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: python errors and some pyrs helpers #114

Merged
merged 7 commits into from
Sep 19, 2023
Merged

feat: python errors and some pyrs helpers #114

merged 7 commits into from
Sep 19, 2023

Conversation

aborgna-q
Copy link
Collaborator

No description provided.

@aborgna-q aborgna-q requested a review from ss2165 September 19, 2023 10:42
@aborgna-q aborgna-q marked this pull request as ready for review September 19, 2023 10:42
Copy link
Member

@ss2165 ss2165 left a comment

Choose a reason for hiding this comment

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

looking good

Comment on lines +42 to +54
pub fn validate_hugr(c: Py<PyAny>) -> PyResult<()> {
try_with_hugr(c, |hugr| hugr.validate(&REGISTRY))
}

#[pyfunction]
pub fn to_hugr_dot(c: Py<PyAny>) -> PyResult<String> {
with_hugr(c, |hugr| hugr.dot_string())
}

#[pyfunction]
pub fn to_hugr(c: Py<PyAny>) -> PyResult<Hugr> {
with_hugr(c, |hugr| hugr)
}
Copy link
Member

Choose a reason for hiding this comment

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

nice

@aborgna-q aborgna-q merged commit 41eaf72 into main Sep 19, 2023
@aborgna-q aborgna-q deleted the feat/py-bindings branch September 19, 2023 16:06
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