From a8a645948b4e3e903d494917850f8681726ffc15 Mon Sep 17 00:00:00 2001 From: Stefan Appelhoff Date: Sat, 23 Nov 2024 12:30:07 +0100 Subject: [PATCH] bump hooks, reorganize extra-deps --- .github/workflows/python_tests.yml | 2 ++ .pre-commit-config.yaml | 6 +++--- .readthedocs.yaml | 10 +++++----- docs/conf.py | 1 + docs/sphinxext/gh_substitutions.py | 1 + pyproject.toml | 18 +++++++++++++----- 6 files changed, 25 insertions(+), 13 deletions(-) diff --git a/.github/workflows/python_tests.yml b/.github/workflows/python_tests.yml index 1a45a48..faadc82 100644 --- a/.github/workflows/python_tests.yml +++ b/.github/workflows/python_tests.yml @@ -80,8 +80,10 @@ jobs: with: name: docs-artifact path: docs/_build/html + include-hidden-files: true - name: Upload coverage report uses: codecov/codecov-action@v5 with: + token: ${{ secrets.CODECOV_TOKEN }} files: ./coverage.xml diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index d6443a6..d9ae42f 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -2,7 +2,7 @@ # See https://pre-commit.com/hooks.html for more hooks repos: - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.4.0 + rev: v5.0.0 hooks: - id: trailing-whitespace - id: end-of-file-fixer @@ -13,14 +13,14 @@ repos: - id: check-case-conflict - id: check-docstring-first - repo: https://github.com/astral-sh/ruff-pre-commit - rev: v0.2.1 + rev: v0.8.0 hooks: - id: ruff args: [ --fix ] - id: ruff-format - repo: https://github.com/pappasam/toml-sort - rev: v0.23.1 + rev: v0.24.2 hooks: - id: toml-sort-fix files: pyproject.toml diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 4b35493..fa7dbbe 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -12,8 +12,8 @@ sphinx: configuration: docs/conf.py python: - install: - - method: pip - path: . - extra_requirements: - - dev + install: + - method: pip + path: . + extra_requirements: + - docs diff --git a/docs/conf.py b/docs/conf.py index f0f6bb7..9666074 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -2,6 +2,7 @@ See: https://www.sphinx-doc.org/en/master/usage/configuration.html """ + import os import sys from datetime import date diff --git a/docs/sphinxext/gh_substitutions.py b/docs/sphinxext/gh_substitutions.py index 02b0054..2315e5e 100644 --- a/docs/sphinxext/gh_substitutions.py +++ b/docs/sphinxext/gh_substitutions.py @@ -6,6 +6,7 @@ https://doughellmann.com/blog/2010/05/09/defining-custom-roles-in-sphinx/ """ + from docutils.nodes import reference from docutils.parsers.rst.roles import set_classes diff --git a/pyproject.toml b/pyproject.toml index 5f83cef..07691e9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,18 +37,26 @@ readme = "README.rst" requires-python = ">=3.9" [project.optional-dependencies] -dev = [ - "check-manifest", +dev = ["ipykernel", "ipython", "pybv[test,docs]"] +# Dependencies for developer installations +docs = [ "intersphinx_registry", - "mne", + "matplotlib", "numpydoc", + "sphinx", + "sphinx-copybutton", +] +test = [ + "build", + "check-manifest", + "matplotlib", + "mne", "pre-commit", "pytest", "pytest-cov", "pytest-sugar", "ruff", - "sphinx", - "sphinx-copybutton", + "twine", ] [project.urls]