Skip to content

Commit

Permalink
[MNT] new CI workflow to test extras (#5375)
Browse files Browse the repository at this point in the history
new CI workflow that tris to install `sktime` each extra to see if the
specified packages (with specified versions or versions bounds) are
compatible with one another.

when does it run:

1. runs first of every month at 00:00
2. runs for a PR into `main`that modifies `pyproject.toml`
3. runs when triggered manually

what does it do:

1. runs for all supported operating system
2. runs for all supported python version
3. runs for all supported extras
4. creates a new python environment of specific python version on a
specific operating system with a specific python version and installs
`sktime` with a specific extra

what does it not do:

1. installation multiple extras simultaneously - too many combinations
2. automated resolution if installation fails with conflicts - probably
impossible

other changes

1. formatted of `pyproject.toml` with `pyproject-fmt` as needed to test
workflow
2. skipped `mrsqm` from `classification` extra as it was failing to be
built in most combinations
3. added python version bound for relevant packages
  • Loading branch information
yarnabrina committed Oct 21, 2023
1 parent 5e8d230 commit 5d729c4
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 12 deletions.
21 changes: 21 additions & 0 deletions .github/actions/validate-extra/action.yml
@@ -0,0 +1,21 @@
name: test specific sktime extra
description: install individual extra of sktime
inputs:
sktime-extra-identifier:
description: name of sktime extra
required: true
python-version-identifier:
description: python version to run tests
required: true
runs:
using: composite
steps:
- name: repository checkout step
uses: actions/checkout@v4
- name: python environment step
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python-version-identifier }}
- name: extra installation step
run: python3 -m pip install .[${{ inputs.sktime-extra-identifier }}]
shell: bash
45 changes: 45 additions & 0 deletions .github/workflows/validate_extras.yml
@@ -0,0 +1,45 @@
name: extras validation
on:
pull_request:
branches:
- main
paths:
- pyproject.toml
schedule:
- cron: 0 0 1 * *
workflow_dispatch:
jobs:
test_installations:
name: extras installation
strategy:
fail-fast: false
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
operating-system:
- macos-latest
- ubuntu-latest
- windows-latest
sktime-extra:
- alignment
- annotation
- classification
- clustering
- forecasting
- networks
- param_est
- regression
- transformations
runs-on: ${{ matrix.operating-system }}
steps:
- name: checkout pull request branch
uses: actions/checkout@v4
- name: install ${{ matrix.sktime-extra }} extra on python ${{ matrix.python-version }}
uses: ./.github/actions/validate-extra
with:
sktime-extra-identifier: ${{ matrix.sktime-extra }}
python-version-identifier: ${{ matrix.python-version }}
23 changes: 11 additions & 12 deletions pyproject.toml
Expand Up @@ -133,22 +133,21 @@ all_extras_pandas2 = [
annotation = [
"hmmlearn<0.4,>=0.2.7",
'numba<0.59,>=0.53; python_version < "3.12"',
"pyod<1.2,>=0.8",
'pyod<1.2,>=0.8; python_version < "3.12"',
]
binder = [
"jupyter",
"pandas<2.0.0",
]
classification = [
"esig<0.10,>=0.9.7",
"mrsqm<0.1,>=0.0.3",
'esig<0.10,>=0.9.7; python_version < "3.11"',
'numba<0.59,>=0.53; python_version < "3.12"',
"tensorflow<=2.14,>=2",
'tensorflow<=2.14,>=2; python_version < "3.12"',
'tsfresh<0.21,>=0.17; python_version < "3.12"',
]
clustering = [
'numba<0.59,>=0.53; python_version < "3.12"',
"tslearn<0.6.3,>=0.5.2",
'tslearn<0.6.3,>=0.5.2; python_version < "3.12"',
]
cython_extras = [
"mrseql",
Expand Down Expand Up @@ -184,11 +183,11 @@ docs = [
"tabulate",
]
forecasting = [
"arch<6.3.0,>=5.6",
"arch<6.3,>=5.6",
'pmdarima!=1.8.1,<2.1,>=1.8; python_version < "3.12"',
'prophet<1.2,>=1.1; python_version < "3.12"',
"skpro<2.2.0,>=2",
'statsforecast<1.7.0,>=0.5.2; python_version < "3.12"',
"prophet<1.2,>=1.1",
"skpro<2.2,>=2",
'statsforecast<1.7,>=0.5.2; python_version < "3.12"',
"statsmodels<0.15,>=0.12.1",
'tbats<1.2,>=1.1; python_version < "3.12"',
]
Expand All @@ -203,7 +202,7 @@ mlflow_tests = [
]
networks = [
"keras-self-attention<0.52,>=0.51",
"tensorflow<=2.14,>=2",
'tensorflow<=2.14,>=2; python_version < "3.12"',
]
pandas1 = [
"pandas<2.0.0",
Expand All @@ -214,10 +213,10 @@ param_est = [
]
regression = [
'numba<0.59,>=0.53; python_version < "3.12"',
"tensorflow<=2.14,>=2",
'tensorflow<=2.14,>=2; python_version < "3.12"',
]
transformations = [
"esig<0.10,>=0.9.7",
'esig<0.10,>=0.9.7; python_version < "3.11"',
"filterpy<1.5,>=1.4.5",
"holidays<0.35,>=0.29",
"mne<1.6,>=1.5",
Expand Down

0 comments on commit 5d729c4

Please sign in to comment.