Skip to content

Comments

ci: add release to PyPI with semantic versioning#36

Merged
adamarnesen merged 21 commits intomainfrom
adamarnesen/pipy-publishing
Dec 8, 2025
Merged

ci: add release to PyPI with semantic versioning#36
adamarnesen merged 21 commits intomainfrom
adamarnesen/pipy-publishing

Conversation

@adamarnesen
Copy link
Member

@adamarnesen adamarnesen commented Dec 3, 2025

Justification

There are two main reasons that we're adding a PyPi package deployment to this repository:

  1. A lot of the examples have common/boiler plate code. This code is often copied around between examples in Jupyter notebooks. It doesn't value and adds noise to the notebooks. Pulling this common code into a library that can be pip installed will help with the readability and complexity of the notebooks themselves.
  2. Having this will allow us to more easily allow customers to reuse examples in their own notebooks without having to copy code.

After this goes in, anytime we submit code to the core libraries, and the PR is approved, it will publish a new package version to PyPi. This will use semantic versioning just as our other SystemLink APIs do.

Implementation

  1. Add a new set of workflow steps that will publish to PyPi every time we submit code to the library directories.
  2. Updated the CONRIBUTING document to talk about appropriate tags that should be used to make semantic versioning work.

Testing

This one is a bit difficult to test. I manually tested deploying to the Test PyPi tiers and then tested publishing manually to the actual tier. Here is the PyPi page showing that publish was successful: https://pypi.org/project/nisystemlink-examples/

Checklist

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR implements automated PyPI releases with semantic versioning for the nisystemlink-demo package. The implementation uses python-semantic-release to automatically bump versions based on Conventional Commits, then publishes to PyPI whenever code affecting the package is merged to the main/master branch.

Key Changes:

  • Added automated release workflow that runs after successful builds on pushes to main/master
  • Documented Conventional Commits specification for contributors to ensure proper semantic versioning
  • Added path filters to limit workflow execution to relevant file changes

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
.github/workflows/python-package.yml Added release job with semantic versioning and PyPI publishing; added path filters to trigger workflows only for relevant files
CONTRIBUTING.md Added comprehensive documentation on Conventional Commits format, version bump types, and commit message examples

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

adamarnesen and others added 6 commits December 4, 2025 15:16
make python versions consistent

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Make step versions consistent

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
use the right action bot email

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@adamarnesen adamarnesen self-assigned this Dec 4, 2025
@fredvisser
Copy link
Collaborator

@adamarnesen - Could you explain the rationale for publishing the example code to PyPI? I.e., Do you have a customer/solutions/sales workflow that would have them install the code as a library instead of cloning the repo or just copying and pasting the relevant code? Can we provide a one-liner to copy the repo to a directory instead?

@adamarnesen
Copy link
Member Author

adamarnesen commented Dec 5, 2025

@adamarnesen - Could you explain the rationale for publishing the example code to PyPI? I.e., Do you have a customer/solutions/sales workflow that would have them install the code as a library instead of cloning the repo or just copying and pasting the relevant code? Can we provide a one-liner to copy the repo to a directory instead?

@fredvisser There are two reasons.

  1. A lot of the examples have common/boiler plate code that is copied around a lot between examples and doesn't add a lot to the actual Jupyter notebook. Pulling this common code into a library that can be pip installed will help with the readability and complexity of the notebooks themselves.
  2. Having this will allow us to more easily allow customers to reuse examples in their own notebooks without having to copy code.

This isn't releasing all the examples, just the newly created library that I intend to have used for these types of common/reusable bits.

@adamarnesen adamarnesen merged commit 1b40427 into main Dec 8, 2025
6 checks passed
@adamarnesen adamarnesen deleted the adamarnesen/pipy-publishing branch December 8, 2025 22:20
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.

3 participants