-
Notifications
You must be signed in to change notification settings - Fork 1
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
Linter updates #684
Linter updates #684
Conversation
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #684 +/- ##
==========================================
+ Coverage 82.16% 82.18% +0.01%
==========================================
Files 42 42
Lines 6191 6196 +5
==========================================
+ Hits 5087 5092 +5
Misses 1104 1104 ☔ View full report in Codecov by Sentry. |
I "fixed" all of the issues reported by the CI, with the exception of |
I've fixed the remaining one (the numpy.unravel_index can return a tuble of any length, but we definitely expect only two values here). Merged also #714 into main / this branch to solve the corsika_parameter_file complain. Pylint is running through without any complaints now, very good!! (look for the super-linter complain now) |
The linter works, see e.g., https://github.com/gammasim/simtools/actions/runs/7125191095/job/19400677771 |
@orelgueta , @VictorBarbosaMartins - this pull request is now ready for final review. Please have a look and let me know when it is ready to merge. Have a look at the 'checks' panel, super-linter nicely lists all the linters. Lot's of trivial changes, but some important ones. Very nice. |
In the output there are some errors, but I think they were corrected by the linter?
|
Yes - this is the example to show you that it works and that the linter picks up errors. |
I reviewed this issue yesterday and do not have any complaints. So from my point of view, it can be merged. |
I was wondering if there is a way to correct the line breaks of the doc string as well. I see line breaks in some places that are way below the limit. And sometimes line are broken with "" in the docstring, but most of the time not. (not too important I guess) |
Examples? |
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.
Ok, I am approving with some more comments to consider. Thank you for these changes, it will facilitate a lot our work and maintain the quality of the code.
Too early break: simtools/simtools/psf_analysis.py Lines 26 to 28 in 44cbe1f
|
Breaking with a slash: simtools/simtools/model/camera.py Lines 26 to 36 in 44cbe1f
|
I don't think we have a strict rule with the line breaks, but I don't think we need to fix it. Both ways are probably fine. |
Signed-off-by: Victor Barbosa Martins <[email protected]>
Thanks! I think we can merge after the tests pass! |
This add linters to the CI with the goal of linting every single file type in simtools:
Most of it is achieved by using the super-lint github action.
Missing files not covered by linters:
For pylint, I've removed the 500 lines of default configuration which we had in pyproject.toml. I think we should list only the non-default values (otherwise readability will be hard).
Note that the extensive linting results in a run time of 10-12 min of this workflow.