@@ -46,29 +46,19 @@ jobs:
4646 # This path is specific to Ubuntu
4747 path : ~/.cache/pip
4848 # Look to see if there is a cache hit for the corresponding requirements file
49- key : ${{ runner.os }}-pip-${{ hashFiles('requirements-all .txt') }}
49+ key : ${{ runner.os }}-pip-${{ hashFiles('setup.py', ' requirements.txt', 'requirements-dev .txt') }}
5050 restore-keys : |
51- ${{ runner.os }}-pip-${{ hashFiles('requirements-all .txt') }}
51+ ${{ runner.os }}-pip-${{ hashFiles('setup.py', ' requirements.txt', 'requirements-dev .txt') }}
5252 ${{ runner.os }}-pip
5353 - name : Install dependencies
54+ # Installs core install + all extras ("all") + dev/test dependencies ("dev")
55+ # via the combined "test" extra defined in setup.py.
5456 run : |
5557 python -m pip install --upgrade pip wheel setuptools
56- if [ -f requirements-all.txt ]; then
57- python -m pip install --use-pep517 -r requirements-all.txt
58- elif [ -f requirements.txt ]; then
59- python -m pip install --use-pep517 -r requirements.txt;
60- fi
61- python -m pip install -e .
58+ python -m pip install --use-pep517 -e ".[test]"
6259 - name : Install test dependencies
6360 # ToDo - remove pip install xgboost when flaml is fixed
6461 run : |
65- if [ -f requirements-dev.txt ]; then
66- python -m pip install -r requirements-dev.txt
67- else
68- echo "Missing requirements-dev.txt. Installing minimal requirements for testing."
69- python -m pip install pytest pytest-cov pytest-xdist pytest-check aiohttp nbconvert jupyter_contrib_nbextensions
70- python -m pip install Pygments respx pytest-xdist markdown beautifulsoup4 Pillow async-cache lxml
71- fi
7262 python -m pip install "pandas>=1.3.0" "pygeohash>=1.2.0"
7363 python -m pip install "xgboost"
7464 - name : Prepare test dummy data
@@ -122,9 +112,9 @@ jobs:
122112 # This path is specific to Ubuntu
123113 path : ~/.cache/pip
124114 # Look to see if there is a cache hit for the corresponding requirements file
125- key : ${{ runner.os }}-pip-docs-${{ hashFiles('doc /requirements-all .txt') }}
115+ key : ${{ runner.os }}-pip-docs-${{ hashFiles('docs /requirements.txt') }}
126116 restore-keys : |
127- ${{ runner.os }}-pip-docs-${{ hashFiles('requirements-all .txt') }}
117+ ${{ runner.os }}-pip-docs-${{ hashFiles('docs/ requirements.txt') }}
128118 ${{ runner.os }}-pip-docs
129119 ${{ runner.os }}-pip
130120 - name : Sphinx Read the Docs build
@@ -159,28 +149,17 @@ jobs:
159149 # This path is specific to Ubuntu
160150 path : ~/.cache/pip
161151 # Look to see if there is a cache hit for the corresponding requirements file
162- key : ${{ runner.os }}-pip-lint-${{ hashFiles('requirements-all .txt') }}
152+ key : ${{ runner.os }}-pip-lint-${{ hashFiles('setup.py', ' requirements.txt', 'requirements-dev .txt') }}
163153 restore-keys : |
164- ${{ runner.os }}-pip-lint-${{ hashFiles('requirements-all .txt') }}
154+ ${{ runner.os }}-pip-lint-${{ hashFiles('setup.py', ' requirements.txt', 'requirements-dev .txt') }}
165155 ${{ runner.os }}-pip-lint
166156 ${{ runner.os }}-pip
167157 - name : Install dependencies
158+ # Installs core install + all extras ("all") + dev/test dependencies ("dev")
159+ # via the combined "test" extra defined in setup.py.
168160 run : |
169161 python -m pip install --upgrade pip wheel setuptools
170- if [ -f requirements-all.txt ]; then
171- python -m pip install -r requirements-all.txt
172- elif [ -f requirements.txt ]; then
173- python -m pip install -r requirements.txt;
174- fi
175- python -m pip install -e .
176- - name : Install test dependencies
177- run : |
178- if [ -f requirements-dev.txt ]; then
179- python -m pip install -r requirements-dev.txt
180- else
181- echo "Missing requirements-dev.txt. Installing minimal requirements for testing."
182- python -m pip install bandit mypy types-attrs pyroma
183- fi
162+ python -m pip install -e ".[test]"
184163 - name : ruff
185164 run : |
186165 ruff check msticpy --ignore PLW0603
0 commit comments