Refactoring alerts.py and alerts_test.py #153
Locked
ferozsalam
started this conversation in
Ideas
Replies: 2 comments 4 replies
-
It means that it is divided for each alert like opsgenie.py and zabbix.py. The image is that each alert class is in a separate file, and alerts.py retains the base class of alerter. So declare "from .alerts import Alerter" at the beginning of each alert file. It's just a plan, so it's not absolutely necessary, but I think it should be decided first. alerts.py
jira.py
File split as below
loaders.py add
modify before
after
|
Beta Was this translation helpful? Give feedback.
0 replies
-
I agree, and am onboard with the idea! |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello!
I'd like to start working on refactoring
alerts.py
andalerts_test.py
. Both files are several thousand lines long, with code classes that are unrelated to each other. I think - as a start - that it would be a good foundation for future work if each alerter (and its test class) had their own file.I'm happy to do this work myself, but before I start I am looking for feedback, in particular from @jertel and @nsano-rururu, about any reasons why this shouldn't be done, or anything I will have to consider before doing the work.
If done correctly, this shouldn't be a breaking change in any way. I will also take the opportunity to make minor style/clarity improvements where it's clear that it won't affect functionality.
Beta Was this translation helpful? Give feedback.
All reactions