https://github.com/addmorepower/nomad-dfxm_parser
A NOMAD parser for DFXM measurements
Science Score: 26.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (15.0%) to scientific vocabulary
Repository
A NOMAD parser for DFXM measurements
Basic Info
- Host: GitHub
- Owner: AddMorePower
- License: mit
- Language: Python
- Default Branch: main
- Size: 511 KB
Statistics
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
- Releases: 0
Metadata Files
README.md
nomad-DFXM_parser
A NOMAD plugin for DFXM measurements produced within the AddMorePower project.
This nomad plugin was generated with Cookiecutter along with @nomad's cookiecutter-nomad-plugin template.
Development
If you want to develop locally this plugin, clone the project and in the plugin folder, create a virtual environment (you can use Python 3.10, 3.11 or 3.12):
sh
git clone https://github.com/AddMorePower/nomad-DFXM_parser.git
cd nomad-DFXM_parser
python3.11 -m venv .pyenv
. .pyenv/bin/activate
Make sure to have pip upgraded:
sh
pip install --upgrade pip
We recommend installing uv for fast pip installation of the packages:
sh
pip install uv
Install the nomad-lab package:
sh
uv pip install -e '.[dev]'
Run the tests
You can run locally the tests:
sh
python -m pytest -sv tests
where the -s and -v options toggle the output verbosity.
Our CI/CD pipeline produces a more comprehensive test report using the pytest-cov package. You can generate a local coverage report:
sh
uv pip install pytest-cov
python -m pytest --cov=src tests
Run linting and auto-formatting
We use Ruff for linting and formatting the code. Ruff auto-formatting is also a part of the GitHub workflow actions. You can run locally:
sh
ruff check .
ruff format . --check
Debugging
For interactive debugging of the tests, use pytest with the --pdb flag. We recommend using an IDE for debugging, e.g., VSCode. If that is the case, add the following snippet to your .vscode/launch.json:
json
{
"configurations": [
{
"name": "<descriptive tag>",
"type": "debugpy",
"request": "launch",
"cwd": "${workspaceFolder}",
"program": "${workspaceFolder}/.pyenv/bin/pytest",
"justMyCode": true,
"env": {
"_PYTEST_RAISE": "1"
},
"args": [
"-sv",
"--pdb",
"<path-to-plugin-tests>",
]
}
]
}
where <path-to-plugin-tests> must be changed to the local path to the test module to be debugged.
The settings configuration file .vscode/settings.json automatically applies the linting and formatting upon saving the modified file.
Documentation on Github pages
To view the documentation locally, install the related packages using:
sh
uv pip install -r requirements_docs.txt
Run the documentation server:
sh
mkdocs serve
Adding this plugin to NOMAD
Currently, NOMAD has two distinct flavors that are relevant depending on your role as an user: 1. A NOMAD Oasis: any user with a NOMAD Oasis instance. 2. Local NOMAD installation and the source code of NOMAD: internal developers.
Adding this plugin in your NOMAD Oasis
Read the NOMAD plugin documentation for all details on how to deploy the plugin on your NOMAD instance.
Adding this plugin in your local NOMAD installation and the source code of NOMAD
We now recommend using the dedicated nomad-distro-dev repository to simplify the process. Please refer to that repository for detailed instructions.
Template update
We use cruft to update the project based on template changes. To run the check for updates locally, run cruft update in the root of the project. More details see the instructions on cruft website.
Main contributors
| Name | E-mail | |------|------------| | Guillaume Gaisné | guillaume.gaisne@esrf.fr
Owner
- Name: AddMorePower
- Login: AddMorePower
- Kind: organization
- Location: Germany
- Website: https://addmorepower.eu/
- Repositories: 1
- Profile: https://github.com/AddMorePower
GitHub Events
Total
- Push event: 2
- Create event: 2
Last Year
- Push event: 2
- Create event: 2
Dependencies
- actions/checkout v4 composite
- astral-sh/ruff-action v3 composite
- astral-sh/setup-uv v5 composite
- actions/checkout v4 composite
- mhausenblas/mkdocs-deploy-gh-pages master composite
- nomad-lab >=1.3.0
- python-magic-bin sys_platform == 'win32'
- mkdocs *
- mkdocs-click *
- mkdocs-material ==8.1.1
- pymdown-extensions *