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

update versioneer configuration to fix reported readthedocs version #1810

Merged
merged 4 commits into from
Dec 20, 2023

Conversation

stephprince
Copy link
Contributor

Motivation

Fix #1655 . _version.py and setup.cfg versioneer configurations were different so I rebuilt _version.py with versioneer so they would be consistent

  • _version.py was configured to use a tag prefix with the glob pattern *.*.*, but it is not setup to do pattern matching. This led to _version.get_versions() in docs\source\conf.py returning an unknown
  • pep440-pre was the style configuration in _version.py, but the default pep440 was being used by setup.cfg. Not sure which one is best to use. (See - https://github.com/python-versioneer/python-versioneer#styles)

How to test the behavior?

Build docs with make html and look at page title

Checklist

  • Did you update CHANGELOG.md with your changes?
  • Have you checked our Contributing document?
  • Have you ensured the PR clearly describes the problem and the solution?
  • Is your contribution compliant with our coding style? This can be checked running flake8 from the source directory.
  • Have you checked to ensure that there aren't other open Pull Requests for the same change?
  • Have you included the relevant issue number using "Fix #XXX" notation where XXX is the issue number? By including "Fix #XXX" you allow GitHub to close issue #XXX when the PR is merged.

Copy link

codecov bot commented Dec 19, 2023

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (d9a409d) 91.98% compared to head (20494c4) 91.98%.

Additional details and impacted files
@@           Coverage Diff           @@
##              dev    #1810   +/-   ##
=======================================
  Coverage   91.98%   91.98%           
=======================================
  Files          27       27           
  Lines        2620     2620           
  Branches      684      684           
=======================================
  Hits         2410     2410           
  Misses        138      138           
  Partials       72       72           
Flag Coverage Δ
integration 71.18% <ø> (ø)
unit 83.66% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@stephprince stephprince marked this pull request as ready for review December 19, 2023 18:39
@stephprince stephprince requested a review from rly December 19, 2023 18:39
@rly
Copy link
Contributor

rly commented Dec 19, 2023

Thanks for this fix! It looks like it works in the docs generated by the PR. And the unreleased version string in the CI looks fine. (It is different than before -- pynwb-2.5.0.post0.dev14 now whereas before it was pynwb-2.5.0+14.gcfec809e
-- although I could have sworn it was always in the format pynwb-2.5.0.post0.dev14 when I last looked.)

At some point in the future, we will drop versioneer in favor of the hatch versioning system which we use in HDMF and is considerably simpler and more up-to-date with modern practices than versioneer is. (With that, the unreleased version string would be 2.5.0.dev14+34995646f.) In the meantime, your fix will be helpful!

rly
rly previously approved these changes Dec 19, 2023
@rly
Copy link
Contributor

rly commented Dec 19, 2023

Can you add a quick changelog entry?

@stephprince
Copy link
Contributor Author

@rly added!

@stephprince stephprince merged commit ac17d17 into dev Dec 20, 2023
23 of 24 checks passed
@stephprince stephprince deleted the update-versioning-from-VCS branch December 20, 2023 20:00
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.

[Bug]: Report version to readthedocs
2 participants