Skip to content

Commit

Permalink
[MNT] Automated pre-commit hook update (aeon-toolkit#1834)
Browse files Browse the repository at this point in the history
* Automated `pre-commit` hook update

* workflow checkout revert

---------

Co-authored-by: MatthewMiddlehurst <[email protected]>
Co-authored-by: MatthewMiddlehurst <[email protected]>
  • Loading branch information
3 people authored Jul 22, 2024
1 parent 61e7fe8 commit ba0f5a1
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 21 deletions.
27 changes: 11 additions & 16 deletions .github/workflows/pr_precommit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,19 @@ jobs:
runs-on: ubuntu-20.04

steps:
- name: Create app token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.PR_APP_ID }}
private-key: ${{ secrets.PR_APP_KEY }}

- name: Checkout
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
token: ${{ steps.app-token.outputs.token }}

- name: Setup Python 3.10
uses: actions/setup-python@v5
Expand All @@ -45,22 +56,6 @@ jobs:
extra_args: --files ${{ steps.changed-files.outputs.all_changed_files }}

# push fixes if pre-commit fails and PR is eligible
- if: ${{ failure() && github.event_name == 'pull_request_target' && !github.event.pull_request.draft && !contains(github.event.pull_request.labels.*.name, 'stop pre-commit fixes') }}
name: Create app token
uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.PR_APP_ID }}
private-key: ${{ secrets.PR_APP_KEY }}

- if: ${{ failure() && github.event_name == 'pull_request_target' && !github.event.pull_request.draft && !contains(github.event.pull_request.labels.*.name, 'stop pre-commit fixes') }}
name: Checkout
uses: actions/checkout@v4
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.head_ref }}
token: ${{ steps.app-token.outputs.token }}

- if: ${{ failure() && github.event_name == 'pull_request_target' && !github.event.pull_request.draft && !contains(github.event.pull_request.labels.*.name, 'stop pre-commit fixes') }}
name: Push pre-commit fixes
uses: stefanzweifel/git-auto-commit-action@v5
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ repos:
args: [ "--create", "--python-folders", "aeon" ]

- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.5.2
rev: v0.5.4
hooks:
- id: ruff
args: [ "--fix"]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from aeon.regression.convolution_based import (
HydraRegressor,
MultiRocketHydraRegressor,
RocketRegressor
RocketRegressor,
)
from aeon.regression.distance_based import KNeighborsTimeSeriesRegressor
from aeon.regression.feature_based import (
Expand All @@ -25,9 +25,8 @@
RandomIntervalSpectralEnsembleRegressor,
TimeSeriesForestRegressor,
)
from aeon.regression.shapelet_based import (
RDSTRegressor,
)
from aeon.regression.shapelet_based import RDSTRegressor


def _reproduce_regression_covid_3month(estimator):
X_train, y_train = load_covid_3month(split="train")
Expand Down

0 comments on commit ba0f5a1

Please sign in to comment.