-
-
Notifications
You must be signed in to change notification settings - Fork 279
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
Add JSON schema generation #2005
Conversation
✅ Deploy Preview for maturin-guide ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for maturin-guide ready!Built without sensitive environment variables
To edit notification comments on pull requests, go to your Netlify site configuration. |
Thanks, IMO it's better to be placed in a separated crate that depends on |
Can we make this a subcommand instead of a separate crate? I'd avoid splitting out into a new crate over helper functionality |
I am also fine with a subcommand. |
I've just forked https://github.com/PyO3/schemastore so we can port (copy?) https://github.com/astral-sh/ruff/blob/0c194f55e81c217b7ac63e7136ea3aabffd7c127/scripts/update_schemastore.py for maturin too |
With switched to a (hidden?) subcommand and CI passing i'm r+ on the code. |
I switched to the JSON generation to a hidden sub-command. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
It seems that the schema generation currently does not put a newline in the end, which triggers the pre-commit autofixes. We should get this fixed when adding schema checks in CI. |
https://build.opensuse.org/request/show/1178629 by user mia + anag+factory - Update to 1.6.0 * Add pypi name validation gh#PyO3/maturin#2007 * Add JSON schema generation gh#PyO3/maturin#2005 * Detect compiling from Linux gnu to Linux musl as cross compiling gh#PyO3/maturin#2010 * Upgrade uniffi to 0.27.0 gh#PyO3/maturin#2021 * Add instrumentation support for develop gh#PyO3/maturin#2019 * Make tracing-subscriber mandatory gh#PyO3/maturin#2022 * Import hook upgrade gh#PyO3/maturin#2024 * Add uv as develop backend command gh#PyO3/maturin#2015 * Also try uv in PATH in develop --uv gh#PyO3/maturin#2026 * docs: update pyo3 to match tutorial gh#PyO3/maturin#2029 * Add support for AIX gh#PyO3/maturin#2030 * Remove rust-cpython from project init/new template gh#PyO3/maturin#2034 * Only run uv tests
This PR implements the Maturin JSON schema for the section
tool.maturin
inpyproject.toml
files.To run the generation, you can use the following command:
I use Ruff generate_json_schema.rs as a base to implement the JSON schema generation.
Remaining tasks: