From 2117b2c13b513bbdca1661743be3fcba3158dfb0 Mon Sep 17 00:00:00 2001 From: Robert Richer Date: Fri, 3 Jan 2025 09:22:48 +0100 Subject: [PATCH] fixed docs? --- .github/workflows/test-and-lint.yml | 2 +- poetry.lock | 46 ++++++++++++++++------------- pyproject.toml | 3 +- src/biopsykit/io/tfm.py | 4 +-- 4 files changed, 29 insertions(+), 26 deletions(-) diff --git a/.github/workflows/test-and-lint.yml b/.github/workflows/test-and-lint.yml index bdf685c..6ad05c9 100644 --- a/.github/workflows/test-and-lint.yml +++ b/.github/workflows/test-and-lint.yml @@ -12,7 +12,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.9", "3.10"] steps: - uses: actions/checkout@v3 diff --git a/poetry.lock b/poetry.lock index 39bb651..1a031fa 100644 --- a/poetry.lock +++ b/poetry.lock @@ -2059,21 +2059,25 @@ files = [ [[package]] name = "numpydoc" -version = "1.5.0" +version = "1.6.0" description = "Sphinx extension to support docstrings in Numpy format" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "numpydoc-1.5.0-py3-none-any.whl", hash = "sha256:c997759fb6fc32662801cece76491eedbc0ec619b514932ffd2b270ae89c07f9"}, - {file = "numpydoc-1.5.0.tar.gz", hash = "sha256:b0db7b75a32367a0e25c23b397842c65e344a1206524d16c8069f0a1c91b5f4c"}, + {file = "numpydoc-1.6.0-py3-none-any.whl", hash = "sha256:b6ddaa654a52bdf967763c1e773be41f1c3ae3da39ee0de973f2680048acafaa"}, + {file = "numpydoc-1.6.0.tar.gz", hash = "sha256:ae7a5380f0a06373c3afe16ccd15bd79bc6b07f2704cbc6f1e7ecc94b4f5fc0d"}, ] [package.dependencies] Jinja2 = ">=2.10" -sphinx = ">=4.2" +sphinx = ">=5" +tabulate = ">=0.8.10" +tomli = {version = ">=1.1.0", markers = "python_version < \"3.11\""} [package.extras] -testing = ["matplotlib", "pytest", "pytest-cov"] +developer = ["pre-commit (>=3.3)", "tomli"] +doc = ["matplotlib (>=3.5)", "numpy (>=1.22)", "pydata-sphinx-theme (>=0.13.3)", "sphinx (>=7)"] +test = ["matplotlib", "pytest", "pytest-cov"] [[package]] name = "openpyxl" @@ -3229,27 +3233,27 @@ files = [ [[package]] name = "sphinx" -version = "4.5.0" +version = "5.3.0" description = "Python documentation generator" optional = false python-versions = ">=3.6" files = [ - {file = "Sphinx-4.5.0-py3-none-any.whl", hash = "sha256:ebf612653238bcc8f4359627a9b7ce44ede6fdd75d9d30f68255c7383d3a6226"}, - {file = "Sphinx-4.5.0.tar.gz", hash = "sha256:7bf8ca9637a4ee15af412d1a1d9689fec70523a68ca9bb9127c2f3eeb344e2e6"}, + {file = "Sphinx-5.3.0.tar.gz", hash = "sha256:51026de0a9ff9fc13c05d74913ad66047e104f56a129ff73e174eb5c3ee794b5"}, + {file = "sphinx-5.3.0-py3-none-any.whl", hash = "sha256:060ca5c9f7ba57a08a1219e547b269fadf125ae25b06b9fa7f66768efb652d6d"}, ] [package.dependencies] alabaster = ">=0.7,<0.8" -babel = ">=1.3" -colorama = {version = ">=0.3.5", markers = "sys_platform == \"win32\""} -docutils = ">=0.14,<0.18" -imagesize = "*" -importlib-metadata = {version = ">=4.4", markers = "python_version < \"3.10\""} -Jinja2 = ">=2.3" -packaging = "*" -Pygments = ">=2.0" +babel = ">=2.9" +colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} +docutils = ">=0.14,<0.20" +imagesize = ">=1.3" +importlib-metadata = {version = ">=4.8", markers = "python_version < \"3.10\""} +Jinja2 = ">=3.0" +packaging = ">=21.0" +Pygments = ">=2.12" requests = ">=2.5.0" -snowballstemmer = ">=1.1" +snowballstemmer = ">=2.0" sphinxcontrib-applehelp = "*" sphinxcontrib-devhelp = "*" sphinxcontrib-htmlhelp = ">=2.0.0" @@ -3259,8 +3263,8 @@ sphinxcontrib-serializinghtml = ">=1.1.5" [package.extras] docs = ["sphinxcontrib-websupport"] -lint = ["docutils-stubs", "flake8 (>=3.5.0)", "isort", "mypy (>=0.931)", "types-requests", "types-typed-ast"] -test = ["cython", "html5lib", "pytest", "pytest-cov", "typed-ast"] +lint = ["docutils-stubs", "flake8 (>=3.5.0)", "flake8-bugbear", "flake8-comprehensions", "flake8-simplify", "isort", "mypy (>=0.981)", "sphinx-lint", "types-requests", "types-typed-ast"] +test = ["cython", "html5lib", "pytest (>=4.6)", "typed_ast"] [[package]] name = "sphinx-copybutton" @@ -3882,4 +3886,4 @@ mne = ["mne"] [metadata] lock-version = "2.0" python-versions = ">=3.9,<4.0" -content-hash = "2cda11f913619c06ac053055c24f3bdc17a813780b4239478fef1485c4a7374c" +content-hash = "93c2c7f3db0c767ae361f2d01f0e358fb2592037aa64d0d2a1fb8c8925e49bbd" diff --git a/pyproject.toml b/pyproject.toml index 8dda0e0..fd6560a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -55,8 +55,7 @@ pytest = "^6" pytest-cov = "^2" ipykernel = "^6" ruff = "^0" -# Doc dependencies. They also need to be updated in ./docs/requirements.txt -sphinx = "^4" +sphinx = "^5" numpydoc = "^1" sphinx-gallery = "^0.10.0" sphinx_issues = "^1.2.0" diff --git a/src/biopsykit/io/tfm.py b/src/biopsykit/io/tfm.py index f7154da..3723c6c 100644 --- a/src/biopsykit/io/tfm.py +++ b/src/biopsykit/io/tfm.py @@ -1,5 +1,5 @@ """Module for loading and processing Task Force Monitor (TFM) data.""" -from typing import ClassVar, Optional, Self +from typing import ClassVar, Optional import pandas as pd from scipy.io import loadmat @@ -42,7 +42,7 @@ def from_mat_file( path: path_t, # channel_mapping: Optional[Dict[str, str]] = None, tz: Optional[str] = "Europe/Berlin", - ) -> Self: + ): """Load TFM data from a .mat file. Parameters