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: support PEP 735 #208

Merged
merged 5 commits into from
Oct 15, 2024
Merged

Conversation

henryiii
Copy link
Collaborator

@henryiii henryiii commented Oct 11, 2024

Add support for validating PEP 735.

Pretty sure we can't validate that include-groups point to an existing group without custom code. Though maybe there is custom code for dynamic already? It doesn't seem to be part of the schema like in SchemaStore's version.

@henryiii
Copy link
Collaborator Author

henryiii commented Oct 11, 2024

What's the difference between $$description and description? They seem to both be used in this file interchangeably. I think I knew at one point. Something about line breaks? Yes, that's what it is. Also, SchemaStore/schemastore#4139 uses title everywhere, while we use it only on the outermost item. From https://json-schema.org/understanding-json-schema/reference/annotations, it seems to me title is the one you normally want, with description needed for longer pieces of information. Though, the SchemaStore docs say to use description. No idea, let's just keep matching styles for now.

@henryiii henryiii force-pushed the henryiii/feat/pep735 branch from 6fbb97e to 0a2ed51 Compare October 11, 2024 18:25
@henryiii henryiii marked this pull request as ready for review October 11, 2024 18:28
@henryiii henryiii force-pushed the henryiii/feat/pep735 branch from 0a2ed51 to 288300e Compare October 11, 2024 18:28
@henryiii henryiii requested a review from abravalheri October 11, 2024 18:29
@sirosen
Copy link

sirosen commented Oct 11, 2024

Pretty sure we can't validate that include-groups point to an existing group.

I'm fairly sure this is right. There's no generic mechanism in JSON Schema for referring to the literal keys of an input object as far as I know.

@henryiii
Copy link
Collaborator Author

Added a dynamic check for this case.

Circular deps could probably be done too but I'm tempted to wait till we are 3.9+, since IIRC this is easy with graphlib.

Copy link
Owner

@abravalheri abravalheri left a comment

Choose a reason for hiding this comment

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

Thank you very much @henryiii for working on this.

src/validate_pyproject/extra_validations.py Outdated Show resolved Hide resolved
henryiii and others added 5 commits October 15, 2024 10:22
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
Co-authored-by: Anderson Bravalheri <andersonbravalheri+github@gmail.com>
Co-authored-by: Anderson Bravalheri <andersonbravalheri+github@gmail.com>
Co-authored-by: Anderson Bravalheri <andersonbravalheri+github@gmail.com>
@henryiii henryiii force-pushed the henryiii/feat/pep735 branch from d0b2808 to 8ba8e1b Compare October 15, 2024 14:22
@abravalheri abravalheri merged commit 41e9e09 into abravalheri:main Oct 15, 2024
20 of 21 checks passed
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.

3 participants