parsl 2024.9.23__py3-none-any.whl → 2024.9.30__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.
parsl/config.py CHANGED
@@ -83,6 +83,9 @@ class Config(RepresentationMixin, UsageInformation):
83
83
  Setting this field to 0 will disable usage tracking. Default (this field is not set): usage tracking is not enabled.
84
84
  Parsl only collects minimal, non personally-identifiable,
85
85
  information used for reporting to our funding agencies.
86
+ project_name: str, optional
87
+ Option to deanonymize usage tracking data.
88
+ If set, this value will be used as the project name in the usage tracking data and placed on the leaderboard.
86
89
  initialize_logging : bool, optional
87
90
  Make DFK optionally not initialize any logging. Log messages
88
91
  will still be passed into the python logging system under the
@@ -118,6 +121,7 @@ class Config(RepresentationMixin, UsageInformation):
118
121
  max_idletime: float = 120.0,
119
122
  monitoring: Optional[MonitoringHub] = None,
120
123
  usage_tracking: int = 0,
124
+ project_name: Optional[str] = None,
121
125
  initialize_logging: bool = True) -> None:
122
126
 
123
127
  executors = tuple(executors or [])
@@ -154,6 +158,7 @@ class Config(RepresentationMixin, UsageInformation):
154
158
  self.max_idletime = max_idletime
155
159
  self.validate_usage_tracking(usage_tracking)
156
160
  self.usage_tracking = usage_tracking
161
+ self.project_name = project_name
157
162
  self.initialize_logging = initialize_logging
158
163
  self.monitoring = monitoring
159
164
  self.std_autopath: Optional[Callable] = std_autopath
@@ -43,3 +43,24 @@ def test_invalid_types(level):
43
43
  # we can't instantiate TypeCheckError if we're in typeguard 2.x environment
44
44
  # because it does not exist... so check name using strings.
45
45
  assert ex.type.__name__ in ["TypeCheckError", "TypeError"]
46
+
47
+
48
+ @pytest.mark.local
49
+ def test_valid_project_name():
50
+ """Test valid project_name."""
51
+ assert (
52
+ Config(
53
+ usage_tracking=3,
54
+ project_name="unit-test",
55
+ ).project_name == "unit-test"
56
+ )
57
+
58
+
59
+ @pytest.mark.local
60
+ @pytest.mark.parametrize("name", (1, 1.0, True, object()))
61
+ def test_invalid_project_name(name):
62
+ """Test invalid project_name."""
63
+ with pytest.raises(Exception) as ex:
64
+ Config(usage_tracking=3, project_name=name)
65
+
66
+ assert ex.type.__name__ in ["TypeCheckError", "TypeError"]
@@ -114,6 +114,7 @@ class UsageTracker:
114
114
  sys.version_info.minor,
115
115
  sys.version_info.micro)
116
116
  self.tracking_level = self.check_tracking_level()
117
+ self.project_name = self.config.project_name
117
118
  self.start_time = None
118
119
  logger.debug("Tracking level: {}".format(self.tracking_level))
119
120
 
@@ -153,6 +154,9 @@ class UsageTracker:
153
154
  'platform.system': platform.system(),
154
155
  'tracking_level': int(self.tracking_level)}
155
156
 
157
+ if self.project_name:
158
+ message['project_name'] = self.project_name
159
+
156
160
  if self.tracking_level >= 2:
157
161
  message['components'] = get_parsl_usage(self.dfk._config)
158
162
 
@@ -188,6 +192,10 @@ class UsageTracker:
188
192
  'end': end_time,
189
193
  'execution_time': end_time - self.start_time,
190
194
  'components': [dfk_component] + get_parsl_usage(self.dfk._config)}
195
+
196
+ if self.project_name:
197
+ message['project_name'] = self.project_name
198
+
191
199
  logger.debug(f"Usage tracking end message (unencoded): {message}")
192
200
 
193
201
  return self.encode_message(message)
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.09.23'
6
+ VERSION = '2024.09.30'
@@ -1,9 +1,9 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: parsl
3
- Version: 2024.9.23
3
+ Version: 2024.9.30
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.09.23.tar.gz
6
+ Download-URL: https://github.com/Parsl/parsl/archive/2024.09.30.tar.gz
7
7
  Author: The Parsl Team
8
8
  Author-email: parsl@googlegroups.com
9
9
  License: Apache 2.0
@@ -1,6 +1,6 @@
1
1
  parsl/__init__.py,sha256=65VfBnxw2k8V3sHsbhKoUCqG-ps2XP2l3x3ALMqQ13Y,1777
2
2
  parsl/addresses.py,sha256=WJI5hG8DwHRMu95nCFW_GdoQTQjMXtuvJour11J1D5I,4823
3
- parsl/config.py,sha256=WX6lnZ7dyK7D8COX8kgwTb-p5-D7LarwKqrQL5_SVX4,9340
3
+ parsl/config.py,sha256=p5HQoxLj5aMagUAYfngcXG2kw0s6SJoc6u7vH2sVhPU,9635
4
4
  parsl/curvezmq.py,sha256=FtZEYP1IWDry39cH-tOKUm9TnaR1U7krOmvVYpATcOk,6939
5
5
  parsl/errors.py,sha256=SzINzQFZDBDbj9l-DPQznD0TbGkNhHIRAPkcBCogf_A,1019
6
6
  parsl/log_utils.py,sha256=u14Fkl5eDfS4HMpl0JjseNNPdbvPaugWPRQj1_af_Zo,3273
@@ -8,7 +8,7 @@ parsl/multiprocessing.py,sha256=MyaEcEq-Qf860u7V98u-PZrPNdtzOZL_NW6EhIJnmfQ,1937
8
8
  parsl/process_loggers.py,sha256=uQ7Gd0W72Jz7rrcYlOMfLsAEhkRltxXJL2MgdduJjEw,1136
9
9
  parsl/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  parsl/utils.py,sha256=91FjQiTUY383ueAjkBAgE21My9nba6SP2a2SrbB1r1Q,11250
11
- parsl/version.py,sha256=mha86mAy5Evay2VJ1zr4OP-Zw4EQ9mRpQBigHO0KT8A,131
11
+ parsl/version.py,sha256=9YyBevKs1n6vZkMkHfrTfMwBB2aVNlUdhCfi5jUQi0M,131
12
12
  parsl/app/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
13
  parsl/app/app.py,sha256=0gbM4AH2OtFOLsv07I5nglpElcwMSOi-FzdZZfrk7So,8532
14
14
  parsl/app/bash.py,sha256=jm2AvePlCT9DZR7H_4ANDWxatp5dN_22FUlT_gWhZ-g,5528
@@ -457,18 +457,18 @@ parsl/tests/test_utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3
457
457
  parsl/tests/test_utils/test_representation_mixin.py,sha256=kUZeIDwA2rlbJ3-beGzLLwf3dOplTMCrWJN87etHcyY,1633
458
458
  parsl/tests/unit/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
459
459
  parsl/tests/unit/test_file.py,sha256=vLycnYcv3bvSzL-FV8WdoibqTyb41BrH1LUYBavobsg,2850
460
- parsl/tests/unit/test_usage_tracking.py,sha256=eoEAHHINQ15LlQDulH_yUYZLBHnrm_rs-IK2vws3Nes,1345
460
+ parsl/tests/unit/test_usage_tracking.py,sha256=xEfUlbBRpsFdUdOrCsk1Kz5AfmMxJT7f0_esZl8Ft-0,1884
461
461
  parsl/usage_tracking/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
462
462
  parsl/usage_tracking/api.py,sha256=iaCY58Dc5J4UM7_dJzEEs871P1p1HdxBMtNGyVdzc9g,1821
463
463
  parsl/usage_tracking/levels.py,sha256=xbfzYEsd55KiZJ-mzNgPebvOH4rRHum04hROzEf41tU,291
464
- parsl/usage_tracking/usage.py,sha256=qNEJ7nPimqd3Y7OWFLdYmNwJ6XDKlyfV_fTzasxsQw8,8690
465
- parsl-2024.9.23.data/scripts/exec_parsl_function.py,sha256=RUkJ4JSJAjr7YyRZ58zhMdg8cR5dVV9odUl3AuzNf3k,7802
466
- parsl-2024.9.23.data/scripts/interchange.py,sha256=2tsbwd055SEnSpWLNNoqMW6o6ohRJFNSgvgN_umsqN8,30864
467
- parsl-2024.9.23.data/scripts/parsl_coprocess.py,sha256=zrVjEqQvFOHxsLufPi00xzMONagjVwLZbavPM7bbjK4,5722
468
- parsl-2024.9.23.data/scripts/process_worker_pool.py,sha256=78QKnV5KbY_vcteC6k60gpDE4wEk6hsciet_qzs9QoU,43061
469
- parsl-2024.9.23.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
470
- parsl-2024.9.23.dist-info/METADATA,sha256=z9mWcPa2fRwyAcdLjHLhy-ltY4feH0ojQRlc4OksUmo,4121
471
- parsl-2024.9.23.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
472
- parsl-2024.9.23.dist-info/entry_points.txt,sha256=XqnsWDYoEcLbsMcpnYGKLEnSBmaIe1YoM5YsBdJG2tI,176
473
- parsl-2024.9.23.dist-info/top_level.txt,sha256=PIheYoUFQtF2icLsgOykgU-Cjuwr2Oi6On2jo5RYgRM,6
474
- parsl-2024.9.23.dist-info/RECORD,,
464
+ parsl/usage_tracking/usage.py,sha256=tcoZ2OUjsQVakG8Uu9_HFuEdzpSHyt4JarSRcLGnSMw,8918
465
+ parsl-2024.9.30.data/scripts/exec_parsl_function.py,sha256=RUkJ4JSJAjr7YyRZ58zhMdg8cR5dVV9odUl3AuzNf3k,7802
466
+ parsl-2024.9.30.data/scripts/interchange.py,sha256=2tsbwd055SEnSpWLNNoqMW6o6ohRJFNSgvgN_umsqN8,30864
467
+ parsl-2024.9.30.data/scripts/parsl_coprocess.py,sha256=zrVjEqQvFOHxsLufPi00xzMONagjVwLZbavPM7bbjK4,5722
468
+ parsl-2024.9.30.data/scripts/process_worker_pool.py,sha256=78QKnV5KbY_vcteC6k60gpDE4wEk6hsciet_qzs9QoU,43061
469
+ parsl-2024.9.30.dist-info/LICENSE,sha256=tAkwu8-AdEyGxGoSvJ2gVmQdcicWw3j1ZZueVV74M-E,11357
470
+ parsl-2024.9.30.dist-info/METADATA,sha256=r7NIHuT-y1Qsc3F54gsAuqFnzOQntzyubtzzknMoJ3k,4121
471
+ parsl-2024.9.30.dist-info/WHEEL,sha256=eOLhNAGa2EW3wWl_TU484h7q1UNgy0JXjjoqKoxAAQc,92
472
+ parsl-2024.9.30.dist-info/entry_points.txt,sha256=XqnsWDYoEcLbsMcpnYGKLEnSBmaIe1YoM5YsBdJG2tI,176
473
+ parsl-2024.9.30.dist-info/top_level.txt,sha256=PIheYoUFQtF2icLsgOykgU-Cjuwr2Oi6On2jo5RYgRM,6
474
+ parsl-2024.9.30.dist-info/RECORD,,