Skip to content

Conversation

@alicjapolanska
Copy link
Collaborator

Update the workflows to automatically publish to test pypi on merge to main, and to pypi on published release.

Pair programming contributions with @Kiyam and @zixiao-h.

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 release workflows to streamline the publishing process for the harmonic package. The changes enable automatic publishing to Test PyPI on merges to the main branch and to production PyPI on published releases, using setuptools-scm for version management from git tags.

Key Changes:

  • Migrated from hardcoded version strings to setuptools-scm for automatic version management
  • Added GitHub Actions workflows for building wheels and publishing to PyPI
  • Updated Python version support to 3.11-3.13 (dropped 3.9 and 3.10)

Reviewed changes

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

Show a summary per file
File Description
setup.py Removed hardcoded version, added dynamic version declaration, updated Python version classifiers and author list
requirements/requirements-core.txt Added setuptools-scm dependency for version management
pyproject.toml Configured setuptools-scm build requirements and version file generation
.github/workflows/tests.yml New workflow for running tests, building documentation, and deploying to GitHub Pages
.github/workflows/build.yml New workflow for building wheels with cibuildwheel and publishing to Test PyPI/PyPI

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


[tool.setuptools_scm]
local_scheme = "no-local-version"
write_to = "harmonic/_version.py"
Copy link

Copilot AI Nov 24, 2025

Choose a reason for hiding this comment

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

The pyproject.toml should include a [tool.cibuildwheel] section to configure which Python versions to build wheels for. Without explicit configuration, cibuildwheel will use its defaults which may not match your supported versions (3.11-3.13). Add:

[tool.cibuildwheel]
build = "cp311-* cp312-* cp313-*"
skip = "*-musllinux_*"  # Optional: skip musl builds if not needed
Suggested change
write_to = "harmonic/_version.py"
write_to = "harmonic/_version.py"
[tool.cibuildwheel]
build = "cp311-* cp312-* cp313-*"
skip = "*-musllinux_*" # Optional: skip musl builds if not needed

Copilot uses AI. Check for mistakes.
@codecov
Copy link

codecov bot commented Nov 24, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.13%. Comparing base (2eeccd7) to head (5b6adc1).
⚠️ Report is 46 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #324   +/-   ##
=======================================
  Coverage   94.13%   94.13%           
=======================================
  Files          10       10           
  Lines         802      802           
=======================================
  Hits          755      755           
  Misses         47       47           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

alicjapolanska and others added 4 commits November 24, 2025 19:32
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
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

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


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

@alicjapolanska alicjapolanska mentioned this pull request Nov 26, 2025
Copy link
Collaborator

@Kiyam Kiyam left a comment

Choose a reason for hiding this comment

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

Looks great, we've already thoroughly tested the automatic release mechanism. Thanks for updating the references also!

@alicjapolanska alicjapolanska merged commit dbb9fea into main Nov 26, 2025
7 checks passed
@alicjapolanska alicjapolanska deleted the automatic_release branch November 26, 2025 12:30
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