Skip to content

Add workflow for checking against NOMAD dependencies #6

Add workflow for checking against NOMAD dependencies

Add workflow for checking against NOMAD dependencies #6

name: Validate Dependencies Compatibility
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
validate_dependencies:
runs-on: ubuntu-latest
steps:
- name: Checkout pynxtools (current repository)
uses: actions/checkout@v2
- name: Checkout NOMAD from GitLab
env:
GITLAB_TOKEN: ${{ secrets.GITLAB_TOKEN }}
run: |
git clone https://gitlab.mpcdf.mpg.de/nomad-lab/nomad-FAIR.git nomad
cd nomad
git checkout develop
- name: Init NOMAD submodules
run:
git submodule update --init --recursive
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9'
- name: Install uv
run: |
curl -LsSf https://astral.sh/uv/install.sh | sh
- name: Replace pynxtools dependency in NOMAD pyproject.toml
run: |
sed -i 's|pynxtools\[convert\]==0.3.1|pynxtools\[convert\]@git+https://github.com/FAIRmat-NFDI/pynxtools.git@${{ github.head_ref }}|' pyproject.toml
- name: Generate requirements.txt from pyproject.toml
run: |
uv pip compile -p 3.9 --annotation-style=line --extra=infrastructure --extra=parsing --output-file=requirements.txt dependencies/nomad-dos-fingerprints/pyproject.toml dependencies/parsers/eelsdb/pyproject.toml pyproject.toml
uv pip compile -p 3.9 --annotation-style=line --extra=dev --extra=infrastructure --extra=parsing --output-file=requirements-dev.txt requirements.txt pyproject.toml
- name: Install NOMAD dependencies with pynxtools from current branch
run: |
uv pip install --system -r requirements.txt
uv pip install --system -r requirements-dev.txt
env:
PYTHONPATH: "" # Ensure no pre-installed packages interfere with the test
- name: Run Tests
run: |
pytest