Skip to content

Fix pre-prompt ccds version error#426

Merged
chrisjkuch merged 3 commits intomasterfrom
425-version-bugfix
Feb 26, 2025
Merged

Fix pre-prompt ccds version error#426
chrisjkuch merged 3 commits intomasterfrom
425-version-bugfix

Conversation

@chrisjkuch
Copy link
Contributor

@chrisjkuch chrisjkuch commented Feb 17, 2025

This fixes an issue introduced in #336 (hotfixed in #427 ) that added a pre-prompt hook to warn about the newly introduced versioning system.

However, the pre-prompt script was unable to access certain module-level imports from the ccds package. (I'm still trying to figure out / think about why that's the case) I think this is because we simultaneously changed the versioning structure and mechanism in #336 by adding a version.py that computed the package version, and people with the old version of ccds installed were looking for the version of ccds in a module that didn't exist in their version of the package.

Migrating version extraction from a separate version.py module into __init__.py seems to fix this, since the version can be determined directly by importlib without needing separate imports from the ccds module.

@chrisjkuch chrisjkuch added this to the v2.0.1 milestone Feb 18, 2025
Copy link
Member

@pjbull pjbull left a comment

Choose a reason for hiding this comment

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

Change looks reasonable. How did you manually test different configs?

Copy link
Contributor

@r-b-g-b r-b-g-b left a comment

Choose a reason for hiding this comment

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

🎉

@jayqi
Copy link
Member

jayqi commented Feb 25, 2025

@chrisjkuch is this good to go?

@chrisjkuch
Copy link
Contributor Author

@jayqi yes, but want to do concurrently with #420 so there's a released 2.0.1 to upgrade to. The only blocker there is resolving #416.

@jayqi
Copy link
Member

jayqi commented Feb 26, 2025

@chrisjkuch is #416 really a blocker? It seems like (1) neither you nor I can reproduce it, and (2) if is is actually a problem, it's an unrelated specific bug that we could fix separately.

@chrisjkuch
Copy link
Contributor Author

Agreed, we can push #416 / handle separately. If @pjbull is onboard, we can merge and then update to / release 2.0.1!

@pjbull
Copy link
Member

pjbull commented Feb 26, 2025

Yeah, let's do it! ✨

@chrisjkuch chrisjkuch merged commit 48aa5ab into master Feb 26, 2025
16 checks passed
@chrisjkuch chrisjkuch deleted the 425-version-bugfix branch February 26, 2025 16:44
proinsias added a commit to proinsias/cookiecutter-data-science-proinsias that referenced this pull request Nov 3, 2025
* upstream/master: (24 commits)
  Add poetry as an env manager (drivendataorg#460)
  Support pixi as environment manager (drivendataorg#459)
  Docs: Add guidelines for contributing and requesting tools (drivendataorg#456)
  Fix terminal animation generation in docs build (drivendataorg#451)
  Fix failing pipenv installation on Windows GH actions runners (drivendataorg#453)
  Fix typo in using-the-template.md (drivendataorg#448)
  Bump to v2.2.0 [skip ci]
  Update HISTORY.md [skip ci]
  Add option for tests (drivendataorg#447)
  Resolve python version to work with compatible operator (drivendataorg#446)
  Add pyproject.toml as a dependencies file option (drivendataorg#436)
  Make PyPI badges links to PyPI (drivendataorg#440)
  Update to version v2.1.0 (drivendataorg#438)
  Add back isort configuration that was removed in drivendataorg#387 (drivendataorg#439)
  add badges to readme and docs homepage (drivendataorg#434)
  Added support for the uv package and project manager (drivendataorg#408)
  Add ruff as default linting + formatting option (drivendataorg#387)
  Add PyTest IDs for better readability and filtering (drivendataorg#409)
  prepare for 2.0.1 release by bumping version in pyproject.toml and updating change log (drivendataorg#422)
  Fix pre-prompt ccds version error (drivendataorg#426)
  ...
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.

4 participants