Add initial H5MD schema validator prototype#175
Open
EBB2675 wants to merge 5 commits into
Open
Conversation
Coverage Report for CI Build 25169163886Coverage increased (+0.2%) to 74.311%Details
Uncovered Changes
Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds an initial, machine-readable H5MD-NOMAD schema “slice” plus a prototype HDF5 validator to check H5MD header and core particles/all trajectory layout, along with tests against a minimal synthetic file and an existing fixture.
Changes:
- Introduce a YAML-based schema DSL for the targeted H5MD layout (
h5md-nomad.schema.yaml). - Add a prototype validator (
schema.py) to validate HDF5 groups/datasets/attrs against the schema. - Add pytest coverage for the validator on a synthetic minimal file and a reference H5MD fixture.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/parsers/test_h5md_schema.py | Adds validator tests for minimal + fixture H5MD files |
| src/nomad_simulation_parsers/parsers/h5md/schemas/h5md-nomad.schema.yaml | Defines initial H5MD-NOMAD schema slice (header + particles/all core) |
| src/nomad_simulation_parsers/parsers/h5md/schemas/init.py | Marks schemas as a package for resource loading |
| src/nomad_simulation_parsers/parsers/h5md/schema.py | Implements YAML schema loader + HDF5 schema validator |
| src/nomad_simulation_parsers/parsers/gromacs/parser.py | Minor formatting/indent adjustment for an existing staticmethod |
| MANIFEST.in | Attempts to include schema YAML files in distributions |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
here i add a first machine-readable H5MD-NOMAD schema slice covering the header and core particles/all trajectory layout.
we have a small HDF5 validator, packaged schema YAML, and focused tests against a synthetic file and the existing H5MD fixture