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(hugr-sexpr): Add s-expression library. #1208

Closed
wants to merge 9 commits into from
Closed

feat(hugr-sexpr): Add s-expression library. #1208

wants to merge 9 commits into from

Conversation

zrho
Copy link
Contributor

@zrho zrho commented Jun 19, 2024

This PR adds the hugr-sexpr library for s-expressions.

  • Read s-expressions from a string.
  • Pretty print s-expressions.
  • Derive macros for converting between s-expressions and user defined types.

(This commit also updates the devenv lock file to the newest version, since on the main branch version the Rust toolchain fails to work on my machine.)

Copy link

codecov bot commented Jun 20, 2024

Codecov Report

Attention: Patch coverage is 85.71429% with 119 lines in your changes missing coverage. Please review.

Project coverage is 86.98%. Comparing base (bcc1e2d) to head (2a898f1).
Report is 1 commits behind head on main.

Files Patch % Lines
hugr-sexpr-derive/src/input.rs 91.07% 16 Missing and 3 partials ⚠️
hugr-sexpr/src/lib.rs 80.41% 19 Missing ⚠️
hugr-sexpr/src/output.rs 73.97% 18 Missing and 1 partial ⚠️
hugr-sexpr/src/input.rs 74.24% 15 Missing and 2 partials ⚠️
hugr-sexpr-derive/src/output.rs 84.69% 12 Missing and 3 partials ⚠️
hugr-sexpr/src/read.rs 86.27% 11 Missing and 3 partials ⚠️
hugr-sexpr-derive/src/common.rs 76.92% 4 Missing and 5 partials ⚠️
hugr-sexpr/src/escape.rs 87.71% 4 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1208      +/-   ##
==========================================
- Coverage   87.03%   86.98%   -0.06%     
==========================================
  Files         100      110      +10     
  Lines       18918    19751     +833     
  Branches    16935    17768     +833     
==========================================
+ Hits        16466    17180     +714     
- Misses       1676     1775      +99     
- Partials      776      796      +20     
Flag Coverage Δ
rust 86.48% <85.71%> (-0.04%) ⬇️

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.

@zrho zrho force-pushed the feat/sexpr branch 4 times, most recently from 22f62a0 to 6275ba7 Compare June 24, 2024 08:48
@zrho zrho marked this pull request as ready for review June 24, 2024 09:01
@zrho zrho requested a review from a team as a code owner June 24, 2024 09:01
@zrho zrho requested a review from ss2165 June 24, 2024 09:01
Copy link
Collaborator

@aborgna-q aborgna-q left a comment

Choose a reason for hiding this comment

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

Some comments to ensure the new crates work well with the automation.

hugr-core/Cargo.toml Outdated Show resolved Hide resolved
Cargo.toml Outdated Show resolved Hide resolved
Cargo.toml Show resolved Hide resolved
This was not caught by the proptest before since the `Arbitrary` instance
for `f64` does not generate these values. The proptest has been updated
accordingly.
@zrho
Copy link
Contributor Author

zrho commented Jun 25, 2024

As a general purpose s-expression crate this probably does not belong in this repository after all.

@zrho zrho closed this Jun 25, 2024
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.

2 participants