dyngle 0.1.0__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.
dyngle-0.1.0/PKG-INFO ADDED
@@ -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
+
dyngle-0.1.0/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # Dyngle
2
+
3
+ ## Run lightweight local workflows
4
+
5
+ Agentic coding rules and guidelines in `GUIDE` - browsable at https://gitlab.com/steamwiz/workshop/agentic
6
+
7
+ 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
8
+
9
+ ## Development setup
10
+
11
+ Requires Python 3.11.
12
+
13
+ The `Makefile` is designed for local development environment use (not for CI/CD).
14
+
15
+ - `make init` - Create the virtual environment and install poetry
16
+ - `make dependencies` - Install the required packages using poetry
17
+ - `make` - Perform the dull style check / test / coverage cycle same as in CI/CD
18
+ - `make build` - Create a test build
19
+
20
+ GitLab CI/CD performs the entire build/test/release cycle using ProCICD.
21
+
22
+ ## References
23
+
24
+ The `REFERENCES` directory contains git submodules for use as read-only reference material from other projects. Refer to them as appropriate.
25
+
26
+ 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.
27
+
28
+ | Topic | Reference |
29
+ | --- | --- |
30
+ | Documentation for WizLib framework | `REFERENCES/gitlab.com/steamwiz/wizlib/docs` |
31
+ | Important testing techniques for WizLib-based applications | `REFERENCES/gitlab.com/steamwiz/wizlib/docs/testing.md` |
32
+ | WizLib framework code | `REFERENCES/gitlab.com/steamwiz/wizlib/wizlib` |
33
+
34
+ Note that this application makes heavy use of WizLib and all code changes are expected to comply with, and take advantage of, the framework.
35
+
@@ -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]
@@ -0,0 +1,4 @@
1
+ from . import DyngleApp
2
+
3
+ if __name__ == '__main__': # pragma: nocover
4
+ DyngleApp.main()
@@ -0,0 +1,6 @@
1
+ from wizlib.command import WizCommand
2
+
3
+
4
+ class DyngleCommand(WizCommand):
5
+
6
+ default = 'run'
@@ -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,17 @@
1
+ [tool.poetry]
2
+ name = "dyngle"
3
+ description = "Template"
4
+ authors = ["Steampunk Wizard <dyngle@steamwiz.io>"]
5
+ license = "MIT"
6
+ readme = "README.md"
7
+ version = "0.1.0"
8
+
9
+ [tool.poetry.dependencies]
10
+ python = "~3.11"
11
+ wizlib = "^3.1.4"
12
+ requests = "^2.32.3"
13
+
14
+ [tool.poetry.group.dev.dependencies]
15
+ pycodestyle = "^2.11.0"
16
+ autopep8 = "^2.0.4"
17
+ coverage = "^7.3.0"