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. |
valeriupredoi
left a comment
There was a problem hiding this comment.
absolutely YES for this 🍺
f25c4f1 to
8e922f6
Compare
schlunma
left a comment
There was a problem hiding this comment.
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
valeriupredoi
left a comment
There was a problem hiding this comment.
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: