Skip to content

Commit

Permalink
Merge branch 'sktime:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
YHallouard authored Nov 1, 2023
2 parents 9390639 + b6fc794 commit 95bd5cf
Show file tree
Hide file tree
Showing 258 changed files with 1,948 additions and 793 deletions.
12 changes: 11 additions & 1 deletion .all-contributorsrc
Original file line number Diff line number Diff line change
Expand Up @@ -2423,7 +2423,7 @@
"contributions": [
"test"
]
}
},
{
"login": "xansh",
"name": "Ansh Kumar",
Expand All @@ -2433,5 +2433,15 @@
"doc"
]
},
{
"login": "tpvasconcelos",
"name": "Tomas P. de Vasconcelos",
"avatar_url": "https://avatars.githubusercontent.com/u/17701527?v=4",
"profile": "https://github.com/tpvasconcelos",
"contributions": [
"bug",
"code"
]
}
]
}
2 changes: 1 addition & 1 deletion .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ coverage:
status:
project:
default:
# treshold: 1%
# threshold: 1%
informational: true
patch:
default:
Expand Down
37 changes: 37 additions & 0 deletions .github/actions/test-base/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: test base sktime
description: run unit tests on base interface of sktime framework
inputs:
python-version-identifier:
description: python version to run tests
required: true
sub-sample-estimators:
description: test only subset of estimators
required: true
test-affected-estimators:
description: test only modified estimators
required: true
runs:
using: composite
steps:
- name: repository checkout step
uses: actions/checkout@v4
- name: update tracking reference step
run: git remote set-branches origin main
shell: bash
- name: shallow clone update step
run: git fetch --depth 1
shell: bash
- name: python environment step
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python-version-identifier }}
- name: dependencies installation step
run: python3 -m pip install .[tests]
shell: bash
- name: unit test step
run: python3 -m pytest sktime/base --matrixdesign ${{ inputs.sub-sample-estimators }} --only_changed_modules ${{ inputs.test-affected-estimators }}
shell: bash
- name: test coverage step
uses: codecov/codecov-action@v3
with:
flags: ${{ inputs.python-version-identifier }},base
40 changes: 40 additions & 0 deletions .github/actions/test-component/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: test specific sktime component
description: run unit tests on individual component of sktime framework
inputs:
sktime-component-identifier:
description: name of sktime component
required: true
python-version-identifier:
description: python version to run tests
required: true
sub-sample-estimators:
description: test only subset of estimators
required: true
test-affected-estimators:
description: test only modified estimators
required: true
runs:
using: composite
steps:
- name: repository checkout step
uses: actions/checkout@v4
- name: update tracking reference step
run: git remote set-branches origin main
shell: bash
- name: shallow clone update step
run: git fetch --depth 1
shell: bash
- name: python environment step
uses: actions/setup-python@v4
with:
python-version: ${{ inputs.python-version-identifier }}
- name: dependencies installation step
run: python3 -m pip install .[${{ inputs.sktime-component-identifier }},tests]
shell: bash
- name: unit test step
run: python3 -m pytest sktime/${{ inputs.sktime-component-identifier }} --matrixdesign ${{ inputs.sub-sample-estimators }} --only_changed_modules ${{ inputs.test-affected-estimators }}
shell: bash
- name: test coverage step
uses: codecov/codecov-action@v3
with:
flags: ${{ inputs.python-version-identifier }},${{ inputs.sktime-component-identifier }}
21 changes: 21 additions & 0 deletions .github/actions/validate-extra/action.yml
Original file line number Diff line number Diff line change
@@ -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
86 changes: 86 additions & 0 deletions .github/workflows/test_all.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
name: test all workflow
on:
schedule:
- cron: 0 0 * * 0
workflow_dispatch:
jobs:
code_quality:
name: validate code quality
runs-on: ubuntu-latest
steps:
- name: repository checkout step
uses: actions/checkout@v4
- name: python environment step
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: install pre-commit
run: python3 -m pip install pre-commit
- name: run pre-commit hooks on all files
run: pre-commit run --color always --all-files --show-diff-on-failure
- name: check missing __init__ files
run: build_tools/fail_on_missing_init_files.sh
shell: bash
test_base:
needs: code_quality
name: test base framework
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
runs-on: ${{ matrix.operating-system }}
steps:
- name: checkout pull request branch
uses: actions/checkout@v4
- name: run tests on python ${{ matrix.python-version }}
uses: ./.github/actions/test-base
with:
python-version-identifier: ${{ matrix.python-version }}
sub-sample-estimators: "False"
test-affected-estimators: "False"
test_components:
needs: code_quality
name: test individual components
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-component:
- 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: run tests for component ${{ matrix.sktime-component }} on python ${{ matrix.python-version }}
uses: ./.github/actions/test-component
with:
sktime-component-identifier: ${{ matrix.sktime-component }}
python-version-identifier: ${{ matrix.python-version }}
sub-sample-estimators: "False"
test-affected-estimators: "False"
45 changes: 45 additions & 0 deletions .github/workflows/test_base.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: test base workflow
on:
workflow_call:
jobs:
detect:
name: check for changes in base framework
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
base: ${{ steps.filter.outputs.base }}
steps:
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
base:
- sktime/base/**
test:
needs: detect
name: test base framework
if: ${{ needs.detect.outputs.base == 'true' }}
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
runs-on: ${{ matrix.operating-system }}
steps:
- name: checkout pull request branch
uses: actions/checkout@v4
- name: run tests on python ${{ matrix.python-version }}
uses: ./.github/actions/test-base
with:
python-version-identifier: ${{ matrix.python-version }}
sub-sample-estimators: "True"
test-affected-estimators: "True"
34 changes: 34 additions & 0 deletions .github/workflows/test_code_quality.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: validate code quality workflow
on:
pull_request:
branches:
- main
jobs:
code_quality:
name: test code quality
runs-on: ubuntu-latest
steps:
- name: repository checkout step
uses: actions/checkout@v4
- name: python environment step
uses: actions/setup-python@v4
with:
python-version: "3.8"
- name: install pre-commit
run: python3 -m pip install pre-commit
- id: changed-files
name: identify modified files
uses: tj-actions/changed-files@v40
- name: run pre-commit hooks on modified files
run: pre-commit run --color always --files ${{ steps.changed-files.outputs.all_changed_files }} --show-diff-on-failure
- name: check missing __init__ files
run: build_tools/fail_on_missing_init_files.sh
shell: bash
unit_test_base:
needs: code_quality
name: run unit tests for base framework
uses: ./.github/workflows/test_base.yml
unit_test_components:
needs: code_quality
name: run unit tests for individual components
uses: ./.github/workflows/test_components.yml
62 changes: 62 additions & 0 deletions .github/workflows/test_components.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: test individual components workflow
on:
workflow_call:
jobs:
detect:
name: check for changes in individual components
runs-on: ubuntu-latest
permissions:
pull-requests: read
outputs:
components: ${{ steps.filter.outputs.changes }}
steps:
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
alignment:
- sktime/alignment/**
annotation:
- sktime/annotation/**
classification:
- sktime/classification/**
clustering:
- sktime/clustering/**
forecasting:
- sktime/forecasting/**
networks:
- sktime/networks/**
param_est:
- sktime/param_est/**
regression:
- sktime/regression/**
transformations:
- sktime/transformations/**
test:
needs: detect
name: test specific component
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-component: ${{ fromJSON(needs.detect.outputs.components) }}
runs-on: ${{ matrix.operating-system }}
steps:
- name: checkout pull request branch
uses: actions/checkout@v4
- name: run tests for component ${{ matrix.sktime-component }} on python ${{ matrix.python-version }}
uses: ./.github/actions/test-component
with:
sktime-component-identifier: ${{ matrix.sktime-component }}
python-version-identifier: ${{ matrix.python-version }}
sub-sample-estimators: "True"
test-affected-estimators: "True"
2 changes: 1 addition & 1 deletion .github/workflows/update_contributors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v3
uses: actions/setup-node@v4
with:
node-version: 18
- name: Set up tool
Expand Down
Loading

0 comments on commit 95bd5cf

Please sign in to comment.