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

ci: Publish python package to pypi #908

Merged
merged 4 commits into from
Apr 3, 2024
Merged

ci: Publish python package to pypi #908

merged 4 commits into from
Apr 3, 2024

Conversation

aborgna-q
Copy link
Collaborator

@aborgna-q aborgna-q commented Apr 3, 2024

Adds a CI job that

  • Publishes each push to main to the test pypi repository.

  • When a quantinuum-hugr-py-v* tag is pushed, publishes the python package to pypi
    (this is done generically, so other python

Closes #907

I will make another PR configuring release-please, to automate the changelog and releases side.
Until we are ready to publish 0.1.0, we can publish alpha versions manually by pushing tags.

@aborgna-q aborgna-q requested a review from cqc-alec April 3, 2024 11:21
cd ${{ matrix.package }}
poetry config repositories.test-pypi https://test.pypi.org/legacy/
poetry config pypi-token.test-pypi ${{ secrets.PYPI_TEST_PUBLISH }}
poetry publish -r test-pypi --dist-dir ../dist --skip-existing
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Perhaps we could do a --dry-run here, to avoid spamming the test registry

pyproject.toml Outdated Show resolved Hide resolved
quantinuum-hugr-py/README.md Outdated Show resolved Hide resolved
quantinuum-hugr-py/README.md Outdated Show resolved Hide resolved
Comment on lines +5 to +6
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
Copy link
Collaborator

Choose a reason for hiding this comment

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

We are only building with 3.10; should we be building with 3.11 and 3.12 as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I added a python 3.12 target to the CI checks in addition to the 3.10.

The wheels we build are source-based, so they should be portable between versions.

Copy link

codecov bot commented Apr 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.63%. Comparing base (a2e4d05) to head (0d494db).

❗ Current head 0d494db differs from pull request most recent head 244c13a. Consider uploading reports for the commit 244c13a to get more accurate results

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #908   +/-   ##
=======================================
  Coverage   85.63%   85.63%           
=======================================
  Files          78       78           
  Lines       14444    14444           
  Branches    14444    14444           
=======================================
  Hits        12369    12369           
  Misses       1436     1436           
  Partials      639      639           

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

@aborgna-q aborgna-q requested a review from cqc-alec April 3, 2024 13:12
@aborgna-q aborgna-q added this pull request to the merge queue Apr 3, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 3, 2024
@aborgna-q aborgna-q added this pull request to the merge queue Apr 3, 2024
Merged via the queue into main with commit 622f0e2 Apr 3, 2024
14 checks passed
@aborgna-q aborgna-q deleted the ci/python-ci branch April 3, 2024 13:33
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.

ci: Release an alpha version of the hugr package
2 participants