Skip to content

Add initial H5MD schema validator prototype#175

Open
EBB2675 wants to merge 5 commits into
developfrom
make-h5md-machine-readable
Open

Add initial H5MD schema validator prototype#175
EBB2675 wants to merge 5 commits into
developfrom
make-h5md-machine-readable

Conversation

@EBB2675

@EBB2675 EBB2675 commented Apr 30, 2026

Copy link
Copy Markdown
Collaborator

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

@coveralls

coveralls commented Apr 30, 2026

Copy link
Copy Markdown

Coverage Report for CI Build 25169163886

Coverage increased (+0.2%) to 74.311%

Details

  • Coverage increased (+0.2%) from the base build.
  • Patch coverage: 41 uncovered changes across 1 file (208 of 249 lines covered, 83.53%).
  • No coverage regressions found.

Uncovered Changes

File Changed Covered %
src/nomad_simulation_parsers/parsers/h5md/schema.py 164 123 75.0%

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 10522
Covered Lines: 7819
Line Coverage: 74.31%
Coverage Strength: 0.74 hits per line

💛 - Coveralls

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread src/nomad_simulation_parsers/parsers/h5md/schema.py
Comment thread tests/parsers/test_h5md_schema.py Outdated
Comment thread MANIFEST.in
@EBB2675 EBB2675 requested a review from JFRudzinski April 30, 2026 14:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants