Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .claude/skills
2 changes: 2 additions & 0 deletions .codespellrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[codespell]
skip=./requirements,./jupyter,./node_modules,./venv
7 changes: 7 additions & 0 deletions .flake8
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
[flake8]
ignore = D205,D413,D400,D401
max-line-length =120
max-complexity = 10
exclude = "venv"
extend-exclude = "*__init__.py,*__version__.py,venv"
select = "C101"
77 changes: 0 additions & 77 deletions .github/actions/tests/pre-commit/action.yml

This file was deleted.

86 changes: 0 additions & 86 deletions .github/actions/tests/python/action.yml

This file was deleted.

2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
version: 2
updates:
- package-ecosystem: "pip"
directory: "requirements/in/"
directory: "requirements/"
schedule:
interval: "monthly"
labels:
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/auto-assign.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,28 @@
---
#------------------------------------------------------------------------------
# Auto Assign: assigns every new issue and pull request to the maintainer.
#------------------------------------------------------------------------------
name: Auto Assign

on:
issues:
types: [opened]
pull_request:
types: [opened]

permissions:
contents: read

jobs:
run:
runs-on: ubuntu-latest
timeout-minutes: 5
permissions:
issues: write
pull-requests: write
steps:
- name: "Auto-assign issue"
uses: pozil/auto-assign-issue@v4
uses: pozil/auto-assign-issue@d6e511896e5f1d2408e74db74416647d8ff80c8c # v4.1.0
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
assignees: lpm0073
Expand Down
70 changes: 20 additions & 50 deletions .github/workflows/precommitVersionBumps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,12 @@
#
# This workflow runs on a cron schedule and checks for updates to the
# .pre-commit-config.yaml file. If updates are found, the workflow
# commits the changes to the next branch and pushes the changes to GitHub.
# commits the changes to the alpha branch and pushes the changes to GitHub.
#
# This is a workaround for the fact that the pre-commit autoupdate command
# is not supported by Dependabot.
#
# A scheduled run uses this file as it is on main, the default branch.
#------------------------------------------------------------------------------
name: pre-commit Version Bumps

Expand All @@ -17,67 +19,33 @@ on:
- cron: "0 0 * * 3"
workflow_dispatch:

# The push to alpha uses the PAT secret, not GITHUB_TOKEN.
permissions:
contents: read

jobs:
evaluate_precommit_config:
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- uses: actions/checkout@v7
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
ref: alpha
persist-credentials: false

- name: Checkout alpha branch
run: |
git fetch
git checkout alpha
git pull origin alpha

- name: Cache NPM dependencies
uses: actions/cache@v6
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node

- name: Cache Python dependencies
uses: actions/cache@v6
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements/**') }}
restore-keys: |
${{ runner.os }}-pip

- name: Set up Python
uses: actions/setup-python@v7
uses: actions/setup-python@6d4fd22b20465ccc0f7354476588e8df7c9ca0e0 # v7.1.0
with:
python-version: "3.13"

- name: locate site-packages path
shell: bash
run: |
echo "SITE_PACKAGES_PATH=$(python -c 'import site; print(site.getsitepackages()[0])')" >> $GITHUB_ENV

- name: Install pip
# pre-commit autoupdate only reads the hooks' repositories, so it needs
# pre-commit itself, at the version requirements/local.txt pins.
- name: Install pre-commit
shell: bash
run: |
python -m pip install --upgrade pip

- name: Install dependencies
shell: bash
run: |
pip install -r ./requirements/local.txt
pip install -r ./requirements/prod.txt
env:
SITE_PACKAGES_PATH: ${{ env.SITE_PACKAGES_PATH }}

- name: Setup Node.js environment
uses: actions/setup-node@v7
with:
node-version: "20.9.0"

- name: Install npm dev dependencies
run: npm install
pip install "$(grep -E '^pre-commit==' requirements/local.txt)"

- name: Update .pre-commit-config.yaml
run: |
Expand All @@ -87,9 +55,9 @@ jobs:
id: check_changes
run: |
if [[ -n "$(git status --porcelain .pre-commit-config.yaml)" ]]; then
echo "::set-output name=changes::true"
echo "changes=true" >> "$GITHUB_OUTPUT"
else
echo "::set-output name=changes::false"
echo "changes=false" >> "$GITHUB_OUTPUT"
fi

- name: Commit and push changes
Expand All @@ -99,5 +67,7 @@ jobs:
git config --local user.email "action@github.com"
git config --local user.name "GitHub Action"
git add .pre-commit-config.yaml
git commit -m "chore: [gh] version bumps in .pre-commit-config.yaml [skip ci]"
# No CI skip tag: this commit can become the head of the pull
# request from alpha to main, whose checks would then never start.
git commit -m "chore: [gh] version bumps in .pre-commit-config.yaml"
git push https://${{ secrets.PAT }}@github.com/${{ github.repository }}.git HEAD:alpha
Loading
Loading