Skip to content

Switch from versioneer to setuptools-scm#695

Merged
weiji14 merged 8 commits intomasterfrom
versioneer_to_setuptools_scm
Nov 17, 2020
Merged

Switch from versioneer to setuptools-scm#695
weiji14 merged 8 commits intomasterfrom
versioneer_to_setuptools_scm

Conversation

@weiji14
Copy link
Member

@weiji14 weiji14 commented Nov 16, 2020

Description of proposed changes

Replace versioneer added in 3683f37 with the more modern setuptools-scm.

This PR mostly follows psf/black#1008, and fatiando/boule#61:

  • Remove all instances of versioneer and pygmt/_version.py. There is a _version.py file at the top-level which is git-ignored that contains a single line like __version__ = "0.2.2.dev3+g355d85f1"
  • Update our Github Actions workflows that mentioned versioneer

What this PR doesn't do:

Fixes #671

Reminders

  • Run make format and make check to make sure the code follows the style guide.
  • Add tests for new features or tests that would have caught the bug that you're fixing.
  • Add new public functions/methods/classes to doc/api/index.rst.
  • Write detailed docstrings for all functions/methods.
  • If adding new functionality, add an example to docstrings or tutorials.

Notes

  • You can write /format in the first line of a comment to lint the code automatically

Replace versioneer added in 3683f37 with the more modern [setuptools-scm](https://github.com/pypa/setuptools_scm).
@weiji14 weiji14 added the maintenance Boring but important stuff for the core devs label Nov 16, 2020
@weiji14 weiji14 force-pushed the versioneer_to_setuptools_scm branch from a8ff2ff to 83a0c49 Compare November 16, 2020 11:02
@weiji14 weiji14 marked this pull request as ready for review November 16, 2020 11:19
setup.py Outdated
SETUP_REQUIRES = ["setuptools_scm"]
USE_SCM_VERSION = {
"local_scheme": "node-and-date",
"write_to": "_version.py",
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder if writing to a _version.py file is actually needed here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

https://github.com/fatiando/boule doesn't write the file.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I'll remove this line then (and don't add _version.py to .gitignore too).

@seisman seisman added this to the 0.2.2 milestone Nov 17, 2020
Copy link
Member

@seisman seisman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@weiji14 weiji14 merged commit cfab529 into master Nov 17, 2020
@weiji14 weiji14 deleted the versioneer_to_setuptools_scm branch November 17, 2020 03:05
@seisman seisman modified the milestones: 0.2.2, 0.3.0 Nov 21, 2020
seisman added a commit to GenericMappingTools/sphinx_gmt that referenced this pull request Apr 19, 2022
seisman added a commit to GenericMappingTools/sphinx_gmt that referenced this pull request Apr 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

maintenance Boring but important stuff for the core devs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Switch from versioneer to setuptools-scm

2 participants