CQCL / hugr

Hierarchical Unified Graph Representation
https://crates.io/crates/hugr
Apache License 2.0
15 stars 4 forks source link

docs(hugr-py): docstrings for builder #1231

Closed ss2165 closed 3 days ago

ss2165 commented 1 week ago

first commit just copies in the docs building infrastructure from guppy, the rest add docstrings by file. There are some minor refactor commits towards the end that I couldn't untangle from the docs.

Closes #1214

To build docs:

cd hugr-py
poetry install --with=docs
cd docs
./build.sh
open build/api-docs/index.html
codecov[bot] commented 1 week ago

Codecov Report

Attention: Patch coverage is 97.30942% with 6 lines in your changes missing coverage. Please review.

Project coverage is 86.98%. Comparing base (f158384) to head (006b94c). Report is 2 commits behind head on main.

Files Patch % Lines
hugr-py/src/hugr/ops.py 93.75% 5 Missing :warning:
hugr-py/src/hugr/tys.py 96.29% 1 Missing :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #1231 +/- ## ========================================== + Coverage 86.91% 86.98% +0.07% ========================================== Files 99 102 +3 Lines 19023 19108 +85 Branches 17015 17015 ========================================== + Hits 16533 16622 +89 + Misses 1713 1709 -4 Partials 777 777 ``` | [Flag](https://app.codecov.io/gh/CQCL/hugr/pull/1231/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CQCL) | Coverage Δ | | |---|---|---| | [python](https://app.codecov.io/gh/CQCL/hugr/pull/1231/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CQCL) | `91.16% <97.30%> (+0.57%)` | :arrow_up: | | [rust](https://app.codecov.io/gh/CQCL/hugr/pull/1231/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CQCL) | `86.47% <ø> (ø)` | | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=CQCL#carryforward-flags-in-the-pull-request-comment) to find out more.

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.