Eventually deprecate setup.cfg
, setup.py
and move to pyproject.toml
#70
Labels
Milestone
setup.cfg
, setup.py
and move to pyproject.toml
#70
Is your feature request related to a problem? Please describe.
I'm always frustrated when preparing a new release, as i have to edit the project metadata in three different files.
For example, for minor version bumps or patches i have to edit:
gitlab2prov.__version__
module attribute contained ingitlab2prov/__init__.py
CITATION.cff
setup.cfg
Considering the DRY principle, this seems far from ideal.
I would like to reduce the number of files that hold the same information. Ideally i'd only want to edit a single file when preparing a release. Considering the tooling behind CITATION.cff doesn't allow to source metadata dynamically, a single file won't be achievable, though we can reduce the amount of files with duplicate information.
Describe the solution you'd like
In PEP 621 the python community chose to store project metadata in the
pyproject.toml
file. Our current build backendsetuptools
supports PEP 621 and is able to source the build metadata from it.Proposal
setup.py
andsetup.cfg
pyproject.toml
,CITATION.cff
gitlab2prov.__version__
be the single ground truth for the package version number (Not achievable yet,CITATION.cff
has to be edited aswell)pyproject.toml
supports dynamic metadata such as reading the version number from a module attribute, which allows us to read the package version fromgitlab2prov.__version__
.gitlab2prov.__version__
has to hold the version number, since the cli option--version
has to correctly display the current version number and we can't read the version number from metadata files outside of the package scope.This would leave us with two files that we have to edit for each release:
CITATION.cff
, since it does not allow us to source metadata dynamicallygitlab2prov/__init__.py
, to edit the module attributegitlab2prov.__version__
One file less than before and hopefully the future allows us to reduce the amount of duplicated metadata even further, see citation-file-format/citation-file-format#374 (comment).
Additional context
The text was updated successfully, but these errors were encountered: