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

feat: Add a python package #885

Merged
merged 10 commits into from
Mar 19, 2024
Merged

feat: Add a python package #885

merged 10 commits into from
Mar 19, 2024

Conversation

aborgna-q
Copy link
Collaborator

Adds all the boilerplate for a quantinuum-hugr python package.

This includes conditional CI checks (dependant on the changed files), and other metadata.

What's missing is a release-please configuration to generate python changelogs. release-plz should already be configured to only include changes that modify the rust project.

This is the foundation required for #486 and CQCL/guppylang#173, and it should make adding another package for #866 quite easy.

@aborgna-q aborgna-q added the ci CI / devops label Mar 18, 2024
@aborgna-q aborgna-q requested a review from cqc-alec March 18, 2024 16:34
@aborgna-q
Copy link
Collaborator Author

Uh, the "approve required checks if they are skipped" doesn't quite work. If we modify files that should be checked and also files to ignore, we end up running both workflows -.-

The github docs are not really helpful:
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/collaborating-on-repositories-with-code-quality-features/troubleshooting-required-status-checks#handling-skipped-but-required-checks

I think the best option is to just use https://github.com/dorny/paths-filter. It seems to be a widely used alternative.

Copy link

codecov bot commented Mar 18, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (76d3ea3) to head (230e625).

❗ Current head 230e625 differs from pull request most recent head 2fe569c. Consider uploading reports for the commit 2fe569c to get more accurate results

Additional details and impacted files
@@             Coverage Diff              @@
##             main      #885       +/-   ##
============================================
+ Coverage   85.62%   100.00%   +14.37%     
============================================
  Files          78         1       -77     
  Lines       14397         2    -14395     
  Branches    14397         0    -14397     
============================================
- Hits        12327         2    -12325     
+ Misses       1436         0     -1436     
+ Partials      634         0      -634     

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

@aborgna-q
Copy link
Collaborator Author

aborgna-q commented Mar 18, 2024

@acl-cqc CI should be working now

nvm, we can't skip required tests...

@aborgna-q aborgna-q force-pushed the feat/hugr-py branch 3 times, most recently from 01794b4 to 45b3807 Compare March 18, 2024 18:00
it doesn't seem to work, the filter always returs `true`
if we add something like

  - '!**/*.md'
quantinuum-hugr-py/src/quantinuum_hugr/__init__.py Outdated Show resolved Hide resolved
.github/pre-commit Outdated Show resolved Hide resolved
quantinuum-hugr-py/pyproject.toml Outdated Show resolved Hide resolved
.gitignore 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
quantinuum-hugr-py/README.md Show resolved Hide resolved
quantinuum-hugr-py/README.md Show resolved Hide resolved
.github/workflows/ci-rs.yml Show resolved Hide resolved
@aborgna-q aborgna-q requested a review from cqc-alec March 19, 2024 11:08
@aborgna-q aborgna-q added this pull request to the merge queue Mar 19, 2024
Merged via the queue into main with commit c10bad0 Mar 19, 2024
12 checks passed
@aborgna-q aborgna-q deleted the feat/hugr-py branch March 19, 2024 11:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci CI / devops
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants