parsl 2024.1.1__py3-none-any.whl → 2024.1.15__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (28) hide show
  1. parsl/addresses.py +3 -2
  2. parsl/dataflow/dflow.py +5 -9
  3. parsl/executors/high_throughput/executor.py +19 -16
  4. parsl/executors/workqueue/executor.py +1 -1
  5. parsl/jobs/job_status_poller.py +7 -6
  6. parsl/providers/errors.py +14 -7
  7. parsl/tests/conftest.py +59 -10
  8. parsl/tests/test_checkpointing/test_python_checkpoint_1.py +12 -32
  9. parsl/tests/test_checkpointing/test_python_checkpoint_2.py +25 -28
  10. parsl/tests/test_providers/test_submiterror_deprecation.py +21 -0
  11. parsl/tests/test_radical/test_mpi_funcs.py +3 -2
  12. parsl/tests/test_staging/__init__.py +7 -0
  13. parsl/tests/test_staging/test_elaborate_noop_file.py +30 -38
  14. parsl/tests/test_staging/test_staging_https.py +60 -76
  15. parsl/tests/test_utils/__init__.py +0 -0
  16. parsl/tests/test_utils/test_representation_mixin.py +68 -0
  17. parsl/utils.py +14 -9
  18. parsl/version.py +1 -1
  19. {parsl-2024.1.1.dist-info → parsl-2024.1.15.dist-info}/METADATA +2 -2
  20. {parsl-2024.1.1.dist-info → parsl-2024.1.15.dist-info}/RECORD +27 -25
  21. parsl/tests/test_staging/test_staging_https_in_task.py +0 -34
  22. {parsl-2024.1.1.data → parsl-2024.1.15.data}/scripts/exec_parsl_function.py +0 -0
  23. {parsl-2024.1.1.data → parsl-2024.1.15.data}/scripts/parsl_coprocess.py +0 -0
  24. {parsl-2024.1.1.data → parsl-2024.1.15.data}/scripts/process_worker_pool.py +0 -0
  25. {parsl-2024.1.1.dist-info → parsl-2024.1.15.dist-info}/LICENSE +0 -0
  26. {parsl-2024.1.1.dist-info → parsl-2024.1.15.dist-info}/WHEEL +0 -0
  27. {parsl-2024.1.1.dist-info → parsl-2024.1.15.dist-info}/entry_points.txt +0 -0
  28. {parsl-2024.1.1.dist-info → parsl-2024.1.15.dist-info}/top_level.txt +0 -0
parsl/addresses.py CHANGED
@@ -72,8 +72,9 @@ def address_by_hostname() -> str:
72
72
  """
73
73
  logger.debug("Finding address by using local hostname")
74
74
  addr = platform.node()
75
- logger.debug("Address found: {}".format(addr))
76
- return addr
75
+ ip_addr = socket.gethostbyname(addr)
76
+ logger.debug("Address found: {}".format(ip_addr))
77
+ return ip_addr
77
78
 
78
79
 
79
80
  @typeguard.typechecked
parsl/dataflow/dflow.py CHANGED
@@ -177,7 +177,9 @@ class DataFlowKernel:
177
177
 
178
178
  # this must be set before executors are added since add_executors calls
179
179
  # job_status_poller.add_executors.
180
- self.job_status_poller = JobStatusPoller(self)
180
+ self.job_status_poller = JobStatusPoller(strategy=self.config.strategy,
181
+ max_idletime=self.config.max_idletime,
182
+ dfk=self)
181
183
 
182
184
  self.executors: Dict[str, ParslExecutor] = {}
183
185
 
@@ -526,9 +528,7 @@ class DataFlowKernel:
526
528
  # or do nothing?
527
529
  if self.checkpoint_mode == 'task_exit':
528
530
  self.checkpoint(tasks=[task_record])
529
- elif self.checkpoint_mode == 'manual' or \
530
- self.checkpoint_mode == 'periodic' or \
531
- self.checkpoint_mode == 'dfk_exit':
531
+ elif self.checkpoint_mode in ('manual', 'periodic', 'dfk_exit'):
532
532
  with self.checkpoint_lock:
533
533
  self.checkpointable_tasks.append(task_record)
534
534
  elif self.checkpoint_mode is None:
@@ -1298,11 +1298,7 @@ class DataFlowKernel:
1298
1298
  hashsum = task_record['hashsum']
1299
1299
  if not hashsum:
1300
1300
  continue
1301
- t = {'hash': hashsum,
1302
- 'exception': None,
1303
- 'result': None}
1304
-
1305
- t['result'] = app_fu.result()
1301
+ t = {'hash': hashsum, 'exception': None, 'result': app_fu.result()}
1306
1302
 
1307
1303
  # We are using pickle here since pickle dumps to a file in 'ab'
1308
1304
  # mode behave like a incremental log.
@@ -205,7 +205,6 @@ class HighThroughputExecutor(BlockProviderExecutor, RepresentationMixin):
205
205
 
206
206
  BlockProviderExecutor.__init__(self, provider=provider, block_error_handler=block_error_handler)
207
207
  self.label = label
208
- self.launch_cmd = launch_cmd
209
208
  self.worker_debug = worker_debug
210
209
  self.storage_access = storage_access
211
210
  self.working_dir = working_dir
@@ -259,21 +258,25 @@ class HighThroughputExecutor(BlockProviderExecutor, RepresentationMixin):
259
258
  self.cpu_affinity = cpu_affinity
260
259
 
261
260
  if not launch_cmd:
262
- self.launch_cmd = ("process_worker_pool.py {debug} {max_workers} "
263
- "-a {addresses} "
264
- "-p {prefetch_capacity} "
265
- "-c {cores_per_worker} "
266
- "-m {mem_per_worker} "
267
- "--poll {poll_period} "
268
- "--task_port={task_port} "
269
- "--result_port={result_port} "
270
- "--logdir={logdir} "
271
- "--block_id={{block_id}} "
272
- "--hb_period={heartbeat_period} "
273
- "{address_probe_timeout_string} "
274
- "--hb_threshold={heartbeat_threshold} "
275
- "--cpu-affinity {cpu_affinity} "
276
- "--available-accelerators {accelerators}")
261
+ launch_cmd = (
262
+ "process_worker_pool.py {debug} {max_workers} "
263
+ "-a {addresses} "
264
+ "-p {prefetch_capacity} "
265
+ "-c {cores_per_worker} "
266
+ "-m {mem_per_worker} "
267
+ "--poll {poll_period} "
268
+ "--task_port={task_port} "
269
+ "--result_port={result_port} "
270
+ "--logdir={logdir} "
271
+ "--block_id={{block_id}} "
272
+ "--hb_period={heartbeat_period} "
273
+ "{address_probe_timeout_string} "
274
+ "--hb_threshold={heartbeat_threshold} "
275
+ "--cpu-affinity {cpu_affinity} "
276
+ "--available-accelerators {accelerators}"
277
+ )
278
+
279
+ self.launch_cmd = launch_cmd
277
280
 
278
281
  radio_mode = "htex"
279
282
 
@@ -849,7 +849,7 @@ def _work_queue_submit_wait(*,
849
849
  break
850
850
 
851
851
  # Submit tasks
852
- while task_queue.qsize() > 0 and not should_stop.value:
852
+ while task_queue.qsize() > 0 or q.empty() and not should_stop.value:
853
853
  # Obtain task from task_queue
854
854
  try:
855
855
  task = task_queue.get(timeout=1)
@@ -2,7 +2,7 @@ import logging
2
2
  import parsl
3
3
  import time
4
4
  import zmq
5
- from typing import Dict, List, Sequence
5
+ from typing import Dict, List, Sequence, Optional
6
6
 
7
7
  from parsl.jobs.states import JobStatus, JobState
8
8
  from parsl.jobs.strategy import Strategy
@@ -17,7 +17,7 @@ logger = logging.getLogger(__name__)
17
17
 
18
18
 
19
19
  class PollItem:
20
- def __init__(self, executor: BlockProviderExecutor, dfk: "parsl.dataflow.dflow.DataFlowKernel"):
20
+ def __init__(self, executor: BlockProviderExecutor, dfk: Optional["parsl.dataflow.dflow.DataFlowKernel"] = None):
21
21
  self._executor = executor
22
22
  self._dfk = dfk
23
23
  self._interval = executor.status_polling_interval
@@ -26,7 +26,7 @@ class PollItem:
26
26
 
27
27
  # Create a ZMQ channel to send poll status to monitoring
28
28
  self.monitoring_enabled = False
29
- if self._dfk.monitoring is not None:
29
+ if self._dfk and self._dfk.monitoring is not None:
30
30
  self.monitoring_enabled = True
31
31
  hub_address = self._dfk.hub_address
32
32
  hub_port = self._dfk.hub_interchange_port
@@ -100,11 +100,12 @@ class PollItem:
100
100
 
101
101
 
102
102
  class JobStatusPoller(Timer):
103
- def __init__(self, dfk: "parsl.dataflow.dflow.DataFlowKernel") -> None:
103
+ def __init__(self, strategy: Optional[str] = None, max_idletime: float = 0.0,
104
+ dfk: Optional["parsl.dataflow.dflow.DataFlowKernel"] = None) -> None:
104
105
  self._poll_items = [] # type: List[PollItem]
105
106
  self.dfk = dfk
106
- self._strategy = Strategy(strategy=dfk.config.strategy,
107
- max_idletime=dfk.config.max_idletime)
107
+ self._strategy = Strategy(strategy=strategy,
108
+ max_idletime=max_idletime)
108
109
  super().__init__(self.poll, interval=5, name="JobStatusPoller")
109
110
 
110
111
  def poll(self) -> None:
parsl/providers/errors.py CHANGED
@@ -1,5 +1,7 @@
1
1
  from parsl.errors import ParslError
2
2
 
3
+ import warnings
4
+
3
5
 
4
6
  class ExecutionProviderException(ParslError):
5
7
  """ Base class for all exceptions
@@ -46,18 +48,23 @@ class ScriptPathError(ExecutionProviderException):
46
48
 
47
49
 
48
50
  class SubmitException(ExecutionProviderException):
49
- '''Raised by the submit() method of a provider if there is an error in launching a task.
51
+ '''Raised by the submit() method of a provider if there is an error in launching a job.
50
52
  '''
51
53
 
52
- def __init__(self, task_name, message, stdout=None, stderr=None):
53
- self.task_name = task_name
54
+ def __init__(self, job_name, message, stdout=None, stderr=None):
55
+ self.job_name = job_name
54
56
  self.message = message
55
57
  self.stdout = stdout
56
58
  self.stderr = stderr
57
59
 
60
+ @property
61
+ def task_name(self) -> str:
62
+ warnings.warn("task_name is deprecated; use .job_name instead. This will be removed after 2024-06.", DeprecationWarning)
63
+ return self.job_name
64
+
58
65
  def __str__(self):
59
66
  # TODO: make this more user-friendly
60
- return "Cannot launch task {0}: {1}; stdout={2}, stderr={3}".format(self.task_name,
61
- self.message,
62
- self.stdout,
63
- self.stderr)
67
+ return "Cannot launch job {0}: {1}; stdout={2}, stderr={3}".format(self.job_name,
68
+ self.message,
69
+ self.stdout,
70
+ self.stderr)
parsl/tests/conftest.py CHANGED
@@ -3,6 +3,8 @@ import itertools
3
3
  import logging
4
4
  import os
5
5
  import pathlib
6
+ import re
7
+ import shutil
6
8
  import time
7
9
  import types
8
10
  import signal
@@ -20,6 +22,7 @@ import _pytest.runner as runner
20
22
 
21
23
  import parsl
22
24
  from parsl.dataflow.dflow import DataFlowKernelLoader
25
+ from parsl.utils import RepresentationMixin
23
26
 
24
27
  logger = logging.getLogger(__name__)
25
28
 
@@ -44,17 +47,46 @@ def pytest_sessionstart(session):
44
47
 
45
48
 
46
49
  @pytest.fixture(scope="session")
47
- def tmpd_cwd_session():
48
- n = datetime.now().strftime('%Y%m%d.%H%I%S')
49
- with tempfile.TemporaryDirectory(dir=os.getcwd(), prefix=f".pytest-{n}-") as tmpd:
50
- yield pathlib.Path(tmpd)
50
+ def tmpd_cwd_session(pytestconfig):
51
+ config = re.sub(r"[^A-z0-9_-]+", "_", pytestconfig.getoption('config')[0])
52
+ cwd = pathlib.Path(os.getcwd())
53
+ pytest_dir = cwd / ".pytest"
54
+ pytest_dir.mkdir(mode=0o700, parents=True, exist_ok=True)
55
+
56
+ test_dir_prefix = "parsltest-"
57
+ link = pytest_dir / f"{test_dir_prefix}current"
58
+ link.unlink(missing_ok=True)
59
+ n = datetime.now().strftime('%Y%m%d.%H%M%S')
60
+ tmpd = tempfile.mkdtemp(dir=pytest_dir, prefix=f"{test_dir_prefix}{n}-{config}-")
61
+ tmpd = pathlib.Path(tmpd)
62
+ link.symlink_to(tmpd.name)
63
+ yield link
64
+
65
+ try:
66
+ preserve = int(os.getenv("PARSL_TEST_PRESERVE_NUM_RUNS", "3"))
67
+ except Exception:
68
+ preserve = 3
69
+
70
+ test_runs = sorted(
71
+ d for d in pytest_dir.glob(f"{test_dir_prefix}*")
72
+ if d.is_dir() and not d.is_symlink()
73
+ )
74
+ for run_to_remove in test_runs[:-preserve]:
75
+ run_to_remove.chmod(0o700)
76
+ for root, subdirnames, fnames in os.walk(run_to_remove):
77
+ rpath = pathlib.Path(root)
78
+ for d in subdirnames:
79
+ (rpath / d).lchmod(0o700)
80
+ for f in fnames:
81
+ (rpath / f).lchmod(0o600)
82
+ shutil.rmtree(run_to_remove)
51
83
 
52
84
 
53
85
  @pytest.fixture
54
86
  def tmpd_cwd(tmpd_cwd_session, request):
55
87
  prefix = f"{request.node.name}-"
56
- with tempfile.TemporaryDirectory(dir=tmpd_cwd_session, prefix=prefix) as tmpd:
57
- yield pathlib.Path(tmpd)
88
+ tmpd = tempfile.mkdtemp(dir=tmpd_cwd_session, prefix=prefix)
89
+ yield pathlib.Path(tmpd)
58
90
 
59
91
 
60
92
  def pytest_addoption(parser):
@@ -118,7 +150,7 @@ def pytest_configure(config):
118
150
 
119
151
 
120
152
  @pytest.fixture(autouse=True, scope='session')
121
- def load_dfk_session(request, pytestconfig):
153
+ def load_dfk_session(request, pytestconfig, tmpd_cwd_session):
122
154
  """Load a dfk around entire test suite, except in local mode.
123
155
 
124
156
  The special path `local` indicates that configuration will not come
@@ -126,6 +158,8 @@ def load_dfk_session(request, pytestconfig):
126
158
  load_dfk_local_module for module-level configuration management.
127
159
  """
128
160
 
161
+ RepresentationMixin._validate_repr = True
162
+
129
163
  config = pytestconfig.getoption('config')[0]
130
164
 
131
165
  if config != 'local':
@@ -137,12 +171,19 @@ def load_dfk_session(request, pytestconfig):
137
171
  raise RuntimeError("DFK didn't start as None - there was a DFK from somewhere already")
138
172
 
139
173
  if hasattr(module, 'config'):
140
- dfk = parsl.load(module.config)
174
+ parsl_conf = module.config
141
175
  elif hasattr(module, 'fresh_config'):
142
- dfk = parsl.load(module.fresh_config())
176
+ parsl_conf = module.fresh_config()
143
177
  else:
144
178
  raise RuntimeError("Config module does not define config or fresh_config")
145
179
 
180
+ if parsl_conf.run_dir == "runinfo": # the default
181
+ parsl_conf.run_dir = tmpd_cwd_session / parsl_conf.run_dir
182
+ dfk = parsl.load(parsl_conf)
183
+
184
+ for ex in dfk.executors.values():
185
+ ex.working_dir = tmpd_cwd_session
186
+
146
187
  yield
147
188
 
148
189
  if parsl.dfk() != dfk:
@@ -154,7 +195,7 @@ def load_dfk_session(request, pytestconfig):
154
195
 
155
196
 
156
197
  @pytest.fixture(autouse=True, scope='module')
157
- def load_dfk_local_module(request, pytestconfig):
198
+ def load_dfk_local_module(request, pytestconfig, tmpd_cwd_session):
158
199
  """Load the dfk around test modules, in local mode.
159
200
 
160
201
  If local_config is specified in the test module, it will be loaded using
@@ -165,6 +206,7 @@ def load_dfk_local_module(request, pytestconfig):
165
206
  be used to perform more interesting DFK initialisation not possible with
166
207
  local_config.
167
208
  """
209
+ RepresentationMixin._validate_repr = True
168
210
 
169
211
  config = pytestconfig.getoption('config')[0]
170
212
 
@@ -177,8 +219,15 @@ def load_dfk_local_module(request, pytestconfig):
177
219
  assert callable(local_config)
178
220
  c = local_config()
179
221
  assert isinstance(c, parsl.Config)
222
+
223
+ if c.run_dir == "runinfo": # the default
224
+ c.run_dir = tmpd_cwd_session / c.run_dir
225
+
180
226
  dfk = parsl.load(c)
181
227
 
228
+ for ex in dfk.executors.values():
229
+ ex.working_dir = tmpd_cwd_session
230
+
182
231
  if callable(local_setup):
183
232
  local_setup()
184
233
 
@@ -1,4 +1,3 @@
1
- import argparse
2
1
  import os
3
2
  import pytest
4
3
 
@@ -7,47 +6,28 @@ from parsl import python_app
7
6
  from parsl.tests.configs.local_threads import fresh_config
8
7
 
9
8
 
10
- @python_app(cache=True)
11
- def random_app(i):
12
- import random
13
- return random.randint(i, 100000)
14
-
15
-
16
- def launch_n_random(n=2):
17
- """1. Launch a few apps and write the checkpoint once a few have completed
18
- """
9
+ def local_config():
10
+ config = fresh_config()
11
+ config.checkpoint_mode = "manual"
12
+ return config
19
13
 
20
- d = [random_app(i) for i in range(0, n)]
21
- print("Done launching")
22
14
 
23
- # Block till done
24
- return [i.result() for i in d]
15
+ @python_app(cache=True)
16
+ def uuid_app():
17
+ import uuid
18
+ return uuid.uuid4()
25
19
 
26
20
 
27
21
  @pytest.mark.local
28
- def test_initial_checkpoint_write(n=2):
22
+ def test_initial_checkpoint_write():
29
23
  """1. Launch a few apps and write the checkpoint once a few have completed
30
24
  """
31
- config = fresh_config()
32
- config.checkpoint_mode = 'manual'
33
- parsl.load(config)
34
- results = launch_n_random(n)
25
+ uuid_app().result()
35
26
 
36
27
  cpt_dir = parsl.dfk().checkpoint()
37
28
 
38
29
  cptpath = cpt_dir + '/dfk.pkl'
39
- print("Path exists : ", os.path.exists(cptpath))
40
- assert os.path.exists(
41
- cptpath), "DFK checkpoint missing: {0}".format(cptpath)
30
+ assert os.path.exists(cptpath), f"DFK checkpoint missing: {cptpath}"
42
31
 
43
32
  cptpath = cpt_dir + '/tasks.pkl'
44
- print("Path exists : ", os.path.exists(cptpath))
45
- assert os.path.exists(
46
- cptpath), "Tasks checkpoint missing: {0}".format(cptpath)
47
-
48
- run_dir = parsl.dfk().run_dir
49
-
50
- parsl.dfk().cleanup()
51
- parsl.clear()
52
-
53
- return run_dir, results
33
+ assert os.path.exists(cptpath), f"Tasks checkpoint missing: {cptpath}"
@@ -1,45 +1,42 @@
1
- import argparse
1
+ import contextlib
2
2
  import os
3
3
  import pytest
4
4
  import parsl
5
5
  from parsl import python_app
6
6
 
7
- from parsl.tests.configs.local_threads import config
8
7
  from parsl.tests.configs.local_threads_checkpoint import fresh_config
9
8
 
10
9
 
11
- @python_app(cache=True)
12
- def random_app(i):
13
- import random
14
- return random.randint(i, 100000)
10
+ @contextlib.contextmanager
11
+ def parsl_configured(run_dir, **kw):
12
+ c = fresh_config()
13
+ c.run_dir = run_dir
14
+ for config_attr, config_val in kw.items():
15
+ setattr(c, config_attr, config_val)
16
+ dfk = parsl.load(c)
17
+ for ex in dfk.executors.values():
18
+ ex.working_dir = run_dir
19
+ yield dfk
20
+
21
+ parsl.dfk().cleanup()
22
+ parsl.clear()
15
23
 
16
24
 
17
- def launch_n_random(n=2):
18
- """1. Launch a few apps and write the checkpoint once a few have completed
19
- """
20
- d = [random_app(i) for i in range(0, n)]
21
- return [i.result() for i in d]
25
+ @python_app(cache=True)
26
+ def uuid_app():
27
+ import uuid
28
+ return uuid.uuid4()
22
29
 
23
30
 
24
31
  @pytest.mark.local
25
- def test_loading_checkpoint(n=2):
32
+ def test_loading_checkpoint(tmpd_cwd):
26
33
  """Load memoization table from previous checkpoint
27
34
  """
28
- config.checkpoint_mode = 'task_exit'
29
- parsl.load(config)
30
- results = launch_n_random(n)
31
- rundir = parsl.dfk().run_dir
32
- parsl.dfk().cleanup()
33
- parsl.clear()
34
-
35
- local_config = fresh_config()
36
- local_config.checkpoint_files = [os.path.join(rundir, 'checkpoint')]
37
- parsl.load(local_config)
35
+ with parsl_configured(tmpd_cwd, checkpoint_mode="task_exit"):
36
+ checkpoint_files = [os.path.join(parsl.dfk().run_dir, "checkpoint")]
37
+ result = uuid_app().result()
38
38
 
39
- relaunched = launch_n_random(n)
40
- assert len(relaunched) == len(results) == n, "Expected all results to have n items"
39
+ with parsl_configured(tmpd_cwd, checkpoint_files=checkpoint_files):
40
+ relaunched = uuid_app().result()
41
41
 
42
- for i in range(n):
43
- assert relaunched[i] == results[i], "Expected relaunched to contain cached results from first run"
44
- parsl.dfk().cleanup()
45
- parsl.clear()
42
+ assert result == relaunched, "Expected following call to uuid_app to return cached uuid"
@@ -0,0 +1,21 @@
1
+ import pytest
2
+ import random
3
+ import string
4
+
5
+ from parsl.providers.errors import SubmitException
6
+
7
+
8
+ @pytest.mark.local
9
+ def test_submit_exception_task_name_deprecation():
10
+ """This tests the deprecation warning of task_name in SubmitException
11
+ """
12
+ j = "the_name-" + "".join(random.sample(string.ascii_lowercase, 10))
13
+
14
+ ex = SubmitException(j, "m")
15
+
16
+ # the new behaviour
17
+ assert ex.job_name == j
18
+
19
+ # the old behaviour
20
+ with pytest.deprecated_call():
21
+ assert ex.task_name == j
@@ -5,7 +5,7 @@ from parsl.tests.configs.local_radical_mpi import fresh_config as local_config
5
5
 
6
6
 
7
7
  @parsl.python_app
8
- def test_mpi_func(msg, sleep, comm=None, parsl_resource_specification={}):
8
+ def some_mpi_func(msg, sleep, comm=None, parsl_resource_specification={}):
9
9
  import time
10
10
  msg = 'hello %d/%d: %s' % (comm.rank, comm.size, msg)
11
11
  time.sleep(sleep)
@@ -17,11 +17,12 @@ apps = []
17
17
 
18
18
 
19
19
  @pytest.mark.local
20
+ @pytest.mark.radical
20
21
  def test_radical_mpi(n=7):
21
22
  # rank size should be > 1 for the
22
23
  # radical runtime system to run this function in MPI env
23
24
  for i in range(2, n):
24
25
  spec = {'ranks': i}
25
- t = test_mpi_func(msg='mpi.func.%06d' % i, sleep=1, comm=None, parsl_resource_specification=spec)
26
+ t = some_mpi_func(msg='mpi.func.%06d' % i, sleep=1, comm=None, parsl_resource_specification=spec)
26
27
  apps.append(t)
27
28
  assert [len(app.result()) for app in apps] == list(range(2, n))
@@ -0,0 +1,7 @@
1
+ def read_sort_write(in_path, out_path):
2
+ with open(in_path) as u:
3
+ strs = u.read().split()
4
+ strs.sort()
5
+ with open(out_path, 'w') as s:
6
+ for e in strs:
7
+ print(e, file=s)
@@ -20,8 +20,8 @@ logger = logging.getLogger(__name__)
20
20
 
21
21
 
22
22
  @bash_app
23
- def touch(filename, inputs=[], outputs=[]):
24
- return "touch {}".format(filename)
23
+ def touch(filename, outputs=()):
24
+ return f"touch {filename}"
25
25
 
26
26
 
27
27
  @python_app
@@ -31,52 +31,47 @@ def app_test_in(file):
31
31
  pass
32
32
 
33
33
 
34
+ @pytest.fixture
35
+ def storage_access_parsl():
36
+ def _setup_config(*args, **kwargs):
37
+ tpe = ThreadPoolExecutor(
38
+ label='local_threads',
39
+ storage_access=[NoOpTestingFileStaging(*args, **kwargs)]
40
+ )
41
+ config = Config(executors=[tpe])
42
+ parsl.load(config)
43
+
44
+ yield _setup_config
45
+
46
+ parsl.dfk().cleanup()
47
+ parsl.clear()
48
+
49
+
34
50
  @pytest.mark.local
35
- def test_regression_stage_out_does_not_stage_in():
36
- no_stageout_config = Config(
37
- executors=[
38
- ThreadPoolExecutor(
39
- label='local_threads',
40
- storage_access=[NoOpTestingFileStaging(allow_stage_in=False)]
41
- )
42
- ]
43
- )
44
-
45
- parsl.load(no_stageout_config)
51
+ def test_regression_stage_out_does_not_stage_in(storage_access_parsl, tmpd_cwd):
52
+ storage_access_parsl(allow_stage_in=False)
46
53
 
47
54
  # Test that the helper app runs with no staging
48
- touch("test.1", outputs=[]).result()
55
+ touch(str(tmpd_cwd / "test.1"), outputs=[]).result()
49
56
 
50
- # Test with stage-out, checking that provider stage in is never
51
- # invoked. If stage-in is invoked, the the NoOpTestingFileStaging
57
+ # Test with stage-out, checking that provider stage-in is never
58
+ # invoked. If stage-in is invoked, then the NoOpTestingFileStaging
52
59
  # provider will raise an exception, which should propagate to
53
60
  # .result() here.
54
- touch("test.2", outputs=[File("test.2")]).result()
61
+ fpath = tmpd_cwd / "test.2"
62
+ touch(str(fpath), outputs=[File(fpath)]).result()
55
63
 
56
64
  # Test that stage-in exceptions propagate out to user code.
57
65
  with pytest.raises(NoOpError):
58
66
  touch("test.3", inputs=[File("test.3")]).result()
59
67
 
60
- parsl.dfk().cleanup()
61
- parsl.clear()
62
-
63
68
 
64
69
  @pytest.mark.local
65
- def test_regression_stage_in_does_not_stage_out():
66
- no_stageout_config = Config(
67
- executors=[
68
- ThreadPoolExecutor(
69
- label='local_threads',
70
- storage_access=[NoOpTestingFileStaging(allow_stage_out=False)]
71
- )
72
- ],
73
- )
74
-
75
- parsl.load(no_stageout_config)
76
-
77
- f = open("test.4", "a")
78
- f.write("test")
79
- f.close()
70
+ def test_regression_stage_in_does_not_stage_out(storage_access_parsl, tmpd_cwd):
71
+ storage_access_parsl(allow_stage_out=False)
72
+
73
+ fpath = tmpd_cwd / "test.4"
74
+ fpath.write_text("test")
80
75
 
81
76
  # Test that stage in does not invoke stage out. If stage out is
82
77
  # attempted, then the NoOpTestingFileStaging provider will raise
@@ -86,6 +81,3 @@ def test_regression_stage_in_does_not_stage_out():
86
81
  # Test that stage out exceptions propagate to user code.
87
82
  with pytest.raises(NoOpError):
88
83
  touch("test.5", outputs=[File("test.5")]).result()
89
-
90
- parsl.dfk().cleanup()
91
- parsl.clear()
@@ -9,111 +9,95 @@ import pytest
9
9
  # specificed with --config, not this one.
10
10
  from parsl.tests.configs.htex_local import fresh_config as local_config
11
11
 
12
+ """
13
+ Test staging for an http file
12
14
 
13
- @python_app
14
- def sort_strings(inputs=[], outputs=[]):
15
- with open(inputs[0].filepath, 'r') as u:
16
- strs = u.readlines()
17
- strs.sort()
18
- with open(outputs[0].filepath, 'w') as s:
19
- for e in strs:
20
- s.write(e)
21
-
15
+ Create a remote input file (https) that points to unsorted.txt, then
16
+ a local file for output data (sorted.txt).
17
+ """
22
18
 
23
- @pytest.mark.cleannet
24
- def test_staging_https():
25
- """Test staging for an https file
19
+ _unsorted_url = (
20
+ 'https://gist.githubusercontent.com/yadudoc/7f21dd15e64a421990a46766bfa5359c/'
21
+ 'raw/7fe04978ea44f807088c349f6ecb0f6ee350ec49/unsorted.txt'
22
+ )
23
+ _exp_sorted = sorted(f"{i}\n" for i in range(1, 101))[:20]
26
24
 
27
- Create a remote input file (https) that points to unsorted.txt.
28
- """
29
25
 
30
- # unsorted_file = File('https://testbed.petrel.host/test/public/unsorted.txt')
31
- unsorted_file = File('https://gist.githubusercontent.com/yadudoc/7f21dd15e64a421990a46766bfa5359c/'
32
- 'raw/7fe04978ea44f807088c349f6ecb0f6ee350ec49/unsorted.txt')
26
+ @python_app
27
+ def sort_strings(inputs=(), outputs=()):
28
+ from parsl.tests.test_staging import read_sort_write
29
+ read_sort_write(inputs[0].filepath, outputs[0].filepath)
33
30
 
34
- # Create a local file for output data
35
- sorted_file = File('sorted.txt')
36
31
 
37
- f = sort_strings(inputs=[unsorted_file], outputs=[sorted_file])
38
- f.result()
32
+ @python_app
33
+ def sort_strings_kw(*, x=None, outputs=()):
34
+ from parsl.tests.test_staging import read_sort_write
35
+ read_sort_write(x.filepath, outputs[0].filepath)
39
36
 
40
37
 
41
38
  @python_app
42
- def sort_strings_kw(x=None, outputs=[]):
43
- with open(x.filepath, 'r') as u:
44
- strs = u.readlines()
45
- strs.sort()
46
- with open(outputs[0].filepath, 'w') as s:
47
- for e in strs:
48
- s.write(e)
39
+ def sort_strings_arg(x, /, outputs=()):
40
+ from parsl.tests.test_staging import read_sort_write
41
+ read_sort_write(x.filepath, outputs[0].filepath)
49
42
 
50
43
 
51
- @pytest.mark.cleannet
52
- def test_staging_https_kwargs():
44
+ @python_app(executors=['other'])
45
+ def sort_strings_additional_executor(inputs=(), outputs=()):
46
+ from parsl.tests.test_staging import read_sort_write
47
+ read_sort_write(inputs[0].filepath, outputs[0].filepath)
53
48
 
54
- # unsorted_file = File('https://testbed.petrel.host/test/public/unsorted.txt')
55
- unsorted_file = File('https://gist.githubusercontent.com/yadudoc/7f21dd15e64a421990a46766bfa5359c/'
56
- 'raw/7fe04978ea44f807088c349f6ecb0f6ee350ec49/unsorted.txt')
57
49
 
58
- # Create a local file for output data
59
- sorted_file = File('sorted.txt')
50
+ @pytest.mark.cleannet
51
+ def test_staging_https_cleannet(tmpd_cwd):
52
+ unsorted_file = File(_unsorted_url)
53
+ sorted_file = File(tmpd_cwd / 'sorted.txt')
60
54
 
61
- f = sort_strings_kw(x=unsorted_file, outputs=[sorted_file])
62
- f.result()
55
+ sort_strings(inputs=[unsorted_file], outputs=[sorted_file]).result()
56
+ with open(sorted_file) as f:
57
+ assert all(a == b for a, b in zip(f.readlines(), _exp_sorted))
63
58
 
64
59
 
65
- @python_app
66
- def sort_strings_arg(x, outputs=[]):
67
- with open(x.filepath, 'r') as u:
68
- strs = u.readlines()
69
- strs.sort()
70
- with open(outputs[0].filepath, 'w') as s:
71
- for e in strs:
72
- s.write(e)
60
+ @pytest.mark.local
61
+ def test_staging_https_local(tmpd_cwd):
62
+ unsorted_file = File(_unsorted_url)
63
+ sorted_file = File(tmpd_cwd / 'sorted.txt')
73
64
 
65
+ sort_strings(inputs=[unsorted_file], outputs=[sorted_file]).result()
66
+ with open(sorted_file) as f:
67
+ assert all(a == b for a, b in zip(f.readlines(), _exp_sorted))
74
68
 
75
- @pytest.mark.cleannet
76
- def test_staging_https_args():
77
69
 
78
- # unsorted_file = File('https://testbed.petrel.host/test/public/unsorted.txt')
79
- unsorted_file = File('https://gist.githubusercontent.com/yadudoc/7f21dd15e64a421990a46766bfa5359c/'
80
- 'raw/7fe04978ea44f807088c349f6ecb0f6ee350ec49/unsorted.txt')
70
+ @pytest.mark.cleannet
71
+ def test_staging_https_kwargs(tmpd_cwd):
72
+ unsorted_file = File(_unsorted_url)
73
+ sorted_file = File(tmpd_cwd / 'sorted.txt')
81
74
 
82
- # Create a local file for output data
83
- sorted_file = File('sorted.txt')
75
+ sort_strings_kw(x=unsorted_file, outputs=[sorted_file]).result()
76
+ with open(sorted_file) as f:
77
+ assert all(a == b for a, b in zip(f.readlines(), _exp_sorted))
84
78
 
85
- f = sort_strings_arg(unsorted_file, outputs=[sorted_file])
86
- f.result()
87
79
 
80
+ @pytest.mark.cleannet
81
+ def test_staging_https_args(tmpd_cwd):
82
+ unsorted_file = File(_unsorted_url)
83
+ sorted_file = File(tmpd_cwd / 'sorted.txt')
88
84
 
89
- @python_app(executors=['other'])
90
- def sort_strings_additional_executor(inputs=[], outputs=[]):
91
- with open(inputs[0].filepath, 'r') as u:
92
- strs = u.readlines()
93
- strs.sort()
94
- with open(outputs[0].filepath, 'w') as s:
95
- for e in strs:
96
- s.write(e)
85
+ sort_strings_arg(unsorted_file, outputs=[sorted_file]).result()
86
+ with open(sorted_file) as f:
87
+ assert all(a == b for a, b in zip(f.readlines(), _exp_sorted))
97
88
 
98
89
 
99
90
  @pytest.mark.cleannet
100
91
  @pytest.mark.local
101
- def test_staging_https_additional_executor():
102
- """Test staging for an https file
103
-
104
- Create a remote input file (https) that points to unsorted.txt.
105
- """
106
-
107
- # unsorted_file = File('https://testbed.petrel.host/test/public/unsorted.txt')
108
- unsorted_file = File('https://gist.githubusercontent.com/yadudoc/7f21dd15e64a421990a46766bfa5359c/'
109
- 'raw/7fe04978ea44f807088c349f6ecb0f6ee350ec49/unsorted.txt')
110
-
111
- # Create a local file for output data
112
- sorted_file = File('sorted.txt')
92
+ def test_staging_https_additional_executor(tmpd_cwd):
93
+ unsorted_file = File(_unsorted_url)
94
+ sorted_file = File(tmpd_cwd / 'sorted.txt')
113
95
 
114
96
  other_executor = parsl.ThreadPoolExecutor(label='other')
97
+ other_executor.working_dir = tmpd_cwd
115
98
 
116
99
  parsl.dfk().add_executors([other_executor])
117
100
 
118
- f = sort_strings_additional_executor(inputs=[unsorted_file], outputs=[sorted_file])
119
- f.result()
101
+ sort_strings_additional_executor(inputs=[unsorted_file], outputs=[sorted_file]).result()
102
+ with open(sorted_file) as f:
103
+ assert all(a == b for a, b in zip(f.readlines(), _exp_sorted))
File without changes
@@ -0,0 +1,68 @@
1
+ import pytest
2
+
3
+ from parsl.utils import RepresentationMixin
4
+
5
+
6
+ class GoodRepr(RepresentationMixin):
7
+ def __init__(self, x, y):
8
+ self.x = x
9
+ self.y = y
10
+
11
+
12
+ class BadRepr(RepresentationMixin):
13
+ """This class incorrectly subclasses RepresentationMixin.
14
+ It does not store the parameter x on self.
15
+ """
16
+ def __init__(self, x, y):
17
+ self.y = y
18
+
19
+
20
+ @pytest.mark.local
21
+ def test_repr_good():
22
+ p1 = "parameter 1"
23
+ p2 = "the second parameter"
24
+
25
+ # repr should not raise an exception
26
+ r = repr(GoodRepr(p1, p2))
27
+
28
+ # representation should contain both values supplied
29
+ # at object creation.
30
+ assert p1 in r
31
+ assert p2 in r
32
+
33
+
34
+ @pytest.mark.local
35
+ def test_repr_bad():
36
+ p1 = "parameter 1"
37
+ p2 = "the second parameter"
38
+
39
+ # repr should raise an exception
40
+ with pytest.raises(AttributeError):
41
+ repr(BadRepr(p1, p2))
42
+
43
+
44
+ class NonValidatingRepresentationMixin(RepresentationMixin):
45
+ """This will override the process level RepresentationMixin which can
46
+ be set to validating mode by pytest fixtures"""
47
+ _validate_repr = False
48
+
49
+
50
+ class BadReprNonValidating(NonValidatingRepresentationMixin):
51
+ """This class incorrectly subclasses RepresentationMixin.
52
+ It does not store the parameter x on self.
53
+ """
54
+ def __init__(self, x, y):
55
+ self.y = y
56
+
57
+
58
+ @pytest.mark.local
59
+ def test_repr_bad_unvalidated():
60
+ p1 = "parameter 1"
61
+ p2 = "the second parameter"
62
+
63
+ # repr should not raise an exception
64
+ r = repr(BadReprNonValidating(p1, p2))
65
+ # parameter 2 should be found in the representation, but not
66
+ # parameter 1
67
+ assert p1 not in r
68
+ assert p2 in r
parsl/utils.py CHANGED
@@ -191,6 +191,8 @@ class RepresentationMixin:
191
191
  """
192
192
  __max_width__ = 80
193
193
 
194
+ _validate_repr = False
195
+
194
196
  def __repr__(self) -> str:
195
197
  init = self.__init__ # type: ignore[misc]
196
198
 
@@ -211,18 +213,21 @@ class RepresentationMixin:
211
213
  else:
212
214
  defaults = {}
213
215
 
214
- for arg in argspec.args[1:]:
215
- if not hasattr(self, arg):
216
- template = (f'class {self.__class__.__name__} uses {arg} in the'
217
- f' constructor, but does not define it as an '
218
- f'attribute')
219
- raise AttributeError(template)
216
+ if self._validate_repr:
217
+ for arg in argspec.args[1:]:
218
+ if not hasattr(self, arg):
219
+ template = (f'class {self.__class__.__name__} uses {arg} in the'
220
+ f' constructor, but does not define it as an '
221
+ f'attribute')
222
+ raise AttributeError(template)
223
+
224
+ default = "<unrecorded>"
220
225
 
221
226
  if len(defaults) != 0:
222
- args = [getattr(self, a) for a in argspec.args[1:-len(defaults)]]
227
+ args = [getattr(self, a, default) for a in argspec.args[1:-len(defaults)]]
223
228
  else:
224
- args = [getattr(self, a) for a in argspec.args[1:]]
225
- kwargs = {key: getattr(self, key) for key in defaults}
229
+ args = [getattr(self, a, default) for a in argspec.args[1:]]
230
+ kwargs = {key: getattr(self, key, default) for key in defaults}
226
231
 
227
232
  def assemble_multiline(args: List[str], kwargs: Dict[str, object]) -> str:
228
233
  def indent(text: str) -> str:
parsl/version.py CHANGED
@@ -3,4 +3,4 @@
3
3
  Year.Month.Day[alpha/beta/..]
4
4
  Alphas will be numbered like this -> 2024.12.10a0
5
5
  """
6
- VERSION = '2024.01.01'
6
+ VERSION = '2024.01.15'
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: parsl
3
- Version: 2024.1.1
3
+ Version: 2024.1.15
4
4
  Summary: Simple data dependent workflows in Python
5
5
  Home-page: https://github.com/Parsl/parsl
6
- Download-URL: https://github.com/Parsl/parsl/archive/2024.01.01.tar.gz
6
+ Download-URL: https://github.com/Parsl/parsl/archive/2024.01.15.tar.gz
7
7
  Author: The Parsl Team
8
8
  Author-email: parsl@googlegroups.com
9
9
  License: Apache 2.0
@@ -1,13 +1,13 @@
1
1
  parsl/__init__.py,sha256=hq8rJmP59wzd9-yxaGcmq5gPpshOopH-Y1K0BkUBNY0,1843
2
- parsl/addresses.py,sha256=L4RjQ-jGY9RfT-hBpsGw1uCzWaIdrEKxcPWV-TkGJes,4767
2
+ parsl/addresses.py,sha256=bkaRhM4IZ4iZzh6ZkRXPvCLKFkbJ6HX2AOjYyujCiO8,4814
3
3
  parsl/config.py,sha256=ysUWBfm9bygayHHdItaJbP4oozkHJJmVQVnWCt5igjE,6808
4
4
  parsl/errors.py,sha256=SzINzQFZDBDbj9l-DPQznD0TbGkNhHIRAPkcBCogf_A,1019
5
5
  parsl/log_utils.py,sha256=AGem-dhQs5TYUyJg6GKkRuHxAw8FHhYlWB_0s7_ROw4,3175
6
6
  parsl/multiprocessing.py,sha256=w3t1pFkHo4oZpznc2KF6Ff-Jj8MvXqvjm-hoiRqZDDQ,1984
7
7
  parsl/process_loggers.py,sha256=1G3Rfrh5wuZNo2X03grG4kTYPGOxz7hHCyG6L_A3b0A,1137
8
8
  parsl/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
9
- parsl/utils.py,sha256=_flbNpTu6IXHbzIyE5JkUbOBIK4poc1R1bjBtwJUVdo,11622
10
- parsl/version.py,sha256=83i1K32J5f1RKKsHFv9TvoMh8Oz7O7NPL-Bc2AuQ4_8,131
9
+ parsl/utils.py,sha256=TTM6gFgW2EscFsNNDGNRmHdXSMIo7TO5yYt8PdyRqVI,11767
10
+ parsl/version.py,sha256=WpmqICAVsqNhdyjF-ha60RMe-o4rQkt9Jfb9C2bTing,131
11
11
  parsl/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
12
12
  parsl/app/app.py,sha256=wAHchJetgnicT1pn0NJKDeDX0lV3vDFlG8cQd_Ciax4,8522
13
13
  parsl/app/bash.py,sha256=bx9x1XFwkOTpZZD3CPwnVL9SyNRDjbUGtOnuGLvxN_8,5396
@@ -62,7 +62,7 @@ parsl/data_provider/http.py,sha256=nDHTW7XmJqAukWJjPRQjyhUXt8r6GsQ36mX9mv_wOig,2
62
62
  parsl/data_provider/rsync.py,sha256=2-ZxqrT-hBj39x082NusJaBqsGW4Jd2qCW6JkVPpEl0,4254
63
63
  parsl/data_provider/staging.py,sha256=l-mAXFburs3BWPjkSmiQKuAgJpsxCG62yATPDbrafYI,4523
64
64
  parsl/dataflow/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
65
- parsl/dataflow/dflow.py,sha256=sqw1YuwGt9DZe4Gr_eAOrC3i0mmH6jjEL_IlgHYcSBE,63861
65
+ parsl/dataflow/dflow.py,sha256=VymK_7clCbzFBlX8EyaCtUtTtE6BjULiezP3WpW-eoI,63845
66
66
  parsl/dataflow/errors.py,sha256=w2vOt_ymzG2dOqJUO4IDcmTlrCIHlMZL8nBVyVq0O_8,2176
67
67
  parsl/dataflow/futures.py,sha256=aVfEUTzp4-EdunDAtNcqVQf8l_A7ArDi2c82KZMwxfY,5256
68
68
  parsl/dataflow/memoization.py,sha256=AsJO6c6cRp2ac6H8uGn2USlEi78_nX3QWvpxYt4XdYE,9583
@@ -80,7 +80,7 @@ parsl/executors/flux/executor.py,sha256=tf9xPmWgEsgEjzs89dJ-sMx-QaqRpM1R1crX3tp0
80
80
  parsl/executors/flux/flux_instance_manager.py,sha256=tTEOATClm9SwdgLeBRWPC6D55iNDuh0YxqJOw3c3eQ4,2036
81
81
  parsl/executors/high_throughput/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
82
82
  parsl/executors/high_throughput/errors.py,sha256=vl69wLuVOplbKxHI9WphEGBExHWkTn5n8T9QhBXuNH0,380
83
- parsl/executors/high_throughput/executor.py,sha256=xhvGvfVtF8YXo3T8gleua0Pf__5T_jba_bYzVAyUs14,32167
83
+ parsl/executors/high_throughput/executor.py,sha256=Rpv3yd3vAQxNXRqsyo2_8aCNUoaCtscu6FEt7BPrrSE,31983
84
84
  parsl/executors/high_throughput/interchange.py,sha256=tX_EvQf7WkSKMJG-TNmA-WADjhtKZqviYpM406Td4dA,29334
85
85
  parsl/executors/high_throughput/manager_record.py,sha256=T8-JVMfDJU6SJfzJRooD0mO8AHGMXlcn3PBOM0m_vng,366
86
86
  parsl/executors/high_throughput/monitoring_info.py,sha256=3gQpwQjjNDEBz0cQqJZB6hRiwLiWwXs83zkQDmbOwxY,297
@@ -104,13 +104,13 @@ parsl/executors/taskvine/utils.py,sha256=iSrIogeiauL3UNy_9tiZp1cBSNn6fIJkMYQRVi1
104
104
  parsl/executors/workqueue/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
105
105
  parsl/executors/workqueue/errors.py,sha256=ghB93Ptb_QbOAvgLe7siV_snRRkU_T-cFHv3AR6Ziwo,541
106
106
  parsl/executors/workqueue/exec_parsl_function.py,sha256=NtWNeBvRqksej38eRPw8zPBJ1CeW6vgaitve0tfz_qc,7801
107
- parsl/executors/workqueue/executor.py,sha256=fjcbln8cxs6AIffbJOtYFjUZHtTxcAecTzl3zGYPYUE,49018
107
+ parsl/executors/workqueue/executor.py,sha256=szgelw7HL4K-iLcyzqoGg2dsSN1S9QUXlNr4Z9q11mw,49031
108
108
  parsl/executors/workqueue/parsl_coprocess.py,sha256=6nmNqv7GT472J5smGFKm_TUjeFHy44i5Fl8pUovRoug,6046
109
109
  parsl/executors/workqueue/parsl_coprocess_stub.py,sha256=_bJmpPIgL42qM6bVzeEKt1Mn1trSP41rtJguXxPGfHI,735
110
110
  parsl/jobs/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
111
111
  parsl/jobs/error_handlers.py,sha256=WYn69jtWgfEsThCMxkGvJ2qoCfebc4IGd4JEolj2ww8,2279
112
112
  parsl/jobs/errors.py,sha256=cpSQXCrlKtuHsQf7usjF-lX8XsDkFnE5kWpmFjiN6OU,178
113
- parsl/jobs/job_status_poller.py,sha256=Q57s6FfWP7LjfUSPAOZ0sT59zpUxnyFNE5BZu-xRNvM,4861
113
+ parsl/jobs/job_status_poller.py,sha256=xQQauyNpmK23t6ViYm-AvvDLHsxVTmghjlACZvfL6LQ,4973
114
114
  parsl/jobs/states.py,sha256=lwe2fUdPjaUcS-N9qTPbS9du8mpX_YAQ7vlVzCXDKVE,4574
115
115
  parsl/jobs/strategy.py,sha256=9V07D8bydpyxvNNRH89JZa0Pt-bjjowrSmCc5mv6awY,12903
116
116
  parsl/launchers/__init__.py,sha256=k8zAB3IBP-brfqXUptKwGkvsIRaXjAJZNBJa2XVtY1A,546
@@ -150,7 +150,7 @@ parsl/monitoring/visualization/templates/workflows_summary.html,sha256=7brKKNsxc
150
150
  parsl/providers/__init__.py,sha256=jd-1_vd-HtWYDHzwO30lNW5GMw6nfeTyNn3tI8CG7L4,1207
151
151
  parsl/providers/base.py,sha256=LvSMClsbCQI_7geGdNDpKZ6vWCl1EpD73o0xkxilqJ4,5702
152
152
  parsl/providers/cluster_provider.py,sha256=FLl3AUHdFRRapQl_YoM1gxg_UhH3gxxaDvl6NNQqSTg,4701
153
- parsl/providers/errors.py,sha256=6TRJOqAcxTq4ym-w5DQTsPMvuetREvlpl3O8LQexf8c,2225
153
+ parsl/providers/errors.py,sha256=ZBZdLKmz1cLqL1ukhimlUAtUUj94WWc8ebr2GI8_I8I,2438
154
154
  parsl/providers/ad_hoc/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
155
155
  parsl/providers/ad_hoc/ad_hoc.py,sha256=jeYMxMT_ox7banr8Db_UeT2qer6XTGLZOZvC307S54U,8302
156
156
  parsl/providers/aws/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -195,7 +195,7 @@ parsl/serialize/facade.py,sha256=0A--_bB_8e5RRT-weYu5Ak33zN_lqZeaJU1x7JXaoBQ,563
195
195
  parsl/serialize/proxystore.py,sha256=Yo-38odKlSKSuQfXU4cB5YM9sYV_302uPn1z_en19SU,1623
196
196
  parsl/tests/__init__.py,sha256=s_zoz7Ipgykh-QTQvctdpxENrMnmpXY8oe1bJbUmpqY,204
197
197
  parsl/tests/callables_helper.py,sha256=ceP1YYsNtrZgKT6MAIvpgdccEjQ_CpFEOnZBGHKGOx0,30
198
- parsl/tests/conftest.py,sha256=8JLS8HG4JxqTtEry4U2QSybDU69pHnGexCgTY9AWgVs,12246
198
+ parsl/tests/conftest.py,sha256=sbzv8rIzT69i0GzO3662v9EmXwzTVipx-uR2HfqFR4A,13892
199
199
  parsl/tests/test_aalst_patterns.py,sha256=fi6JHKidV7vMJLv2nnu_-Q0ngGLc89mRm8rFrGIwiUM,9615
200
200
  parsl/tests/test_callables.py,sha256=_QsdS8v2nGgOj4_X69NFHZOGUnqbOrOMCA9pCJColZw,1974
201
201
  parsl/tests/test_flux.py,sha256=st9v55o5ZajK_LQUXh1saLwFh2gpaQFGG5mzdnJMNu0,5098
@@ -304,8 +304,8 @@ parsl/tests/test_channels/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
304
304
  parsl/tests/test_channels/test_large_output.py,sha256=PGeNSW_sN5mR7KF1hVL2CPfktydYxo4oNz1wVQ-ENN0,595
305
305
  parsl/tests/test_checkpointing/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
306
306
  parsl/tests/test_checkpointing/test_periodic.py,sha256=Nb_3_eHYnMUJxYvI3y2Tum6cU07ZUtEawAtYsEsXPd0,1662
307
- parsl/tests/test_checkpointing/test_python_checkpoint_1.py,sha256=uAybnNRnk5YguvNc-5PsZ0HpYkGlTTeDQ3L-E9NLTF0,1272
308
- parsl/tests/test_checkpointing/test_python_checkpoint_2.py,sha256=i5TJWTvvM20u_M446bzsyL3Li9AXV8_Ymsc0XSevZck,1230
307
+ parsl/tests/test_checkpointing/test_python_checkpoint_1.py,sha256=7p_q5aFYYoRQpYmkFekuLOsPgTaILbj5-MMVCDP3Bsg,745
308
+ parsl/tests/test_checkpointing/test_python_checkpoint_2.py,sha256=f1s-qRzIzaCFJauEGU08fhFw6od3yGrMelk792WQuYI,1106
309
309
  parsl/tests/test_checkpointing/test_python_checkpoint_3.py,sha256=8Np2OpDeQ8sE1Hmd5rYZo1qgt2xOuR4t-d-41JyLCHI,823
310
310
  parsl/tests/test_checkpointing/test_regression_232.py,sha256=AsI6AJ0DcFaefAbEY9qWa41ER0VX-4yLuIdlgvBw360,2637
311
311
  parsl/tests/test_checkpointing/test_regression_233.py,sha256=jii7BKuygK6KMIGtg4IeBjix7Z28cYhv57rE9ixoXMU,1774
@@ -349,6 +349,7 @@ parsl/tests/test_monitoring/test_viz_colouring.py,sha256=k8SiELxPtnGYZ4r02VQt46R
349
349
  parsl/tests/test_providers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
350
350
  parsl/tests/test_providers/test_local_provider.py,sha256=G6Fuko22SvAtD7xhfQv8k_8HtJuFhZ8aHYcWQt073Pg,6968
351
351
  parsl/tests/test_providers/test_slurm_instantiate.py,sha256=eW3pEZRIzZO1-eKFrBc7N5uoN5otwghgbqut74Kyqoc,500
352
+ parsl/tests/test_providers/test_submiterror_deprecation.py,sha256=ZutVj_0VJ7M-5UZV0qisMwId7lT783LAxGEAsMjkeZU,501
352
353
  parsl/tests/test_python_apps/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
353
354
  parsl/tests/test_python_apps/test_arg_input_types.py,sha256=JXpfHiu8lr9BN6u1OzqFvGwBhxzsGTPMewHx6Wdo-HI,670
354
355
  parsl/tests/test_python_apps/test_basic.py,sha256=lFqh4ugePbp_FRiHGUXxzV34iS7l8C5UkxTHuLcpnYs,855
@@ -377,7 +378,7 @@ parsl/tests/test_python_apps/test_simple.py,sha256=LYGjdHvRizTpYzZePPvwKSPwrr2MP
377
378
  parsl/tests/test_python_apps/test_timeout.py,sha256=uENfT-1DharQkqkeG7a89E-gU1gjE7ATJrBZGUKvZSA,998
378
379
  parsl/tests/test_python_apps/test_type5.py,sha256=kUyA1NuFu-DDXsJNNvJLZVyewZBt7QAOhcGm2DWFTQw,777
379
380
  parsl/tests/test_radical/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
380
- parsl/tests/test_radical/test_mpi_funcs.py,sha256=vCb5u6fjafEhrPgxwOzUjGXC3O6Yjf3lSYaxUE98pKg,744
381
+ parsl/tests/test_radical/test_mpi_funcs.py,sha256=rLC01pdq6354pzHHm4PHMtePg0xOcQO2_2DwivoHvFg,765
381
382
  parsl/tests/test_regression/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
382
383
  parsl/tests/test_regression/test_1480.py,sha256=HNhuw7OYkBGMhN--XgKIl2JPHUj_hXlgL74oS3FqWk4,545
383
384
  parsl/tests/test_regression/test_1606_wait_for_current_tasks.py,sha256=frqPtaiVysevj9nCWoQlAeh9K1jQO5zaahr9ev_Mx_0,1134
@@ -398,28 +399,29 @@ parsl/tests/test_serialization/test_2555_caching_deserializer.py,sha256=J8__b4dj
398
399
  parsl/tests/test_serialization/test_basic.py,sha256=51KshqIk2RNr7S2iSkl5tZo40CJBb0h6uby8YPgOGlg,543
399
400
  parsl/tests/test_serialization/test_proxystore_configured.py,sha256=_JbMzeUgcR-1Ss2hGAb2v0LBA0fzKpNpfO-HaUCR7Yo,2293
400
401
  parsl/tests/test_serialization/test_proxystore_impl.py,sha256=Pn_4ulwCd7Tc6Qlmypq2ImT4DtErGDIfqHHmPTr7aOI,1226
401
- parsl/tests/test_staging/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
402
+ parsl/tests/test_staging/__init__.py,sha256=WZl9EHSkfYiSoE3Gbulcq2ifmn7IFGUkasJIobL5T5A,208
402
403
  parsl/tests/test_staging/staging_provider.py,sha256=DEONOOGrYgDZimE3rkrbzFl_4KxhzmNJledh8Hho9fo,3242
403
404
  parsl/tests/test_staging/test_1316.py,sha256=pj1QbmOJSRES1R4Ov380MmVe6xXvPUXh4FB48nE6vjI,2687
404
405
  parsl/tests/test_staging/test_docs_1.py,sha256=SIGIYo9w2vwkQ-i9Io38sYYj8ns7uFrD1uziR_0Ae2w,628
405
406
  parsl/tests/test_staging/test_docs_2.py,sha256=zy6P6aanR27_U6ASDrB0YyG8udyRvA8r2HRDX5RcslU,463
406
- parsl/tests/test_staging/test_elaborate_noop_file.py,sha256=D1K5mu-meNQL8hieasdqktJ2ZDY5aSWBGNgvqRyV_Tg,2539
407
+ parsl/tests/test_staging/test_elaborate_noop_file.py,sha256=d694K2jKhyBM0bIY9j3w_huVjTU2CVFPgIRfYFpIQQM,2466
407
408
  parsl/tests/test_staging/test_staging_ftp.py,sha256=EkRoTcQ00FZGh8lDVYBdKb-pQ-ybW2Sx5vqGltoMGJ4,778
408
409
  parsl/tests/test_staging/test_staging_ftp_in_task.py,sha256=kR2XrGvbvVFDpHg53NnjO04kqEksTJjQAMQwYqBdb2M,884
409
410
  parsl/tests/test_staging/test_staging_globus.py,sha256=ds8nDH5dNbI10FV_GxMHyVaY6GPnuPPzkX9IiqROLF0,2339
410
- parsl/tests/test_staging/test_staging_https.py,sha256=alpbk-3Q025yZT26lg8-m1K4bsydLXysnRNMdub3elA,3750
411
- parsl/tests/test_staging/test_staging_https_in_task.py,sha256=Ezqcsr_wUXCYXv2sd9yR-zB-NJvxDDizfdvuptH6zBs,1036
411
+ parsl/tests/test_staging/test_staging_https.py,sha256=ESNuvdc_P5JoPaMjBM3ofi1mNJM0U6vahi9JgbCsrPw,3307
412
412
  parsl/tests/test_threads/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
413
413
  parsl/tests/test_threads/test_configs.py,sha256=QA9YjIMAtZ2jmkfOWqBzEfzQQcFVCDizH7Qwiy2HIMQ,909
414
414
  parsl/tests/test_threads/test_lazy_errors.py,sha256=nGhYfCMHFZYSy6YJ4gnAmiLl9SfYs0WVnuvj8DXQ9bw,560
415
+ parsl/tests/test_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
416
+ parsl/tests/test_utils/test_representation_mixin.py,sha256=kUZeIDwA2rlbJ3-beGzLLwf3dOplTMCrWJN87etHcyY,1633
415
417
  parsl/usage_tracking/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
416
418
  parsl/usage_tracking/usage.py,sha256=TEuAIm_U_G2ojZxvd0bbVa6gZlU61_mVRa2yJC9mGiI,7555
417
- parsl-2024.1.1.data/scripts/exec_parsl_function.py,sha256=NtWNeBvRqksej38eRPw8zPBJ1CeW6vgaitve0tfz_qc,7801
418
- parsl-2024.1.1.data/scripts/parsl_coprocess.py,sha256=kzX_1RI3V2KMKs6L-il4I1qkLNVodDKFXN_1FHB9fmM,6031
419
- parsl-2024.1.1.data/scripts/process_worker_pool.py,sha256=ytz3F8ZYeBr8tFqSRv2O9eZGdsID7oZRulBmmQmZaV8,34056
420
- parsl-2024.1.1.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
421
- parsl-2024.1.1.dist-info/METADATA,sha256=LtoVs92FZGfX7VGeKW2eBdwxsxvdsj0BozzEG2kxCBI,3867
422
- parsl-2024.1.1.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
423
- parsl-2024.1.1.dist-info/entry_points.txt,sha256=XqnsWDYoEcLbsMcpnYGKLEnSBmaIe1YoM5YsBdJG2tI,176
424
- parsl-2024.1.1.dist-info/top_level.txt,sha256=PIheYoUFQtF2icLsgOykgU-Cjuwr2Oi6On2jo5RYgRM,6
425
- parsl-2024.1.1.dist-info/RECORD,,
419
+ parsl-2024.1.15.data/scripts/exec_parsl_function.py,sha256=NtWNeBvRqksej38eRPw8zPBJ1CeW6vgaitve0tfz_qc,7801
420
+ parsl-2024.1.15.data/scripts/parsl_coprocess.py,sha256=kzX_1RI3V2KMKs6L-il4I1qkLNVodDKFXN_1FHB9fmM,6031
421
+ parsl-2024.1.15.data/scripts/process_worker_pool.py,sha256=ytz3F8ZYeBr8tFqSRv2O9eZGdsID7oZRulBmmQmZaV8,34056
422
+ parsl-2024.1.15.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
423
+ parsl-2024.1.15.dist-info/METADATA,sha256=lO1T0WGGTSX5H5gO1b9g1uS6kl5PfhL1K6b7eu7HAFk,3868
424
+ parsl-2024.1.15.dist-info/WHEEL,sha256=oiQVh_5PnQM0E3gPdiz09WCNmwiHDMaGer_elqB3coM,92
425
+ parsl-2024.1.15.dist-info/entry_points.txt,sha256=XqnsWDYoEcLbsMcpnYGKLEnSBmaIe1YoM5YsBdJG2tI,176
426
+ parsl-2024.1.15.dist-info/top_level.txt,sha256=PIheYoUFQtF2icLsgOykgU-Cjuwr2Oi6On2jo5RYgRM,6
427
+ parsl-2024.1.15.dist-info/RECORD,,
@@ -1,34 +0,0 @@
1
- import pytest
2
-
3
- from parsl.app.app import python_app
4
- from parsl.data_provider.files import File
5
-
6
- from parsl.tests.configs.local_threads_http_in_task import fresh_config as local_config
7
-
8
-
9
- @python_app
10
- def sort_strings(inputs=[], outputs=[]):
11
- with open(inputs[0].filepath, 'r') as u:
12
- strs = u.readlines()
13
- strs.sort()
14
- with open(outputs[0].filepath, 'w') as s:
15
- for e in strs:
16
- s.write(e)
17
-
18
-
19
- @pytest.mark.local
20
- def test_staging_https():
21
- """Test staging for an http file
22
-
23
- Create a remote input file (https) that points to unsorted.txt.
24
- """
25
-
26
- # unsorted_file = File('https://testbed.petrel.host/test/public/unsorted.txt')
27
- unsorted_file = File('https://gist.githubusercontent.com/yadudoc/7f21dd15e64a421990a46766bfa5359c/'
28
- 'raw/7fe04978ea44f807088c349f6ecb0f6ee350ec49/unsorted.txt')
29
-
30
- # Create a local file for output data
31
- sorted_file = File('sorted.txt')
32
-
33
- f = sort_strings(inputs=[unsorted_file], outputs=[sorted_file])
34
- f.result()