Skip to main content

Validator and examples for openPMD format

Project description

openPMD Validator Scripts

Supported Python Versions License

This repository contains scripts to validate existing files that (claim to) implement the openPMD Standard in version 1.1.*.

Additional scripts to create random/empty files with the valid markup of the standard are also provided.

Rationale

These tools are intended for developers that want to implementent the standard. They were written to allow an easy implement-test-correct workflow without the hazzle to check every word of the written standard twice.

Nevertheless, these scripts can not validate 100% of the standard and uncovered sections shall be cross-checked manually with the words of the written standard.

For more information on requirements for implementations, please refer to the section Implementations of the openPMD standard. The repository openPMD-projects also lists a large collection of open source projects that already implement the openPMD standard.

Install

pypi version Spack Package Conda Package

Choose one of the install methods below to get started:

PyPI

# optional: append --user
pip install openPMD-validator==1.1.0.5

Spack

spack install py-openpmd-validator@1.1.0.5 ^py-h5py~mpi
spack load --dependencies py-openpmd-validator@1.1.0.5 ^py-h5py~mpi

Conda

conda install -c conda-forge openpmd-validator

From Source

wget https://github.com/openPMD/openPMD-validator/archive/1.1.0.5.tar.gz
tar -xf 1.1.0.5.tar.gz
cd openPMD-validator-1.1.0.5/

# optional: append --user
python setup.py install

Usage

CLI

We provide the command-line tools for individual files:

# optional: create dummy example files
openPMD_createExamples_h5

# validate
openPMD_check_h5 -i example.h5
#   optional: append --EDPIC for the Partice-in-Cell Extension

Module

Additionally, the validator tools can be used as Python module in your projects, e.g. to verify a file before opening it for reading.

Create:

from openpmd_validator import createExamples_h5


# create "example.h5"
createExamples_h5.main()

Check:

from openpmd_validator import check_h5


result_array = check_h5.check_file("example.h5", verbose=False)

print("Result: %d Errors and %d Warnings."
      %( result_array[0], result_array[1]))

Development

The development of these scripts is carried out per-branch. Each branch corresponds to a certain version of the standard and might be updated in case tests did contain bugs or we found a way to cover more sections of the standard.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

openPMD-validator-1.1.0.5.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

openPMD_validator-1.1.0.5-py3-none-any.whl (17.2 kB view details)

Uploaded Python 3

File details

Details for the file openPMD-validator-1.1.0.5.tar.gz.

File metadata

  • Download URL: openPMD-validator-1.1.0.5.tar.gz
  • Upload date:
  • Size: 16.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for openPMD-validator-1.1.0.5.tar.gz
Algorithm Hash digest
SHA256 0aa26a4ce747f9adc2980a451d06043d8a89fc42725d19a74c870714e12bd702
MD5 c48d3b3e0c04a223cb25ec8de7d9dd3e
BLAKE2b-256 0bb65af7faa9a8e7568c14c030c73acdc2885cef482ef15c92dd878920fb0c0e

See more details on using hashes here.

File details

Details for the file openPMD_validator-1.1.0.5-py3-none-any.whl.

File metadata

File hashes

Hashes for openPMD_validator-1.1.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d3ddf361c5b47258aedf7bce0b4a1f001e265b7e7391c652d11e859f81f094e5
MD5 ecab5994d06100159313547ba489c57e
BLAKE2b-256 d8c781b5dd2b6a12219f162f2d1be20a29a295ea429101f923fe378e714413c8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page