Skip to content

Commit bb36fcd

Browse files
committed
CI: Split basic and optional dependencies
1 parent 3d9634f commit bb36fcd

File tree

5 files changed

+32
-14
lines changed

5 files changed

+32
-14
lines changed

.github/workflows/misc.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,10 @@ jobs:
1818
install: ['setup']
1919
check: ['style', 'doc']
2020
pip-flags: ['']
21-
depends: ['DEFAULT_DEPENDS']
21+
depends: ['REQUIREMENTS']
2222
env:
2323
DEPENDS: ${{ matrix.depends }}
24+
OPTIONAL_DEPENDS: ${{ matrix.optional-depends }}
2425
INSTALL_TYPE: ${{ matrix.install }}
2526
CHECK_TYPE: ${{ matrix.check }}
2627
EXTRA_PIP_FLAGS: ${{ matrix.pip-flags }}

.github/workflows/pre-release.yml

+5-2
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,17 @@ jobs:
2121
install: ['setup']
2222
check: ['test']
2323
pip-flags: ['PRE_PIP_FLAGS']
24-
depends: ['DEFAULT_DEPENDS']
24+
depends: ['REQUIREMENTS']
25+
optional-depends: ['DEFAULT_OPT_DEPENDS']
2526
include:
2627
# Pydicom master
2728
- os: ubuntu-latest
2829
python-version: 3.8
2930
install: setup
3031
check: test
3132
pip-flags: ''
32-
depends: PYDICOM_MASTER
33+
depends: REQUIREMENTS
34+
optional-depends: PYDICOM_MASTER
3335
exclude:
3436
- os: ubuntu-latest
3537
architecture: x86
@@ -42,6 +44,7 @@ jobs:
4244

4345
env:
4446
DEPENDS: ${{ matrix.depends }}
47+
OPTIONAL_DEPENDS: ${{ matrix.optional-depends }}
4548
INSTALL_TYPE: ${{ matrix.install }}
4649
CHECK_TYPE: ${{ matrix.check }}
4750
EXTRA_PIP_FLAGS: ${{ matrix.pip-flags }}

.github/workflows/stable.yml

+13-5
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,8 @@ jobs:
2424
install: ['setup']
2525
check: ['test']
2626
pip-flags: ['']
27-
depends: ['DEFAULT_DEPENDS']
27+
depends: ['REQUIREMENTS']
28+
optional-depends: ['DEFAULT_OPT_DEPENDS']
2829
include:
2930
# Basic dependencies only
3031
- os: ubuntu-latest
@@ -33,20 +34,23 @@ jobs:
3334
check: test
3435
pip-flags: ''
3536
depends: REQUIREMENTS
37+
optional-depends: ''
3638
# Absolute minimum dependencies
3739
- os: ubuntu-latest
3840
python-version: 3.6
3941
install: setup
4042
check: test
4143
pip-flags: ''
4244
depends: MIN_REQUIREMENTS
45+
optional-depends: ''
4346
# Absolute minimum dependencies plus old MPL, Pydicom, Pillow
4447
- os: ubuntu-latest
4548
python-version: 3.6
4649
install: setup
4750
check: test
4851
pip-flags: ''
49-
depends: MIN_REQUIREMENTS_PLUS
52+
depends: MIN_REQUIREMENTS
53+
optional-depends: MIN_OPT_DEPENDS
5054
# Clean install imports only with package-declared dependencies
5155
- os: ubuntu-latest
5256
python-version: 3.6
@@ -60,26 +64,30 @@ jobs:
6064
install: wheel
6165
check: test
6266
pip-flags: ''
63-
depends: DEFAULT_DEPENDS
67+
depends: REQUIREMENTS
68+
optional-depends: DEFAULT_OPT_DEPENDS
6469
- os: ubuntu-latest
6570
python-version: 3.8
6671
install: sdist
6772
check: test
6873
pip-flags: ''
69-
depends: DEFAULT_DEPENDS
74+
depends: REQUIREMENTS
75+
optional-depends: DEFAULT_OPT_DEPENDS
7076
- os: ubuntu-latest
7177
python-version: 3.8
7278
install: archive
7379
check: test
7480
pip-flags: ''
75-
depends: DEFAULT_DEPENDS
81+
depends: REQUIREMENTS
82+
optional-depends: DEFAULT_OPT_DEPENDS
7683
exclude:
7784
- os: ubuntu-latest
7885
architecture: x86
7986
- os: macos-latest
8087
architecture: x86
8188
env:
8289
DEPENDS: ${{ matrix.depends }}
90+
OPTIONAL_DEPENDS: ${{ matrix.optional-depends }}
8391
INSTALL_TYPE: ${{ matrix.install }}
8492
CHECK_TYPE: ${{ matrix.check }}
8593
EXTRA_PIP_FLAGS: ${{ matrix.pip-flags }}

tools/ci/env.sh

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
SETUP_REQUIRES="pip setuptools>=30.3.0 wheel"
22

3-
# Dependencies that should always be installable
4-
DEFAULT_DEPENDS="numpy scipy matplotlib pillow pydicom h5py indexed_gzip"
5-
# pydicom has skipped some important pre-releases, so enable a check against master
6-
PYDICOM_MASTER="numpy git+https://github.com/pydicom/pydicom.git@master"
7-
83
# Minimum requirements
94
REQUIREMENTS="-r requirements.txt"
105
# Minimum versions of minimum requirements
116
MIN_REQUIREMENTS="-r min-requirements.txt"
12-
MIN_REQUIREMENTS_PLUS="-r min-requirements.txt matplotlib==1.5.3 pydicom==0.9.9 pillow==2.6"
7+
8+
DEFAULT_OPT_DEPENDS="scipy matplotlib pillow pydicom h5py indexed_gzip"
9+
# pydicom has skipped some important pre-releases, so enable a check against master
10+
PYDICOM_MASTER="git+https://github.com/pydicom/pydicom.git@master"
11+
# Minimum versions of optional requirements
12+
MIN_OPT_DEPENDS="matplotlib==1.5.3 pydicom==0.9.9 pillow==2.6"
1313

1414
# Numpy and scipy upload nightly/weekly/intermittent wheels
1515
NIGHTLY_WHEELS="https://pypi.anaconda.org/scipy-wheels-nightly/simple"

tools/ci/install_dependencies.sh

+6
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ set -eu
1010
# Required variables
1111
echo EXTRA_PIP_FLAGS = $EXTRA_PIP_FLAGS
1212
echo DEPENDS = $DEPENDS
13+
echo OPTIONAL_DEPENDS = $OPTIONAL_DEPENDS
1314

1415
set -x
1516

@@ -19,6 +20,11 @@ fi
1920

2021
if [ -n "$DEPENDS" ]; then
2122
pip install ${EXTRA_PIP_FLAGS} --prefer-binary ${!DEPENDS}
23+
if [ -n "$OPTIONAL_DEPENDS" ]; then
24+
for DEP in ${!OPTIONAL_DEPENDS}; do
25+
pip install ${EXTRA_PIP_FLAGS} --prefer-binary $DEP || true
26+
done
27+
fi
2228
fi
2329

2430
set +eux

0 commit comments

Comments
 (0)