Skip to main content

Validator and examples for openPMD format

Project description

# openPMD Validator Scripts

[![Build Status 1.0.*](https://img.shields.io/travis/openPMD/openPMD-validator/1.0.X.svg?label=1.0.*)](https://travis-ci.org/openPMD/openPMD-validator/branches)
![Supported Python Versions](https://img.shields.io/pypi/pyversions/openPMD-validator.svg)
[![License](https://img.shields.io/badge/license-ISC-blue.svg)](https://opensource.org/licenses/ISC)

This repository contains scripts to validate existing files that (claim to)
implement the [openPMD Standard](https://github.com/openPMD/openPMD-standard)
in version `1.0.*`.

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*](https://github.com/openPMD/openPMD-standard/blob/1.0.0/STANDARD.md#implementations)
of the openPMD standard. The repository
[openPMD-projects](https://github.com/openPMD/openPMD-projects)
also lists a large collection of open source projects that already implement
the openPMD standard.


## Install

[![pypi version](https://img.shields.io/pypi/v/openPMD-validator.svg)](https://pypi.python.org/pypi/openPMD-validator)
[![Spack Package](https://img.shields.io/badge/spack-notyet-yellow.svg)](https://spack.io)
[![Conda Package](https://anaconda.org/ax3l/openpmd_validator/badges/version.svg)](https://anaconda.org/ax3l/openpmd_validator)

### PyPI

```bash
# optional: append --user
pip install openPMD-validator
```

### Spack

*soon*

### Conda

```bash
conda install -c ax3l openpmd_validator
```

## Usage

### CLI

We provide the command-line tools for individual files:

```bash
# optional: create dummy example files
openPMD_createExamples_h5.py

# 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:**
```python
from openpmd_validator import createExamples_h5


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

**Check:**
```python
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.0.0.2.tar.gz (14.2 kB view details)

Uploaded Source

Built Distributions

openPMD_validator-1.0.0.2-py3-none-any.whl (17.8 kB view details)

Uploaded Python 3

openPMD_validator-1.0.0.2-py2-none-any.whl (17.8 kB view details)

Uploaded Python 2

File details

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

File metadata

File hashes

Hashes for openPMD-validator-1.0.0.2.tar.gz
Algorithm Hash digest
SHA256 9610b552aef48baf37e1ce3fe1372b5a2a2f358ff50e23283e79fdfb6fee5366
MD5 4b83c0ebfe88bc2873124d21d1a93a2d
BLAKE2b-256 6f6e0b78f7225cffe8098d48b7fbeab8fe350b970368daef4d62a0c7baf4a315

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for openPMD_validator-1.0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 47098ed5b9ca6b9d54225f6af100f1386dec9c1b7ca3157dbd6a269124feed9c
MD5 71e0f8fb25d008d1b14d33c0bc2ffc20
BLAKE2b-256 b6d333607035ee595c2ed3341350b3c706734d8748d7a9f73f25f7607eba6d50

See more details on using hashes here.

File details

Details for the file openPMD_validator-1.0.0.2-py2-none-any.whl.

File metadata

File hashes

Hashes for openPMD_validator-1.0.0.2-py2-none-any.whl
Algorithm Hash digest
SHA256 9309f8b6a4ffec816c822a3d268f7d7173c821a8b05abcdf1df2d2362fd8fc39
MD5 4b2f91a25b62fda1822e9316838c3eba
BLAKE2b-256 447f7e93fc1b66560a55e4c5e123d3587f7fd397a40872f16234f74abc0b093f

See more details on using hashes here.

Supported by

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