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

tests: [Very WIP] Better proptests for Type #1744

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

acl-cqc
Copy link
Contributor

@acl-cqc acl-cqc commented Dec 9, 2024

  • Produce Type/etc. containing variables, plus an appropriate Vec<TypeParam> declaring all variables that are used
  • Goal is for the type to validate with that environment....
  • ...and to be able to produce a list of TypeArg's "fitting" the declared TypeParams, such that substitution also succeeds

but not there yet!

@hugrbot
Copy link
Collaborator

hugrbot commented Dec 9, 2024

Hey there and thank you for opening this pull request! 👋

We require pull request titles to follow the Conventional Commits specification
and it looks like your proposed title needs to be adjusted.

Your title should look like this. The scope field is optional.

<type>(<scope>): <description>

If the PR includes a breaking change, mark it with an exclamation mark:

<type>!: <description>

and include a "BREAKING CHANGE:" footer in the body of the pull request.

Details:

Unknown release type "tests" found in pull request title "tests: [Very WIP] Better proptests for Type". 

Available types:
 - feat
 - fix
 - docs
 - style
 - refactor
 - perf
 - test
 - ci
 - chore
 - revert

Copy link

codecov bot commented Dec 9, 2024

Codecov Report

Attention: Patch coverage is 0.42918% with 232 lines in your changes missing coverage. Please review.

Project coverage is 85.66%. Comparing base (f9a3446) to head (24dc93d).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
hugr-core/src/types.rs 0.00% 232 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1744      +/-   ##
==========================================
- Coverage   86.26%   85.66%   -0.60%     
==========================================
  Files         177      177              
  Lines       31959    32319     +360     
  Branches    28871    29231     +360     
==========================================
+ Hits        27570    27687     +117     
- Misses       2766     3007     +241     
- Partials     1623     1625       +2     
Flag Coverage Δ
python 92.42% <ø> (ø)
rust 84.95% <0.42%> (-0.66%) ⬇️

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.

@hugrbot
Copy link
Collaborator

hugrbot commented Dec 9, 2024

This PR contains breaking changes to the public Rust API.
Please deprecate the old API instead (if possible), or mark the PR with a ! to indicate a breaking change.

cargo-semver-checks summary

--- failure inherent_method_missing: pub method removed or renamed ---

Description:
A publicly-visible method or associated fn is no longer available under its prior name. It may have been renamed or removed entirely.
      ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
     impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.37.0/src/lints/inherent_method_missing.ron

Failed in:
ArrayScan::new, previously in file /home/runner/work/hugr/hugr/BASELINE_BRANCH/hugr-core/src/extension/prelude/array.rs:630

--- failure pub_module_level_const_missing: pub module-level const is missing ---

Description:
A public const is missing, renamed, or changed from const to static.
      ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
     impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.37.0/src/lints/pub_module_level_const_missing.ron

Failed in:
ARRAY_REPEAT_OP_ID in file /home/runner/work/hugr/hugr/BASELINE_BRANCH/hugr-core/src/extension/prelude/array.rs:340

--- failure struct_missing: pub struct removed or renamed ---

Description:
A publicly-visible struct cannot be imported by its prior path. A `pub use` may have been removed, or the struct itself may have been renamed or removed entirely.
      ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
     impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.37.0/src/lints/struct_missing.ron

Failed in:
struct hugr_core::extension::prelude::array::ArrayRepeatDef, previously in file /home/runner/work/hugr/hugr/BASELINE_BRANCH/hugr-core/src/extension/prelude/array.rs:344
struct hugr_core::extension::prelude::array::ArrayRepeat, previously in file /home/runner/work/hugr/hugr/BASELINE_BRANCH/hugr-core/src/extension/prelude/array.rs:429

--- failure struct_pub_field_missing: pub struct's pub field removed or renamed ---

Description:
A publicly-visible struct has at least one public field that is no longer available under its prior name. It may have been renamed or removed entirely.
      ref: https://doc.rust-lang.org/cargo/reference/semver.html#item-remove
     impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.37.0/src/lints/struct_pub_field_missing.ron

Failed in:
field src_ty of struct ArrayScan, previously in file /home/runner/work/hugr/hugr/BASELINE_BRANCH/hugr-core/src/extension/prelude/array.rs:617
field tgt_ty of struct ArrayScan, previously in file /home/runner/work/hugr/hugr/BASELINE_BRANCH/hugr-core/src/extension/prelude/array.rs:619
field acc_tys of struct ArrayScan, previously in file /home/runner/work/hugr/hugr/BASELINE_BRANCH/hugr-core/src/extension/prelude/array.rs:621
field size of struct ArrayScan, previously in file /home/runner/work/hugr/hugr/BASELINE_BRANCH/hugr-core/src/extension/prelude/array.rs:623
field extension_reqs of struct ArrayScan, previously in file /home/runner/work/hugr/hugr/BASELINE_BRANCH/hugr-core/src/extension/prelude/array.rs:625

--- failure struct_pub_field_now_doc_hidden: pub struct field is now #[doc(hidden)] ---

Description:
A pub field of a pub struct is now marked #[doc(hidden)] and is no longer part of the public API.
      ref: https://doc.rust-lang.org/rustdoc/write-documentation/the-doc-attribute.html#hidden
     impl: https://github.com/obi1kenobi/cargo-semver-checks/tree/v0.37.0/src/lints/struct_pub_field_now_doc_hidden.ron

Failed in:
field ArrayScan.src_ty in file /home/runner/work/hugr/hugr/PR_BRANCH/hugr-core/src/extension/prelude/array.rs:458
field ArrayScan.tgt_ty in file /home/runner/work/hugr/hugr/PR_BRANCH/hugr-core/src/extension/prelude/array.rs:458
field ArrayScan.acc_tys in file /home/runner/work/hugr/hugr/PR_BRANCH/hugr-core/src/extension/prelude/array.rs:458
field ArrayScan.size in file /home/runner/work/hugr/hugr/PR_BRANCH/hugr-core/src/extension/prelude/array.rs:458

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.

Add proptests for Optrait::substitute and DataflowOpTrait::substitute
2 participants