Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/workflows/cancel.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: Cancel Workflows on Push
on:
workflow_run:
workflows: ["Install and test"]
types:
- requested
jobs:
cancel:
runs-on: ubuntu-latest
steps:
- uses: styfle/cancel-workflow-action@0.9.1
with:
workflow_id: ${{ github.event.workflow.id }}
182 changes: 182 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,182 @@
name: Install and test

on:
push:
branches:
- main
pull_request:
branches:
- main

jobs:
code-quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
- id: file_changes
uses: trilom/file-changes-action@v1.2.4
with:
output: " "
- name: List changed files
run: echo '${{ steps.file_changes.outputs.files}}'
- uses: pre-commit/action@v3.0.0
with:
extra_args: --files ${{ steps.file_changes.outputs.files}}
- name: Check for missing init files
run: build_tools/fail_on_missing_init_files.sh
shell: bash

run-notebook-examples:
needs: code-quality
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install .[all_extras,binder,dev,mlflow]
- name: Run example notebooks
run: build_tools/run_examples.sh
shell: bash

test-nosoftdeps:
needs: code-quality
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Display Python version
run: python -c "import sys; print(sys.version)"

- name: Install sktime and dependencies
run: |
python -m pip install .[dev]

- name: Show dependencies
run: python -m pip list

- name: Run tests
run: make PYTESTOPTIONS="--cov --cov-report=xml --timeout=600" test_softdeps

test-nosoftdeps-full:
needs: test-nosoftdeps
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Display Python version
run: python -c "import sys; print(sys.version)"

- name: Install sktime and dependencies
run: |
python -m pip install .[dev]

- name: Show dependencies
run: python -m pip list

- name: Run tests
run: make PYTESTOPTIONS="--cov --cov-report=xml --timeout=600" test_softdeps_full

test-mlflow:
needs: test-nosoftdeps
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.9
- name: Display Python version
run: python -c "import sys; print(sys.version)"

- name: Install sktime and dependencies
run: |
python -m pip install .[all_extras,dev,mlflow_tests] --no-cache-dir

- name: Show dependencies
run: python -m pip list

- name: Run tests
run: make PYTESTOPTIONS="--cov --cov-report=xml --timeout=600" test_mlflow

test-windows:
needs: test-nosoftdeps
runs-on: windows-2019
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']

steps:
- uses: actions/checkout@v3

- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
channels: anaconda, conda-forge,

- run: conda --version
- run: which python

- name: Fix windows paths
if: ${{ runner.os == 'Windows' }}
run: echo "C:\Program Files (x86)\Windows Kits\10\bin\10.0.18362.0\x64" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append

- name: Install conda libpython
run: conda install -c anaconda libpython

- name: Install sktime and dependencies
run: python -m pip install .[all_extras,dev]

- name: Show dependencies
run: python -m pip list

- name: Run tests
run: |
mkdir -p testdir/
cp .coveragerc testdir/
cp setup.cfg testdir/
python -m pytest

- name: Publish code coverage
uses: codecov/codecov-action@v3

test-unix:
needs: test-nosoftdeps
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10']
os: [ubuntu-20.04, macOS-11]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Display Python version
run: python -c "import sys; print(sys.version)"

- name: Install sktime and dependencies
run: |
python -m pip install .[all_extras,dev] --no-cache-dir

- name: Show dependencies
run: python -m pip list

- name: Run tests
run: make test

- name: Publish code coverage
uses: codecov/codecov-action@v3
33 changes: 33 additions & 0 deletions .github/workflows/update_contributors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Update Contributors

on:
push:
branches:
- main
paths:
- '.all-contributorsrc'

jobs:
generate-markdown-and-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Node
uses: actions/setup-node@v3
with:
node-version: 18
- name: Set up tool
run: npm install -g all-contributors-cli@6.24.0
- name: Generate file
id: generate
run: npx all-contributors generate
- name: commit-and-push
id: candp
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: '[AUTOMATED] update CONTRIBUTORS.md'
file_pattern: 'CONTRIBUTORS.md'
commit_user_name: github-actions[bot]
- name: Echo Results
if: steps.candp.outputs.changes_detected == 'true'
run: echo "changes detected and committed."
151 changes: 151 additions & 0 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,151 @@
name: Build wheels and publish to PyPI

on:
release:
types: [published]

jobs:
build_wheels:
name: Build wheels
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: '3.10'

- name: Build wheel
run: |
python -m pip install build
python -m build --wheel --sdist --outdir wheelhouse

- name: Store wheels
uses: actions/upload-artifact@v2
with:
name: wheels
path: wheelhouse/*

test_unix_wheels:
needs: build_wheels
name: Test wheels on ${{ matrix.os }} with ${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-20.04, macOS-11]
python-version: ['3.7', '3.8', '3.9', '3.10']

steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}

- uses: actions/download-artifact@v2
with:
name: wheels
path: wheelhouse

- name: Get wheel filename
run: echo "WHEELNAME=$(ls ./wheelhouse/sktime-*none-any.whl)" >> $GITHUB_ENV

- name: Install wheel and extras
run: python -m pip install "${{ env.WHEELNAME }}[all_extras,dev]"

- name: Run tests
run: make test

test_windows_wheels:
needs: build_wheels
name: Test wheels on ${{ matrix.os }} with ${{ matrix.python-version }}
runs-on: windows-2019
strategy:
matrix:
include:
# Window 64 bit
- os: windows-2019
python: 37
python-version: '3.7'
bitness: 64
platform_id: win_amd64
- os: windows-2019
python: 38
python-version: '3.8'
bitness: 64
platform_id: win_amd64
- os: windows-2019
python: 39
python-version: '3.9'
bitness: 64
platform_id: win_amd64
- os: windows-2019
python: 310
python-version: '3.10'
bitness: 64
platform_id: win_amd64
- os: windows-2019
python: 39
python-version: 3.9
bitness: 64
platform_id: win_amd64

steps:
- uses: actions/checkout@v3
- uses: conda-incubator/setup-miniconda@v2
with:
activate-environment: test
auto-update-conda: true
python-version: ${{ matrix.python-version }}
channels: anaconda, conda-forge,

- run: conda --version
- run: which python

- uses: actions/download-artifact@v2
with:
name: wheels
path: wheelhouse

- name: Install conda libpython
run: conda install -c anaconda -n test -y libpython

- name: Display downloaded artifacts
run: ls -l wheelhouse

- name: Get wheel filename
run: echo "WHEELNAME=$(ls ./wheelhouse/sktime-*none-any.whl)" >> $env:GITHUB_ENV

- name: Activate conda env
run: conda activate test

- name: Install wheel and extras
run: python -m pip install "${env:WHEELNAME}[all_extras,dev]"

- name: Show conda packages
run: conda list -n test

- name: Run tests
run: |
mkdir -p testdir/
cp .coveragerc testdir/
cp setup.cfg testdir/
python -m pytest

upload_wheels:
name: Upload wheels to PyPI
runs-on: ubuntu-latest
needs: [build_wheels,test_unix_wheels,test_windows_wheels]

steps:
- uses: actions/download-artifact@v2
with:
name: wheels
path: wheelhouse

- name: Publish package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: ${{ secrets.PYPI_USERNAME }}
password: ${{ secrets.PYPI_PASSWORD }}
packages_dir: wheelhouse/
8 changes: 0 additions & 8 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,11 +59,3 @@ repos:
hooks:
- id: pydocstyle
args: ["--config=setup.cfg"]

# We use the Python version instead of the original version which seems to require Docker
# https://github.com/koalaman/shellcheck-precommit
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.8.0.4
hooks:
- id: shellcheck
name: shellcheck
Loading