kjappelbaum / oximachine_featurizer

featurizing MOFs for the oximachine
MIT License
7 stars 4 forks source link

Update packaging #48

Closed mpougin closed 1 year ago

mpougin commented 1 year ago

@kjappelbaum these are some changes I made to make the package installable in my Python 3.10 environment and play nice with pymatgen==2023.7.20 (not sure what the supported range is, but it's above v2022.0.0 due to the changed import statements). However, I think we can just leave the pymatgen specification to other dependencies, see below.

I've mainly updated the package to use pyproject.toml, condensing a lot of files into one place. I've also updated the requirements since:

  1. The pymatgen dependency was duplicated.
  2. matminer already has pandas, scikit_learn and pymatgen as dependencies.

I've also adapted the tests so the ones that rely on the CSD Python API are skipped in case the package is not installed.

mpougin commented 1 year ago

Added a tox configuration, and locally the install/tests seem to run fine for Python 3.8-3.11:

 py38: OK (8.65=setup[1.58]+cmd[7.07] seconds)
  py39: OK (8.41=setup[1.43]+cmd[6.98] seconds)
  py310: OK (8.56=setup[1.37]+cmd[7.18] seconds)
  py311: OK (8.06=setup[1.37]+cmd[6.69] seconds)
  congratulations :) (33.72 seconds)

It failed to install for Python 3.7 since several dependencies down the line required Python>=3.8, so I've adapted our required Python version and removed the classifier.

kjappelbaum commented 1 year ago

Thank you! 🔥 💯 👍🏽

codecov-commenter commented 1 year ago

Codecov Report

Patch coverage: 50.00% and project coverage change: -1.62% :warning:

Comparison is base (1bbfe9d) 42.25% compared to head (627ddb4) 40.63%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #48 +/- ## ========================================== - Coverage 42.25% 40.63% -1.62% ========================================== Files 7 6 -1 Lines 942 662 -280 ========================================== - Hits 398 269 -129 + Misses 544 393 -151 ``` | [Flag](https://app.codecov.io/gh/kjappelbaum/oximachine_featurizer/pull/48/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kevin+Jablonka) | Coverage Δ | | |---|---|---| | [unittests](https://app.codecov.io/gh/kjappelbaum/oximachine_featurizer/pull/48/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kevin+Jablonka) | `40.63% <50.00%> (-1.62%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kevin+Jablonka#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files Changed](https://app.codecov.io/gh/kjappelbaum/oximachine_featurizer/pull/48?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kevin+Jablonka) | Coverage Δ | | |---|---|---| | [oximachine\_featurizer/parse.py](https://app.codecov.io/gh/kjappelbaum/oximachine_featurizer/pull/48?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kevin+Jablonka#diff-b3hpbWFjaGluZV9mZWF0dXJpemVyL3BhcnNlLnB5) | `0.00% <0.00%> (ø)` | | | [oximachine\_featurizer/utils.py](https://app.codecov.io/gh/kjappelbaum/oximachine_featurizer/pull/48?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kevin+Jablonka#diff-b3hpbWFjaGluZV9mZWF0dXJpemVyL3V0aWxzLnB5) | `24.26% <0.00%> (-0.74%)` | :arrow_down: | | [oximachine\_featurizer/featurize.py](https://app.codecov.io/gh/kjappelbaum/oximachine_featurizer/pull/48?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kevin+Jablonka#diff-b3hpbWFjaGluZV9mZWF0dXJpemVyL2ZlYXR1cml6ZS5weQ==) | `46.42% <50.00%> (-0.35%)` | :arrow_down: | | [oximachine\_featurizer/\_\_init\_\_.py](https://app.codecov.io/gh/kjappelbaum/oximachine_featurizer/pull/48?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kevin+Jablonka#diff-b3hpbWFjaGluZV9mZWF0dXJpemVyL19faW5pdF9fLnB5) | `100.00% <100.00%> (ø)` | | | [oximachine\_featurizer/featurizer\_local\_property.py](https://app.codecov.io/gh/kjappelbaum/oximachine_featurizer/pull/48?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Kevin+Jablonka#diff-b3hpbWFjaGluZV9mZWF0dXJpemVyL2ZlYXR1cml6ZXJfbG9jYWxfcHJvcGVydHkucHk=) | `90.24% <100.00%> (ø)` | |

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

mpougin commented 1 year ago

thanks for the fast review @kjappelbaum