-
Notifications
You must be signed in to change notification settings - Fork 106
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
autocast number types #225
Conversation
…tocast-number-types
… README for ls-mardyn becuase 'issue' type is no longer an issue
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.
Think this needs a resolution of #91 per discussion before it can be reviewed, and may need more work after we've come to a decision there.
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.
Thanks, excellent work.
Should we perhaps deduplicate version
via a definition?
Created #226 |
Thanks for reviewing! |
Related issues
Refs: #91
148-sort-schema
/PR Sort fields in schema.json alphabetically #218 andlint-schema
/ PR Lint schema #201 branches. Merging PR Sort fields in schema.json alphabetically #218 will clean up the diff forschema.json
.Describe the changes made in this pull request
from #91 (comment)
Now that we have switched to JSONSchema, we should re-evaluate whether union types for some keys are useful. For example, it is currently (https://github.com/citation-file-format/citation-file-format/blob/38d9b1fb629373f6a3607de64aa3a6e21a76f750/schema.json) invalid to write the following in
CITATION.cff
:This is a bit unexpected and inconvenient for people particularly those who write CITATION.cff files by hand / unassisted.
I went over the keys and tried to identify a list of keys that could potentially have values that are interpreted as numbers by YAML, which would render them invalid. Here's the list I came up with:
#/definitions/post-code
issue
number
reference/version
section
version
This PR expands their
"type": "string"
to astr|number
union type using JSONSchema"anyOf"
.This also meant that some of the tests were no longer necessary, specifically the tests that verify that certain
CITATION.cff
files do not pass validation. This PR removes those tests (fromexamples/1.2.0/fail/**
)Instructions to review the pull request
pytest should pass with 68 (not 70 like before) items discovered