Skip to content

Commit

Permalink
workflow and config updates from aeon
Browse files Browse the repository at this point in the history
  • Loading branch information
MatthewMiddlehurst committed Nov 16, 2023
1 parent 5311e49 commit b739b05
Show file tree
Hide file tree
Showing 8 changed files with 111 additions and 13 deletions.
34 changes: 34 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
version: 2
updates:
# update GitHub actions versions
- package-ecosystem: github-actions
directory: /
schedule:
interval: weekly
time: "01:00"
commit-message:
prefix: "[MNT]"
labels:
- "maintenance"
- "no changelog"
groups:
github-actions:
patterns:
- "*"

# update Python dependencies
- package-ecosystem: pip
directory: /
schedule:
interval: weekly
time: "01:00"
commit-message:
prefix: "[MNT]"
labels:
- "maintenance"
- "full pytest actions"
- "no changelog"
groups:
python-packages:
patterns:
- "*"
4 changes: 4 additions & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ on:
- "tsml_eval/**"
- ".github/workflows/**"
- "pyproject.toml"
schedule:
# every day at 1:30 AM UTC
- cron: "30 1 * * *"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
Expand Down
19 changes: 16 additions & 3 deletions .github/workflows/pre_commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ on:
pull_request:
branches:
- main
schedule:
# every day at 1:30 AM UTC
- cron: "30 1 * * *"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
Expand All @@ -26,9 +30,18 @@ jobs:
- uses: tj-actions/[email protected]
id: changed-files

- uses: pre-commit/[email protected]
- if: ${{ github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'full pre-commit') }}
name: Full pre-commit
uses: pre-commit/[email protected]
with:
extra_args: --all-files
- if: ${{ github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'full pre-commit') }}
name: Local pre-commit
uses: pre-commit/[email protected]
with:
extra_args: --files ${{ steps.changed-files.outputs.all_changed_files }}

- uses: pre-commit-ci/[email protected]
if: always()
- uses: marocchino/validate-dependabot@v2

- if: ${{ failure() && github.event_name == 'pull_request' && github.event.pull_request.draft == false }}
uses: pre-commit-ci/[email protected]
37 changes: 37 additions & 0 deletions .github/workflows/precommit_autoupdate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: Update pre-commit Hooks

on:
schedule:
# every Monday at 12:30 AM UTC
- cron: "30 0 * * 1"
workflow_dispatch:

jobs:
pre-commit-auto-update:
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3

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

- uses: browniebroke/[email protected]

- if: always()
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.PR_APP_ID }}
private-key: ${{ secrets.PR_APP_KEY }}

- if: always()
uses: peter-evans/create-pull-request@v5
with:
token: ${{ steps.app-token.outputs.token }}
commit-message: "Automated `pre-commit` hook update"
branch: pre-commit-hooks-update
title: "[MNT] Automated `pre-commit` hook update"
body: "Automated weekly update to `.pre-commit-config.yaml` hook versions."
labels: maintenance, full pre-commit, no changelog
8 changes: 5 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,11 @@ on:
release:
types:
- published
workflow_dispatch:

jobs:
check_manifest:
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
Expand All @@ -22,7 +23,7 @@ jobs:

build_project:
needs: check_manifest
runs-on: ubuntu-latest
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v3
Expand All @@ -41,6 +42,7 @@ jobs:
with:
name: dist
path: dist/*
retention-days: 5

test_wheels:
needs: build_project
Expand All @@ -49,7 +51,7 @@ jobs:

strategy:
matrix:
os: [ ubuntu-latest, macOS-latest, windows-latest ]
os: [ ubuntu-22.04, macOS-12, windows-2022 ]
python-version: [ "3.8", "3.9", "3.10", "3.11" ]

steps:
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ on:
- "tsml_eval/**"
- ".github/workflows/**"
- "pyproject.toml"
schedule:
# every day at 1:30 AM UTC
- cron: "30 1 * * *"
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.ref }}
Expand Down
8 changes: 7 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ authors = [
{name = "Matthew Middlehurst", email = "[email protected]"},
{name = "Tony Bagnall", email = "[email protected]"},
]
maintainers = [
{name = "Matthew Middlehurst", email = "[email protected]"},
{name = "Tony Bagnall", email = "[email protected]"},
]
readme = "README.md"
requires-python = ">=3.8,<3.12"
keywords = [
"data-science",
"machine-learning",
Expand All @@ -36,6 +39,7 @@ classifiers = [
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
]
requires-python = ">=3.8,<3.12"
dependencies = [
"aeon>=0.4.0,<0.5.0",
"scikit-learn>=1.0.2,<=1.2.2",
Expand All @@ -58,6 +62,8 @@ unstable_extras = [
deep_learning = [
"aeon[dl]",
"torch>=1.13.1",
# temp
"pycatch22<=0.4.3",
]
dev = [
"pre-commit",
Expand Down
10 changes: 4 additions & 6 deletions sweep.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
gha_enabled: True
branch: "main"
blocked_dirs: [".github/", "_tsml_group_experiments/", "results/", "tsml_eval/publications/"]
blocked_dirs: [".github/", "results/"]
draft: False
description: "time-series-machine-learning/tsml-eval is a Python project for running experiments on time series machine learning algorithms and evaluating the results. Write code that adheres to PEP8 and is formatted to the Black code style. The projects documentation is built using Sphinx and MyST, and unit testing is done using pytest."

Expand All @@ -16,11 +16,9 @@ docs:

sandbox:
install:
- pre-commit install
- pre-commit install
check:
- pre-commit run --files {file_path}
- git add . && pre-commit run --files {file_path} || exit 0

rules:
- "Any clearly inefficient or redundant code can be optimized or refactored. Any improvements should not change the functionality of the code."
- "All public classes and functions except test functions should have a `numpydoc` style docstring. This should include a description of the class or function, the parameters, the class attributes or function return values, and a usage example for the class or function."
- "Update the relevant API page in `docs/api_reference/` when new public functions and classes are added and not included in the API documentation. For example, if a new function is added to `aeon/distances/`, a `sphinx.ext.autosummary` link should also be added to `docs/api_reference/distances.rst`. New sections in the page should not be created for individual functions and classes, add it to the most relevant existing one. Only add functions and classes which are not already in the relevant API page and avoid duplicate entries."
- ""

0 comments on commit b739b05

Please sign in to comment.