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

Generate version string on _version.py on build #237

Merged
merged 4 commits into from
Sep 13, 2021
Merged

Generate version string on _version.py on build #237

merged 4 commits into from
Sep 13, 2021

Conversation

santisoler
Copy link
Member

Move setuptools-scm to requirements-dev.txt. Automatically create
the version string on build and store it in harmonica/_version.py.
Remove the need to run pgk_resources to get the version number. Invert
MANIFEST.in by specifying what should be ignored because setuptools-scm
includes everything by default.

Related to fatiando/maintenance#4

Inspired on fatiando/pooch#235

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 and the base __init__.py file for the package.
  • Write detailed docstrings for all functions/classes/methods. It often helps to design better code if you write the docstrings first.
  • If adding new functionality, add an example to the docstring, gallery, and/or tutorials.
  • Add your full name, affiliation, and ORCID (optional) to the AUTHORS.md file (if you haven't already) in case you'd like to be listed as an author on the Zenodo archive of the next release.

Move the setuptools-scm to a requirements-dev.txt. Automatically create
the version string on build and store it in harmonica/_version.py.
Remove the need to run pgk_resources to get the version number. Invert
MANIFEST.in by specifying what should be ignored because setuptools-scm
includes everything by default.
@santisoler santisoler requested a review from leouieda May 14, 2021 16:59
@santisoler
Copy link
Member Author

@leouieda We are still using pkg_resources on datasets/sample_data.py to load the registry file. Should we leave that as it is or we would like to change that too?

@leouieda
Copy link
Member

@santisoler we would still need it for the registry so leave it as is. I'm leaning towards defining the registry as a Python dict in the module instead of the external file. It's no harder to do and easier to maintain since there is no messing with setup.py and MANIFEST.in.

Copy link
Member

@leouieda leouieda left a comment

Choose a reason for hiding this comment

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

👍🏽 now we just pray that this doesn't break everything. Would be good to download and inspect the test PyPI package after this is merged.

@santisoler santisoler merged commit 37b9bd8 into master Sep 13, 2021
@santisoler santisoler deleted the version branch September 13, 2021 14:46
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.

None yet

2 participants