scientiflow-cli 0.4.1__tar.gz → 0.4.3__tar.gz

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 (29) hide show
  1. {scientiflow_cli-0.4.1 → scientiflow_cli-0.4.3}/PKG-INFO +1 -1
  2. {scientiflow_cli-0.4.1 → scientiflow_cli-0.4.3}/pyproject.toml +1 -1
  3. {scientiflow_cli-0.4.1 → scientiflow_cli-0.4.3}/scientiflow_cli/pipeline/decode_and_execute.py +11 -18
  4. {scientiflow_cli-0.4.1 → scientiflow_cli-0.4.3}/LICENSE.md +0 -0
  5. {scientiflow_cli-0.4.1 → scientiflow_cli-0.4.3}/README.md +0 -0
  6. {scientiflow_cli-0.4.1 → scientiflow_cli-0.4.3}/scientiflow_cli/__init__.py +0 -0
  7. {scientiflow_cli-0.4.1 → scientiflow_cli-0.4.3}/scientiflow_cli/__main__.py +0 -0
  8. {scientiflow_cli-0.4.1 → scientiflow_cli-0.4.3}/scientiflow_cli/cli/__init__.py +0 -0
  9. {scientiflow_cli-0.4.1 → scientiflow_cli-0.4.3}/scientiflow_cli/cli/auth_utils.py +0 -0
  10. {scientiflow_cli-0.4.1 → scientiflow_cli-0.4.3}/scientiflow_cli/cli/login.py +0 -0
  11. {scientiflow_cli-0.4.1 → scientiflow_cli-0.4.3}/scientiflow_cli/cli/logout.py +0 -0
  12. {scientiflow_cli-0.4.1 → scientiflow_cli-0.4.3}/scientiflow_cli/config.py +0 -0
  13. {scientiflow_cli-0.4.1 → scientiflow_cli-0.4.3}/scientiflow_cli/main.py +0 -0
  14. {scientiflow_cli-0.4.1 → scientiflow_cli-0.4.3}/scientiflow_cli/pipeline/__init__.py +0 -0
  15. {scientiflow_cli-0.4.1 → scientiflow_cli-0.4.3}/scientiflow_cli/pipeline/container_manager.py +0 -0
  16. {scientiflow_cli-0.4.1 → scientiflow_cli-0.4.3}/scientiflow_cli/pipeline/get_jobs.py +0 -0
  17. {scientiflow_cli-0.4.1 → scientiflow_cli-0.4.3}/scientiflow_cli/services/__init__.py +0 -0
  18. {scientiflow_cli-0.4.1 → scientiflow_cli-0.4.3}/scientiflow_cli/services/auth_service.py +0 -0
  19. {scientiflow_cli-0.4.1 → scientiflow_cli-0.4.3}/scientiflow_cli/services/base_directory.py +0 -0
  20. {scientiflow_cli-0.4.1 → scientiflow_cli-0.4.3}/scientiflow_cli/services/executor.py +0 -0
  21. {scientiflow_cli-0.4.1 → scientiflow_cli-0.4.3}/scientiflow_cli/services/request_handler.py +0 -0
  22. {scientiflow_cli-0.4.1 → scientiflow_cli-0.4.3}/scientiflow_cli/services/rich_printer.py +0 -0
  23. {scientiflow_cli-0.4.1 → scientiflow_cli-0.4.3}/scientiflow_cli/services/status_updater.py +0 -0
  24. {scientiflow_cli-0.4.1 → scientiflow_cli-0.4.3}/scientiflow_cli/utils/__init__.py +0 -0
  25. {scientiflow_cli-0.4.1 → scientiflow_cli-0.4.3}/scientiflow_cli/utils/encryption.py +0 -0
  26. {scientiflow_cli-0.4.1 → scientiflow_cli-0.4.3}/scientiflow_cli/utils/file_manager.py +0 -0
  27. {scientiflow_cli-0.4.1 → scientiflow_cli-0.4.3}/scientiflow_cli/utils/logger.py +0 -0
  28. {scientiflow_cli-0.4.1 → scientiflow_cli-0.4.3}/scientiflow_cli/utils/mock.py +0 -0
  29. {scientiflow_cli-0.4.1 → scientiflow_cli-0.4.3}/scientiflow_cli/utils/singularity.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: scientiflow-cli
3
- Version: 0.4.1
3
+ Version: 0.4.3
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
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "scientiflow-cli"
3
- version = "0.4.1"
3
+ version = "0.4.3"
4
4
  description = "CLI tool for scientiflow. This application runs on the client side, decodes pipelines, and executes them in the configured order!"
5
5
  authors = ["ScientiFlow <scientiflow@gmail.com>"]
6
6
  license = "Proprietary"
@@ -109,34 +109,27 @@ class PipelineExecutor:
109
109
  except Exception as e:
110
110
  print(f"[ERROR] Failed to update terminal output: {e}")
111
111
 
112
+
112
113
  # def replace_variables(self, command: str) -> str:
113
114
  # """Replace placeholders like ${VAR} with environment values."""
115
+ # print(self.environment_variables)
114
116
  # return re.sub(r'\$\{(\w+)\}', lambda m: self.environment_variables.get(m.group(1), m.group(0)), command)
115
117
 
116
- # def replace_variables(self, command: str) -> str:
117
- # def replacer(match):
118
- # key = match.group(1)
119
- # value = self.environment_variables.get(key, match.group(0))
120
- # if isinstance(value, list):
121
- # # Convert list to safe, space-separated string
122
- # return " ".join(shlex.quote(str(v)) for v in value)
123
- # return shlex.quote(str(value)) if isinstance(value, str) else str(value)
124
- # replaced_command = re.sub(r'\$\{(\w+)\}', replacer, command)
125
- # return replaced_command
126
-
127
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
+ """
128
123
  def replacer(match):
129
124
  key = match.group(1)
130
125
  value = self.environment_variables.get(key, match.group(0))
126
+ # ✅ Special handling for lists
131
127
  if isinstance(value, list):
132
- # ✅ Only modify behavior for lists — safely join them
133
128
  return " ".join(shlex.quote(str(v)) for v in value)
134
- # ✅ For strings, keep old behavior (no quoting)
135
- return value if isinstance(value, str) else str(value)
136
-
137
- replaced_command = re.sub(r'\$\{(\w+)\}', replacer, command)
138
- return replaced_command
139
-
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
+
140
133
 
141
134
  def execute_command(self, command: str):
142
135
  """Run the command in the terminal, display output in real-time, and log the captured output."""