A NOMAD plugin for analysis of FAIR data.
Project description
NOMAD's Analysis plugin
This is a plugin for NOMAD to facilitate analysis of processed entry archives using classes and functions. The plugin also supports ELN schemas which allow the use of these functions in Jupyter notebooks and persist the analysis workflow.
Getting started
Install the dependencies
Clone the project and, in the workspace folder, create a virtual environment (note this project uses Python 3.9):
git clone https://github.com/FAIRmat-NFDI/nomad-analysis.git
cd nomad-analysis
python3.9 -m venv .pyenv
Install the nomad-lab
package:
pip install --upgrade pip
pip install '.[dev]' --index-url https://gitlab.mpcdf.mpg.de/api/v4/projects/2187/packages/pypi/simple
Note: Until we have an official PyPI NOMAD release with the plugin functionality, make sure to include NOMAD's internal package registry (via
--index-url
in the above command).
Run the tests
You can run the unit testing using the pytest
package:
python -m pytest -sv
We recommend to install the coverage
and coveralls
packages for a more comprehensive output of the testing:
pip install coverage coveralls
python -m coverage run -m pytest -sv
Development
The plugin is still under development. If you would like to contribute, install the package in editable mode (with the added -e
flag) with the development dependencies:
pip install -e .[dev] --index-url https://gitlab.mpcdf.mpg.de/api/v4/projects/2187/packages/pypi/simple
Setting up the plugin on your local installation
Read the NOMAD plugin documentation for all details on how to deploy the plugin on your local NOMAD installation. In summary:
-
Install the plugin repo in your local installation environment
pip install -e <path to the plugin repo>
-
From the following available entry points, include the ones you want (or all) in the nomad.yaml of your local installation:
plugins: include: - nomad_analysis.general:schema - nomad_analysis.jupyter:schema
Run linting and auto-formatting
Ruff auto-formatting is also a part of the GitHub workflow actions. Make sure that before you make a Pull Request to add your contributions to this repo, the following commands run in your local without any errors otherwise the workflow action will fail.
ruff check .
ruff format . --check
Alternatively, if you are using VSCode as your IDE, we added the settings configuration file, .vscode/settings.json
, such that it performs ruff format
whenever you save progress in a file.
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
Hashes for nomad_analysis-0.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f990d2a5f1c31c5bede14d8de6bd89381ff2b0f278d7e27dbe006c40ecc6e838 |
|
MD5 | 5d6a8814ebbf4928a4f3791afb6fbd95 |
|
BLAKE2b-256 | fc41b3a2050fa5e4c10494cedf3bd3b0f8e95c57811f06ef30c68f3255d0c8b4 |