Skip to content

Commit 4dcd89e

Browse files
committed
Implement some suggestions from repo-review tool
- Add concurrency for workflows (so repeated pushes on the same branch cancel previous workflow run) - Add dependabot for GHA version updating - Add prettier as formatter (removing Biome as it didn't format the needed files) - --show-fixes in ruff config Used https://learn.scientific-python.org/development/guides/repo-review/ to highlight suggested changes in project configuration. Some items (upload-artifact version change, nox/tox integration, spell checker, pytest options) weren't included as they add maintainence burden beyond their benefits, or hinder development (codespell).
1 parent 5690b76 commit 4dcd89e

File tree

6 files changed

+14
-9
lines changed

6 files changed

+14
-9
lines changed

.github/dependabot.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "monthly"

.github/workflows/ci.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ on:
55
- "master"
66
- "test-me/*"
77
pull_request:
8-
branches:
9-
- "*"
108
schedule:
119
- cron: "0 7 * * 1" # Run every Monday at 7:00 UTC
1210

11+
concurrency:
12+
group: branch-${{ github.head_ref }}
13+
cancel-in-progress: true
14+
1315
defaults:
1416
run:
1517
shell: bash -el {0}

.pre-commit-config.yaml

+4-4
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ repos:
1313
rev: v0.5.6
1414
hooks:
1515
- id: ruff
16-
args: [ --fix ]
16+
args: [--fix, --show-fixes]
1717
- id: ruff
1818
name: ruff (isort jupyter)
1919
args: [--select, I, --fix]
20-
types_or: [ jupyter ]
20+
types_or: [jupyter]
2121
- id: ruff-format
2222
types_or: [ python, jupyter ]
2323
- repo: https://github.com/biomejs/pre-commit
@@ -31,9 +31,9 @@ repos:
3131
hooks:
3232
- id: flake8
3333
name: pydoclint
34-
files: 'none'
34+
files: "none"
3535
# files: parcels/fieldset.py # put here instead of in config file due to https://github.com/pre-commit/pre-commit-hooks/issues/112#issuecomment-215613842
3636
args:
37-
- --select=DOC103 # TODO: Expand coverage to other codes
37+
- --select=DOC103 # TODO: Expand coverage to other codes
3838
additional_dependencies:
3939
- pydoclint[flake8]

codecov.yml

-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,5 @@ comment:
1313
require_base: false
1414
require_head: true
1515
hide_project_coverage: true
16-
1716
# When modifying this file, please validate using
1817
# curl -X POST --data-binary @codecov.yml https://codecov.io/validate

environment.yml

-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,6 @@ dependencies:
3838
- types-tqdm
3939
- types-psutil
4040

41-
4241
# Linting
4342
- pre_commit
4443

pyproject.toml

-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ local_scheme = "no-local-version"
5454
python_files = ["test_*.py", "example_*.py", "*tutorial*"]
5555

5656
[tool.ruff]
57-
target-version = "py310"
5857
line-length = 120
5958

6059
[tool.ruff.lint]

0 commit comments

Comments
 (0)