From 623281430ae921c633cc02e827f60e651bf2cda5 Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Wed, 31 Dec 2025 11:51:17 +0100 Subject: [PATCH 1/8] chore: update install docs and typing fixes --- docs/source/quickstart.md | 4 ++-- src/pytask_parallel/utils.py | 2 +- src/pytask_parallel/wrappers.py | 16 ++++++++++++---- 3 files changed, 15 insertions(+), 7 deletions(-) diff --git a/docs/source/quickstart.md b/docs/source/quickstart.md index dd583cb..640b26e 100644 --- a/docs/source/quickstart.md +++ b/docs/source/quickstart.md @@ -6,11 +6,11 @@ pytask-parallel is available on [PyPI](https://pypi.org/project/pytask-parallel) [Anaconda.org](https://anaconda.org/conda-forge/pytask-parallel). Install it with ```console -$ pip install pytask-parallel +$ uv add pytask-parallel # or -$ conda install -c conda-forge pytask-parallel +$ pixi add pytask-parallel ``` ## Usage diff --git a/src/pytask_parallel/utils.py b/src/pytask_parallel/utils.py index 52f51e4..269c72d 100644 --- a/src/pytask_parallel/utils.py +++ b/src/pytask_parallel/utils.py @@ -54,7 +54,7 @@ def parse_future_result( exc_info = _parse_future_exception(future_exception) return WrapperResult( - carry_over_products=None, # type: ignore[arg-type] + carry_over_products=None, warning_reports=[], exc_info=exc_info, stdout="", diff --git a/src/pytask_parallel/wrappers.py b/src/pytask_parallel/wrappers.py index eade498..e663e8a 100644 --- a/src/pytask_parallel/wrappers.py +++ b/src/pytask_parallel/wrappers.py @@ -69,14 +69,22 @@ def wrap_task_in_thread(task: PTask, *, remote: bool, **kwargs: Any) -> WrapperR try: out = task.function(**kwargs) except Exception: # noqa: BLE001 - exc_info = sys.exc_info() + exc_info_raw = sys.exc_info() + exc_info = ( + cast( + "tuple[type[BaseException], BaseException, TracebackType | str | None]", + exc_info_raw, + ) + if exc_info_raw[0] is not None + else None + ) else: _handle_function_products(task, out, remote=remote) exc_info = None return WrapperResult( - carry_over_products=None, # type: ignore[arg-type] + carry_over_products=None, warning_reports=[], - exc_info=exc_info, # type: ignore[arg-type] + exc_info=exc_info, stdout="", stderr="", ) @@ -161,7 +169,7 @@ def wrap_task_in_process( # noqa: PLR0913 captured_stderr_buffer.close() return WrapperResult( - carry_over_products=products, # type: ignore[arg-type] + carry_over_products=products, warning_reports=warning_reports, exc_info=processed_exc_info, stdout=captured_stdout, From 6c3178238cf467ef1654e1b4582ca56b2730c428 Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Wed, 31 Dec 2025 12:49:25 +0100 Subject: [PATCH 2/8] chore: bump ty minimum to 0.0.8 --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index d8037d0..8520904 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -50,7 +50,7 @@ test = [ ] typing = [ "pytask-parallel", - "ty", + "ty>=0.0.8", {include-group = "coiled"}, {include-group = "dask"}, ] From f9bd35a9189859755ec240e419c88f4e96e826f7 Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Wed, 31 Dec 2025 12:54:24 +0100 Subject: [PATCH 3/8] chore: add weekly dependabot for uv --- .github/dependabot.yml | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index fbb58d4..6483b1d 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,12 +1,6 @@ version: 2 - updates: - - package-ecosystem: "github-actions" + - package-ecosystem: "uv" directory: "/" schedule: interval: "weekly" - - groups: - github-actions: - patterns: - - "*" From 9469a02aa7b11977e69fb07852308dbb310dca9f Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Wed, 31 Dec 2025 13:06:54 +0100 Subject: [PATCH 4/8] chore: add github-actions dependabot updates --- .github/dependabot.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index 6483b1d..c766b7e 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,5 +1,9 @@ version: 2 updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" - package-ecosystem: "uv" directory: "/" schedule: From 34507ab951f60010426ef349ce19308e2bef6462 Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Wed, 31 Dec 2025 15:42:10 +0100 Subject: [PATCH 5/8] chore: group github-actions dependabot updates --- .github/dependabot.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/dependabot.yml b/.github/dependabot.yml index c766b7e..be4ca53 100644 --- a/.github/dependabot.yml +++ b/.github/dependabot.yml @@ -1,9 +1,14 @@ version: 2 + updates: - package-ecosystem: "github-actions" directory: "/" schedule: interval: "weekly" + groups: + github-actions: + patterns: + - "*" - package-ecosystem: "uv" directory: "/" schedule: From c06a4c70f31522cff0cbf20f7ad8776828d42873 Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Wed, 31 Dec 2025 16:15:56 +0100 Subject: [PATCH 6/8] chore: avoid editable rtd docs --- .readthedocs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 707af96..633e182 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -9,7 +9,7 @@ build: - asdf plugin add uv - asdf install uv latest - asdf global uv latest - - UV_PROJECT_ENVIRONMENT=$READTHEDOCS_VIRTUALENV_PATH uv sync --group docs + - UV_NO_EDITABLE=1 UV_PROJECT_ENVIRONMENT=$READTHEDOCS_VIRTUALENV_PATH uv sync --group docs install: - "true" From 3193461c42795091a620e7fc39cb8a44a2662002 Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Wed, 31 Dec 2025 16:57:41 +0100 Subject: [PATCH 7/8] chore: use prek for lint --- justfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/justfile b/justfile index d63d31d..87529e7 100644 --- a/justfile +++ b/justfile @@ -20,7 +20,7 @@ typing: # Run linting and formatting lint: - uvx --with pre-commit-uv pre-commit run -a + uvx prek run -a # Build documentation docs: From 3ff8d2fce126d89907b67d751de5c49e2fce4204 Mon Sep 17 00:00:00 2001 From: Tobias Raabe Date: Wed, 31 Dec 2025 16:59:21 +0100 Subject: [PATCH 8/8] Fix docs. --- .readthedocs.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.readthedocs.yaml b/.readthedocs.yaml index 633e182..707af96 100644 --- a/.readthedocs.yaml +++ b/.readthedocs.yaml @@ -9,7 +9,7 @@ build: - asdf plugin add uv - asdf install uv latest - asdf global uv latest - - UV_NO_EDITABLE=1 UV_PROJECT_ENVIRONMENT=$READTHEDOCS_VIRTUALENV_PATH uv sync --group docs + - UV_PROJECT_ENVIRONMENT=$READTHEDOCS_VIRTUALENV_PATH uv sync --group docs install: - "true"