Repository navigation
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
release(v1.0.2): scoring, JSON Schema import and report fixes, strict JSON output #604
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
Uh oh!
There was an error while loading. Please reload this page.
release(v1.0.2): scoring, JSON Schema import and report fixes, strict JSON output #604
Changes from 1 commit
869bc28a2db932a2f5d4cafc1b0cad19ac8b88d81b9db859d6abbf26693a3dee57a48dde3dfd2ddbd94bd1f0f809a6f13de1445a495fee3ff81a33ebaa3ca2dd0048a50497092ca4fe0aad6ebd6385efc1e743e0e403b9bc3dfee314963ad7faefc0003b5f1b53e2f75e17922be316a699cc2feb5903a9bcc24ded90c7f63554406c346ee8c45b00bd37730bace4572cc2bd10f59b247a1a58ce84b890b0921f4a776d42d8cda4fde6163d759e39ceb8efbdc2db699d35bf5378f2d66f86372b519f8618f72dc4befbe6a9ce23e8a49fa64bbaef6c5b6c40799eaf895de0d3c9215ac16651087a063037f319cac6ff179d64f4f4b52ce08cf1f46ece13a4523251f3331df32da4a6ef0089cb5878187b856825739c7a943a04146993ad0c4abe1755d38ff23aaaaff130d166746af633f0b694bdc24055c9fd99e28a1d736e94dc213265ee962323bcf2df86101f6fffdafdaa0434631c1878d48d7b32141619dd24969aba008432d05a21b35d60b6846b9336a72aee152e8ef41f1119fa9d451034867f9f65e3ea3f95e716c72d294e659e7789fad949be6c3cf01328fbea5722fbc121dee74aa5aea5509ba54054c05001582848af2dd9e4a9ec503cf90773b613111836484247a7651ba5efe3b7486cba48a708828eb62165bc9e94eff9c7ad2c758d4f7a4a6486f4e2fd553feea4ef06188a32df0f8ace6c100d7f19307eedb8c1cd5eaad0ccd30a91ab9e14438c79ea9e2957988d158f2dd3fe7010fd8acd9bc64e6bb232982ea79306cbd33555c4c5e3196e914af0075f8f6a0493258fbcb2e95fd88c32ec1a16300ff4b52c41d9875a7416a64ca336edae186655955c13228e108aac9c8d3ee3d1e1d5d2c036285a7d68bc001c3e47ea8e019d7034ec002050e12b7c362be0e1d5d800d888e553f01d724f75d5523fcd300e8ae01626de42b5a896657af74e5e95745260e7e851e3ae6efac78ae428fe86387cba44034bc5d1da0167194875d4e72b7d5be474a6d1aac1e8c56dfa97cc76521c6d4b98956e01079aaa7962e9635a9db443e492c0d7a5dd4b8f50b87d857e895531ae35b0f96780970b59c7ce9a6757acc1ca507e376de6f762361a3e87b77f3b72626dd6e95d6698c70ca6ed64aadd6396971ad3d86813a682c5472b869fa8e29d30ca9d9fc70def63ee347f503ef1d8f27ff49283014f5bba0452f35ccfa56d713da0bacc99874b44540cbd7532File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading. Please reload this page.
Jump to
Uh oh!
There was an error while loading. Please reload this page.
to_json_schema() and to_stickler_config() fell back to "string" / "str" for any annotation missing from their type tables. A plain BaseModel, a list of plain models and a list of lists all took that fallback, so the re-imported field was str (or List[str], or an unknown type in the config) and could not load the data the original model accepted. The guard meant to stop a nested model reaching the fallback checked `isinstance(field_type, type)`, which is False for Union[Card, Bank], so that union exported as "string" too. from_json_schema() builds exactly that union from a multi-arm anyOf, so a schema-only round trip broke. - A plain BaseModel is scored as one object, as a mapping is, so it exports as a free-form {"type": "object"} ("dict" in a Stickler config, List[dict] for a list) and re-imports as dict with its comparison settings. Its own field types are not exported. - A list of lists exports as nested arrays, so List[List[float]] and List[List[Dict]] reload. The element goes through the existing primitive list branch, so that branch stays the one place that writes a list property. - to_stickler_config() has no type for a union with a model arm, or for a StructuredModel inside a nested list, so both exporters raise ValueError for these and follow one rule. JSON Schema could express the union (anyOf), and that export could follow; a model inside a nested list would also need importer work. Optional and Annotated wrappers are stripped at every level before the check. Mapping fields and List[Dict] elements are left alone here: the first is handled in #360, the second in #405. Refs #349 (parts B and C)Uh oh!
There was an error while loading. Please reload this page.
There are no files selected for viewing
Uh oh!
There was an error while loading. Please reload this page.