Skip to content

JosePizarro3/d2bmat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CI Status Coverage

d2bmat is a Python package with a set of utility functions to map Python schemas and parsers between 2 different database platforms. Its development is strongly tied to Materials Science databases, and as an example, we mainly worked in a mapping between NOMAD and openBIS.

The main objective of this repository is to provide an interface for database admins so that researchers only focus on creating schemas and parsers in one common notation, without having to worry about one or another database languages.

If you want to install it, do:

pip install d2bmat

Note: the package is still in development and we did not deploy any version to PyPI. If you want to install this package, you need to clone and pip install it locally.

Development

If you want to develop locally this package, clone the project and enter in the workspace folder:

git clone https://github.com/JosePizarro3/d2bmat.git
cd d2bmat

Create a virtual environment (you can use Python>3.9) in your workspace:

python3 -m venv .venv
source .venv/bin/activate

And run the following commands:

pip install --upgrade pip
pip install uv
uv pip install -e '.[dev]'

Run the tests

You can locally run the tests by doing:

python -m pytest -sv tests

where the -s and -v options toggle the output verbosity.

You can also generate a local coverage report:

python -m pytest --cov=src tests

Run auto-formatting and linting

We use Ruff for formatting and linting the code following the rules specified in the pyproject.toml. You can run locally:

ruff check .

This will produce an output with the specific issues found. In order to auto-fix them, run:

ruff format . --check

If some issues are not possible to fix automatically, you will need to visit the file and fix them by hand.

Main contributors

The main code developers are:

Name E-mail
Dr. Jose M. Pizarro jose.pizarro-blanco@bam.de

About

A set of utility functions to map Python schemas and parsers between 2 database platforms.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages