Skip to content

Commit

Permalink
ci: chain requirements to ensure consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda committed Jan 29, 2024
1 parent 4a481ca commit 5717472
Show file tree
Hide file tree
Showing 14 changed files with 66 additions and 78 deletions.
13 changes: 6 additions & 7 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,12 @@ jobs:

- name: Install dependencies
run: |
python -m pip install -U pip
pip install ".[arrow]"
pip install -r requirements/requirements-docs.txt
pip install -r requirements/requirements-mxnet.txt
pip install -r requirements/requirements-pytorch.txt
pip install -r requirements/requirements-rotbaum.txt
pip install -r requirements/requirements-extras-statsforecast.txt
pip install ".[arrow]" \
-r requirements/requirements-docs.txt \
-r requirements/requirements-mxnet.txt \
-r requirements/requirements-pytorch.txt \
-r requirements/requirements-rotbaum.txt \
-r requirements/requirements-extras-statsforecast.txt
- name: Install Pandoc
run: |
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/doctests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install other dependencies
run: |
python -m pip install -U pip
pip install -e .
pip install -r requirements/requirements-test.txt
pip install -r requirements/requirements-arrow.txt
pip install -e . \
-r requirements/requirements-test.txt \
-r requirements/requirements-arrow.txt
- name: Test with pytest
run: |
pytest -n2 --doctest-modules \
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/flake8.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ jobs:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install -U pip
pip install ruff
pip install docformatter[tomli]==1.5.0
- name: Ruff (Flake8)
Expand Down
17 changes: 8 additions & 9 deletions .github/workflows/mxnet_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,15 +26,14 @@ jobs:
run: |
python -m pip install pip==20.2
pip install --pre "mxnet<2" -f https://dist.mxnet.io/python
pip install torch==1.10.0+cpu --no-cache-dir -f https://download.pytorch.org/whl/cpu/torch_stable.html
pip install pytorch-lightning~=1.5
pip install -e ".[shell]"
pip install -r requirements/requirements-test.txt
pip install -r requirements/requirements-extras-sagemaker-sdk.txt
pip install -r requirements/requirements-extras-m-competitions.txt
pip install -r requirements/requirements-rotbaum.txt
pip install -r requirements/requirements-extras-anomaly-evaluation.txt
pip install -r requirements/requirements-extras-autogluon.txt
pip install "torch==1.10.0" "pytorch-lightning~=1.5" -f https://download.pytorch.org/whl/cpu/torch_stable.html
pip install -e ".[shell]" \
-r requirements/requirements-test.txt \
-r requirements/requirements-extras-sagemaker-sdk.txt \
-r requirements/requirements-extras-m-competitions.txt \
-r requirements/requirements-rotbaum.txt \
-r requirements/requirements-extras-anomaly-evaluation.txt \
-r requirements/requirements-extras-autogluon.txt
- name: Test with pytest
run: |
pytest -m 'not (gpu or serial)' --cov src/gluonts --cov-report=term --cov-report xml test
1 change: 0 additions & 1 deletion .github/workflows/pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ jobs:
python-version: '3.8'
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install setuptools wheel
- name: Create `dist` folder
run: |
Expand Down
19 changes: 9 additions & 10 deletions .github/workflows/test_release_unix_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,15 @@ jobs:
git clone https://github.com/awslabs/gluonts --branch $(curl https://api.github.com/repos/awslabs/gluonts/releases/latest | grep tag_name | cut -d : -f 2,3 | tr -d \"\ | tr -d \,\ )
cd gluon-ts
python -m pip install pip==20.2
pip install mxnet~=1.8.0
pip install torch==1.10.0+cpu --no-cache-dir -f https://download.pytorch.org/whl/cpu/torch_stable.html
pip install pytorch-lightning~=1.5
pip install -e ".[shell]"
pip install -r requirements/requirements-test.txt
pip install -r requirements/requirements-extras-sagemaker-sdk.txt
pip install -r requirements/requirements-extras-m-competitions.txt
pip install -r requirements/requirements-rotbaum.txt
pip install -r requirements/requirements-extras-anomaly-evaluation.txt
pip install -r requirements/requirements-extras-autogluon.txt
pip install "mxnet~=1.8.0" "torch==1.10.0" "pytorch-lightning~=1.5" \
-f https://download.pytorch.org/whl/cpu/torch_stable.html
pip install -e ".[shell]" \
-r requirements/requirements-test.txt \
-r requirements/requirements-extras-sagemaker-sdk.txt \
-r requirements/requirements-extras-m-competitions.txt \
-r requirements/requirements-rotbaum.txt \
-r requirements/requirements-extras-anomaly-evaluation.txt \
-r requirements/requirements-extras-autogluon.txt
- name: Test with pytest
run: |
cd gluon-ts
Expand Down
19 changes: 8 additions & 11 deletions .github/workflows/test_release_win32_nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,14 @@ jobs:
$tmp=$tmp.psobject.properties.value.trim()
git clone https://github.com/awslabs/gluonts --branch $tmp
cd gluon-ts
python -m pip install -U pip
pip install mxnet~=1.7.0
pip install torch
pip install pytorch-lightning~=1.5
pip install -e ".[shell]"
pip install -r requirements/requirements-test.txt
pip install -r requirements/requirements-extras-sagemaker-sdk.txt
pip install -r requirements/requirements-extras-m-competitions.txt
pip install -r requirements/requirements-rotbaum.txt
pip install -r requirements/requirements-extras-anomaly-evaluation.txt
pip install -r requirements/requirements-extras-autogluon.txt
pip install "mxnet~=1.7.0" torch "pytorch-lightning~=1.5"
pip install -e ".[shell]" \
-r requirements/requirements-test.txt \
-r requirements/requirements-extras-sagemaker-sdk.txt \
-r requirements/requirements-extras-m-competitions.txt \
-r requirements/requirements-rotbaum.txt \
-r requirements/requirements-extras-anomaly-evaluation.txt \
-r requirements/requirements-extras-autogluon.txt
shell: powershell
- name: Test with pytest
run: |
Expand Down
9 changes: 4 additions & 5 deletions .github/workflows/tests-nixtla.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,10 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install other dependencies
run: |
python -m pip install -U pip
pip install .
pip install -r requirements/requirements-test.txt
pip install -r requirements/requirements-extras-statsforecast.txt
pip install -r requirements/requirements-extras-hierarchicalforecast.txt
pip install . \
-r requirements/requirements-test.txt \
-r requirements/requirements-extras-statsforecast.txt \
-r requirements/requirements-extras-hierarchicalforecast.txt
- name: Test with pytest
run: |
pytest -n2 --doctest-modules test/ext/statsforecast
Expand Down
19 changes: 10 additions & 9 deletions .github/workflows/tests-nursery.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,16 @@ jobs:
run: pip install mxnet~=1.7.0
- name: Install other dependencies
run: |
python -m pip install -U pip
pip install torch==1.10.0+cpu --no-cache-dir -f https://download.pytorch.org/whl/cpu/torch_stable.html
pip install pytorch-lightning~=1.5
pip install -e ".[shell]"
pip install -r requirements/requirements-test.txt
pip install -r requirements/requirements-extras-sagemaker-sdk.txt
pip install -r requirements/requirements-extras-m-competitions.txt
pip install -r requirements/requirements-extras-anomaly-evaluation.txt
pip install -r requirements/requirements-extras-autogluon.txt
pip install "torch==1.10.0" "pytorch-lightning~=1.5" \
-f https://download.pytorch.org/whl/cpu/torch_stable.html
pip install
pip install -e ".[shell]" \
-r requirements/requirements-test.txt \
-r requirements/requirements-extras-sagemaker-sdk.txt \
-r requirements/requirements-extras-m-competitions.txt \
-r requirements/requirements-rotbaum.txt \
-r requirements/requirements-extras-anomaly-evaluation.txt \
-r requirements/requirements-extras-autogluon.txt
- name: Test with pytest
run: |
pytest -n2 --doctest-modules test/nursery
6 changes: 3 additions & 3 deletions .github/workflows/tests-prophet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ jobs:
- name: Install other dependencies
run: |
python -m pip install -U pip
pip install .
pip install -r requirements/requirements-test.txt
pip install -r requirements/requirements-extras-prophet.txt
pip install . \
-r requirements/requirements-test.txt \
-r requirements/requirements-extras-prophet.txt
- name: Test with pytest
run: |
pytest -n2 --doctest-modules test/ext/prophet
7 changes: 3 additions & 4 deletions .github/workflows/tests-r.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,9 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install Python dependencies
run: |
python -m pip install -U pip
pip install .
pip install -r requirements/requirements-test.txt
pip install -r requirements/requirements-extras-r.txt
pip install . \
-r requirements/requirements-test.txt \
-r requirements/requirements-extras-r.txt
- name: Test with pytest
run: |
pytest -n2 test/ext/r_forecast
11 changes: 5 additions & 6 deletions .github/workflows/tests-torch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,11 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install -U pip
pip install ".[arrow]"
pip install -r requirements/requirements-test.txt
pip install -r requirements/requirements-extras-m-competitions.txt
pip install -r requirements/requirements-pytorch.txt
pip install -r requirements/requirements-extras-cpflows.txt
pip install ".[arrow]" \
-r requirements/requirements-test.txt \
-r requirements/requirements-extras-m-competitions.txt \
-r requirements/requirements-pytorch.txt \
-r requirements/requirements-extras-cpflows.txt
- name: Test with pytest
run: |
pytest -n2 --doctest-modules --ignore test/nursery test
8 changes: 4 additions & 4 deletions .github/workflows/tests-xgboost.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:
run: |
python -m pip install -U pip setuptools wheel
python -m pip install -U "Cython<3.0"
pip install .
pip install -r requirements/requirements-test.txt
pip install -r requirements/requirements-rotbaum.txt
pip install -r requirements/requirements-rotbaum-extra-methods.txt
pip install . \
-r requirements/requirements-test.txt \
-r requirements/requirements-rotbaum.txt \
-r requirements/requirements-rotbaum-extra-methods.txt
- name: Test with pytest
run: |
pytest -n2 --timeout 120 --doctest-modules test/ext/rotbaum
7 changes: 3 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ jobs:
python-version: ${{ matrix.python-version }}
- name: Install other dependencies
run: |
python -m pip install -U pip
pip install ".[mxnet,arrow,shell]"
pip install -r requirements/requirements-test.txt
pip install -r requirements/requirements-extras-m-competitions.txt
pip install ".[mxnet,arrow,shell]" \
-r requirements/requirements-test.txt \
-r requirements/requirements-extras-m-competitions.txt
- name: Test with pytest
run: |
pytest -n2 --doctest-modules --ignore test/nursery test

0 comments on commit 5717472

Please sign in to comment.