-
Notifications
You must be signed in to change notification settings - Fork 101
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
allow polymorphism for dataclasses using type designators #1617
Conversation
…ion of range of type designators in #945)
Because the pydantic and the python tests now have similar test cases, i refactored the pydantic test so that they can use common test schema's and data.
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1617 +/- ##
==========================================
- Coverage 80.11% 80.04% -0.07%
==========================================
Files 95 98 +3
Lines 9923 10751 +828
Branches 2441 2742 +301
==========================================
+ Hits 7950 8606 +656
- Misses 1520 1636 +116
- Partials 453 509 +56
☔ View full report in Codecov by Sentry. |
I am not sure why an unrelated test has started failing in windows... |
The test failures are in fact related to the changes here. These changes introduce It is a bit odd that tests for |
Perhaps the most conservative thing to do is to get the entailed type designators via schemaloader (since pythongen already uses this framework), then we can back out the schemaview dependency. @kervel do you have any preferences? We should also try and isolate what is happening with windows and imports as a separate issue/PR |
That sounds reasonable to me. I have a simple example that demonstrates the issue directly with |
On re-reviewing, while it is unusual to mix the two modes, I think on balance it makes sense to use schemaview in this PR. I believe a new runtime release will fix the issue. |
* Add source code and test scripts * Add source code and test scripts * Fix unsorted imports * Fix unsorted imports * Fix unsorted imports * Fix unsorted imports * Rename testcase and improve code coverage * Reformat files
* Add a schema transformer to make logical constraint models. * add missing * additional convenience arguments * lint * fixed import * lint * Formatting * adding missing file --------- Co-authored-by: Patrick Kalita <pkalita@lbl.gov>
* Modified tutorial to make age explicitly a string in part1. Fixes #1612 * fix-typos
* [DATALAD RUNCMD] run codespell throughout fixing typo automagically === Do not change lines below === { "chain": [], "cmd": "codespell -w", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^ * [DATALAD RUNCMD] fix pytset typo === Do not change lines below === { "chain": [], "cmd": "git-sedi pytset pytest", "exit": 0, "extra_inputs": [], "inputs": [], "outputs": [], "pwd": "." } ^^^ Do not change lines above ^^^
This PR is a continuation of #1257