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
2 changes: 2 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ on:
pull_request:
branches:
- '**'
workflow_dispatch:
Comment thread
pollytur marked this conversation as resolved.

jobs:
build-docs:
name: Build Sphinx Docs
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
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/ruff.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ on:
pull_request:
branches:
- '**'
workflow_dispatch:
Comment thread
pollytur marked this conversation as resolved.

jobs:
ruff:
name: Ruff Linting
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
Expand Down
14 changes: 9 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ on:
pull_request:
branches:
- '**'
workflow_dispatch:
Comment thread
pollytur marked this conversation as resolved.

jobs:
test:
name: Run Tests
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
Expand Down Expand Up @@ -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
Expand All @@ -64,25 +67,25 @@ 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]"
Comment thread
pollytur marked this conversation as resolved.

- name: Run Black and Isort
run: |
if [[ "${{ github.event_name }}" == "push" && "${{ github.repository }}" == "${{ github.event.repository.full_name }}" ]]; then
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
else
echo "No formatting changes to commit."
fi

elif [[ "${{ github.event_name }}" == "pull_request" ]]; then
echo "PR from fork: Running black and isort in check mode"
elif [[ "${{ github.event_name }}" == "pull_request" || "${{ github.event_name }}" == "workflow_dispatch" ]]; then
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; }

Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .readthedocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.9"
python: "3.12"

python:
install:
Expand Down
4 changes: 3 additions & 1 deletion docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -83,6 +83,8 @@
"optree",
"rootutils",
"numba",
"numpy",
"yaml",
]

# -- Intersphinx settings (cross-references to external docs) ----------------
Expand Down
5 changes: 4 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Comment thread
reneburghardt marked this conversation as resolved.
# 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",
Expand All @@ -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",
Comment thread
pollytur marked this conversation as resolved.
"hypothesis>=6.0",
"ruff==0.15.6",
]
Expand Down
Loading