workflowforge 1.0b1__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.

Potentially problematic release.


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

@@ -0,0 +1,336 @@
1
+ Metadata-Version: 2.4
2
+ Name: workflowforge
3
+ Version: 1.0b1
4
+ Summary: A robust and flexible library for creating GitHub Actions workflows, Jenkins pipelines, and AWS CodeBuild BuildSpecs programmatically in Python
5
+ Author-email: "Brainy Nimbus, LLC" <info@brainynimbus.io>
6
+ License: MIT
7
+ Project-URL: Homepage, https://brainynimbus.io/workflowforge
8
+ Project-URL: Repository, https://github.com/brainynimbus/workflowforge
9
+ Project-URL: Documentation, https://workflowforge.brainynimbus.io
10
+ Project-URL: Issues, https://github.com/brainynimbus/workflowforge/issues
11
+ Keywords: github-actions,jenkins,codebuild,aws,workflow,ci-cd,automation,yaml,devops,pipeline,buildspec
12
+ Classifier: Development Status :: 4 - Beta
13
+ Classifier: Intended Audience :: Developers
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.11
16
+ Classifier: Programming Language :: Python :: 3.12
17
+ Classifier: Programming Language :: Python :: 3.13
18
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
19
+ Classifier: Topic :: Software Development :: Build Tools
20
+ Requires-Python: >=3.11
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ License-File: AUTHORS.md
24
+ Requires-Dist: pyyaml>=6.0
25
+ Requires-Dist: pydantic>=2.0.0
26
+ Requires-Dist: typing-extensions>=4.0.0
27
+ Requires-Dist: requests>=2.25.0
28
+ Provides-Extra: dev
29
+ Requires-Dist: pytest>=7.0.0; extra == "dev"
30
+ Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
31
+ Requires-Dist: black>=23.0.0; extra == "dev"
32
+ Requires-Dist: isort>=5.12.0; extra == "dev"
33
+ Requires-Dist: mypy>=1.0.0; extra == "dev"
34
+ Requires-Dist: pre-commit>=3.0.0; extra == "dev"
35
+ Requires-Dist: flake8>=7.0.0; extra == "dev"
36
+ Dynamic: license-file
37
+
38
+ # WorkflowForge 🔨
39
+
40
+ A robust and flexible library for creating GitHub Actions workflows, Jenkins pipelines, and AWS CodeBuild BuildSpecs programmatically in Python.
41
+
42
+ ## ✨ Features
43
+
44
+ - **Intuitive API**: Fluent and easy-to-use syntax
45
+ - **Type Validation**: Built on Pydantic for automatic validation
46
+ - **IDE Support**: Full autocompletion with type hints
47
+ - **Multi-Platform**: GitHub Actions, Jenkins, AWS CodeBuild
48
+ - **AI Documentation**: Optional AI-powered README generation with Ollama
49
+ - **Pipeline Visualization**: Automatic diagram generation with Graphviz
50
+ - **Secrets Support**: Secure credential handling across all platforms
51
+ - **Templates**: Pre-built workflows for common use cases
52
+ - **Validation**: Schema validation and best practices checking
53
+
54
+ ## 🚀 Installation
55
+
56
+ ```bash
57
+ pip install workflowforge
58
+ ```
59
+
60
+ ## 🤖 AI Documentation (Optional)
61
+
62
+ WorkflowForge can automatically generate comprehensive README documentation for your workflows using **Ollama** (free local AI):
63
+
64
+ ```bash
65
+ # Install Ollama (one-time setup)
66
+ curl -fsSL https://ollama.com/install.sh | sh
67
+ ollama serve
68
+ ollama pull llama3.2
69
+ ```
70
+
71
+ ```python
72
+ # Generate workflow with AI documentation and diagram
73
+ workflow.save(".github/workflows/ci.yml", generate_readme=True, use_ai=True, generate_diagram=True)
74
+ # Creates: ci.yml + ci_README.md + CI_Pipeline_workflow.png
75
+
76
+ # Or generate README separately
77
+ readme = workflow.generate_readme(use_ai=True, ai_model="llama3.2")
78
+ print(readme)
79
+ ```
80
+
81
+ **Features:**
82
+
83
+ - ✅ **Completely free** - no API keys or cloud services
84
+ - ✅ **Works offline** - local AI processing
85
+ - ✅ **Optional** - gracefully falls back to templates if Ollama not available
86
+ - ✅ **Comprehensive** - explains purpose, triggers, jobs, secrets, setup instructions
87
+ - ✅ **All platforms** - GitHub Actions, Jenkins, AWS CodeBuild
88
+
89
+ ## 📊 Pipeline Visualization (Automatic)
90
+
91
+ WorkflowForge automatically generates visual diagrams of your pipelines using **Graphviz**:
92
+
93
+ ```bash
94
+ # Install Graphviz (one-time setup)
95
+ brew install graphviz # macOS
96
+ sudo apt-get install graphviz # Ubuntu
97
+ choco install graphviz # Windows
98
+ ```
99
+
100
+ ```python
101
+ # Generate workflow with automatic diagram
102
+ workflow.save(".github/workflows/ci.yml", generate_diagram=True)
103
+ # Creates: ci.yml + CI_Pipeline_workflow.png
104
+
105
+ # Generate diagram separately
106
+ diagram_path = workflow.generate_diagram("png")
107
+ print(f"📊 Diagram saved: {diagram_path}")
108
+
109
+ # Multiple formats supported
110
+ workflow.generate_diagram("svg") # Vector graphics
111
+ workflow.generate_diagram("pdf") # PDF document
112
+ ```
113
+
114
+ **Features:**
115
+
116
+ - ✅ **Automatic generation** - every pipeline gets a visual diagram
117
+ - ✅ **Multiple formats** - PNG, SVG, PDF, DOT
118
+ - ✅ **Smart fallback** - DOT files if Graphviz not installed
119
+ - ✅ **Platform-specific styling** - GitHub (blue), Jenkins (orange), CodeBuild (purple)
120
+ - ✅ **Comprehensive view** - shows triggers, jobs, dependencies, step counts
121
+
122
+ ## 📖 Basic Usage
123
+
124
+ ```python
125
+ from workflowforge import (
126
+ Workflow, Job,
127
+ action, run,
128
+ on_push, on_pull_request
129
+ )
130
+
131
+ # Create workflow
132
+ workflow = Workflow(
133
+ name="My Workflow",
134
+ on=on_push(branches=["main"])
135
+ )
136
+
137
+ # Create job
138
+ job = Job(runs_on="ubuntu-latest")
139
+ job.add_step(action("actions/checkout@v4", name="Checkout"))
140
+ job.add_step(run("echo 'Hello World!'", name="Say Hello"))
141
+
142
+ # Add job to workflow
143
+ workflow.add_job("hello", job)
144
+
145
+ # Generate YAML
146
+ print(workflow.to_yaml())
147
+
148
+ # Save with documentation and diagram
149
+ workflow.save(".github/workflows/hello.yml", generate_readme=True, generate_diagram=True)
150
+ # Creates: hello.yml + hello_README.md + My_Workflow.png
151
+ ```
152
+
153
+ ### Jenkins Pipeline Usage
154
+
155
+ ```python
156
+ from workflowforge import (
157
+ JenkinsPipeline, stage,
158
+ agent_docker, pipeline
159
+ )
160
+
161
+ # Create Jenkins pipeline
162
+ jp = pipeline()
163
+ jp.set_agent(agent_docker("maven:3.9.3-eclipse-temurin-17"))
164
+
165
+ # Add stages
166
+ build_stage = stage("Build")
167
+ build_stage.add_step("mvn clean compile")
168
+ jp.add_stage(build_stage)
169
+
170
+ # Generate Jenkinsfile
171
+ print(jp.to_jenkinsfile())
172
+ jp.save("Jenkinsfile")
173
+ ```
174
+
175
+ ### AWS CodeBuild BuildSpec Usage
176
+
177
+ ```python
178
+ from workflowforge import (
179
+ buildspec, phase, environment, artifacts
180
+ )
181
+
182
+ # Create BuildSpec
183
+ spec = buildspec()
184
+
185
+ # Add environment
186
+ env = environment()
187
+ env.add_variable("JAVA_HOME", "/usr/lib/jvm/java-17-openjdk")
188
+ spec.set_env(env)
189
+
190
+ # Add build phase
191
+ build_phase = phase()
192
+ build_phase.add_command("mvn clean package")
193
+ spec.set_build_phase(build_phase)
194
+
195
+ # Generate buildspec.yml with AI documentation and diagram
196
+ spec.save("buildspec.yml", generate_readme=True, use_ai=True, generate_diagram=True)
197
+ # Creates: buildspec.yml + buildspec_README.md + codebuild_spec.png
198
+ ```
199
+
200
+ ### AI Documentation Examples
201
+
202
+ ```python
203
+ # GitHub Actions with AI README
204
+ workflow = Workflow(name="CI Pipeline", on=on_push())
205
+ job = Job(runs_on="ubuntu-latest")
206
+ job.add_step(action("actions/checkout@v4"))
207
+ workflow.add_job("test", job)
208
+
209
+ # Save with AI documentation and diagram
210
+ workflow.save("ci.yml", generate_readme=True, use_ai=True, generate_diagram=True)
211
+ # Creates: ci.yml + ci_README.md + Test_Workflow.png
212
+
213
+ # Jenkins with AI README and diagram
214
+ pipeline = pipeline()
215
+ stage_build = stage("Build")
216
+ stage_build.add_step("mvn clean package")
217
+ pipeline.add_stage(stage_build)
218
+
219
+ # Save with AI documentation and diagram
220
+ pipeline.save("Jenkinsfile", generate_readme=True, use_ai=True, generate_diagram=True)
221
+ # Creates: Jenkinsfile + Jenkinsfile_README.md + jenkins_pipeline.png
222
+
223
+ # Check AI availability
224
+ from workflowforge import OllamaClient
225
+ client = OllamaClient()
226
+ if client.is_available():
227
+ print("AI documentation available!")
228
+ else:
229
+ print("Using template documentation (Ollama not running)")
230
+ ```
231
+
232
+ ## 🔧 Advanced Examples
233
+
234
+ ### Build Matrix Workflow
235
+
236
+ ```python
237
+ from workflowforge import matrix, strategy
238
+
239
+ job = Job(
240
+ runs_on="ubuntu-latest",
241
+ strategy=strategy(
242
+ matrix=matrix(
243
+ python_version=["3.8", "3.9", "3.10", "3.11"],
244
+ os=["ubuntu-latest", "windows-latest"]
245
+ )
246
+ )
247
+ )
248
+ ```
249
+
250
+ ### Multiple Triggers
251
+
252
+ ```python
253
+ workflow = Workflow(
254
+ name="CI/CD",
255
+ on=[
256
+ on_push(branches=["main"]),
257
+ on_pull_request(branches=["main"]),
258
+ on_schedule("0 2 * * *") # Daily at 2 AM
259
+ ]
260
+ )
261
+ ```
262
+
263
+ ### Jobs with Dependencies
264
+
265
+ ```python
266
+ test_job = Job(runs_on="ubuntu-latest")
267
+ deploy_job = Job(runs_on="ubuntu-latest").set_needs("test")
268
+
269
+ workflow.add_job("test", test_job)
270
+ workflow.add_job("deploy", deploy_job)
271
+ ```
272
+
273
+ ## 📚 Complete Documentation
274
+
275
+ ### Platform Support
276
+
277
+ **GitHub Actions:**
278
+
279
+ - `on_push()`, `on_pull_request()`, `on_schedule()`, `on_workflow_dispatch()`
280
+ - `action()`, `run()` steps
281
+ - `secret()`, `variable()`, `github_context()` for credentials
282
+ - Build matrices, strategies, environments
283
+
284
+ **Jenkins:**
285
+
286
+ - `pipeline()`, `stage()`, `agent_docker()`, `agent_any()`
287
+ - `jenkins_credential()`, `jenkins_env()`, `jenkins_param()`
288
+ - Shared libraries, parameters, post actions
289
+
290
+ **AWS CodeBuild:**
291
+
292
+ - `buildspec()`, `phase()`, `environment()`, `artifacts()`
293
+ - `codebuild_secret()`, `codebuild_parameter()`, `codebuild_env()`
294
+ - Runtime versions, caching, reports
295
+
296
+ ### AI Documentation
297
+
298
+ - **Ollama Integration**: Local AI models (llama3.2, codellama, qwen2.5-coder)
299
+ - **Automatic README**: Explains workflow purpose, triggers, jobs, setup
300
+ - **Fallback Support**: Template-based documentation if AI unavailable
301
+ - **All Platforms**: Works with GitHub Actions, Jenkins, CodeBuild
302
+
303
+ ### Pipeline Visualization
304
+
305
+ - **Graphviz Integration**: Native diagram generation using DOT language
306
+ - **Multiple Formats**: PNG, SVG, PDF, DOT files
307
+ - **Platform Styling**: Color-coded diagrams (GitHub: blue, Jenkins: orange, CodeBuild: purple)
308
+ - **Smart Fallback**: DOT files if Graphviz not installed, images if available
309
+ - **Comprehensive View**: Shows triggers, jobs, dependencies, step counts, execution flow
310
+
311
+ ## 🤝 Contributing
312
+
313
+ Contributions are welcome! Please:
314
+
315
+ 1. Fork the repository
316
+ 2. Create a feature branch
317
+ 3. Add tests
318
+ 4. Submit a pull request
319
+
320
+ ## 👨‍💻 Author & Maintainer
321
+
322
+ **Brainy Nimbus, LLC** - We love opensource! 💖
323
+
324
+ Website: [brainynimbus.io](https://brainynimbus.io)
325
+ Email: <info@brainynimbus.io>
326
+ GitHub: [@brainynimbus](https://github.com/brainynimbus)
327
+
328
+ ## 📄 License
329
+
330
+ MIT License - see [LICENSE](LICENSE) for details.
331
+
332
+ ## 🔗 Links
333
+
334
+ - [GitHub Actions Documentation](https://docs.github.com/en/actions)
335
+ - [Actions Marketplace](https://github.com/marketplace?type=actions)
336
+ - [Workflow Syntax](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions)
@@ -0,0 +1,22 @@
1
+ workflowforge/__init__.py,sha256=cVApnWGyDkf3z4O3f7YewKGj4UwF2wdzlXblbrci0Is,4145
2
+ workflowforge/ai_documentation.py,sha256=qJYtPhBdAbE1nevr2krc1_2ST8GrUUGVyCTumHsosYw,4131
3
+ workflowforge/codebuild.py,sha256=ksb5Ntj1l1SFhvs_Jeq75W6aMwZ_hp8-sW2hESyjkrc,12273
4
+ workflowforge/environment.py,sha256=YRcsFi4d5AjlDytzmeeDZ7FpYCVB0qhzXKdJOzByQyU,750
5
+ workflowforge/jenkins.py,sha256=Bt5b3Qqq0vvWUD4V9kLw7rldVbqx0l3aJG6n2k1cLMk,10992
6
+ workflowforge/jenkins_plugins.py,sha256=6BwIocVeu8qhHEDinK0Cd9-tTlJ_Ozjn9fuBE-UO74I,6428
7
+ workflowforge/job.py,sha256=_G6Yz9jCO8kCagZKlhIK0gIzNXP6ICLErn6DB7OXUwI,3818
8
+ workflowforge/schema_validation.py,sha256=DtvXhNvM47mWEWhVap3mq4ns62BGl58M8QBMvkA4mm0,4183
9
+ workflowforge/secrets.py,sha256=euOgJGMq3Pgu3IIvk0IzFqmpdf9nlPKxomgpUYHTfSo,3654
10
+ workflowforge/step.py,sha256=vlM5jCcOwK9_MF9vGW7WSql6k3BtkOgs05n5mOGFg9o,3492
11
+ workflowforge/strategy.py,sha256=KB2shjwwmSH-yT0qC3-CPflkL4nzADF5SoNHcp-00TM,1906
12
+ workflowforge/templates.py,sha256=E1rALm8kdWNtmmh8VwfdtFVgD7ED3LZ7d7TouWNZrQ4,5626
13
+ workflowforge/triggers.py,sha256=Typ_hOKV-8tWOQJmi23I2tMfweE5YQbTObz_rLFRC40,4785
14
+ workflowforge/validation.py,sha256=NKciI997Dz27KPbf9L_HkQTGvEmEInG6eUtf6Y_jKVE,2205
15
+ workflowforge/visualization.py,sha256=TgMdFY1OEX3sGG-nCOSbtg-3W2Zrgp_phLjGmU1HWDE,7275
16
+ workflowforge/workflow.py,sha256=pi81czMHYiCYVG4kbJdXQK8j0d4DZqsUF-oxvZAWwrM,5414
17
+ workflowforge-1.0b1.dist-info/licenses/AUTHORS.md,sha256=k60lokjNBiVANxcmSd-V14FnZkgZ460BhGHI6wUEJPI,584
18
+ workflowforge-1.0b1.dist-info/licenses/LICENSE,sha256=CtUYPup3IC0JXBeoOp3D7TFO8dOtp9OzceCwRX1X4Yg,1077
19
+ workflowforge-1.0b1.dist-info/METADATA,sha256=774TfGOFc-xosaMZg_u63Q-L13NpGIQpPO3d0IFWjDc,10158
20
+ workflowforge-1.0b1.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
21
+ workflowforge-1.0b1.dist-info/top_level.txt,sha256=hG5J2HbxHV149TAjnEeiUgu5WAQ4-O4CFjvl1goab08,14
22
+ workflowforge-1.0b1.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (80.9.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,18 @@
1
+ # Authors
2
+
3
+ ## Creator & Maintainer
4
+
5
+ **Brainy Nimbus, LLC**
6
+ Website: [brainynimbus.io](https://brainynimbus.io)
7
+ Email: <info@brainynimbus.io>
8
+ GitHub: [@brainynimbus](https://github.com/brainynimbus)
9
+
10
+ ## Contributions
11
+
12
+ WorkflowForge was created and developed by Brainy Nimbus, LLC as a robust and flexible solution for generating GitHub Actions workflows and Jenkins pipelines programmatically in Python.
13
+
14
+ ### Acknowledgments
15
+
16
+ - Inspired by the need to simplify complex workflow creation
17
+ - Based on GitHub Actions and Jenkins best practices
18
+ - Designed with developer experience in mind
@@ -0,0 +1,21 @@
1
+ # MIT License
2
+
3
+ Copyright (c) 2025 Brainy Nimbus, LLC
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ workflowforge