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

pyproject.toml for builds, using setuptools_scm for versioning #37

Merged
merged 8 commits into from
Jan 30, 2024

Conversation

markcampanelli
Copy link
Contributor

@markcampanelli markcampanelli commented Jan 10, 2024

Closes #36

setuptools conversion reference: https://setuptools.pypa.io/en/latest/userguide/pyproject_config.html

Refactor Notes

  • Consolidates requirements.txt and many other config files into a single, standard, setuptools-based pyproject.toml.
  • Replaces versioneer with setuptools_scm. Versions look similar to 0.1.dev506+g40c6f19.d20240110 when there are changes since last tag (e.g., while developing). Checking out a proper tag should produce the expected version string, so do this before building a distribution or documentation for release.
  • pytest-runner is deprecated and was removed entirely, apparently without hurting anything.
  • The test alias to pytest was dropped.
  • I verified that the data files are being packaged, and pyproject.toml includes datafiles it finds by default, unlike older setup.py.
  • Rebuilt the documentation with version added to upper left corner of main html page for documentation. (Not sure why a bunch of whitespace was added to several rst files.)
  • Updated READMEs. Running locally with conda now exclusively suggests installing pvdeg using pip.

Release Notes

A project maintainer should try to upload this project to the test PyPI server to verify that resulting page looks ok (esp. parity with existing). I recommend using build to build the package tarball and wheel, e.g., python -m build . The resulting package should be universal. Usually, this is done after tagging, and, with the tag checked out, the dist artifacts will automatically pick up the version from git.

@markcampanelli markcampanelli changed the title pyproject.toml for builds, using setuptools_scm for versioning #36 pyproject.toml for builds, using setuptools_scm for versioning Jan 10, 2024
@markcampanelli markcampanelli marked this pull request as ready for review January 11, 2024 03:24
@markcampanelli
Copy link
Contributor Author

@martin-springer Ready for review.

Copy link
Collaborator

@martin-springer martin-springer left a comment

Choose a reason for hiding this comment

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

@markcampanelli - That's looking great! Thank you for putting it together. I'll go ahead and merge it into our repo and then update pip with a new release tag.

@martin-springer martin-springer merged commit 07d3994 into NREL:main Jan 30, 2024
3 checks passed
@markcampanelli
Copy link
Contributor Author

Kewl. Glad this was found useful!

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.

pyproject.toml for builds, using setuptools_scm for versioning
2 participants