ATOMScience-org / AMPL

The ATOM Modeling PipeLine (AMPL) is an open-source, modular, extensible software pipeline for building and sharing models to advance in silico drug discovery.
MIT License
136 stars 68 forks source link

Adds ruff linter + GitHub Actions CI + Fixes all lint errors #335

Closed Kartstig closed 3 months ago

Kartstig commented 3 months ago

This is a combined effort from the 2024 Atom Hackathon, with contributions from @NihaalChowdary @SaiedaJN @Duah04 @vasavipr ❤️ 🥳 💯

We were able to identify a variety of different errors, some being low-risk and trivial, while others being potential defects in the codebase. This chart describes all the errors we encountered from the latest master branch (805b33292284ddb38a787d28e014c6e0ab419a4c)

image

I am happy to review this in detail with the core team so that we can merge this and make this part of the GH Actions checks, and hopefully prevent future defects in PRs towards the AMPL codebase.

There are many different configurations available for the ruff linter, so if you have any preferences on rule exclusions, we can add those to this PR before merging

Thanks!

TODO

Files which need behavior validation

Kartstig commented 3 months ago

After running unit tests. These failed:

FAILED test_DatasetManager.py::test_DatasetManager_doesnot_needs_smiles - AssertionError: Expecting [[1 1 0 0]
FAILED test_DatasetManager.py::test_DatasetManager_needs_smiles - AssertionError: Expecting [[1 1 0 0]
FAILED test_DatasetManager.py::test_DatasetManager_many_to_one - AssertionError: Expecting [[1 1 1 0]