scientiflow-cli 0.4.0__py3-none-any.whl → 0.4.2__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.
@@ -109,16 +109,27 @@ class PipelineExecutor:
109
109
  except Exception as e:
110
110
  print(f"[ERROR] Failed to update terminal output: {e}")
111
111
 
112
+
113
+ # def replace_variables(self, command: str) -> str:
114
+ # """Replace placeholders like ${VAR} with environment values."""
115
+ # print(self.environment_variables)
116
+ # return re.sub(r'\$\{(\w+)\}', lambda m: self.environment_variables.get(m.group(1), m.group(0)), command)
117
+
112
118
  def replace_variables(self, command: str) -> str:
119
+ """Replace placeholders like ${VAR} with environment values.
120
+ - If value is a list: safely join into space-separated arguments (quoted).
121
+ - Otherwise: use the old behavior (direct substitution).
122
+ """
113
123
  def replacer(match):
114
124
  key = match.group(1)
115
125
  value = self.environment_variables.get(key, match.group(0))
126
+ # ✅ Special handling for lists
116
127
  if isinstance(value, list):
117
- # Convert list to safe, space-separated string
118
128
  return " ".join(shlex.quote(str(v)) for v in value)
119
- return shlex.quote(str(value)) if isinstance(value, str) else str(value)
120
- t = re.sub(r'\$\{(\w+)\}', replacer, command)
121
- return t
129
+ # Default: keep original behavior for strings, numbers, None
130
+ return self.environment_variables.get(key, match.group(0))
131
+ return re.sub(r'\$\{(\w+)\}', replacer, command)
132
+
122
133
 
123
134
  def execute_command(self, command: str):
124
135
  """Run the command in the terminal, display output in real-time, and log the captured output."""
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: scientiflow-cli
3
- Version: 0.4.0
3
+ Version: 0.4.2
4
4
  Summary: CLI tool for scientiflow. This application runs on the client side, decodes pipelines, and executes them in the configured order!
5
5
  License: Proprietary
6
6
  Author: ScientiFlow
@@ -8,7 +8,7 @@ scientiflow_cli/config.py,sha256=_ThqpT5MpbE3fYh7WfmMQj6WLoEN5NNVkYMRvxv4ANc,345
8
8
  scientiflow_cli/main.py,sha256=TwCRK381_TYrJ5LAXlsSJdJVe8LhfD2SWGBtGp6hRFk,5278
9
9
  scientiflow_cli/pipeline/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
10
10
  scientiflow_cli/pipeline/container_manager.py,sha256=KAnE5AvsSg4cewLc_v4gWCqhKGoc7ycHOtl_HYxUK7E,8444
11
- scientiflow_cli/pipeline/decode_and_execute.py,sha256=d_i2G-Deb4KOymlr7zWOaJS-_zk9ALwMSH7qlL574ro,15838
11
+ scientiflow_cli/pipeline/decode_and_execute.py,sha256=UxvEU5g--OMd_J3dt8PIcGeF82uDL2uanY54ZVbRk-M,16398
12
12
  scientiflow_cli/pipeline/get_jobs.py,sha256=69jOIVwXd8j2lAYy28r2QcsjFT4yRpXNOqsfopiZhFs,1498
13
13
  scientiflow_cli/services/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
14
  scientiflow_cli/services/auth_service.py,sha256=lknARfVTjRCH-4yWVPKiS330NIVHxFw3HlQdN2Lw3Og,3343
@@ -23,8 +23,8 @@ scientiflow_cli/utils/file_manager.py,sha256=J6FBaZ0xz6OH4vcArOGj5KqKSZ2AD78HNei
23
23
  scientiflow_cli/utils/logger.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
24
24
  scientiflow_cli/utils/mock.py,sha256=UZ9cN2Qx3EAXcxnLQY5z4DQWy4jflnWFnfNTsuvnFH8,11237
25
25
  scientiflow_cli/utils/singularity.py,sha256=MPBMpL_9ik9mKApht9LKf1zlyMjNk8GGfKFhbrZHErs,4747
26
- scientiflow_cli-0.4.0.dist-info/LICENSE.md,sha256=nb6GGGYuS_KXe33mSNwcEW-QzvwM475NQ4cNE7KBb34,425
27
- scientiflow_cli-0.4.0.dist-info/METADATA,sha256=PbzyWzJdypRhcGuNg9L5TWkbuizYaLIhjCQ32Wv2rI8,2491
28
- scientiflow_cli-0.4.0.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
29
- scientiflow_cli-0.4.0.dist-info/entry_points.txt,sha256=0lq2mjcG5hGfODrQodeMSAy9RfE2EX1MZSHRpfSncxc,61
30
- scientiflow_cli-0.4.0.dist-info/RECORD,,
26
+ scientiflow_cli-0.4.2.dist-info/LICENSE.md,sha256=nb6GGGYuS_KXe33mSNwcEW-QzvwM475NQ4cNE7KBb34,425
27
+ scientiflow_cli-0.4.2.dist-info/METADATA,sha256=aPNmj6g_5enMVn2qHCkItfBIK-cmkKzW9x9TkndHOF4,2491
28
+ scientiflow_cli-0.4.2.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
29
+ scientiflow_cli-0.4.2.dist-info/entry_points.txt,sha256=0lq2mjcG5hGfODrQodeMSAy9RfE2EX1MZSHRpfSncxc,61
30
+ scientiflow_cli-0.4.2.dist-info/RECORD,,