-
Notifications
You must be signed in to change notification settings - Fork 74
🔧 MAINTAIN: Switch to declarative metadata #139
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
🔧 MAINTAIN: Switch to declarative metadata #139
Conversation
Codecov Report
@@ Coverage Diff @@
## master #139 +/- ##
=======================================
Coverage 96.32% 96.32%
=======================================
Files 72 72
Lines 3266 3266
=======================================
Hits 3146 3146
Misses 120 120
Flags with carried forward coverage won't be shown. Click here to find out more. Continue to review full report at Codecov.
|
rather than installing setuptools, should it be defined in a pyproject.toml, e.g. https://github.com/aiidateam/aiida-core/blob/623d0d8b8b3f11e4f25a0d7d60061dccdba7150a/pyproject.toml#L1 this is the thing I don't like about this "new" setuptools system; you have to replace the single |
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.
see comment
So firstly, setuptools was already installed. The change made here merely updates it similar to what we do with Adding a pyproject.toml (thus activating PEP 517 build) and restricting setuptools version there would work as well yeah. This comes with the downside that we get yet another file as you mentioned 🤦 😄
Yeah its pretty annoying right now. With PEP 621 accepted I guess setuptools will soon support metadata in pyproject.toml but we're not there yet. Meanwhile we have a few options:
|
Oh definitely sticking with setuptools, for editable install support, and because it is more well known for other contributors to work with. |
👍
The other two tools have editable installs, so its not that bad, just not via
Added the pyproject.toml |
d5949fa
to
ff2699c
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.
Both mypy and flake8 configuration can be moved to setup.cfg
, which might be desirable to reduce the number of files:
@@ -1,73 +1,3 @@ | |||
# from importlib import import_module |
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.
add a comment that this is required only for editable builds
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.
added
ff2699c
to
7efdae9
Compare
Moved mypy and flake8 conf to setup.cfg |
I was testing out some tooling (setup-py-upgrade and setup-cfg-fmt) and came up with this auto-generated PR.
Declarative metadata has some advantages:
get_version
function.Maybe we want to keep metadata in
setup.py
for consistency with other projects though?I kept a dummy
setup.py
as pip doesn't yet support editable installs for projects without one.