dyngle 0.1.0__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.
- dyngle/__init__.py +13 -0
- dyngle/__main__.py +4 -0
- dyngle/command/__init__.py +6 -0
- dyngle/command/run_command.py +42 -0
- dyngle-0.1.0.dist-info/METADATA +51 -0
- dyngle-0.1.0.dist-info/RECORD +7 -0
- dyngle-0.1.0.dist-info/WHEEL +4 -0
dyngle/__init__.py
ADDED
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
from wizlib.app import WizApp
|
|
2
|
+
from wizlib.stream_handler import StreamHandler
|
|
3
|
+
from wizlib.config_handler import ConfigHandler
|
|
4
|
+
from wizlib.ui_handler import UIHandler
|
|
5
|
+
|
|
6
|
+
from dyngle.command import DyngleCommand
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
class DyngleApp(WizApp):
|
|
10
|
+
|
|
11
|
+
base = DyngleCommand
|
|
12
|
+
name = 'dyngle'
|
|
13
|
+
handlers = [StreamHandler, ConfigHandler, UIHandler]
|
dyngle/__main__.py
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import subprocess
|
|
2
|
+
from wizlib.parser import WizParser
|
|
3
|
+
|
|
4
|
+
from dyngle.command import DyngleCommand
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
class RunCommand(DyngleCommand):
|
|
8
|
+
"""Run a workflow defined in the configuration"""
|
|
9
|
+
|
|
10
|
+
name = 'run'
|
|
11
|
+
|
|
12
|
+
@classmethod
|
|
13
|
+
def add_args(cls, parser: WizParser):
|
|
14
|
+
super().add_args(parser)
|
|
15
|
+
parser.add_argument('flow', help='Flow name to run')
|
|
16
|
+
|
|
17
|
+
def handle_vals(self):
|
|
18
|
+
super().handle_vals()
|
|
19
|
+
if not self.provided('flow'):
|
|
20
|
+
self.flow = self.app.ui.get_input('Enter flow name: ')
|
|
21
|
+
|
|
22
|
+
@DyngleCommand.wrap
|
|
23
|
+
def execute(self):
|
|
24
|
+
flows = self.app.config.get('dyngle-flows')
|
|
25
|
+
|
|
26
|
+
if not flows:
|
|
27
|
+
raise RuntimeError('No flows configured')
|
|
28
|
+
|
|
29
|
+
if self.flow not in flows:
|
|
30
|
+
raise RuntimeError(f'Flow "{self.flow}" not found')
|
|
31
|
+
|
|
32
|
+
tasks = flows[self.flow]
|
|
33
|
+
|
|
34
|
+
for task_str in tasks:
|
|
35
|
+
# Split task string at spaces and pass to subprocess
|
|
36
|
+
task_parts = task_str.split()
|
|
37
|
+
result = subprocess.run(task_parts)
|
|
38
|
+
|
|
39
|
+
if result.returncode != 0:
|
|
40
|
+
raise RuntimeError(f'Task failed: {task_str}')
|
|
41
|
+
|
|
42
|
+
return f'Flow "{self.flow}" completed successfully'
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
Metadata-Version: 2.3
|
|
2
|
+
Name: dyngle
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Template
|
|
5
|
+
License: MIT
|
|
6
|
+
Author: Steampunk Wizard
|
|
7
|
+
Author-email: dyngle@steamwiz.io
|
|
8
|
+
Requires-Python: >=3.11,<3.12
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
+
Requires-Dist: requests (>=2.32.3,<3.0.0)
|
|
13
|
+
Requires-Dist: wizlib (>=3.1.4,<4.0.0)
|
|
14
|
+
Description-Content-Type: text/markdown
|
|
15
|
+
|
|
16
|
+
# Dyngle
|
|
17
|
+
|
|
18
|
+
## Run lightweight local workflows
|
|
19
|
+
|
|
20
|
+
Agentic coding rules and guidelines in `GUIDE` - browsable at https://gitlab.com/steamwiz/workshop/agentic
|
|
21
|
+
|
|
22
|
+
WizLib framework as git submodule at `REFERENCES/gitlab.com/steamwiz/wizlib` for reference with docs at `REFERENCES/gitlab.com/steamwiz/wizlib/docs` - browsable at https://wizlib.steamwiz.io
|
|
23
|
+
|
|
24
|
+
## Development setup
|
|
25
|
+
|
|
26
|
+
Requires Python 3.11.
|
|
27
|
+
|
|
28
|
+
The `Makefile` is designed for local development environment use (not for CI/CD).
|
|
29
|
+
|
|
30
|
+
- `make init` - Create the virtual environment and install poetry
|
|
31
|
+
- `make dependencies` - Install the required packages using poetry
|
|
32
|
+
- `make` - Perform the dull style check / test / coverage cycle same as in CI/CD
|
|
33
|
+
- `make build` - Create a test build
|
|
34
|
+
|
|
35
|
+
GitLab CI/CD performs the entire build/test/release cycle using ProCICD.
|
|
36
|
+
|
|
37
|
+
## References
|
|
38
|
+
|
|
39
|
+
The `REFERENCES` directory contains git submodules for use as read-only reference material from other projects. Refer to them as appropriate.
|
|
40
|
+
|
|
41
|
+
The table below contains only _examples_ of useful reference material. View direcory listings and README files to discern which specific files to read, whether documentation or code examples.
|
|
42
|
+
|
|
43
|
+
| Topic | Reference |
|
|
44
|
+
| --- | --- |
|
|
45
|
+
| Documentation for WizLib framework | `REFERENCES/gitlab.com/steamwiz/wizlib/docs` |
|
|
46
|
+
| Important testing techniques for WizLib-based applications | `REFERENCES/gitlab.com/steamwiz/wizlib/docs/testing.md` |
|
|
47
|
+
| WizLib framework code | `REFERENCES/gitlab.com/steamwiz/wizlib/wizlib` |
|
|
48
|
+
|
|
49
|
+
Note that this application makes heavy use of WizLib and all code changes are expected to comply with, and take advantage of, the framework.
|
|
50
|
+
|
|
51
|
+
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
dyngle/__init__.py,sha256=2KD52sWHfMhk1g1wxHdnxjRtEKeYNJn7sTPkKRpSqNA,338
|
|
2
|
+
dyngle/__main__.py,sha256=mXOQ5tiUi5mEfp1NG2viz5kW2DEeWg1oCPFhfXgxJ4U,92
|
|
3
|
+
dyngle/command/__init__.py,sha256=1S86gbef8MYvG-TWD5JRIWzFg7qV5xKhp9QXx9zEx5c,94
|
|
4
|
+
dyngle/command/run_command.py,sha256=Nc0whPMfVQbB2YgL6UwSpxFLA94RQGd8nZ_0TMX6ldY,1182
|
|
5
|
+
dyngle-0.1.0.dist-info/METADATA,sha256=OqSBTC-420XLqHhkFlNHZegnPybiZxtudCoC6iDOjGs,2054
|
|
6
|
+
dyngle-0.1.0.dist-info/WHEEL,sha256=b4K_helf-jlQoXBBETfwnf4B04YC67LOev0jo4fX5m8,88
|
|
7
|
+
dyngle-0.1.0.dist-info/RECORD,,
|