Validator and examples for openPMD format
Project description
openPMD Validator Scripts
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
Choose one of the install methods below to get started:
PyPI
# optional: append --user
pip install openPMD-validator==1.1.0.3
Spack
spack install py-openpmd-validator@1.1.0.3 ^py-h5py~mpi
spack load --dependencies py-openpmd-validator@1.1.0.3 ^py-h5py~mpi
Conda
conda install -c ax3l openpmd_validator==1.1.0.3
From Source
wget https://github.com/openPMD/openPMD-validator/archive/1.1.0.3.tar.gz
tar -xf 1.1.0.3.tar.gz
cd openPMD-validator-1.1.0.3/
# 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file openPMD-validator-1.1.0.3.tar.gz
.
File metadata
- Download URL: openPMD-validator-1.1.0.3.tar.gz
- Upload date:
- Size: 16.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b2e57123c1dc09cdc121011d007e30fab82b3d21732d02e4f1ba919b24345810 |
|
MD5 | 6e61ef784726689a22ff86e479908fed |
|
BLAKE2b-256 | 366f00b2c915bf398a838978e0c4b9f3feacdb15cde84d22aa9f11364bfbb4cc |
File details
Details for the file openPMD_validator-1.1.0.3-py3-none-any.whl
.
File metadata
- Download URL: openPMD_validator-1.1.0.3-py3-none-any.whl
- Upload date:
- Size: 17.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f55d04acd135d0afa67b4224912b2a009e660c8bbc9e94c49b79554fd3e6192 |
|
MD5 | 0cb2bd58ad4df5468cab1d7ab9109378 |
|
BLAKE2b-256 | 68b07aa658cc495b058f49af93afe2db01170e3e4a80c3a3404bcbae4b63633a |