Skip to content

Commit a50915a

Browse files
authored
Merge pull request #397 from NLeSC/378b-ruff-config-update-dbodor
378b ruff config update dbodor
2 parents 003117c + 9451420 commit a50915a

File tree

13 files changed

+69
-83
lines changed

13 files changed

+69
-83
lines changed

.github/workflows/cffconvert.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- name: Check out a copy of the repository
14-
uses: actions/checkout@v3
14+
uses: actions/checkout@v4
1515

1616
- name: Check whether the citation metadata from CITATION.cff is valid
1717
uses: citation-file-format/[email protected]

.github/workflows/markdown-link-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
name: Check markdown links
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1818
- uses: gaurav-nelson/github-action-markdown-link-check@v1
1919
with:
2020
config-file: '.mlc-config.json'

.github/workflows/tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@ jobs:
1818
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
1919
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
2020
steps:
21-
- uses: actions/checkout@v3
21+
- uses: actions/checkout@v4
2222
- name: Set up Python ${{ matrix.python-version }}
23-
uses: actions/setup-python@v3
23+
uses: actions/setup-python@v5
2424
with:
2525
python-version: ${{ matrix.python-version }}
2626
- name: Python info

tests/test_project.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ def test_ruff_check(baked_with_development_dependencies, project_env_bin_dir):
167167
project_dir = baked_with_development_dependencies
168168
bin_dir = project_env_bin_dir
169169

170-
result = run([f'{bin_dir}ruff', '.'], project_dir)
170+
result = run([f'{bin_dir}ruff', 'check', '--fix'], project_dir)
171171
assert result.returncode == 0
172172
assert '' in result.stdout
173173

{{cookiecutter.directory_name}}/.githooks/pre-commit

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,8 @@ echo "Script $0 triggered ..."
66
echo "Starting ruff analysis..."
77

88
# quietly run ruff
9-
ruff check . --fix
9+
ruff check --fix
10+
ruff format
1011

1112
# use return code to abort commit if necessary
1213
if [ $? != "0" ]; then

{{cookiecutter.directory_name}}/.github/workflows/build.yml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ jobs:
1919
os: ['ubuntu-latest', 'macos-latest', 'windows-latest']
2020
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12']
2121
steps:
22-
- uses: actions/checkout@v3
22+
- uses: actions/checkout@v4
2323
- name: Set up Python ${{ '{{ ' -}} matrix.python-version }}
24-
uses: actions/setup-python@v3
24+
uses: actions/setup-python@v5
2525
with:
2626
python-version: ${{ '{{ ' -}} matrix.python-version }}
2727
- name: Python info
@@ -44,9 +44,9 @@ jobs:
4444
strategy:
4545
fail-fast: false
4646
steps:
47-
- uses: actions/checkout@v3
47+
- uses: actions/checkout@v4
4848
- name: Set up Python 3.9
49-
uses: actions/setup-python@v3
49+
uses: actions/setup-python@v5
5050
with:
5151
python-version: 3.9
5252
- name: Python info
@@ -59,4 +59,6 @@ jobs:
5959
python -m pip install --upgrade pip setuptools
6060
python -m pip install .[dev,publishing]
6161
- name: Check style against standards using ruff
62-
run: ruff .
62+
run: |
63+
ruff check
64+
ruff format --check

{{cookiecutter.directory_name}}/.github/workflows/cffconvert.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
name: "cffconvert"
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1818
name: Check out a copy of the repository
1919

2020
- name: Check whether the citation metadata from CITATION.cff is valid

{{cookiecutter.directory_name}}/.github/workflows/documentation.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ jobs:
1515
strategy:
1616
fail-fast: false
1717
steps:
18-
- uses: actions/checkout@v2
18+
- uses: actions/checkout@v4
1919
- name: Set up Python 3.9
20-
uses: actions/setup-python@v3
20+
uses: actions/setup-python@v5
2121
with:
2222
python-version: 3.9
2323
- name: Python info
@@ -33,4 +33,4 @@ jobs:
3333
run: sudo apt install pandoc
3434
- name: Build documentation
3535
run: make coverage doctest html
36-
working-directory: docs
36+
working-directory: docs

{{cookiecutter.directory_name}}/.github/workflows/markdown-link-check.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
name: Check markdown links
1515
runs-on: ubuntu-latest
1616
steps:
17-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
1818
- uses: gaurav-nelson/github-action-markdown-link-check@v1
1919
with:
2020
config-file: '.mlc-config.json'

{{cookiecutter.directory_name}}/.github/workflows/next_steps.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
next_steps:
88
runs-on: ubuntu-latest
99
steps:
10-
- uses: actions/checkout@v3
10+
- uses: actions/checkout@v4
1111
- name: Create Sonarcloud integration issue
1212
uses: JasonEtco/create-an-issue@v2
1313
env:

0 commit comments

Comments
 (0)