Skip to content

Merge pull request #632 from FAIRmat-NFDI/inheritance-fix #790

Merge pull request #632 from FAIRmat-NFDI/inheritance-fix

Merge pull request #632 from FAIRmat-NFDI/inheritance-fix #790

name: NOMAD dependencies compatibility
on:
push:
branches:
- master
pull_request:
branches:
- master
# Run workflow only when there are changes in pyproject.toml or dev-requirements.txt
# paths:
# - 'pyproject.toml'
# - 'dev-requirements.txt'
env:
python-version: 3.11
jobs:
validate_dependencies:
runs-on: ubuntu-latest
steps:
- name: Checkout pynxtools
uses: actions/checkout@v4
- name: Checkout NOMAD from GitLab
run: |
git clone --depth 1 --branch develop --recurse-submodules https://gitlab.mpcdf.mpg.de/nomad-lab/nomad-FAIR.git nomad
git submodule update --init --recursive --depth 1
- name: Add pynxtools dependency in NOMAD test_plugins.txt
working-directory: ./nomad
run: |
echo "" >> test_plugins.txt
echo "pynxtools@git+https://github.com/FAIRmat-NFDI/pynxtools.git@${{ github.head_ref || github.ref_name }}" >> test_plugins.txt
- name: Install uv and set the python version to ${{ env.python-version }}
uses: astral-sh/setup-uv@v5
with:
python-version: ${{ env.python-version }}
- name: Generate (dev-)requirements.txt from modified pyproject.toml
working-directory: ./nomad
run: |
uv pip compile --universal -p ${{ env.python-version }} --annotation-style=line --extra=infrastructure --extra=parsing --output-file=requirements.txt pyproject.toml
uv pip compile --universal -p ${{ env.python-version }} --annotation-style=line --extra=dev --extra=infrastructure --extra=parsing --output-file=requirements-dev.txt requirements.txt pyproject.toml
uv pip compile --universal -p ${{ env.python-version }} --annotation-style=line --output-file=requirements-plugins.txt --unsafe-package nomad-lab -c requirements-dev.txt test_plugins.txt
- name: Install NOMAD dependencies with pynxtools from current branch
working-directory: ./nomad
run: |
uv pip install -r requirements-plugins.txt
env:
PYTHONPATH: "" # Ensure no pre-installed packages interfere with the test