Skip to main content

Jupyter Releaser for Python and/or npm packages.

Project description

Jupyter Releaser

Jupyter Releaser contains a set of helper scripts and GitHub Actions to aid in automated releases of Python and npm packages.

Installation

To install the latest release locally, make sure you have pip installed and run:

    pip install git+https://github.com/jupyter-server/jupyter-releaser

Library Usage

    jupyter-releaser --help
    jupyter-releaser build-python --help
    jupyter-releaser check-links --help

Checklist for Adoption

See the adoption docs.

Workflows

Detailed workflows are available to draft a changelog, draft a release, publish a release, and check a release.

Draft ChangeLog Workflow

  • Manual Github workflow
    • Inputs are the target repo, branch, and the version spec
  • Bumps the version
    • By default, uses tbump or bump2version to bump the version based on presence of config files
      • We recommend tbump instead of bump2version for most cases because it does not handle patch releases well when using prereleases.
  • Prepares the environment
    • Sets up git config and branch
  • Generates a changelog (using github-activity) using the PRs since the last tag on this branch.
    • Gets the current version and then does a git checkout to clear state
    • Adds a new version entry using a HTML comment markers in the changelog file
    • Optionally resolves meeseeks backport PRs to their original PR
  • Creates a PR with the changelog changes
  • Can be re-run using the same version spec. It will add new entries but preserve existing ones (in case they have been hand modified).
  • Note: Pre-release changelog sections are not automatically combined, but you may wish to do so manually.

Draft Release Workflow

  • Manual Github workflow
    • Inputs are target repository, branch, version spec and optional post version spec
  • Bumps version using the same method as the changelog action
  • Prepares the environment using the same method as the changelog action
  • Checks the changelog entry
    • Looks for the current entry using the HTML comment markers
    • Gets the expected changelog values using github-activity
    • Ensures that all PRs are the same between the two
  • For Python packages:
    • Builds the wheel and source distributions if applicable
    • Makes sure Python dists can be installed and imported in a virtual environment
  • For npm package(s) (including workspace support):
    • Builds tarball(s) using npm pack
    • Make sure tarball(s) can be installed and imported in a new npm package
  • Checks the package manifest using check-manifest
  • Checks the links in Markdown and reStructuredText files
  • Adds a commit that includes the hashes of the dist files
  • Creates an annotated version tag in standard format
  • If given, bumps the version using the post version spec
  • Pushes the commits and tag to the target branch
  • Publishes a draft GitHub release for the tag with the changelog entry as the text

Publish Release Workflow

  • Manual Github workflow
    • Input is the url of the draft release
  • Downloads the dist assets from the release
  • Verifies shas and integrity of release assets
  • Publishes assets to appropriate registries
  • If the tag is on a backport branch, makes a forwardport PR for the changelog entry

Check Release Workflow

  • Runs on CI in the target repository to verify compatibility and release-ability.
  • Runs the Draft Changelog and Draft Release actions in dry run mode
  • Publishes to the local PyPI server and/or dry-run npm publish.
  • Does not make PRs or push git changes

FAQs

My changelog is out of sync

Create a new manual PR to fix the PR and re-orient the changelog entry markers.

PR is merged to the target branch in the middle of a "Draft Release"

The release will fail to push commits because it will not be up to date. Delete the pushed tags and re-start with "Draft Changelog" to pick up the new PR.

How to keep fork of Jupyter Releaser up to date

The manual workflow files target the @v1 actions in the source repository, which means that as long as the workflow files themselves are up to date, you will always be running the most up to date actions.

Project details


Release history Release notifications | RSS feed

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jupyter_releaser-0.12.0.tar.gz (47.2 kB view details)

Uploaded Source

Built Distribution

jupyter_releaser-0.12.0-py3-none-any.whl (46.6 kB view details)

Uploaded Python 3

File details

Details for the file jupyter_releaser-0.12.0.tar.gz.

File metadata

  • Download URL: jupyter_releaser-0.12.0.tar.gz
  • Upload date:
  • Size: 47.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2

File hashes

Hashes for jupyter_releaser-0.12.0.tar.gz
Algorithm Hash digest
SHA256 06b7c2f34ea0f1df8302d84104d9f424b191f634e7845236c57c2da566fa7f5c
MD5 9de3c7cf018d54c1f1845d52ed49b430
BLAKE2b-256 29bd730daa206918260a016aebfa3bb3f0d6913d6b049752690b2ae737f5bb46

See more details on using hashes here.

File details

Details for the file jupyter_releaser-0.12.0-py3-none-any.whl.

File metadata

  • Download URL: jupyter_releaser-0.12.0-py3-none-any.whl
  • Upload date:
  • Size: 46.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.7.1 importlib_metadata/4.10.1 pkginfo/1.8.2 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.2

File hashes

Hashes for jupyter_releaser-0.12.0-py3-none-any.whl
Algorithm Hash digest
SHA256 357cae6f3d224a1fa221d77c642e48ddde2e47c3bf5a0d95b146089818e1b378
MD5 3451472891ac0f0a553923f91946bbed
BLAKE2b-256 4a0b3f14a12903143be736f3a576f517ef53e2ec048db76c6f027d9737ad56e3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page