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

pin jsonschema to 3.2.0 #50

Merged
merged 1 commit into from Oct 6, 2021
Merged

pin jsonschema to 3.2.0 #50

merged 1 commit into from Oct 6, 2021

Conversation

arm61
Copy link
Contributor

@arm61 arm61 commented Oct 6, 2021

jsonschema released a 4.0.1 update that appears to break the schema testing. I have pinned to 3.2.0 (the previous release) until we can investigate further.

@arm61 arm61 merged commit b801a1e into reflectivity:main Oct 6, 2021
@@ -11,5 +11,5 @@ numpy>=1.19.0

pytest==6.2.4
pyyaml>=5.4.1
jsonschema
jsonschema==3.2.0
Copy link
Contributor

Choose a reason for hiding this comment

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

Would have been better as <4?

Copy link
Contributor

Choose a reason for hiding this comment

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

How are you testing (how did you find out it was breaking?)
EDIT: I think I found it... I was in a branch and didn't realize it.

Copy link
Contributor

Choose a reason for hiding this comment

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

This seems to be two things: in jsonschema==4.0.1 they added two new validators (latest is default, which ends up being jsonschema.validators.Draft202012Validator). Our schema doesn't seem to be valid in that latest hyperschema.

Also, the Draft201909Validator in the package seems to be broken.
For the moment the most appropriate fix is probably to add
"$schema": "http://json-schema.org/draft-07/schema#" to the top of our schema. This will allow it to work with jsonschema==4.0.1 and we should be versioning the hyperschema anyway.
I will put in a PR shortly - have to go to a meeting right now.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor

Choose a reason for hiding this comment

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

In the newest draft 2020-12 "items" functionality is largely replaced by "prefixItems", and "additionalItems" is replaced by "items" ("additionalItems" goes away). That is why our schema doesn't load in the latest validator.

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.

None yet

3 participants