Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Major version 2.0 #1251

Draft
wants to merge 8 commits into
base: master
Choose a base branch
from
Draft
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
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Install uv
uses: astral-sh/setup-uv@v3
with:
version: "0.4.22"
version: "0.5.22"

- name: Set up Python ${{ matrix.python-version }}
run: uv python install ${{ matrix.python-version }}
Expand Down Expand Up @@ -214,7 +214,7 @@ jobs:
uses: astral-sh/setup-uv@v3
with:
# Install a specific version of uv.
version: "0.4.22"
version: "0.5.22"
- name: Write version file
run: |
pushd webknossos
Expand Down Expand Up @@ -291,7 +291,7 @@ jobs:
uses: astral-sh/setup-uv@v3
with:
# Install a specific version of uv.
version: "0.4.22"
version: "0.5.22"
- name: Build Docs
run: |
cd docs
Expand Down Expand Up @@ -343,7 +343,7 @@ jobs:
uses: astral-sh/setup-uv@v3
with:
# Install a specific version of uv.
version: "0.4.22"
version: "0.5.22"
- name: Publish python packages
env:
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_PASSWORD }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
uses: astral-sh/setup-uv@v3
with:
# Install a specific version of uv.
version: "0.4.19"
version: "0.5.22"

- name: Build Docs
run: |
Expand Down
3 changes: 3 additions & 0 deletions cluster_tools/Changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ For upgrade instructions, please check the respective *Breaking Changes* section
[Commits](https://github.com/scalableminds/webknossos-libs/compare/v0.16.6...HEAD)

### Breaking Changes
- The deprecated executor `WrappedProcessPoolExecutor` was removed. Use `MultiprocessingExecutor` instead. [#1244](https://github.com/scalableminds/webknossos-libs/pull/1244)
- The deprecated execution strategy `test_pickling` was removed. Use `multiprocessing_with_pickling` instead. [#1244](https://github.com/scalableminds/webknossos-libs/pull/1244)
- The deprecated execution strategy `debug_sequential` was removed. Use `sequential` instead. [#1244](https://github.com/scalableminds/webknossos-libs/pull/1244)

### Added

Expand Down
32 changes: 0 additions & 32 deletions cluster_tools/cluster_tools/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import warnings
from typing import Any, Literal, overload

from cluster_tools.executor_protocol import Executor
Expand All @@ -17,9 +16,6 @@
from cluster_tools.schedulers.pbs import PBSExecutor
from cluster_tools.schedulers.slurm import SlurmExecutor

# For backwards-compatibility, remove in version 2.0:
WrappedProcessPoolExecutor = MultiprocessingExecutor


def _noop() -> bool:
return True
Expand Down Expand Up @@ -84,24 +80,12 @@ def get_executor(
) -> MultiprocessingPickleExecutor: ...


@overload
def get_executor(
environment: Literal["test_pickling"], **kwargs: Any
) -> MultiprocessingPickleExecutor: ...


@overload
def get_executor(
environment: Literal["sequential"], **kwargs: Any
) -> SequentialExecutor: ...


@overload
def get_executor(
environment: Literal["debug_sequential"], **kwargs: Any
) -> SequentialExecutor: ...


@overload
def get_executor(
environment: Literal["sequential_with_pickling"], **kwargs: Any
Expand Down Expand Up @@ -133,20 +117,4 @@ def get_executor(environment: str, **kwargs: Any) -> "Executor":
return SequentialPickleExecutor(**kwargs)
elif environment == "multiprocessing_with_pickling":
return MultiprocessingPickleExecutor(**kwargs)
elif environment == "test_pickling":
# For backwards-compatibility, remove in version 2.0:
warnings.warn(
"The test_pickling execution strategy is deprecated and will be removed in version 2.0. Use multiprocessing_with_pickling instead.",
DeprecationWarning,
stacklevel=2,
)
return MultiprocessingPickleExecutor(**kwargs)
elif environment == "debug_sequential":
# For backwards-compatibility, remove in version 2.0:
warnings.warn(
"The debug_sequential execution strategy is deprecated and will be removed in version 2.0. Use sequential instead.",
DeprecationWarning,
stacklevel=2,
)
return SequentialExecutor(**kwargs)
raise Exception("Unknown executor: {}".format(environment))
2 changes: 1 addition & 1 deletion cluster_tools/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@
set -eEuo pipefail

cd tests
PYTEST_EXECUTORS=multiprocessing,sequential,test_pickling,debug_sequential uv run --frozen python -m pytest -sv test_all.py test_multiprocessing.py
PYTEST_EXECUTORS=multiprocessing,multiprocessing_with_pickling,sequential uv run --frozen python -m pytest -sv test_all.py test_multiprocessing.py

echo "Tests for the kubernetes, dask and SLURM executors are only run in the CI"
2 changes: 1 addition & 1 deletion cluster_tools/tests/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ ARG PYTHON_VERSION="3.11"

FROM python:${PYTHON_VERSION}

COPY --from=ghcr.io/astral-sh/uv:0.4.20 /uv /bin/uv
COPY --from=ghcr.io/astral-sh/uv:0.5.22 /uv /bin/uv

RUN mkdir /cluster_tools
COPY . /cluster_tools
Expand Down