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

Switch from versioneer to setuptools-scm #695

Merged
merged 8 commits into from
Nov 17, 2020

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 marked this pull request as ready for review November 16, 2020 11:19
setup.py Show resolved Hide resolved
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 In progress in Release v0.2.x via automation Nov 17, 2020
@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
Release v0.2.x automation moved this from In progress to Done 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
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
No open projects
Development

Successfully merging this pull request may close these issues.

Switch from versioneer to setuptools-scm
2 participants