Skip to content

Conversation

henryiii
Copy link
Contributor

@henryiii henryiii commented Sep 19, 2023

Adding a json schema. This supports validate-pyproject, allowing it to check a tool.cibuildwheel section. I wrote a Python 3.10+ bin/generate_schema.py to make the schema as I didn't see a good way to do the OS sections and overrides by hand. I mostly tried to replicate the current behavior, though we technically could be more strict with a schema than in reality, since it's optional to validate it.

Testing by validating the defaults toml, a few manual examples, and running all the docs examples though.

Once we have this, we could also contribute it to SchemaStore, which would make it work in vscode, etc.

Copy link
Contributor

@joerick joerick left a comment

Choose a reason for hiding this comment

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

This is really cool, I didn't know about this. Getting auto-complete in vscode would be amazing.

@henryiii henryiii force-pushed the henryiii/feat/schema branch from 0297018 to a5db7f8 Compare September 21, 2023 15:29
@henryiii henryiii force-pushed the henryiii/feat/schema branch from a5db7f8 to 62ec642 Compare September 21, 2023 15:31
@henryiii
Copy link
Contributor Author

Also added a mechanism to test all the docs examples. Several fixes of the schema came from that. :)

Signed-off-by: Henry Schreiner <[email protected]>
@henryiii henryiii requested a review from joerick September 25, 2023 15:04
Copy link
Contributor

@joerick joerick left a comment

Choose a reason for hiding this comment

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

Looks good! Testing with the docs samples is a very cool idea.

@henryiii henryiii merged commit d4af0ac into pypa:main Sep 26, 2023
@henryiii henryiii deleted the henryiii/feat/schema branch September 26, 2023 16:23
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