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

MAINT: Use setuptools_scm to manage versioning #83

Merged
merged 1 commit into from
Mar 27, 2020

Conversation

oesteban
Copy link
Collaborator

Summary

Pilots whether we can abandon versioneer in all projects, as
setuptools_scm has minimal boilerplate.

Changes

The setuptools_scm module is added to the pyproject.toml file,
as recommended in the documentation.
A tiny hack is added to the root __init__.py file, so that
the version is read from nitransforms/_version.py when that
file exists or it is interpolated via setuptools_scm.get_version.

To make the version traverse into container images, before building,
python setup.py --version must be invoked first (and it will create
the nitransforms/_version.py file.

nitransforms/_version.py has been added to .gitignore to avoid
adding it by mistake.

Finally, the CircleCI workflow is also modified, so that the packaging
is always tested and installed versions are checked both for python
packages and docker distributions.

Resolves: #82

@pull-assistant
Copy link

pull-assistant bot commented Mar 26, 2020

Score: 1.00

Best reviewed: commit by commit


Optimal code review plan

     chore: Use setuptools_scm to manage versioning

Powered by Pull Assistant. Last update 2670b12 ... 2670b12. Read the comment docs.

@oesteban oesteban force-pushed the maint/versioneer branch 5 times, most recently from c90871e to 50c830c Compare March 27, 2020 00:21
@codecov-io
Copy link

codecov-io commented Mar 27, 2020

Codecov Report

Merging #83 into master will decrease coverage by 0.74%.
The diff coverage is 27.27%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #83      +/-   ##
=========================================
- Coverage   98.95%   98.2%   -0.75%     
=========================================
  Files          12      12              
  Lines        1050    1059       +9     
  Branches      135     135              
=========================================
+ Hits         1039    1040       +1     
- Misses          6      14       +8     
  Partials        5       5
Flag Coverage Δ
#unittests 98.2% <27.27%> (-0.75%) ⬇️
Impacted Files Coverage Δ
nitransforms/__init__.py 42.85% <27.27%> (-57.15%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1ed36d0...2670b12. Read the comment docs.

@oesteban oesteban force-pushed the maint/versioneer branch 3 times, most recently from 35b5e1a to da123ab Compare March 27, 2020 06:48
Summary
-------
Pilots whether we can abandon versioneer in all projects, as
setuptools_scm has minimal boilerplate.

Changes
-------
The setuptools_scm module is added to the pyproject.toml file,
as recommended in the documentation.
A tiny hack is added to the root ``__init__.py`` file, so that
the version is read from ``nitransforms/_version.py`` when that
file exists or it is interpolated via ``setuptools_scm.get_version``.

To make the version traverse into container images, before building,
``python setup.py --version`` must be invoked first (and it will create
the ``nitransforms/_version.py`` file.

``nitransforms/_version.py`` has been added to ``.gitignore`` to avoid
adding it by mistake.

Finally, the CircleCI workflow is also modified, so that the packaging
is always tested and installed versions are checked both for python
packages and docker distributions.

Resolves: nipy#82
@oesteban oesteban merged commit c8fc385 into nipy:master Mar 27, 2020
@oesteban oesteban deleted the maint/versioneer branch March 27, 2020 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Maintain versioning of the package (required for deployment)
2 participants