-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: add ODR monitoring module #34
Feature: add ODR monitoring module #34
Conversation
1e4211b
to
4c86dd6
Compare
I've just noticed that there is another logger method in api module, so I might have misinterpreted the first criterion. @fearnworks was the intention to replace all project logging with this central monitoring module as a part of this change? |
4c86dd6
to
c5bb1bc
Compare
As far as coverage I don't think we are setting minimum coverage, just that we can prove out the critical path for now. Irt second comment : Replacing all of the logging isn't required for this feature since that could spiral out of hand. As long as the logs are available to be used in the other components. |
I get this error when running _________________________________________________________________________________________________________________________________________________________________________________________________________________________ TestODRLogger.test_logger_creation __________________________________________________________________________________________________________________________________________________________________________________________________________________________
self = <tests.test_logger.TestODRLogger testMethod=test_logger_creation>
def tearDown(self):
if os.path.exists(self.log_file):
> os.remove(self.log_file)
E PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'logs/odr_monitoring.log'
tests\test_logger.py:46: PermissionError
=============================================================================================================================================================================================================================== short test summary info ===============================================================================================================================================================================================================================
FAILED tests/test_logger.py::TestODRLogger::test_log_format - PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'logs/odr_monitoring.log'
FAILED tests/test_logger.py::TestODRLogger::test_log_levels - PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'logs/odr_monitoring.log'
FAILED tests/test_logger.py::TestODRLogger::test_logger_creation - PermissionError: [WinError 32] The process cannot access the file because it is being used by another process: 'logs/odr_monitoring.log'
================================================================================================================================================================================================================================== 3 failed in 0.17s ==================================================================================================================================================================================================================================
task: Failed to run task "monitoring:test": exit status 1 Test outputs look good! Just likely need to make sure the file is released before teardown |
Good catch, I think you're right, we just need to release the file before teardown, I'll push a fix 👍 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks solid. Very minor update request for the module imports
version: "3" | ||
|
||
tasks: | ||
default: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is nice. Making a mental note to propogate to the other task files
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah its a cool pattern I've adopted recently, I think it just gets rid of the error upon running task
modules/odr_monitoring/odr_monitoring/handlers/console_handler.py
Outdated
Show resolved
Hide resolved
Signed-off-by: Robert Cronin <[email protected]>
c5bb1bc
to
a017ae8
Compare
@fearnworks latest change should fix the PR comments, don't hesitate to add more if needed, thanks! |
LGTM. Tests pass. Output looks solid. Nice work! Merging |
Hey @robert-cronin - shoot us a note on discord! |
Fixes #13
I believe I covered all the bases here, but if I've missed anything please don't hesitate to suggest improvements or fixes!
[x] odr_monitoring module is created and integrated into the project structure
[x] Logging system is implemented and configurable
[x] Other modules can easily use the logging functionality
[x] Basic error and info logging are functional
[x] Configuration options for logging are available and documented
[x] Placeholder for future performance monitoring is in place
[x] Tests are written and passing
[x] Documentation for usage and configuration is available
As for testing, I'm not sure if there has been any agreement for min coverage for new features? I am getting 87% but I can strengthen if need be!
Thank you in advance for your review!