Repository navigation
Qcel schema included #90
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
Open
jaclark5
wants to merge
14
commits into
MolSSI:master
Choose a base branch
from
jaclark5:qcel_schema
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
14 commits
Select commit
Hold shift + click to select a range
51cb6ce
Align v1 generation scripts
14d5c94
Align v1_5 generation scripts
fcadbe2
Update testing and remove old dirs
49b24d4
Add qcelemental v1
bb2afbf
Add qcelemental_v2 schema
8fabebb
Update tests
f08e899
Remove silent fallbacks, resolve running in CLI
73077a3
Update qcselemental v1 schema
7415481
Resolve v2 issues
6b9fe7a
Apply suggestions from code review
jaclark5 76e4727
Change qc_schema to qcschema
47f32f5
resolve testing
4b8f086
Add test dependencies
558e9b0
fix python versions
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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 hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -51,6 +51,7 @@ coverage.xml | |
| *.cover | ||
| .hypothesis/ | ||
| .pytest_cache/ | ||
| .ruff_cache/ | ||
|
|
||
| # Translations | ||
| *.mo | ||
|
|
||
This file contains hidden or 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 hidden or 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 hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,85 @@ | ||
| # QCSchema — Quantum Chemistry Schema | ||
|
|
||
| The core qcschema package. | ||
|
|
||
| ## Directory structure | ||
|
|
||
| ### `data/` — Generated JSON Schema documents | ||
| Contains the generated JSON Schema files for all schema versions. | ||
|
|
||
| - **`v1/`** — v1 JSON Schema documents (draft-04, frozen) | ||
| - Generated by `qcschema/v1/generate.py` | ||
| - `qcschema_input.schema` — Input specification | ||
| - `qcschema_molecule.schema` — Molecule structure | ||
| - `qcschema_output.schema` — Output specification | ||
|
|
||
| - **`v2/`** — v1.5 enhanced JSON Schema documents (draft-04, frozen) | ||
| - Generated by `qcschema/v1_5/generate.py` | ||
| - Same three schema files as v1, with wavefunction support | ||
| - Version number: 2 (v1.5 is the v2 JSON Schema version) | ||
|
|
||
| - **`qcelemental_v1/` and `qcelemental_v2/`** — Companion schema directories (dev-only) | ||
| - Will contain JSON Schema representations of qcelemental's pydantic models | ||
| - Generated by scripts in their respective directories (not shipped) | ||
|
|
||
| ### `v1/` — v1 schema generator | ||
| Modular generator for v1 JSON Schema documents. | ||
|
|
||
| - **`generate.py`** — Main entry point: `python -m qcschema.v1.generate` | ||
| - **`generator/`** — Schema component modules (source of truth) | ||
| - `molecule.py` — Molecule schema definition | ||
| - `definitions.py` — Shared definitions (provenance, error, basis, etc.) | ||
| - `basis.py` — Basis set specifications | ||
| - `properties/` — Output property definitions | ||
|
|
||
| ### `v1_5/` — v1.5 schema generator | ||
| Modular generator for v1.5 (v2) JSON Schema documents. Inherits from v1 and adds wavefunction. | ||
|
|
||
| - **`generate.py`** — Main entry point: `python -m qcschema.v1_5.generate` | ||
| - Imports and extends `qcschema.v1.generate.build_v1_schemas()` | ||
| - Adds wavefunction support to output schema | ||
| - Updates version number to 2 | ||
| - **`generator/`** — v1.5-specific additions | ||
| - `wavefunction/` — Wavefunction schema definitions | ||
|
|
||
| ### `qcelemental_v1/` and `qcelemental_v2/` (future) | ||
| Placeholders for qcelemental companion schema generation scripts. | ||
|
|
||
| ## Version naming | ||
|
|
||
| - **v1**: Original QCSchema (version: 1) | ||
| - Frozen, JSON Schema draft-04 | ||
| - **v1.5 / v2**: Enhanced QCSchema (version: 2) | ||
| - Adds wavefunction support | ||
| - Frozen, JSON Schema draft-04 | ||
| - Called "v1.5" in directory names, "v2" in version numbers | ||
| - **Pydantic v2 API** (future): Separate Python object layer | ||
| - Will be built on pydantic v2 | ||
| - Uses JSON Schema 2020-12 | ||
|
|
||
| ## How schemas are generated | ||
|
|
||
| Schemas are not hand-edited. To regenerate: | ||
|
|
||
| ```bash | ||
| # Generate v1 schemas to qcschema/data/v1/ | ||
| python -m qcschema.v1.generate | ||
|
|
||
| # Generate v1.5 schemas to qcschema/data/v2/ | ||
| python -m qcschema.v1_5.generate | ||
| ``` | ||
|
|
||
| The generators use modular component files in their respective `generator/` subdirectories. v1.5 inherits from v1 and extends it with wavefunction support. | ||
| v1.5 is the longstanding state of the QCSchema repo from 2020-2026. | ||
|
|
||
| ## Public API | ||
|
|
||
| See `validate.py` and `versions.py` for the main entry points: | ||
| - `qcschema.get_schema(schema_type, version)` — Load a schema | ||
| - `qcschema.validate(data, schema_type, version)` — Validate an instance | ||
|
|
||
| ## Notes | ||
|
|
||
| - v1 and v1.5 schemas are frozen and protected (GOAL.md) | ||
| - Schema files are minified JSON (single-line format) | ||
| - Companion qcelemental schema generation is dev-only (not shipped) | ||
This file contains hidden or 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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.