guppylang
guppylang copied to clipboard
refactor!: Store function argument names in `FuncInput`
It't a lot nicer to have the name of function arguments in the same object as the type an flags instead of the separate list we have at the moment - not adding the name was more of an oversight when we introduced FuncInput 😅
BREAKING CHANGE: FunctionType constructor no longer accepts the input_names argument. Instead, input names should be provided as an optional argument to FuncInput
This PR contains breaking changes to the public Python API.
Breaking changes summary
guppylang-internals/src/guppylang_internals/tys/ty.py:417: FunctionType.__init__(input_names):
Parameter was removed
guppylang-internals/src/guppylang_internals/tys/ty.py:417: FunctionType.__init__(params):
Positional parameter was moved
Details: position: from 4 to 3 (-1)
guppylang-internals/src/guppylang_internals/tys/ty.py:417: FunctionType.__init__(comptime_args):
Positional parameter was moved
Details: position: from 5 to 4 (-1)
guppylang-internals/src/guppylang_internals/tys/ty.py:417: FunctionType.__init__(unitary_flags):
Positional parameter was moved
Details: position: from 6 to 5 (-1)
Bencher Report
| Branch | refactor/input-names |
| Testbed | Linux |
Click to view all benchmark results
Bencher Report
| Branch | refactor/input-names |
| Testbed | Linux |
Click to view all benchmark results
| Benchmark | hugr_bytes | Benchmark Result bytes x 1e3 (Result Δ%) | Upper Boundary bytes x 1e3 (Limit %) | hugr_nodes | Benchmark Result nodes (Result Δ%) | Upper Boundary nodes (Limit %) |
|---|---|---|---|---|---|---|
| tests/benchmarks/test_big_array.py::test_big_array_compile | 📈 view plot 🚷 view threshold | 143.67 x 1e3(0.00%)Baseline: 143.67 x 1e3 | 145.10 x 1e3 (99.01%) | 📈 view plot 🚷 view threshold | 6,590.00(0.00%)Baseline: 6,590.00 | 6,655.90 (99.01%) |
| tests/benchmarks/test_ctrl_flow.py::test_many_ctrl_flow_compile | 📈 view plot 🚷 view threshold | 21.64 x 1e3(0.00%)Baseline: 21.64 x 1e3 | 21.86 x 1e3 (99.01%) | 📈 view plot 🚷 view threshold | 606.00(0.00%)Baseline: 606.00 | 612.06 (99.01%) |
Codecov Report
:x: Patch coverage is 93.75000% with 1 line in your changes missing coverage. Please review.
:white_check_mark: Project coverage is 93.42%. Comparing base (54dc200) to head (627627a).
| Files with missing lines | Patch % | Lines |
|---|---|---|
| ...pylang-internals/src/guppylang_internals/tys/ty.py | 92.30% | 1 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## main #1286 +/- ##
==========================================
- Coverage 93.42% 93.42% -0.01%
==========================================
Files 125 125
Lines 11290 11298 +8
==========================================
+ Hits 10548 10555 +7
- Misses 742 743 +1
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
:rocket: New features to boost your workflow:
- :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
Apologies, totally forgot about this PR 😅