Skip to content

About

Metadata schema describing electrochemical data

Topics

Resources

Contributing

Stars

2 stars

Watchers

3 watching

Forks

Repository files navigation

echemdb metadata-schema

DOI

This repository provides standardized metadata schemas to describe electrochemical systems and the collected data, and the mdstools Python package to generate, validate and work with them. It is part of the echemdb community project.

Documentation: https://echemdb.github.io/metadata-schema/

Schemas

The schemas cover the electrochemical system (electrodes, electrolyte, cell), the experimental setup, the source of the data and its curation. They are defined in LinkML (linkml/), the single source of truth, from which we generate

  • JSON Schemas (schemas/), to validate metadata with any tool that supports JSON Schema, and
  • Pydantic models (mdstools/models/).

The schema reference, example files and JSON Schema downloads are on the documentation website.

mdstools

The mdstools Python package works with metadata files: it flattens them to Excel or CSV, enriches them with descriptions and examples from the schemas, validates them, and migrates them to newer schema versions.

Installation

Install pixi, then

git clone https://github.com/echemdb/metadata-schema.git
cd metadata-schema
pixi install

Usage

# Flatten a YAML file to enriched Excel and CSV files in generated/
mdstools flatten tests/example_metadata.yaml

# Convert an Excel or CSV file back to YAML
mdstools unflatten generated/example_metadata.xlsx --schema-file schemas/minimum_echemdb.json

# Migrate a metadata file to the current schema version (dry run without --in-place)
mdstools update metadata.yaml --in-place

Run mdstools <command> --help for all options, or prefix the commands with pixi run to use the pixi environment. The CLI, the Python API and the schema generation are described in the documentation.

Contributing

Contributions are welcome. See CONTRIBUTING.md for the setup, the workflow for schema changes and migrations, and the checks:

pixi install -e dev
pixi run test
pixi run validate
pixi run lint
pixi run check-news
pixi run doc-fast    # build the documentation in doc/generated/html

License

GPL-3.0-or-later

About

Metadata schema describing electrochemical data

Topics

Resources

Contributing

Stars

2 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages