aorwall / moatless-tools

MIT License
216 stars 20 forks source link

Refactor: Added Ruff and linted the codebase #22

Closed JensRoland closed 2 months ago

JensRoland commented 2 months ago

Added Ruff to the project with a config of some common linter rules.

This is done in preparation for automated precommit and CI linting, which should make it easier to maintain the code without regressions, especially once more contributors join.

Ruff was selected because it is lightning fast -- meaning it can be configured to run automatically on commit / pre-push without slowing you down.

Linted the codebase, then verified that the notebook still works. I would have verified using the unit tests, but it seems the tests on main are currently failing (see https://github.com/aorwall/moatless-tools/issues/21 ).

Notably:

aorwall commented 2 months ago

Looks good to me. And I agree with what needs to be linted. About the tests I answered in #21. Need to do more work to improve code coverage. The best ROI right now is probably to get the replay trajectory functionality working since that will at least give us regression testing of trajectories we know are correct.