Skip to content

Commit 824e5e1

Browse files
chore: add prettier linting of json, yaml and markdown files (#437)
#### Relevant issue or PR NA #### Description of changes I am adding a lot of json files as part of #411 and these will be a lot more maintainable using SOTA linting. To avoid a crazy non-related diff due to impacts on other files I am adding this as a separate PR. CHANGELOG is excluded as it is auto-generated. #### Testing done - CI passes --------- Co-authored-by: Dion Häfner <dion.haefner@simulation.science>
1 parent 870b94e commit 824e5e1

107 files changed

Lines changed: 975 additions & 1467 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/dependabot.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
version: 2
22

33
updates:
4-
- package-ecosystem: github-actions
5-
directory: "/"
6-
schedule:
7-
interval: "weekly"
8-
day: "monday"
9-
timezone: "America/New_York"
10-
open-pull-requests-limit: 10
4+
- package-ecosystem: github-actions
5+
directory: "/"
6+
schedule:
7+
interval: "weekly"
8+
day: "monday"
9+
timezone: "America/New_York"
10+
open-pull-requests-limit: 10
1111

12-
groups:
13-
actions:
14-
patterns:
15-
- "*"
12+
groups:
13+
actions:
14+
patterns:
15+
- "*"

.github/pull_request_template.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,13 @@ For a full list of commit types visit https://www.conventionalcommits.org/en/v1.
44
-->
55

66
#### Relevant issue or PR
7+
78
<!-- If the changes resolve an issue or follow some other PR, link to them here. Only link something if it is directly relevant. -->
89

910
#### Description of changes
11+
1012
<!-- Add a high-level description of changes, focusing on the *what* and *why*. -->
1113

1214
#### Testing done
15+
1316
<!-- Describe how the changes were tested; e.g., "CI passes", "Tested manually in stagingrepo#123", screenshots of a terminal session that verify the changes, or any other evidence of testing the changes. -->

.github/workflows/bump_lockfile.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
name: Bump UV lockfile
22

33
on:
4-
workflow_dispatch: # Allows manual trigger
4+
workflow_dispatch: # Allows manual trigger
55

66
schedule:
7-
- cron: '0 0 * * 1' # 12AM only on Mondays
7+
- cron: "0 0 * * 1" # 12AM only on Mondays
88

99
jobs:
1010
bump-lockfile:
@@ -36,7 +36,7 @@ jobs:
3636
mv uv.lock production.uv.lock
3737
3838
- name: Generate new requirements.txt
39-
run : |
39+
run: |
4040
pip install pre-commit
4141
pre-commit run update-requirements --all-files || true
4242
@@ -51,14 +51,14 @@ jobs:
5151
if: steps.git-diff.outputs.update_done == 'true'
5252
uses: peter-evans/create-pull-request@v8
5353
with:
54-
token: ${{ secrets.PL_PASTEURBOT_PAT_PUBLIC }}
55-
committer: PasteurBot <${{ vars.PL_PASTEURBOT_EMAIL }}>
56-
author: PasteurBot <${{ vars.PL_PASTEURBOT_EMAIL }}>
57-
commit-message: Update dependencies
58-
title: "chore: 📦 Update dependencies"
59-
branch: _bot/update-deps
60-
draft: false
61-
base: main
62-
body: |
63-
This PR updates the lockfile to the latest versions of the dependencies.
64-
Please review the changes and merge when ready.
54+
token: ${{ secrets.PL_PASTEURBOT_PAT_PUBLIC }}
55+
committer: PasteurBot <${{ vars.PL_PASTEURBOT_EMAIL }}>
56+
author: PasteurBot <${{ vars.PL_PASTEURBOT_EMAIL }}>
57+
commit-message: Update dependencies
58+
title: "chore: 📦 Update dependencies"
59+
branch: _bot/update-deps
60+
draft: false
61+
base: main
62+
body: |
63+
This PR updates the lockfile to the latest versions of the dependencies.
64+
Please review the changes and merge when ready.

.github/workflows/cla.yml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
issue_comment:
55
types: [created]
66
pull_request_target:
7-
types: [opened,closed,synchronize]
7+
types: [opened, closed, synchronize]
88

99
jobs:
1010
cla-assistant:
@@ -17,15 +17,15 @@ jobs:
1717
GITHUB_TOKEN: ${{ secrets.PL_PASTEURBOT_PAT_PUBLIC }}
1818
PERSONAL_ACCESS_TOKEN: ${{ secrets.PL_PASTEURBOT_PAT_PUBLIC }}
1919
with:
20-
allowlist: 'PasteurBot,dependabot[bot],github-actions[bot]'
20+
allowlist: "PasteurBot,dependabot[bot],github-actions[bot]"
2121

22-
remote-organization-name: 'pasteurlabs'
23-
remote-repository-name: 'pasteur-oss-cla-signatures'
24-
path-to-signatures: 'signatures/version1/cla.json'
25-
branch: 'main'
22+
remote-organization-name: "pasteurlabs"
23+
remote-repository-name: "pasteur-oss-cla-signatures"
24+
path-to-signatures: "signatures/version1/cla.json"
25+
branch: "main"
2626

27-
create-file-commit-message: 'Creating file for storing CLA Signatures'
28-
signed-commit-message: '$contributorName has signed the CLA in $owner/$repo'
27+
create-file-commit-message: "Creating file for storing CLA Signatures"
28+
signed-commit-message: "$contributorName has signed the CLA in $owner/$repo"
2929
custom-notsigned-prcomment: >
3030
#### CLA signatures required
3131

.github/workflows/pre-commit-cron-updater.yml

Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,67 +1,67 @@
11
name: Auto update pre-commit hooks
22

33
on:
4-
workflow_dispatch: # Allows manual trigger
4+
workflow_dispatch: # Allows manual trigger
55

66
schedule:
7-
- cron: '0 0 * * 1' # 12AM only on Mondays
7+
- cron: "0 0 * * 1" # 12AM only on Mondays
88

99
jobs:
1010
auto-update-hooks:
1111
runs-on: ubuntu-latest
1212

1313
steps:
14-
- name: Checkout code
15-
uses: actions/checkout@v6
14+
- name: Checkout code
15+
uses: actions/checkout@v6
1616

17-
- uses: actions/setup-python@v6
18-
with:
17+
- uses: actions/setup-python@v6
18+
with:
1919
python-version-file: "pyproject.toml"
2020

21-
- name: Install pre-commit
22-
run: pip install pre-commit
23-
24-
- name: Run pre-commit autoupdate
25-
run: pre-commit autoupdate
26-
27-
- name: Detect if changes were made
28-
id: git-diff
29-
run: |
30-
changes=false
31-
git diff --exit-code || changes=true
32-
echo "update_done=$changes" >> $GITHUB_OUTPUT
33-
34-
- name: Run pre-commit
35-
id: pre-commit
36-
if: steps.git-diff.outputs.update_done == 'true'
37-
run: |
38-
# Run twice so we only fail if there are non-fixable issues
39-
rc=0
40-
pre-commit run --all-files || true
41-
pre-commit run --all-files > /tmp/pre-commit.log || rc=$?
42-
43-
# Add log as step output
44-
echo "pre-commit-log<<EOF" > $GITHUB_OUTPUT
45-
cat /tmp/pre-commit.log >> $GITHUB_OUTPUT
46-
echo "EOF" >> $GITHUB_OUTPUT
47-
48-
# Add linting outcome as step output
49-
if [ $rc -eq 0 ]; then
50-
echo "pre-commit-outcome=success" >> $GITHUB_OUTPUT
51-
else
52-
echo "pre-commit-outcome=failure" >> $GITHUB_OUTPUT
53-
fi
54-
55-
# Distinguish 3 cases:
56-
# 1. No changes were made -> do nothing (steps below are skipped)
57-
# 2. Changes were made and pre-commit ran successfully -> create PR
58-
# 3. Changes were made but pre-commit failed -> create PR with draft status
59-
60-
- name: Create Pull Request (all good)
61-
id: create-pr-ok
62-
if: steps.pre-commit.outputs.pre-commit-outcome == 'success'
63-
uses: peter-evans/create-pull-request@v8
64-
with:
21+
- name: Install pre-commit
22+
run: pip install pre-commit
23+
24+
- name: Run pre-commit autoupdate
25+
run: pre-commit autoupdate
26+
27+
- name: Detect if changes were made
28+
id: git-diff
29+
run: |
30+
changes=false
31+
git diff --exit-code || changes=true
32+
echo "update_done=$changes" >> $GITHUB_OUTPUT
33+
34+
- name: Run pre-commit
35+
id: pre-commit
36+
if: steps.git-diff.outputs.update_done == 'true'
37+
run: |
38+
# Run twice so we only fail if there are non-fixable issues
39+
rc=0
40+
pre-commit run --all-files || true
41+
pre-commit run --all-files > /tmp/pre-commit.log || rc=$?
42+
43+
# Add log as step output
44+
echo "pre-commit-log<<EOF" > $GITHUB_OUTPUT
45+
cat /tmp/pre-commit.log >> $GITHUB_OUTPUT
46+
echo "EOF" >> $GITHUB_OUTPUT
47+
48+
# Add linting outcome as step output
49+
if [ $rc -eq 0 ]; then
50+
echo "pre-commit-outcome=success" >> $GITHUB_OUTPUT
51+
else
52+
echo "pre-commit-outcome=failure" >> $GITHUB_OUTPUT
53+
fi
54+
55+
# Distinguish 3 cases:
56+
# 1. No changes were made -> do nothing (steps below are skipped)
57+
# 2. Changes were made and pre-commit ran successfully -> create PR
58+
# 3. Changes were made but pre-commit failed -> create PR with draft status
59+
60+
- name: Create Pull Request (all good)
61+
id: create-pr-ok
62+
if: steps.pre-commit.outputs.pre-commit-outcome == 'success'
63+
uses: peter-evans/create-pull-request@v8
64+
with:
6565
token: ${{ secrets.PL_PASTEURBOT_PAT_PUBLIC }}
6666
committer: PasteurBot <${{ vars.PL_PASTEURBOT_EMAIL }}>
6767
author: PasteurBot <${{ vars.PL_PASTEURBOT_EMAIL }}>
@@ -72,18 +72,18 @@ jobs:
7272
body: |
7373
Pre-commit hooks have been updated successfully without conflicts.
7474
75-
- name: Enable auto-merge
76-
if: steps.create-pr-ok.outputs.pull-request-operation == 'created'
77-
uses: peter-evans/enable-pull-request-automerge@v3
78-
with:
75+
- name: Enable auto-merge
76+
if: steps.create-pr-ok.outputs.pull-request-operation == 'created'
77+
uses: peter-evans/enable-pull-request-automerge@v3
78+
with:
7979
token: ${{ secrets.PL_PASTEURBOT_PAT_PUBLIC }}
8080
pull-request-number: ${{ steps.create-pr-ok.outputs.pull-request-number }}
8181
merge-method: squash
8282

83-
- name: Create Pull Request (conflicts)
84-
if: steps.pre-commit.outputs.pre-commit-outcome == 'failure'
85-
uses: peter-evans/create-pull-request@v8
86-
with:
83+
- name: Create Pull Request (conflicts)
84+
if: steps.pre-commit.outputs.pre-commit-outcome == 'failure'
85+
uses: peter-evans/create-pull-request@v8
86+
with:
8787
token: ${{ secrets.PL_PASTEURBOT_PAT_PUBLIC }}
8888
committer: PasteurBot <${{ vars.PL_PASTEURBOT_EMAIL }}>
8989
author: PasteurBot <${{ vars.PL_PASTEURBOT_EMAIL }}>

.github/workflows/pre_commit.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ jobs:
1212
runs-on: ubuntu-latest
1313

1414
steps:
15-
- uses: actions/checkout@v6
16-
- uses: actions/setup-python@v6
17-
with:
15+
- uses: actions/checkout@v6
16+
- uses: actions/setup-python@v6
17+
with:
1818
python-version-file: "pyproject.toml"
19-
- uses: pre-commit/action@v3.0.1
19+
- uses: pre-commit/action@v3.0.1

.github/workflows/publish.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Publish
22

33
on:
4-
workflow_dispatch: # Allows manual trigger
4+
workflow_dispatch: # Allows manual trigger
55

66
release:
77
types:
@@ -10,7 +10,7 @@ on:
1010
jobs:
1111
build:
1212
name: "Build distribution"
13-
runs-on: '${{ matrix.os }}'
13+
runs-on: "${{ matrix.os }}"
1414
strategy:
1515
matrix:
1616
# TODO: Comment in additional platforms if using C extensions / platform-specific wheels
@@ -57,7 +57,7 @@ jobs:
5757

5858
publish:
5959
name: "Publish distribution"
60-
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
60+
if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
6161
runs-on: ubuntu-latest
6262
needs: build
6363

.github/workflows/release.yml

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
# Case 2: release PR is being updated -> update changelog
1515
push:
1616
branches:
17-
- 'bot/release/*'
17+
- "bot/release/*"
1818

1919
# Case 3: release PR is merged -> create a new release
2020
pull_request:
@@ -60,23 +60,23 @@ jobs:
6060
- name: Create Pull Request
6161
uses: peter-evans/create-pull-request@v8
6262
with:
63-
token: ${{ secrets.PL_PASTEURBOT_PAT_PUBLIC }}
64-
committer: PasteurBot <${{ vars.PL_PASTEURBOT_EMAIL }}>
65-
author: PasteurBot <${{ vars.PL_PASTEURBOT_EMAIL }}>
66-
commit-message: "chore: update changelog"
67-
title: "chore: 🚢 release ${{ steps.generate_changelog.outputs.new_version }}"
68-
branch: bot/release/${{ steps.generate_changelog.outputs.new_version }}
69-
draft: false
70-
base: main
71-
add-paths: CHANGELOG.md
72-
body: |
73-
This PR contains the generated changelog for the release ${{ steps.generate_changelog.outputs.new_version }}.
74-
75-
⚠️ **Merging this PR will immediately trigger a new release**. ⚠️
76-
77-
To specify additional release notes, please edit this comment after the following line.
78-
79-
---
63+
token: ${{ secrets.PL_PASTEURBOT_PAT_PUBLIC }}
64+
committer: PasteurBot <${{ vars.PL_PASTEURBOT_EMAIL }}>
65+
author: PasteurBot <${{ vars.PL_PASTEURBOT_EMAIL }}>
66+
commit-message: "chore: update changelog"
67+
title: "chore: 🚢 release ${{ steps.generate_changelog.outputs.new_version }}"
68+
branch: bot/release/${{ steps.generate_changelog.outputs.new_version }}
69+
draft: false
70+
base: main
71+
add-paths: CHANGELOG.md
72+
body: |
73+
This PR contains the generated changelog for the release ${{ steps.generate_changelog.outputs.new_version }}.
74+
75+
⚠️ **Merging this PR will immediately trigger a new release**. ⚠️
76+
77+
To specify additional release notes, please edit this comment after the following line.
78+
79+
---
8080
8181
update-pr:
8282
runs-on: ubuntu-latest

.github/workflows/run_tests.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -207,8 +207,8 @@ jobs:
207207
unit-tesseract: ${{ fromJson(needs.get-e2e-matrix.outputs.matrix) }}
208208

209209
exclude:
210-
- arch: x64
211-
unit-tesseract: "pyvista-arm64"
210+
- arch: x64
211+
unit-tesseract: "pyvista-arm64"
212212

213213
include:
214214
# Test on arm to ensure compatibility with Apple M1 chips
@@ -352,7 +352,6 @@ jobs:
352352
uv pip install jupyter
353353
uv run --no-sync jupyter nbconvert --to notebook --execute demo.ipynb
354354
355-
356355
all-ok:
357356
if: always()
358357
needs: [tests-base, tests-e2e, tests-demos]

.github/workflows/test_pip_install.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
name: Test installation via pip
22

33
on:
4-
# run on PRs for validation
5-
pull_request:
4+
# run on PRs for validation
5+
pull_request:
66

77
jobs:
88
test-pip-install:
99
name: "Test pip install"
10-
runs-on: '${{ matrix.os }}'
10+
runs-on: "${{ matrix.os }}"
1111
strategy:
1212
matrix:
1313
os:

0 commit comments

Comments
 (0)