dyngle 1.3.2__tar.gz → 1.3.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.

Potentially problematic release.


This version of dyngle might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dyngle
3
- Version: 1.3.2
3
+ Version: 1.3.3
4
4
  Summary: Run lightweight local workflows
5
5
  License: MIT
6
6
  Author: Steampunk Wizard
@@ -11,7 +11,7 @@ Classifier: Programming Language :: Python :: 3
11
11
  Classifier: Programming Language :: Python :: 3.13
12
12
  Classifier: Programming Language :: Python :: 3.14
13
13
  Requires-Dist: requests (>=2.32.3,<3.0.0)
14
- Requires-Dist: wizlib (>=3.3.8,<3.4.0)
14
+ Requires-Dist: wizlib (>=3.3.11,<3.4.0)
15
15
  Description-Content-Type: text/markdown
16
16
 
17
17
  # Dyngle
@@ -3,4 +3,4 @@ from wizlib.command import WizCommand
3
3
 
4
4
  class DyngleCommand(WizCommand):
5
5
 
6
- default = 'run'
6
+ default = 'null'
@@ -0,0 +1,6 @@
1
+ from dyngle.command import DyngleCommand
2
+
3
+
4
+ class NullCommand(DyngleCommand):
5
+
6
+ name = 'null'
@@ -1,3 +1,4 @@
1
+ from functools import cached_property
1
2
  import shlex
2
3
  import subprocess
3
4
  from wizlib.parser import WizParser
@@ -17,31 +18,26 @@ class RunCommand(DyngleCommand):
17
18
  @classmethod
18
19
  def add_args(cls, parser: WizParser):
19
20
  super().add_args(parser)
20
- parser.add_argument('operation', help='Operation name to run')
21
+ parser.add_argument(
22
+ 'operation', help='Operation name to run', nargs='?')
21
23
  parser.add_argument(
22
24
  'args', nargs='*', help='Optional operation arguments')
23
25
 
24
26
  def handle_vals(self):
25
27
  super().handle_vals()
26
-
27
- def _validate_operation_exists(self, operations):
28
- """Validate that the requested operation exists in configuration"""
29
- if self.operation not in operations:
30
- available_operations = ', '.join(operations.keys())
31
- raise DyngleError(
32
- f"Operation '{self.operation}' not found. " +
33
- f"Available operations: {available_operations}")
28
+ keys = self.app.operations.keys()
29
+ if not self.provided('operation'):
30
+ self.operation = self.app.ui.get_text('Operation: ', sorted(keys))
31
+ if not self.operation:
32
+ raise DyngleError(f"Operation required.")
33
+ if self.operation not in keys:
34
+ raise DyngleError(f"Invalid operation {self.operation}.")
34
35
 
35
36
  @DyngleCommand.wrap
36
37
  def execute(self):
37
38
  data_string = self.app.stream.text
38
39
  data = safe_load(data_string) or {}
39
40
  data['args'] = self.args
40
-
41
- operations = self.app.operations
42
- self._validate_operation_exists(operations)
43
- operation = operations[self.operation]
44
-
41
+ operation = self.app.operations[self.operation]
45
42
  operation.run(data, self.app.globals)
46
-
47
43
  return f'Operation "{self.operation}" completed successfully'
@@ -8,11 +8,11 @@ description = "Run lightweight local workflows"
8
8
  authors = ["Steampunk Wizard <dyngle@steamwiz.io>"]
9
9
  license = "MIT"
10
10
  readme = "PACKAGE.md"
11
- version = "1.3.2"
11
+ version = "1.3.3"
12
12
 
13
13
  [tool.poetry.dependencies]
14
14
  python = "^3.13"
15
- wizlib = "~3.3.8"
15
+ wizlib = "~3.3.11"
16
16
  requests = "^2.32.3"
17
17
 
18
18
  [tool.poetry.group.dev.dependencies]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes