Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: support PEP 735#208

Merged
abravalheri merged 5 commits into
abravalheri:mainfrom
henryiii:henryiii/feat/pep735
Oct 15, 2024
Merged

feat: support PEP 735#208
abravalheri merged 5 commits into
abravalheri:mainfrom
henryiii:henryiii/feat/pep735

Conversation

@henryiii
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown

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
Copy Markdown
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.

Comment thread src/validate_pyproject/extra_validations.py Outdated
Copy link
Copy Markdown
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.

Comment thread src/validate_pyproject/extra_validations.py Outdated
Comment thread src/validate_pyproject/extra_validations.py
@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
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