-
Notifications
You must be signed in to change notification settings - Fork 39
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
Use pyproject.toml instead of setup.py/setup.cfg #2540
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2540 +/- ##
==========================================
- Coverage 95.01% 94.77% -0.25%
==========================================
Files 251 251
Lines 14268 14266 -2
==========================================
- Hits 13557 13520 -37
- Misses 711 746 +35 ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
absolutely YES for this 🍺
f25c4f1
to
8e922f6
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks Bouwe, I really like this! 🚀
There's one more suggestion at https://learn.scientific-python.org/development/guides/repo-review/?repo=esmvalgroup%2Fesmvalcore&branch=pyproject-toml about pyproject:
[PP309](https://learn.scientific-python.org/development/guides/pytest#PP309): Filter warnings specified
filterwarnings must be set (probably to at least ["error"]). Python will hide important warnings otherwise, like deprecations.
[tool.pytest.ini_options]
filterwarnings = ["error"]
Would it make sense to implement this as well?
I tried, but it causes the tests to fail because some of our dependencies are using deprecated features. It would be good to enable that though, but it will require extra work. |
edb1291
to
8b37c2d
Compare
Created #2555 as a reminder. |
e70ffd2
to
1a7c867
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great, thanks Bouwe!!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
very cool! A few remoarks from me only, but I think we now need to add importlib_metadata
to our deps if we use it directly
PS: will remove the three bits in the Github Action, just need to see those slow OSX tests pass first just the call to run GA, Mambaforge can bite the dust via here, am just about to open a PR to remove it from the other tests too |
Can you point me to a line of code where it is used? I couldn't find any. |
nevermind, it was |
soz, conflict - want me to fix it? 🍺 |
No thanks, I'm on it. |
superb @bouweandela 🥳 |
Description
Use pyproject.toml instead of setup.py/setup.cfg, as this is the modern way of doing things.
Also added some improvements suggested by https://learn.scientific-python.org/development/guides/repo-review/?repo=esmvalgroup%2Fesmvalcore&branch=pyproject-toml
Link to documentation: https://esmvaltool--2540.org.readthedocs.build/projects/ESMValCore/en/2540/contributing.html
Related to ESMValGroup/ESMValTool#3584
Before you get started
Checklist
It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.
To help with the number pull requests: