-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Pydantic model for the serialization schema (#888)
This PR ports the pydantic definition from guppy (including CQCL/guppylang#172), and updates it to sync up with the current schema. Changes to the schema: - Renamed the `InputExtensions` class to `ExtensionSet` - Added a named definition for `Const` - Dropped `DummyOp`. It was referenced in a couple field types, but the model was never defined. The main difference with the model in `guppy` is the use of `RootModel`-based classes instead of variables assigned to a `TypeAliasType` for defining aliases on type unions. They both work the same, but `mypy` doesn't like using variables in types. Additionally, I updated some READMEs and added a CI check to ensure that the json in `specification/schema/` is always up to date.
- Loading branch information
Showing
17 changed files
with
1,334 additions
and
311 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.