-
Notifications
You must be signed in to change notification settings - Fork 69
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
Improvements/python linter harness #751
Improvements/python linter harness #751
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## release/111 #751 +/- ##
===============================================
- Coverage 60.50% 60.48% -0.02%
===============================================
Files 195 195
Lines 22309 22309
Branches 3601 3601
===============================================
- Hits 13497 13494 -3
- Misses 7609 7610 +1
- Partials 1203 1205 +2 ☔ View full report in Codecov by Sentry. |
Checked files, skipped files were introduced in November 2023 and released 3 weeks ago in the version |
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.
Thanks for this @thiagogenez, I do find it easier to see what's going on now that it's broken up into functions.
I've made a suggestion to tweak the run_mypy
function with the hope of simplifying it further.
Co-authored-by: twalsh-ebi <[email protected]>
Co-authored-by: twalsh-ebi <[email protected]>
…tch to optimize performance, Co-authored-by: twalsh-ebi <[email protected]>
Co-authored-by: twalsh-ebi <[email protected]>
Description
Refinement of the script involves encapsulating functionality within functions, refining the logic for determining success or failure based on
pylint
andmypy
results, and enhancing the approach to returning results from these functions. The changes make the codebase more streamlined, modular, and maintainable.Overview of changes
run_pylint
andrun_mypy
to encapsulate respective functionalities, providing a structured, modular approach.Change 1: Function Encapsulation
pylint
andmypy
without function encapsulation.pylint
andmypy
executions withinrun_pylint
andrun_mypy
functions for better modularity and readability.Change 2: Refined Exit Strategy
pylint
andmypy
results.Change 3: Declaring
PYTHON_SOURCE_LOCATIONS
Before UsePYTHON_SOURCE_LOCATIONS
variable was declared but not strategically placed for optimal use.PYTHON_SOURCE_LOCATIONS
above its first use, ensuring the variable is defined ahead of time and adhering to best practices for variable declaration and scope.Change 4: Enhanced
pylint
Call with--msg-template
pylint
was called without specifying a message template.--msg-template='{path}:{line}:{column}: {msg_id}: {msg} ({symbol})'
in thepylint
call to format output messages explicitly, making subsequent grepping for errors more straightforward.Change 5: Direct Grepping for Errors
grep -v
to exclude non-error messages and lines.grep -E
, focusing on capturing lines that match the error message format. This approach is more efficient and reduces complexity by avoiding multiple filtering steps.For code reviewers: code review SOP