Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

move setup.cfg to pyproject.toml #5262

Merged
merged 7 commits into from
Apr 21, 2023
Merged

Conversation

bjlittle
Copy link
Member

@bjlittle bjlittle commented Apr 18, 2023

🚀 Pull Request

Description

This PR migrates the setup.cfg to the pyproject.toml.

For the motivation, see pep621.

Note that,

  • the flake8 configuration now lives in the dedicated .flake8 file. When we migrate to tox, then the .flake8 can then be migrated to the tox.ini - see here. Additionally, the flake8 configuration may be further consolidated if we choose to adopt ruff 😉
  • the PyPI dependencies have not been indirectly migrated into the pyproject.toml. Rather, they are now explicitly defined under the requirements directory in *.txt files. Most devs have fallen foul of updating conda dependencies and forgotten about pypi dependencies, as they were obfuscated within the setup.cfg. Hopefully, banking all our dependencies within the same directory will alleviate this issue
  • this pr is related to automate pypi manifest checking #5259 i.e., the MANIFEST.in requires to be updated to include the requirements/*.txt PyPI dependency files
  • by doing this work, I since discovered mo_pack is not available on PyPI, so it has been removed
  • the optional dependency groups are now dev, docs and test, instead of docs, test and all (which included dev, docs and test via using convenience syntax within the setup.cfg)

Reference:


Consult Iris pull request check list

@codecov
Copy link

codecov bot commented Apr 19, 2023

Codecov Report

Patch and project coverage have no change.

Comparison is base (d58fca7) 89.31% compared to head (19c2826) 89.31%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #5262   +/-   ##
=======================================
  Coverage   89.31%   89.31%           
=======================================
  Files          88       88           
  Lines       22279    22279           
  Branches     5355     5355           
=======================================
  Hits        19898    19898           
  Misses       1635     1635           
  Partials      746      746           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@pp-mo
Copy link
Member

pp-mo commented Apr 19, 2023

by doing this work, I since discovered mo_pack is not available on PyPI, so it has been removed

Possibly a bit worrying, as it is so essential for UM files support.
We need this to be available in the internal SSS environments, so at least requires adjustment of those definitions.

@trexfeathers
Copy link
Contributor

trexfeathers commented Apr 19, 2023

by doing this work, I since discovered mo_pack is not available on PyPI, so it has been removed

Possibly a bit worrying, as it is so essential for UM files support. We need this to be available in the internal SSS environments, so at least requires adjustment of those definitions.

It is available - via Conda

(It's also essential to benchmark file generation)

@bjlittle
Copy link
Member Author

Thanks to @trexfeathers, #5259 has landed, so I'll rebase and refactor the MANIFEST.in 👍

@bjlittle
Copy link
Member Author

bjlittle commented Apr 19, 2023

I'll also check to see if any changes I've made here make any of the dev docs stale wrt updating PyPI deps (which now live under the requirements directory) ...

@bjlittle
Copy link
Member Author

Thanks to @trexfeathers, #5259 has landed, so I'll rebase and refactor the MANIFEST.in +1

Done, see a1bf9e4 and 96b89e1

@bjlittle
Copy link
Member Author

I'll also check to see if any changes I've made here make any of the dev docs stale wrt updating PyPI deps (which now live under the requirements directory) ...

Done i.e., nothing to do in the docs (that I can see)

@trexfeathers trexfeathers self-requested a review April 19, 2023 12:54
MANIFEST.in Outdated Show resolved Hide resolved
requirements/optional-test.txt Outdated Show resolved Hide resolved
requirements/core.txt Outdated Show resolved Hide resolved
requirements/optional-dev.txt Outdated Show resolved Hide resolved
.flake8 Outdated Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
pyproject.toml Show resolved Hide resolved
@pp-mo
Copy link
Member

pp-mo commented Apr 19, 2023

@bjlittle by doing this work, I since discovered mo_pack is not available on PyPI, so it has been removed
@pp-mo Possibly a bit worrying, as it is so essential for UM files support. We need this to be available in the internal SSS environments, so at least requires adjustment of those definitions.

@trexfeathers It is available - via Conda

My point was, if we now have "one true list" of dependencies (for which 👍 🥇!) , will this also remove it from the conda deps ?

@bjlittle
Copy link
Member Author

bjlittle commented Apr 19, 2023

My point was, if we now have "one true list" of dependencies (for which +1 1st_place_medal!) , will this also remove it from the conda deps ?

Yeah, from what I can see the ecosystem isn't quite there yet... well, not that I know of, but I'm certainly not an authority on this stuff.

I may ask around at scipy 2023 and see what the word is 👍

Copy link
Contributor

@trexfeathers trexfeathers left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK this is ready to go, but needs a conflict resolved first.

pyproject.toml Show resolved Hide resolved
@bjlittle
Copy link
Member Author

OK this is ready to go, but needs a conflict resolved first.

On it now...

@bjlittle
Copy link
Member Author

@trexfeathers Hmmmm if only we had auto-merge enabled 😉

Ping @ESadek-MO

@trexfeathers trexfeathers merged commit 949b296 into SciTools:main Apr 21, 2023
19 checks passed
@bjlittle
Copy link
Member Author

@trexfeathers Awesome, cheers 🍻

tkknight added a commit to tkknight/iris that referenced this pull request Apr 22, 2023
* upstream/main:
  Updated environment lockfiles (SciTools#5270)
  Drop python3.8 support (SciTools#5269)
  build wheel from sdist, not src (SciTools#5266)
  Lazy netcdf saves (SciTools#5191)
  move setup.cfg to pyproject.toml (SciTools#5262)
  Support Python 3.11 (SciTools#5226)
  Remove Resolve test workaround (SciTools#5267)
  add missing whatsnew entry (SciTools#5265)
tkknight added a commit to tkknight/iris that referenced this pull request Apr 22, 2023
* upstream/main: (61 commits)
  Updated environment lockfiles (SciTools#5270)
  Drop python3.8 support (SciTools#5269)
  build wheel from sdist, not src (SciTools#5266)
  Lazy netcdf saves (SciTools#5191)
  move setup.cfg to pyproject.toml (SciTools#5262)
  Support Python 3.11 (SciTools#5226)
  Remove Resolve test workaround (SciTools#5267)
  add missing whatsnew entry (SciTools#5265)
  make help (SciTools#5258)
  automate pypi manifest checking (SciTools#5259)
  drop sphinxcontrib-napoleon (SciTools#5263)
  add missing test result data (SciTools#5260)
  fix indentation and remove ref to ssstack (SciTools#5256)
  review actions
  update .git-blame-ignore-revs
  adopt codespell
  Adopt sphinx design (SciTools#5127)
  Bump scitools/workflows from 2023.04.2 to 2023.04.3 (SciTools#5253)
  refresh manual pypi publish instructions (SciTools#5252)
  Updated environment lockfiles (SciTools#5250)
  ...
@bjlittle bjlittle deleted the pep621 branch May 2, 2023 10:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants