From ff640640ef7f4faca053e0999295042737f14e3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20Burghardt?= Date: Thu, 19 Mar 2026 13:33:00 +0100 Subject: [PATCH 1/4] fix versions, add black and isort, resolve mismatch of python version between docs CI and actual docs building, rename Experanto in docs to capitalized and allow manual dispatching of CI pipelines --- .github/workflows/docs.yml | 2 ++ .github/workflows/ruff.yml | 2 ++ .github/workflows/test.yml | 10 +++++++--- .readthedocs.yml | 2 +- docs/.claude/settings.local.json | 7 +++++++ docs/source/conf.py | 4 +++- pyproject.toml | 5 ++++- 7 files changed, 26 insertions(+), 6 deletions(-) create mode 100644 docs/.claude/settings.local.json diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a3e03122..a1a1c7bd 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -7,6 +7,7 @@ on: pull_request: branches: - '**' + workflow_dispatch: jobs: build-docs: @@ -14,6 +15,7 @@ jobs: runs-on: ubuntu-latest if: | github.event_name == 'push' || + github.event_name == 'workflow_dispatch' || ( github.event_name == 'pull_request' && github.repository != github.event.pull_request.head.repo.full_name diff --git a/.github/workflows/ruff.yml b/.github/workflows/ruff.yml index 97b3f5b5..024b15c3 100644 --- a/.github/workflows/ruff.yml +++ b/.github/workflows/ruff.yml @@ -7,6 +7,7 @@ on: pull_request: branches: - '**' + workflow_dispatch: jobs: ruff: @@ -14,6 +15,7 @@ jobs: runs-on: ubuntu-latest if: | github.event_name == 'push' || + github.event_name == 'workflow_dispatch' || ( github.event_name == 'pull_request' && github.repository != github.event.pull_request.head.repo.full_name diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 8de4443e..3abe06a4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -7,6 +7,7 @@ on: pull_request: branches: - '**' + workflow_dispatch: jobs: test: @@ -14,6 +15,7 @@ jobs: runs-on: ubuntu-latest if: | github.event_name == 'push' || + github.event_name == 'workflow_dispatch' || ( github.event_name == 'pull_request' && github.repository != github.event.pull_request.head.repo.full_name @@ -47,6 +49,7 @@ jobs: runs-on: ubuntu-latest if: | github.event_name == 'push' || + github.event_name == 'workflow_dispatch' || ( github.event_name == 'pull_request' && github.repository != github.event.pull_request.head.repo.full_name @@ -72,8 +75,8 @@ jobs: echo "Push event in same repo: Running black and isort with auto-format and commit" black . isort . - git config user.name "github-actions" - git config user.email "github-actions@github.com" + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" if ! git diff --quiet; then git commit -am "style: auto-format with black and isort" git push @@ -81,7 +84,7 @@ jobs: echo "No formatting changes to commit." fi - elif [[ "${{ github.event_name }}" == "pull_request" ]]; then + elif [[ "${{ github.event_name }}" == "pull_request" || "${{ github.event_name }}" == "workflow_dispatch" ]]; then echo "PR from fork: Running black and isort in check mode" black --check . || { echo "Black formatting issues found. Run 'black .' to fix."; exit 1; } isort --check-only . || { echo "isort import order issues found. Run 'isort .' to fix."; exit 1; } @@ -95,6 +98,7 @@ jobs: runs-on: ubuntu-latest if: | github.event_name == 'push' || + github.event_name == 'workflow_dispatch' || ( github.event_name == 'pull_request' && github.repository != github.event.pull_request.head.repo.full_name diff --git a/.readthedocs.yml b/.readthedocs.yml index fbcf582c..6aa41297 100644 --- a/.readthedocs.yml +++ b/.readthedocs.yml @@ -4,7 +4,7 @@ version: 2 build: os: ubuntu-22.04 tools: - python: "3.9" + python: "3.12" python: install: diff --git a/docs/.claude/settings.local.json b/docs/.claude/settings.local.json new file mode 100644 index 00000000..ded820aa --- /dev/null +++ b/docs/.claude/settings.local.json @@ -0,0 +1,7 @@ +{ + "permissions": { + "allow": [ + "Bash(git:*)" + ] + } +} diff --git a/docs/source/conf.py b/docs/source/conf.py index d3fcfc1f..73379f70 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -13,7 +13,7 @@ # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information -project = "experanto" +project = "Experanto" copyright = f"{datetime.today().strftime('%Y')}, sinzlab" author = "sinzlab" release = "0.1" @@ -83,6 +83,8 @@ "optree", "rootutils", "numba", + "numpy", + "PyYAML", ] # -- Intersphinx settings (cross-references to external docs) ---------------- diff --git a/pyproject.toml b/pyproject.toml index 646e20e1..b2bd59ec 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,6 +4,7 @@ version = "0.1" description = "Python package to interpolate recordings and stimuli of neuroscience experiments" readme = "README.md" requires-python = ">=3.9" +# When adding or removing dependencies, also update autodoc_mock_imports in docs/source/conf.py if necessary. dependencies = [ "scipy>=1.13.1", "jaxtyping>=0.2.30", @@ -21,7 +22,9 @@ dependencies = [ dev = [ "pytest==8.3.5", "pytest-cov>=7.0.0", - "pyright", + "pyright==1.1.408", + "black[jupyter]==25.1.0", + "isort==6.0.1", "hypothesis>=6.0", "ruff==0.15.6", ] From 23ca40b00fd4bcf3e1cba87f75fb6f9193156376 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20Burghardt?= Date: Thu, 19 Mar 2026 13:39:12 +0100 Subject: [PATCH 2/4] rely on pyproject.toml for version constraints --- .github/workflows/test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 3abe06a4..28e1d159 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -67,7 +67,7 @@ jobs: - name: Install tools run: | python -m pip install --upgrade pip - pip install "black[jupyter]==25.1.0" isort==6.0.1 + pip install -e ".[dev]" - name: Run Black and Isort run: | From 8f9be5e91854adaaadca64035262ef27a7f858bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rene=CC=81=20Burghardt?= Date: Thu, 19 Mar 2026 13:43:52 +0100 Subject: [PATCH 3/4] remove claude settings --- docs/.claude/settings.local.json | 7 ------- 1 file changed, 7 deletions(-) delete mode 100644 docs/.claude/settings.local.json diff --git a/docs/.claude/settings.local.json b/docs/.claude/settings.local.json deleted file mode 100644 index ded820aa..00000000 --- a/docs/.claude/settings.local.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "permissions": { - "allow": [ - "Bash(git:*)" - ] - } -} From 8c2be2cefae0a334f16c28ab562cf682da661a59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ren=C3=A9=20Burghardt?= Date: Thu, 19 Mar 2026 13:46:26 +0100 Subject: [PATCH 4/4] Fix mocking of yaml and CI message Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com> --- .github/workflows/test.yml | 2 +- docs/source/conf.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 28e1d159..db57e8aa 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -85,7 +85,7 @@ jobs: fi elif [[ "${{ github.event_name }}" == "pull_request" || "${{ github.event_name }}" == "workflow_dispatch" ]]; then - echo "PR from fork: Running black and isort in check mode" + echo "PR or manual run: Running black and isort in check mode" black --check . || { echo "Black formatting issues found. Run 'black .' to fix."; exit 1; } isort --check-only . || { echo "isort import order issues found. Run 'isort .' to fix."; exit 1; } diff --git a/docs/source/conf.py b/docs/source/conf.py index 73379f70..f56ddc65 100644 --- a/docs/source/conf.py +++ b/docs/source/conf.py @@ -84,7 +84,7 @@ "rootutils", "numba", "numpy", - "PyYAML", + "yaml", ] # -- Intersphinx settings (cross-references to external docs) ----------------