Closed JensRoland closed 4 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.
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:
Print()
statements have been replaced withlogger.info()
,logger.warning()
orlogger.error()
open(path, "r")
is replaced withopen(path)
since"r"
is the default["tests", "evaluations", "notebooks"]
are excluded since it made less sense to enforce linting rules there