Skip to main content

A NOMAD plugin for analysis of FAIR data.

Project description

NOMAD

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.

To install the package as a dependency for your NOMAD Oasis, add it to your pyproject.toml as under project.dependencies table:

[project]
dependencies = [
    ...
    "nomad-analysis",
]

Or you can use pip to install the package in your Python environment:

pip install nomad-analysis

Development

The plugin is still under development. If you would like to contribute, follow these steps:

Install the dependencies

Clone the project and go into the cloned directory. Create and start a virtual environment (note this project uses Python 3.11):

git clone https://github.com/FAIRmat-NFDI/nomad-analysis.git
cd nomad-analysis
python3.11 -m venv .pyenv
source .pyenv/bin/activate

Install the nomad-analysis package in editable mode (with -e flag) along with development dependencies (with '.[dev]'):

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

Note: uv uses NOMAD's internal package registry via index-url defined under tool.uv.index-url in pyproject.toml. If you want to use pip directly without uv wrapper, use the following:

pip install -e '.[dev]' --index-url https://gitlab.mpcdf.mpg.de/api/v4/projects/2187/packages/pypi/simple

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

Set 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:

  1. Install the plugin repo in your local installation environment

    pip install -e <path to the plugin repo>
    
  2. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nomad_analysis-0.0.7.tar.gz (124.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nomad_analysis-0.0.7-py3-none-any.whl (26.3 kB view details)

Uploaded Python 3

File details

Details for the file nomad_analysis-0.0.7.tar.gz.

File metadata

  • Download URL: nomad_analysis-0.0.7.tar.gz
  • Upload date:
  • Size: 124.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for nomad_analysis-0.0.7.tar.gz
Algorithm Hash digest
SHA256 b8ef34606080f7b73e948531c742a9a4900370ddf509247fae10745bfda4dd42
MD5 bb4d588dd91381067166efa096543de1
BLAKE2b-256 8b30a5375af5b46cee65322c1f866861e64c04e4c460750f94d927a485eee245

See more details on using hashes here.

File details

Details for the file nomad_analysis-0.0.7-py3-none-any.whl.

File metadata

  • Download URL: nomad_analysis-0.0.7-py3-none-any.whl
  • Upload date:
  • Size: 26.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.8

File hashes

Hashes for nomad_analysis-0.0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 763028cf7f1226d4917acb60aa101699929e5a4f9c742b9be1380150646f967f
MD5 ff4fc979033ad1c9aca5bae89c5052f4
BLAKE2b-256 d1679f267ad7ff52b1348cfe00da995d38d8eb7e8ce8e8aae7c984ac1a23f9b2

See more details on using hashes here.

Supported by

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