Skip to content

feat: add inlining annotation + pass#1449

Draft
acl-cqc wants to merge 29 commits intomainfrom
acl/inline
Draft

feat: add inlining annotation + pass#1449
acl-cqc wants to merge 29 commits intomainfrom
acl/inline

Conversation

@acl-cqc
Copy link
Copy Markdown
Contributor

@acl-cqc acl-cqc commented Mar 16, 2026

Intended as precursor to #1532: this adds the "Always" option only, but takes into account in its own pass, which raises an error if it cannot obey all the annotations.

Python interface is very WIP, not sure I've grokked everything there yet.

@aborgna-q aborgna-q force-pushed the ab/hugr-0.26.0 branch 10 times, most recently from cb4d32c to 2b29cdb Compare March 18, 2026 17:25
Base automatically changed from ab/hugr-0.26.0 to main March 19, 2026 10:33
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 23, 2026

Codecov Report

❌ Patch coverage is 97.42268% with 5 lines in your changes missing coverage. Please review.
✅ Project coverage is 83.89%. Comparing base (54e855f) to head (ce8d5b7).

Files with missing lines Patch % Lines
tket/src/passes/inline_always.rs 98.33% 3 Missing ⚠️
tket-py/tket/passes/__init__.py 85.71% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1449      +/-   ##
==========================================
+ Coverage   83.80%   83.89%   +0.08%     
==========================================
  Files         188      189       +1     
  Lines       29035    29229     +194     
  Branches    27931    28111     +180     
==========================================
+ Hits        24334    24522     +188     
- Misses       3539     3545       +6     
  Partials     1162     1162              
Flag Coverage Δ
python 92.24% <85.71%> (-0.09%) ⬇️
qis-compiler 91.66% <ø> (ø)
rust 83.56% <98.33%> (+0.09%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ 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.

Comment thread tket-py/test/test_pass.py
f_id.set_outputs(f_id.input_node[0])

if annotate:
f_id.metadata["tket.inline"] = "always"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

We should export the metadata key from rust, as hugr-py/rust/metadata.rs does, but we don't have a module set up for that yet

Comment thread tket-py/test/test_pass.py

d.set_outputs(tup)

# validate(d.hugr)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I guess there is no way to do this here?

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.

1 participant