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

Fixes for more recent dask versions #101

Merged
merged 7 commits into from
Nov 1, 2023
Merged
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
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.7, 3.8, 3.9, "3.10"]
python-version: [3.8, 3.9, "3.10", "3.11", "3.12"]

steps:
- name: Checkout repository
Expand Down
10 changes: 5 additions & 5 deletions ceci/stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,6 +415,8 @@ def describe_configuration(cls):
@classmethod
def _describe_configuration_text(cls):
s = []
if cls.config_options is None:
return "<This class has no configuration options>"
for name, val in cls.config_options.items():
if isinstance(val, StageParameter):
if val.required:
Expand Down Expand Up @@ -831,14 +833,12 @@ def start_dask(self):

return is_client

@staticmethod
def stop_dask():
def stop_dask(self):
"""
End the dask event loop
"""
from dask_mpi import send_close_signal

send_close_signal()
self.dask_client.retire_workers()
self.dask_client.shutdown()

def split_tasks_by_rank(self, tasks):
"""Iterate through a list of items, yielding ones this process is responsible for/
Expand Down
8 changes: 4 additions & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -66,8 +66,8 @@ viz = [
]

dask = [
"dask",
"dask_mpi @ git+https://github.com/joezuntz/dask-mpi",
"dask[distributed] >= 2023.5.0",
"dask_mpi >= 2022.4.0",
]

test = [
Expand All @@ -90,6 +90,6 @@ all = [
"pytest-mock",
"mockmpi",
"h5py",
"dask[distributed]",
"dask_mpi @ git+https://github.com/joezuntz/dask-mpi",
"dask[distributed] >= 2023.5.0",
"dask_mpi >= 2022.4.0",
]
2 changes: 1 addition & 1 deletion tests/test_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ def test_flow_chart_dot():
def test_run_parsl():
run1("launcher.name=parsl", "launcher.max_threads=3")


@pytest.mark.skip(reason="CWL currently broken")
def test_run_cwl():
run1("launcher.name=cwl", "launcher.dir=tests/cwl") == 0

Expand Down
6 changes: 6 additions & 0 deletions tests/test_stage.py
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,12 @@ def run(self):
assert stage_1_cmd.config.a == 6.
assert stage_1_cmd.config.b == 'puffins are not extinct?'

class AbstractStage(PipelineStage):
name="AbstractStage"
config_options = None

AbstractStage.describe_configuration()


# This one should not work
class TestStage_2(PipelineStage):
Expand Down
Loading