RocketPy-Team / RocketPy

Next generation High-Power Rocketry 6-DOF Trajectory Simulation
https://docs.rocketpy.org/
MIT License
570 stars 137 forks source link

MNT: Refactors the code to adopt pylint #621

Open Gui-FernandesBR opened 2 weeks ago

Gui-FernandesBR commented 2 weeks ago

We are going to officially adopt pylint in this repo.

Github Actions workflows erre updated:

I fixed many pylint errors, but it was a really hard task, quite time consuming. Therefore, I had to use pylint-silent to ignore some errors, those will be solved in the future, one by one.

You don't have to read all the files. Focus on the new github workflow files and the .pylintrc file

Gui-FernandesBR commented 4 days ago

We should add a fallback linter: another linter that is run after pylint to capture eventual errors not captured by the main linter.

I would say that ruff, the "yougest and fastest" player in the market right now, is our best candidate. I will let it for the next PR.

Flake8 would be the more "natural" option.

Maybe we could run flake8 AND also ruff.


@phmbressan I have fixed your comments. Please take in mind that I didnt't care too much about the errors threshold at this first time. I was more worried about getting everything to run.

codecov[bot] commented 4 days ago

Codecov Report

Attention: Patch coverage is 71.18644% with 119 lines in your changes missing coverage. Please review.

Project coverage is 71.99%. Comparing base (5c8e11a) to head (5ed072c). Report is 1 commits behind head on develop.

Files Patch % Lines
rocketpy/prints/environment_prints.py 0.00% 31 Missing :warning:
rocketpy/environment/environment_analysis.py 18.18% 27 Missing :warning:
rocketpy/simulation/flight.py 58.69% 19 Missing :warning:
rocketpy/motors/solid_motor.py 50.00% 7 Missing :warning:
rocketpy/tools.py 28.57% 5 Missing :warning:
rocketpy/prints/aero_surface_prints.py 77.77% 4 Missing :warning:
rocketpy/utilities.py 75.00% 4 Missing :warning:
rocketpy/environment/environment.py 86.95% 3 Missing :warning:
rocketpy/plots/compare/compare.py 40.00% 3 Missing :warning:
rocketpy/plots/rocket_plots.py 50.00% 3 Missing :warning:
... and 10 more
Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #621 +/- ## =========================================== + Coverage 71.86% 71.99% +0.13% =========================================== Files 70 70 Lines 10320 10035 -285 =========================================== - Hits 7416 7225 -191 + Misses 2904 2810 -94 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.