Skip to content

Commit 50083d2

Browse files
committed
Update linters and actions (#157)
* Update pre-commit hooks * Clean lint with updated pre-commit hooks * Allow E704, multiple definitions per line * Manually clean lint found by flake8 * Make test-notebooks job cancelable * Use setup-python action instead of setup-miniconda * Use the conda-forge channel to find nbmake * Also use conda-forge channel for requirements * Clean lint with pre-commit hooks * Replace invalid API key with demo key * Use python=3.13 * Use latest versions of landlab and pymt * Clean lint
1 parent 40aabd2 commit 50083d2

24 files changed

+475
-473
lines changed

.flake8

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[flake8]
2-
ignore = C901, E203, E266, E501, W503, B905
2+
ignore = C901, E203, E266, E501, E704, W503, B905
33
max-line-length = 88
44
max-complexity = 18
55
select = B,C,E,F,W,T4,B9

.github/workflows/test-notebooks.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,25 +2,26 @@ name: Test Notebooks
22

33
on: [push, pull_request]
44

5-
jobs:
5+
concurrency:
6+
group: ${{ github.ref }}-${{ github.workflow }}
7+
cancel-in-progress: true
68

9+
jobs:
710
test-notebooks:
811

912
if:
10-
github.event_name == 'push' ||
11-
github.event.pull_request.head.repo.full_name != github.repository
13+
github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository
1214

1315
name: Test the notebooks
1416
runs-on: ubuntu-latest
17+
1518
steps:
1619
- uses: actions/checkout@v4
1720

18-
- uses: conda-incubator/setup-miniconda@v3
21+
- name: Install Python
22+
uses: actions/setup-python@v5
1923
with:
20-
python-version: "3.11"
21-
miniforge-variant: Miniforge3
22-
miniforge-version: latest
23-
auto-update-conda: true
24+
python-version: 3.13
2425

2526
- name: Install nox
2627
run: pip install nox
@@ -29,4 +30,4 @@ jobs:
2930
env:
3031
MPLBACKEND: "Agg"
3132
OPENTOPOGRAPHY_API_KEY: ${{ secrets.OPENTOPOGRAPHY_API_KEY }}
32-
run: nox -s test-notebooks --python "3.11"
33+
run: nox -s test-notebooks --python "3.13"

.pre-commit-config.yaml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/psf/black
3-
rev: 23.7.0
3+
rev: 25.1.0
44
hooks:
55
- id: black
66
name: black
@@ -23,7 +23,7 @@ repos:
2323
additional_dependencies: [".[jupyter]"]
2424

2525
- repo: https://github.com/nbQA-dev/nbQA
26-
rev: 1.7.0
26+
rev: 1.9.1
2727
hooks:
2828
- id: nbqa-pyupgrade
2929
args: ["--py38-plus"]
@@ -42,7 +42,7 @@ repos:
4242
)
4343
4444
- repo: https://github.com/pycqa/flake8
45-
rev: 6.1.0
45+
rev: 7.2.0
4646
hooks:
4747
- id: flake8
4848
additional_dependencies:
@@ -51,20 +51,20 @@ repos:
5151
- flake8-simplify
5252

5353
- repo: https://github.com/kynan/nbstripout
54-
rev: 0.6.1
54+
rev: 0.8.1
5555
hooks:
5656
- id: nbstripout
5757
description: Strip output from jupyter notebooks
5858
args: [--drop-empty-cells]
5959

6060
- repo: https://github.com/asottile/pyupgrade
61-
rev: v3.10.1
61+
rev: v3.19.1
6262
hooks:
6363
- id: pyupgrade
6464
args: [--py38-plus]
6565

6666
- repo: https://github.com/PyCQA/isort
67-
rev: 5.12.0
67+
rev: 6.0.1
6868
hooks:
6969
- id: isort
7070
files: \.py$
@@ -79,7 +79,7 @@ repos:
7979
# - id: hide-solution-cells
8080

8181
- repo: https://github.com/pre-commit/pre-commit-hooks
82-
rev: v4.4.0
82+
rev: v5.0.0
8383
hooks:
8484
- id: check-builtin-literals
8585
- id: check-added-large-files

README.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"cells": [
33
{
44
"cell_type": "markdown",
5-
"id": "b56d3d13",
5+
"id": "0",
66
"metadata": {},
77
"source": [
88
"![Ivy logo](https://raw.githubusercontent.com/csdms/project/main/assets/CSDMS-logo-color-tagline-hor.png)\n",
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
e3d13293522b2d54ad499adf8d20159e
1+
demoapikeyot2022

0 commit comments

Comments
 (0)