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

Add release GitHub actions #336

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
Open

Add release GitHub actions #336

wants to merge 10 commits into from

Conversation

klwetstone
Copy link

@klwetstone klwetstone commented Dec 1, 2023

closes #317
closes #389

Add GitHub actions to publish on release

Do not merge - #315 is needed first. After transfer, the repo should automatically have access to the PyPI secrets needed by release.yml

ccds.__version__

Users can now see the version of ccds after importing (ccds.__version__). However, the project name is different than the module name. This means that in version.py, we have to hard code the project name with:

__version__ = importlib_metadata.version("cookiecutter-data-science")

Instead of using:

__version__ = importlib_metadata.version(__name__.split(".", 1)[0])

Using release version as default tag for checkout

Per #389, we wanted a way to allow more stable behavior when someone installs ccds. Currently, any change to the template on the master branch will automatically get propagated when someone runs ccds (unless the person has downloaded the template already and opts to skip that step). As part of this PR, we now default to ccds checking out the tag associated with the installed ccds version.

Users can always get the latest by checking out the master branch (-c master) or updating ccds.

Docs

This PR does not include versioning for docs (eg. with a "Build docs" job). That is tracked separately in #334

Copy link
Member

@jayqi jayqi left a comment

Choose a reason for hiding this comment

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

LGTM

Base automatically changed from v2 to master May 22, 2024 16:53
ccds/__main__.py Outdated Show resolved Hide resolved
@chrisjkuch chrisjkuch marked this pull request as ready for review January 3, 2025 15:50
@chrisjkuch chrisjkuch requested a review from pjbull January 3, 2025 15:50
@jayqi jayqi self-requested a review January 3, 2025 17:38
@chrisjkuch chrisjkuch linked an issue Jan 28, 2025 that may be closed by this pull request
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.

Great! Looking good with one question.

May be nice to also add some instructions on creating a release for maintainers so they know to tag the release in the right way.

# Per #389, set this to the currently released version by default
param_names = [p.name for p in f.params]
checkout_index = param_names.index("checkout")
f.params[checkout_index].default = __version__
Copy link
Member

Choose a reason for hiding this comment

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

It looks like some places (like the release tags), we use vX.Y.Z and others we use X.Y.Z. We should check if we need the v prefix here or not.

@chrisjkuch chrisjkuch assigned chrisjkuch and unassigned pjbull Jan 28, 2025
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.

Release tagging mechanics Add CI for releasing package to PyPI
4 participants