Skip to content

Commit 82b4962

Browse files
committed
split out dask and psij workers into separate plugin packages
1 parent a483660 commit 82b4962

File tree

11 files changed

+6
-215
lines changed

11 files changed

+6
-215
lines changed

.github/workflows/ci-cd.yml

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -80,38 +80,6 @@ jobs:
8080
fail_ci_if_error: true
8181
token: ${{ secrets.CODECOV_TOKEN }}
8282

83-
test-workers:
84-
needs: ['build']
85-
strategy:
86-
matrix:
87-
os: [ubuntu-latest]
88-
python-version: ['3.11', '3.12', '3.13']
89-
worker: ["psij-local", "dask"]
90-
fail-fast: false
91-
runs-on: ${{ matrix.os }}
92-
steps:
93-
- name: Checkout repository
94-
uses: actions/checkout@v4
95-
with:
96-
repository: ${{ github.repository }}
97-
- name: Fetch tags
98-
run: git fetch --prune --unshallow
99-
- name: Setup Python version ${{ matrix.python-version }}
100-
uses: actions/setup-python@v5
101-
with:
102-
python-version: ${{ matrix.python-version }}
103-
- name: Install package
104-
run: |
105-
pip install -e ".[test,dask,psij]"
106-
- name: Run tests for Dask
107-
run: |
108-
pytest -v pydra/engine/tests/test_submitter.py --only-worker=${{ matrix.worker }} --rootdir pydra --cov pydra --cov-config .coveragerc --cov-report xml:cov.xml
109-
- name: Upload coverage to Codecov
110-
uses: codecov/codecov-action@v2
111-
with:
112-
fail_ci_if_error: true
113-
token: ${{ secrets.CODECOV_TOKEN }}
114-
11583
test-singularity:
11684
needs: ['build']
11785
runs-on: ubuntu-22.04
@@ -177,7 +145,6 @@ jobs:
177145
strategy:
178146
matrix:
179147
python-version: [3.11.5]
180-
worker: ["slurm", "psij-slurm"]
181148
fail-fast: false
182149
runs-on: ubuntu-latest
183150
env:
@@ -214,7 +181,7 @@ jobs:
214181
docker exec slurm bash -c "pip install --upgrade pip && pip install -e /pydra[test,psij] && python -c 'import pydra.engine; print(pydra.utils.__version__)'"
215182
- name: Run pytest
216183
run: |
217-
docker exec slurm bash -c "pytest /pydra/pydra/engine/tests/test_submitter.py --rootdir /pydra/pydra --only-worker=${{ matrix.worker }} --color=yes -vs --cov pydra --cov-config /pydra/.coveragerc --cov-report xml:/pydra/cov.xml"
184+
docker exec slurm bash -c "pytest /pydra/pydra/engine/tests/test_submitter.py --rootdir /pydra/pydra --only-worker=slurm --color=yes -vs --cov pydra --cov-config /pydra/.coveragerc --cov-report xml:/pydra/cov.xml"
218185
- name: Upload coverage to Codecov
219186
uses: codecov/codecov-action@v2
220187
with:
@@ -373,7 +340,7 @@ jobs:
373340
path: docs/build/html
374341

375342
deploy:
376-
needs: [build-docs, test, test-workers, test-singularity, test-slurm]
343+
needs: [build-docs, test, test-singularity, test-slurm]
377344
runs-on: ubuntu-latest
378345
steps:
379346
- name: Download dist

pydra/conftest.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,6 @@
77

88
def pytest_addoption(parser):
99
parser.addoption("--with-dask", action="store_true", help="run all combinations")
10-
parser.addoption(
11-
"--with-psij",
12-
action="store_true",
13-
help="run with psij workers in test matrix",
14-
)
1510
parser.addoption(
1611
"--only-worker",
1712
help="only run tests with provided worker",
@@ -29,10 +24,6 @@ def pytest_generate_tests(metafunc):
2924
with_dask = metafunc.config.getoption("with_dask")
3025
except ValueError:
3126
with_dask = False
32-
try:
33-
with_psij = metafunc.config.getoption("with_psij")
34-
except ValueError:
35-
with_psij = False
3627
try:
3728
only_worker = metafunc.config.getoption("only_worker")
3829
except ValueError:
@@ -43,10 +34,6 @@ def pytest_generate_tests(metafunc):
4334
available_workers.append("dask")
4435
if bool(shutil.which("sbatch")):
4536
available_workers.append("slurm")
46-
if with_psij:
47-
available_workers.append("psij-slurm")
48-
if with_psij:
49-
available_workers.append("psij-local")
5037
else:
5138
available_workers = [only_worker]
5239
# Set the available workers as a parameter to the

pydra/workers/cf.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
import concurrent.futures as cf
66
import logging
77
from pydra.engine.job import Job
8-
from . import base
8+
from pydra.workers import base
99

1010
logger = logging.getLogger("pydra.worker")
1111

pydra/workers/dask.py

Lines changed: 0 additions & 37 deletions
This file was deleted.

pydra/workers/debug.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import typing as ty
22
import logging
33
from pydra.engine.job import Job
4-
from . import base
4+
from pydra.workers import base
55

66
if ty.TYPE_CHECKING:
77
from pydra.engine.result import Result

pydra/workers/psij_base.py

Lines changed: 0 additions & 110 deletions
This file was deleted.

pydra/workers/psij_local.py

Lines changed: 0 additions & 7 deletions
This file was deleted.

pydra/workers/psij_slurm.py

Lines changed: 0 additions & 7 deletions
This file was deleted.

pydra/workers/sge.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
import random
1111
import logging
1212
from pydra.engine.job import Job, save, load_job
13-
from . import base
13+
from pydra.workers import base
1414

1515
logger = logging.getLogger("pydra.worker")
1616

pydra/workers/slurm.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
import logging
1010
import attrs
1111
from pydra.engine.job import Job, save
12-
from . import base
12+
from pydra.workers import base
1313

1414

1515
logger = logging.getLogger("pydra.worker")

0 commit comments

Comments
 (0)