From abb20b4db2a9c1254bfa396497b1134c1d438e64 Mon Sep 17 00:00:00 2001 From: lochhh Date: Mon, 27 Apr 2026 15:38:49 +0100 Subject: [PATCH 1/4] Use build_sphinx_docs@main action --- .github/workflows/docs_build_and_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs_build_and_deploy.yml b/.github/workflows/docs_build_and_deploy.yml index 3f6acc08..1726100e 100644 --- a/.github/workflows/docs_build_and_deploy.yml +++ b/.github/workflows/docs_build_and_deploy.yml @@ -35,7 +35,7 @@ jobs: name: Build Sphinx Docs runs-on: ubuntu-latest steps: - - uses: neuroinformatics-unit/actions/build_sphinx_docs@v2 + - uses: neuroinformatics-unit/actions/build_sphinx_docs@main with: python-version: 3.13 # default for the action is 3.x use-make: true From 9c65bb86d635b062e1dfd6a3723e33e844e09bb9 Mon Sep 17 00:00:00 2001 From: lochhh Date: Mon, 27 Apr 2026 15:39:56 +0100 Subject: [PATCH 2/4] Migrate to dev and docs to dependency groups --- pyproject.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 1ae41b6a..bfa33d8a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,7 @@ dependencies = [ "User Support" = "https://github.com/neuroinformatics-unit/ethology/issues" -[project.optional-dependencies] +[dependency-groups] dev = [ "pytest", "pytest-cov", @@ -151,7 +151,7 @@ python = 3.13: py313 [testenv] -extras = +dependency_groups = dev commands = pytest -v --color=yes --cov=ethology --cov-report=xml From 49f8467dbaaeeca0fa82eb642816d3c28ad1ee71 Mon Sep 17 00:00:00 2001 From: lochhh Date: Mon, 27 Apr 2026 15:53:34 +0100 Subject: [PATCH 3/4] Update installation commands for all dependency groups --- CONTRIBUTING.md | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index c175ef3e..ca1bf519 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,10 +23,15 @@ and pip-installing it in editable mode with the required dependencies: git clone https://github.com/neuroinformatics-unit/ethology.git # then run from within the repository root folder: -pip install -e .[dev] # works on most shells -pip install -e '.[dev]' # works on zsh (the default shell on macOS) +pip install -e . --group dev +``` +This will install all the dependencies needed for development, such as `pytest` and `pre-commit`. +If you also want to [edit the documentation](#editing-the-documentation) and preview the changes locally, you will additionally need the `docs` dependencies. +To install both `dev` and `docs` dependencies at once, use `--all-groups`: + +```sh +pip install -e . --all-groups ``` -This should install all the dependencies needed for development, such as `pytest` and `pre-commit`. If you also want to edit the documentation and preview the changes locally, you will additionally need the `docs` extra dependencies. See [Editing the documentation](#editing-the-documentation) for more details. Finally, install the [pre-commit hooks](https://pre-commit.com/): @@ -140,8 +145,7 @@ To edit the documentation, first clone the repository, and install `ethology` in Then, install a few additional dependencies in your development environment to be able to build the documentation locally. To do this, run the following command from the root of the repository: ```sh -pip install -e .[docs] # works on most shells -pip install -e '.[docs]' # works on zsh (default on macOS) +pip install -e --group docs ``` Now create a new branch, edit the documentation source files (`.md` or `.rst` in the `docs` folder), From 0948c6b25a140eb04b1064546954ea93528d80c5 Mon Sep 17 00:00:00 2001 From: lochhh Date: Tue, 28 Apr 2026 10:35:23 +0100 Subject: [PATCH 4/4] Revert "Use build_sphinx_docs@main action" This reverts commit abb20b4db2a9c1254bfa396497b1134c1d438e64. --- .github/workflows/docs_build_and_deploy.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/docs_build_and_deploy.yml b/.github/workflows/docs_build_and_deploy.yml index 1726100e..3f6acc08 100644 --- a/.github/workflows/docs_build_and_deploy.yml +++ b/.github/workflows/docs_build_and_deploy.yml @@ -35,7 +35,7 @@ jobs: name: Build Sphinx Docs runs-on: ubuntu-latest steps: - - uses: neuroinformatics-unit/actions/build_sphinx_docs@main + - uses: neuroinformatics-unit/actions/build_sphinx_docs@v2 with: python-version: 3.13 # default for the action is 3.x use-make: true