Metadata-Version: 2.4
Name: matcore
Version: 0.1.0
Summary: Tools for MatCore metadata records of computational materials science datasets
License-Expression: Apache-2.0 AND CC-BY-4.0
License-File: LICENSE
License-File: LICENSE-CC-BY-4.0
License-File: NOTICE
Requires-Dist: pyyaml>=6
Requires-Dist: jsonschema[format-nongpl]>=4.20
Requires-Python: >=3.12
Project-URL: Homepage, https://matcore.org
Description-Content-Type: text/markdown

# matcore

Tools for MatCore metadata records. MatCore (Material Core Metadata) is a reporting standard for the metadata of
computational materials science datasets.

This first release validates a record. It checks the record against the version of the standard the record names,
from 0.8.0 on:

- the record's JSON Schema: structure, types, shapes, values and units;
- the checks a JSON Schema cannot make:
  - labels that name no structure or computation of the record;
  - chemical formulas;
  - identifier check digits;
  - terms outside a vocabulary, as user-specified values or possible typos;
  - a chemical potential's qualifiers;
  - each `Unknown` value;
  - `x-gnu:` units, when GNU Units is installed.

```bash
pip install matcore
matcore validate record.json
matcore validate --json record.json
```

Each finding gives its JSON pointer, a severity (error, warning or info), the rule it applies and a message. The
command exits with status 1 when any finding is an error.

In Python:

```python
import json
from matcore import validate

for finding in validate(json.load(open('record.json'))):
    print(finding.pointer, finding.severity, finding.message)
```

## Licences

All code in this package is licensed under Apache-2.0. The bundled releases of the standard (matcore/releases/) are
data licensed under CC BY 4.0. See https://matcore.org for the standard.
