Skip to content

Commit ef1eaa5

Browse files
committed
ci: install the dependencies declared by SigimaX
SigimaX is installed with --no-deps so that pip does not replace the editable Sigima clone, but its own dependencies were then never installed: the test jobs failed as soon as SigimaX required hdf5plugin. The development, release and latest jobs now also read the dependencies of ../SigimaX/pyproject.toml, still excluding the packages installed from local clones. Assisted-by: Claude Opus 5.5
1 parent 272f764 commit ef1eaa5

2 files changed

Lines changed: 20 additions & 14 deletions

File tree

‎.github/workflows/test_pyqt5.yml‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,9 @@ jobs:
7777
pip install -e ../DataLab-Capsule
7878
# Install tomli for TOML parsing (safe if already present)
7979
pip install tomli
80-
# Extract dependencies and save to file, then install
81-
python -c "import tomli; f=open('pyproject.toml','rb'); data=tomli.load(f); deps=[d for d in data['project']['dependencies'] if not any(p in d for p in ['guidata','PlotPy','Sigima', 'SigimaX', 'datalab-capsule'])]; open('deps.txt','w').write('\n'.join(deps))"
80+
# Extract dependencies of DataLab and SigimaX (installed with --no-deps
81+
# above), save them to file, then install
82+
python -c "import tomli; deps=[d for p in ('pyproject.toml', '../SigimaX/pyproject.toml') for d in tomli.load(open(p,'rb'))['project']['dependencies'] if not any(n in d for n in ['guidata','PlotPy','Sigima', 'SigimaX', 'datalab-capsule'])]; open('deps.txt','w').write('\n'.join(deps))"
8283
pip install -r deps.txt
8384
# Install DataLab without dependencies
8485
pip install --no-deps .
@@ -105,8 +106,9 @@ jobs:
105106
pip install -e ../DataLab-Capsule
106107
# Install tomli for TOML parsing (safe if already present)
107108
pip install tomli
108-
# Extract dependencies and save to file, then install
109-
python -c "import tomli; f=open('pyproject.toml','rb'); data=tomli.load(f); deps=[d for d in data['project']['dependencies'] if not any(p in d for p in ['guidata','PlotPy','Sigima', 'SigimaX', 'datalab-capsule'])]; open('deps.txt','w').write('\n'.join(deps))"
109+
# Extract dependencies of DataLab and SigimaX (installed with --no-deps
110+
# above), save them to file, then install
111+
python -c "import tomli; deps=[d for p in ('pyproject.toml', '../SigimaX/pyproject.toml') for d in tomli.load(open(p,'rb'))['project']['dependencies'] if not any(n in d for n in ['guidata','PlotPy','Sigima', 'SigimaX', 'datalab-capsule'])]; open('deps.txt','w').write('\n'.join(deps))"
110112
pip install -r deps.txt
111113
# Install DataLab without dependencies
112114
pip install --no-deps .
@@ -186,9 +188,10 @@ jobs:
186188
python -m pip install -e ../SigimaX --no-deps
187189
python -m pip install -e ../DataLab-Capsule
188190
189-
# Extract dependency names from pyproject.toml (excluding Sigima and
190-
# SigimaX, installed from local clones above) and install latest versions
191-
python -m pip install -U --upgrade-strategy eager $(python -c "import tomllib, re; print(' '.join(re.sub(r'[\[\]<>=!~,.\s].*$', '', d).strip() for d in tomllib.loads(open('pyproject.toml', 'rb').read().decode())['project']['dependencies'] if not any(p in d for p in ['Sigima', 'SigimaX', 'datalab-capsule'])))")
191+
# Extract dependency names from the pyproject.toml of DataLab and SigimaX
192+
# (excluding Sigima and SigimaX, installed from local clones above) and
193+
# install latest versions
194+
python -m pip install -U --upgrade-strategy eager $(python -c "import tomllib, re; print(' '.join(sorted({re.sub(r'[\[\]<>=!~,.\s].*$', '', d).strip() for p in ('pyproject.toml', '../SigimaX/pyproject.toml') for d in tomllib.loads(open(p, 'rb').read().decode())['project']['dependencies'] if not any(n in d for n in ['Sigima', 'SigimaX', 'datalab-capsule'])})))")
192195
193196
- name: Lint with Ruff (latest)
194197
run: ruff check --output-format=github datalab

‎.github/workflows/test_pyqt6.yml‎

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,9 @@ jobs:
7777
pip install -e ../DataLab-Capsule
7878
# Install tomli for TOML parsing (safe if already present)
7979
pip install tomli
80-
# Extract dependencies and save to file, then install
81-
python -c "import tomli; f=open('pyproject.toml','rb'); data=tomli.load(f); deps=[d for d in data['project']['dependencies'] if not any(p in d for p in ['guidata','PlotPy','Sigima', 'SigimaX', 'datalab-capsule'])]; open('deps.txt','w').write('\n'.join(deps))"
80+
# Extract dependencies of DataLab and SigimaX (installed with --no-deps
81+
# above), save them to file, then install
82+
python -c "import tomli; deps=[d for p in ('pyproject.toml', '../SigimaX/pyproject.toml') for d in tomli.load(open(p,'rb'))['project']['dependencies'] if not any(n in d for n in ['guidata','PlotPy','Sigima', 'SigimaX', 'datalab-capsule'])]; open('deps.txt','w').write('\n'.join(deps))"
8283
pip install -r deps.txt
8384
# Install DataLab without dependencies
8485
pip install --no-deps .
@@ -105,8 +106,9 @@ jobs:
105106
pip install -e ../DataLab-Capsule
106107
# Install tomli for TOML parsing (safe if already present)
107108
pip install tomli
108-
# Extract dependencies and save to file, then install
109-
python -c "import tomli; f=open('pyproject.toml','rb'); data=tomli.load(f); deps=[d for d in data['project']['dependencies'] if not any(p in d for p in ['guidata','PlotPy','Sigima', 'SigimaX', 'datalab-capsule'])]; open('deps.txt','w').write('\n'.join(deps))"
109+
# Extract dependencies of DataLab and SigimaX (installed with --no-deps
110+
# above), save them to file, then install
111+
python -c "import tomli; deps=[d for p in ('pyproject.toml', '../SigimaX/pyproject.toml') for d in tomli.load(open(p,'rb'))['project']['dependencies'] if not any(n in d for n in ['guidata','PlotPy','Sigima', 'SigimaX', 'datalab-capsule'])]; open('deps.txt','w').write('\n'.join(deps))"
110112
pip install -r deps.txt
111113
# Install DataLab without dependencies
112114
pip install --no-deps .
@@ -166,9 +168,10 @@ jobs:
166168
python -m pip install -e ../SigimaX --no-deps
167169
python -m pip install -e ../DataLab-Capsule
168170
169-
# Extract dependency names from pyproject.toml (excluding Sigima and
170-
# SigimaX, installed from local clones above) and install latest versions
171-
python -m pip install -U --upgrade-strategy eager $(python -c "import tomllib, re; print(' '.join(re.sub(r'[\[\]<>=!~,.\s].*$', '', d).strip() for d in tomllib.loads(open('pyproject.toml', 'rb').read().decode())['project']['dependencies'] if not any(p in d for p in ['Sigima', 'SigimaX', 'datalab-capsule'])))")
171+
# Extract dependency names from the pyproject.toml of DataLab and SigimaX
172+
# (excluding Sigima and SigimaX, installed from local clones above) and
173+
# install latest versions
174+
python -m pip install -U --upgrade-strategy eager $(python -c "import tomllib, re; print(' '.join(sorted({re.sub(r'[\[\]<>=!~,.\s].*$', '', d).strip() for p in ('pyproject.toml', '../SigimaX/pyproject.toml') for d in tomllib.loads(open(p, 'rb').read().decode())['project']['dependencies'] if not any(n in d for n in ['Sigima', 'SigimaX', 'datalab-capsule'])})))")
172175
173176
- name: Lint with Ruff (latest)
174177
run: ruff check --output-format=github datalab

0 commit comments

Comments
 (0)