-
Notifications
You must be signed in to change notification settings - Fork 8
58 lines (47 loc) · 1.74 KB
/
nomad-requirements.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: validate NOMAD dependencies compatibility
on:
push:
branches:
- master
pull_request:
branches:
- master
jobs:
validate_nomad_dependencies:
runs-on: ubuntu-latest
steps:
- name: Checkout pynxtools
uses: actions/checkout@v2
- name: Checkout NOMAD from GitLab
run: |
git clone https://gitlab.mpcdf.mpg.de/nomad-lab/nomad-FAIR.git nomad
cd nomad-FAIR
git checkout develop
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.9' # or any other version you need
- name: Parse pynxtools pyproject.toml
id: parse_pyproject
run: |
python -c "
import toml
import json# Load the pyproject.toml
with open('pyproject.toml', 'r') as file:
pyproject = toml.load(file)
dependencies = pyproject.get('project', {}).get('dependencies', [])
# Convert to requirements format and save
with open('pyproject-requirements.txt', 'w') as f:
for dep in dependencies:
f.write(f'{dep}\n')"
- name: Combine and Check Dependencies
run: |
# Combine repo1's requirements with repo2's dependencies from pyproject.toml
cat nomad/requirements-dev > combined-requirements.txt
echo "" >> combined-requirements.txt
cat pyproject-requirements.txt >> combined-requirements.txt
# Upgrade pip and install the combined dependencies
python -m pip install --upgrade pip
pip install -r combined-requirements.txt
env:
PYTHONPATH: "" # Ensure no pre-installed packages interfere with the test