jensengroup / propka

PROPKA predicts the pKa values of ionizable groups in proteins and protein-ligand complexes based in the 3D structure.
http://propka.org
GNU Lesser General Public License v2.1
256 stars 58 forks source link

Add type annotations and mypy CI job #172

Closed speleo3 closed 9 months ago

speleo3 commented 10 months ago

Static type checking is becoming popular for serious Python projects. This PR adds a substantial amount of type annotations and a static type checking CI job with mypy.

Static type checking reveals lots of potential for cleanup and better design decisions, but this patch deliberately doesn't clean up anything. Cleanup could happen in follow-ups.

codecov[bot] commented 10 months ago

Codecov Report

Attention: 20 lines in your changes are missing coverage. Please review.

Comparison is base (ee89e36) 73.09% compared to head (035b827) 72.98%.

:exclamation: Current head 035b827 differs from pull request most recent head 57d7c67. Consider uploading reports for the commit 57d7c67 to get more accurate results

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #172 +/- ## ========================================== - Coverage 73.09% 72.98% -0.11% ========================================== Files 25 25 Lines 3988 4017 +29 ========================================== + Hits 2915 2932 +17 - Misses 1073 1085 +12 ``` | [Files](https://app.codecov.io/gh/jensengroup/propka/pull/172?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jensengroup) | Coverage Δ | | |---|---|---| | [propka/calculations.py](https://app.codecov.io/gh/jensengroup/propka/pull/172?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jensengroup#diff-cHJvcGthL2NhbGN1bGF0aW9ucy5weQ==) | `100.00% <100.00%> (ø)` | | | [propka/input.py](https://app.codecov.io/gh/jensengroup/propka/pull/172?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jensengroup#diff-cHJvcGthL2lucHV0LnB5) | `98.09% <100.00%> (+0.01%)` | :arrow_up: | | [propka/molecular\_container.py](https://app.codecov.io/gh/jensengroup/propka/pull/172?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jensengroup#diff-cHJvcGthL21vbGVjdWxhcl9jb250YWluZXIucHk=) | `92.85% <100.00%> (+0.33%)` | :arrow_up: | | [propka/bonds.py](https://app.codecov.io/gh/jensengroup/propka/pull/172?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jensengroup#diff-cHJvcGthL2JvbmRzLnB5) | `55.55% <75.00%> (+0.15%)` | :arrow_up: | | [propka/group.py](https://app.codecov.io/gh/jensengroup/propka/pull/172?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jensengroup#diff-cHJvcGthL2dyb3VwLnB5) | `76.96% <96.55%> (-0.02%)` | :arrow_down: | | [propka/vector\_algebra.py](https://app.codecov.io/gh/jensengroup/propka/pull/172?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jensengroup#diff-cHJvcGthL3ZlY3Rvcl9hbGdlYnJhLnB5) | `61.02% <95.45%> (+1.98%)` | :arrow_up: | | [propka/energy.py](https://app.codecov.io/gh/jensengroup/propka/pull/172?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jensengroup#diff-cHJvcGthL2VuZXJneS5weQ==) | `90.33% <83.33%> (-0.66%)` | :arrow_down: | | [propka/atom.py](https://app.codecov.io/gh/jensengroup/propka/pull/172?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jensengroup#diff-cHJvcGthL2F0b20ucHk=) | `74.71% <83.33%> (-2.95%)` | :arrow_down: | | [propka/conformation\_container.py](https://app.codecov.io/gh/jensengroup/propka/pull/172?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jensengroup#diff-cHJvcGthL2NvbmZvcm1hdGlvbl9jb250YWluZXIucHk=) | `83.68% <82.60%> (-1.30%)` | :arrow_down: | | [propka/hydrogens.py](https://app.codecov.io/gh/jensengroup/propka/pull/172?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=jensengroup#diff-cHJvcGthL2h5ZHJvZ2Vucy5weQ==) | `16.48% <66.66%> (+0.72%)` | :arrow_up: |

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