workflowforge 1.0b5__tar.gz → 1.0b7__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.
- workflowforge-1.0b7/.github/workflows/publish.yml +116 -0
- {workflowforge-1.0b5 → workflowforge-1.0b7}/.pre-commit-config.yaml +14 -6
- workflowforge-1.0b7/CHANGELOG.md +110 -0
- {workflowforge-1.0b5 → workflowforge-1.0b7}/PKG-INFO +37 -41
- {workflowforge-1.0b5 → workflowforge-1.0b7}/README.md +35 -39
- {workflowforge-1.0b5 → workflowforge-1.0b7}/examples/README.md +1 -6
- {workflowforge-1.0b5 → workflowforge-1.0b7}/examples/codebuild/buildspec.yml +5 -5
- workflowforge-1.0b7/examples/github_actions/basic_ci.yml +14 -0
- workflowforge-1.0b7/examples/github_actions/python_matrix.yml +28 -0
- {workflowforge-1.0b5 → workflowforge-1.0b7}/examples/jenkins/Jenkinsfile +3 -3
- {workflowforge-1.0b5 → workflowforge-1.0b7}/examples/jenkins/maven_build.py +3 -3
- {workflowforge-1.0b5 → workflowforge-1.0b7}/pyproject.toml +15 -13
- workflowforge-1.0b7/src/workflowforge/__init__.py +18 -0
- {workflowforge-1.0b5 → workflowforge-1.0b7}/src/workflowforge/ai_documentation.py +11 -10
- {workflowforge-1.0b5 → workflowforge-1.0b7}/src/workflowforge/codebuild.py +20 -9
- {workflowforge-1.0b5 → workflowforge-1.0b7}/src/workflowforge/environment.py +4 -4
- {workflowforge-1.0b5 → workflowforge-1.0b7}/src/workflowforge/github_actions_module.py +0 -1
- {workflowforge-1.0b5 → workflowforge-1.0b7}/src/workflowforge/jenkins.py +5 -3
- {workflowforge-1.0b5 → workflowforge-1.0b7}/src/workflowforge/jenkins_plugins.py +5 -4
- {workflowforge-1.0b5 → workflowforge-1.0b7}/src/workflowforge/job.py +11 -11
- {workflowforge-1.0b5 → workflowforge-1.0b7}/src/workflowforge/schema_validation.py +11 -10
- {workflowforge-1.0b5 → workflowforge-1.0b7}/src/workflowforge/secrets.py +0 -2
- {workflowforge-1.0b5 → workflowforge-1.0b7}/src/workflowforge/step.py +25 -30
- workflowforge-1.0b7/src/workflowforge/strategy.py +59 -0
- {workflowforge-1.0b5 → workflowforge-1.0b7}/src/workflowforge/templates.py +3 -3
- {workflowforge-1.0b5 → workflowforge-1.0b7}/src/workflowforge/triggers.py +40 -43
- {workflowforge-1.0b5 → workflowforge-1.0b7}/src/workflowforge/validation.py +6 -4
- {workflowforge-1.0b5 → workflowforge-1.0b7}/src/workflowforge/visualization.py +18 -14
- {workflowforge-1.0b5 → workflowforge-1.0b7}/src/workflowforge/workflow.py +21 -12
- {workflowforge-1.0b5 → workflowforge-1.0b7}/src/workflowforge.egg-info/PKG-INFO +37 -41
- {workflowforge-1.0b5 → workflowforge-1.0b7}/src/workflowforge.egg-info/SOURCES.txt +0 -1
- {workflowforge-1.0b5 → workflowforge-1.0b7}/src/workflowforge.egg-info/requires.txt +1 -1
- {workflowforge-1.0b5 → workflowforge-1.0b7}/tests/test_ai_documentation.py +0 -2
- {workflowforge-1.0b5 → workflowforge-1.0b7}/tests/test_codebuild.py +0 -1
- {workflowforge-1.0b5 → workflowforge-1.0b7}/tests/test_jenkins.py +1 -3
- {workflowforge-1.0b5 → workflowforge-1.0b7}/tests/test_secrets.py +1 -3
- {workflowforge-1.0b5 → workflowforge-1.0b7}/tests/test_templates.py +5 -2
- workflowforge-1.0b7/tests/test_validation.py +30 -0
- {workflowforge-1.0b5 → workflowforge-1.0b7}/tests/test_workflow.py +9 -14
- workflowforge-1.0b5/.github/workflows/publish.yml +0 -120
- workflowforge-1.0b5/CHANGELOG.md +0 -46
- workflowforge-1.0b5/codebuild_spec.png +0 -0
- workflowforge-1.0b5/examples/github_actions/basic_ci.yml +0 -14
- workflowforge-1.0b5/examples/github_actions/python_matrix.yml +0 -28
- workflowforge-1.0b5/src/workflowforge/__init__.py +0 -203
- workflowforge-1.0b5/src/workflowforge/strategy.py +0 -59
- workflowforge-1.0b5/tests/test_validation.py +0 -38
- {workflowforge-1.0b5 → workflowforge-1.0b7}/.flake8 +0 -0
- {workflowforge-1.0b5 → workflowforge-1.0b7}/.github/pull_request_template.md +0 -0
- {workflowforge-1.0b5 → workflowforge-1.0b7}/.gitignore +0 -0
- {workflowforge-1.0b5 → workflowforge-1.0b7}/AUTHORS.md +0 -0
- {workflowforge-1.0b5 → workflowforge-1.0b7}/LICENSE +0 -0
- {workflowforge-1.0b5 → workflowforge-1.0b7}/MANIFEST.in +0 -0
- {workflowforge-1.0b5 → workflowforge-1.0b7}/README_PRECOMMIT.md +0 -0
- {workflowforge-1.0b5 → workflowforge-1.0b7}/examples/codebuild/node_app.py +0 -0
- {workflowforge-1.0b5 → workflowforge-1.0b7}/examples/github_actions/basic_ci.py +0 -0
- {workflowforge-1.0b5 → workflowforge-1.0b7}/examples/github_actions/python_matrix.py +0 -0
- {workflowforge-1.0b5 → workflowforge-1.0b7}/setup.cfg +0 -0
- {workflowforge-1.0b5 → workflowforge-1.0b7}/setup.py +0 -0
- {workflowforge-1.0b5 → workflowforge-1.0b7}/src/workflowforge.egg-info/dependency_links.txt +0 -0
- {workflowforge-1.0b5 → workflowforge-1.0b7}/src/workflowforge.egg-info/top_level.txt +0 -0
- {workflowforge-1.0b5 → workflowforge-1.0b7}/tests/__init__.py +0 -0
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
# Do not modify - Generated with WorkflowForge
|
|
2
|
+
name: Publish WorkflowForge to PyPI
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
release:
|
|
11
|
+
types:
|
|
12
|
+
- published
|
|
13
|
+
jobs:
|
|
14
|
+
test:
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
name: Checkout code
|
|
18
|
+
- uses: actions/setup-python@v5
|
|
19
|
+
name: Set up Python ${{ matrix.python-version }}
|
|
20
|
+
with:
|
|
21
|
+
python-version: ${{ matrix.python-version }}
|
|
22
|
+
- run: python -m pip install --upgrade pip
|
|
23
|
+
name: Install pip
|
|
24
|
+
- run: pip install -e .[dev]
|
|
25
|
+
name: Install dependencies
|
|
26
|
+
- run: black --check src/ tests/
|
|
27
|
+
name: Check code formatting
|
|
28
|
+
- run: isort --check-only src/ tests/
|
|
29
|
+
name: Check import sorting
|
|
30
|
+
- run: flake8 src/ tests/ examples/
|
|
31
|
+
name: Lint with flake8
|
|
32
|
+
- run: mypy --install-types --non-interactive src/
|
|
33
|
+
name: Type check with mypy
|
|
34
|
+
- run: pytest tests/ --cov=workflowforge --cov-report=xml
|
|
35
|
+
name: Run tests with coverage
|
|
36
|
+
strategy:
|
|
37
|
+
matrix:
|
|
38
|
+
python_version:
|
|
39
|
+
- '3.11'
|
|
40
|
+
- '3.12'
|
|
41
|
+
- '3.13'
|
|
42
|
+
runs-on: ubuntu-latest
|
|
43
|
+
security:
|
|
44
|
+
steps:
|
|
45
|
+
- uses: actions/checkout@v4
|
|
46
|
+
name: Checkout code
|
|
47
|
+
- uses: actions/setup-python@v5
|
|
48
|
+
name: Set up Python
|
|
49
|
+
with:
|
|
50
|
+
python-version: '3.11'
|
|
51
|
+
- run: pip install bandit safety
|
|
52
|
+
name: Install security tools
|
|
53
|
+
- run: bandit -r src/
|
|
54
|
+
name: Security scan with Bandit
|
|
55
|
+
- run: safety check --ignore-unpinned || echo 'Safety check completed with warnings'
|
|
56
|
+
name: Check dependencies for vulnerabilities
|
|
57
|
+
runs-on: ubuntu-latest
|
|
58
|
+
build:
|
|
59
|
+
steps:
|
|
60
|
+
- uses: actions/checkout@v4
|
|
61
|
+
name: Checkout code
|
|
62
|
+
- uses: actions/setup-python@v5
|
|
63
|
+
name: Set up Python
|
|
64
|
+
with:
|
|
65
|
+
python-version: '3.11'
|
|
66
|
+
- run: python -m pip install --upgrade pip build twine
|
|
67
|
+
name: Install build tools
|
|
68
|
+
- run: python -m build
|
|
69
|
+
name: Build package
|
|
70
|
+
- run: twine check dist/*
|
|
71
|
+
name: Verify package metadata
|
|
72
|
+
- uses: actions/upload-artifact@v4
|
|
73
|
+
name: Upload build artifacts
|
|
74
|
+
with:
|
|
75
|
+
name: dist
|
|
76
|
+
path: dist/
|
|
77
|
+
needs:
|
|
78
|
+
- test
|
|
79
|
+
- security
|
|
80
|
+
runs-on: ubuntu-latest
|
|
81
|
+
publish-testpypi:
|
|
82
|
+
steps:
|
|
83
|
+
- uses: actions/download-artifact@v4
|
|
84
|
+
name: Download build artifacts
|
|
85
|
+
with:
|
|
86
|
+
name: dist
|
|
87
|
+
path: dist/
|
|
88
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
89
|
+
name: Publish to TestPyPI
|
|
90
|
+
with:
|
|
91
|
+
repository-url: https://test.pypi.org/legacy/
|
|
92
|
+
needs: build
|
|
93
|
+
environment:
|
|
94
|
+
name: testpypi
|
|
95
|
+
url: https://test.pypi.org/p/workflowforge
|
|
96
|
+
permissions:
|
|
97
|
+
id-token: write
|
|
98
|
+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
|
|
99
|
+
runs-on: ubuntu-latest
|
|
100
|
+
publish-pypi:
|
|
101
|
+
steps:
|
|
102
|
+
- uses: actions/download-artifact@v4
|
|
103
|
+
name: Download build artifacts
|
|
104
|
+
with:
|
|
105
|
+
name: dist
|
|
106
|
+
path: dist/
|
|
107
|
+
- uses: pypa/gh-action-pypi-publish@release/v1
|
|
108
|
+
name: Publish to PyPI
|
|
109
|
+
needs: build
|
|
110
|
+
environment:
|
|
111
|
+
name: pypi
|
|
112
|
+
url: https://pypi.org/p/workflowforge
|
|
113
|
+
permissions:
|
|
114
|
+
id-token: write
|
|
115
|
+
if: github.event_name == 'release'
|
|
116
|
+
runs-on: ubuntu-latest
|
|
@@ -41,12 +41,12 @@ repos:
|
|
|
41
41
|
- id: conventional-pre-commit
|
|
42
42
|
stages: [commit-msg]
|
|
43
43
|
|
|
44
|
-
# Python syntax and style
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
44
|
+
# Python syntax and style
|
|
45
|
+
- repo: https://github.com/pycqa/flake8
|
|
46
|
+
rev: 7.1.1
|
|
47
|
+
hooks:
|
|
48
|
+
- id: flake8
|
|
49
|
+
args: ["--max-line-length=88", "--extend-ignore=E203,W503"]
|
|
50
50
|
|
|
51
51
|
# Upgrade Python syntax
|
|
52
52
|
- repo: https://github.com/asottile/pyupgrade
|
|
@@ -54,3 +54,11 @@ repos:
|
|
|
54
54
|
hooks:
|
|
55
55
|
- id: pyupgrade
|
|
56
56
|
args: [--py311-plus]
|
|
57
|
+
|
|
58
|
+
# YAML linting
|
|
59
|
+
- repo: https://github.com/adrienverge/yamllint
|
|
60
|
+
rev: v1.35.1
|
|
61
|
+
hooks:
|
|
62
|
+
- id: yamllint
|
|
63
|
+
args: ["--config-data", "{extends: default, rules: {document-start: disable, line-length: {max: 120}, truthy: disable}}"]
|
|
64
|
+
files: ^examples/.*\.ya?ml$
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to WorkflowForge will be documented in this file.
|
|
4
|
+
|
|
5
|
+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
|
|
6
|
+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
## [1.0b7] - 2025-08-27
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- Regenerated examples (python_matrix) and validated with yamllint
|
|
14
|
+
- Maintenance: version bump to 1.0b7
|
|
15
|
+
## [1.0b6] - 2025-08-27
|
|
16
|
+
|
|
17
|
+
### Changed
|
|
18
|
+
- Removed legacy references in docs and comments
|
|
19
|
+
- Cleaned egg-info artifacts from repo
|
|
20
|
+
- Ensured examples generate YAML/Jenkinsfile without lingering images
|
|
21
|
+
## [1.0b5] - 2024-12-19
|
|
22
|
+
|
|
23
|
+
### Added
|
|
24
|
+
- Complete mypy compliance with strict type checking (51 → 0 errors)
|
|
25
|
+
- Enterprise-grade type safety across all modules
|
|
26
|
+
- Enhanced type annotations for visualization, triggers, strategy, step modules
|
|
27
|
+
- Type guards for safe type checking in AI documentation
|
|
28
|
+
- Professional-grade code quality with comprehensive type validation
|
|
29
|
+
|
|
30
|
+
### Changed
|
|
31
|
+
- All modules now use proper dict[str, Any] typing for flexible data structures
|
|
32
|
+
- Enhanced IDE support with strict type annotations
|
|
33
|
+
- Improved code reliability through comprehensive type checking
|
|
34
|
+
- Elevated code quality to enterprise standards
|
|
35
|
+
|
|
36
|
+
### Fixed
|
|
37
|
+
- All mypy type errors resolved across entire codebase
|
|
38
|
+
- Proper return types and function annotations implemented
|
|
39
|
+
- Type assignment issues in codebuild.py resolved
|
|
40
|
+
- Enhanced type safety in templates.py with factory functions
|
|
41
|
+
|
|
42
|
+
## [1.0b4] - 2024-12-19
|
|
43
|
+
|
|
44
|
+
### Added
|
|
45
|
+
- TRUE dogfooding: WorkflowForge generates its own GitHub Actions workflows
|
|
46
|
+
- Professional CI/CD pipeline with Python 3.11, 3.12, 3.13 test matrix
|
|
47
|
+
- Security scanning integration with Bandit and Safety tools
|
|
48
|
+
- OIDC trusted publishing for PyPI deployment (no API tokens needed)
|
|
49
|
+
- Automated TestPyPI publishing on main branch merges
|
|
50
|
+
- Complete mypy compliance with strict type checking (51 → 0 errors)
|
|
51
|
+
- Type safety across all modules with proper annotations
|
|
52
|
+
|
|
53
|
+
### Changed
|
|
54
|
+
- Enhanced publish workflow with comprehensive quality checks
|
|
55
|
+
- Integrated security scanning into CI/CD pipeline
|
|
56
|
+
- Improved project automation with self-generated workflows
|
|
57
|
+
- Migrated all type annotations to strict mypy compliance
|
|
58
|
+
- Enhanced type safety with proper dict[str, Any] annotations
|
|
59
|
+
|
|
60
|
+
### Fixed
|
|
61
|
+
- Removed generated diagram artifacts to maintain clean repository
|
|
62
|
+
- Eliminated image pollution in project structure
|
|
63
|
+
- Fixed all mypy type errors across visualization, triggers, strategy, step modules
|
|
64
|
+
- Corrected return types and function annotations for complete type safety
|
|
65
|
+
- Resolved codebuild.py type assignment issues with proper dict typing
|
|
66
|
+
|
|
67
|
+
## [1.0b3] - 2024-12-19
|
|
68
|
+
|
|
69
|
+
### Added
|
|
70
|
+
- Strict mypy configuration with Pydantic plugin for enhanced type safety
|
|
71
|
+
- Professional quality badges in README (mypy, black, isort, ruamel.yaml)
|
|
72
|
+
- Comprehensive pre-commit hooks including yamllint for generated files
|
|
73
|
+
- GitHub Actions publish workflow with proper ruamel.yaml formatting
|
|
74
|
+
|
|
75
|
+
### Changed
|
|
76
|
+
- **BREAKING**: Migrated from PyYAML to ruamel.yaml for superior YAML generation
|
|
77
|
+
- **BREAKING**: Removed top-level import compatibility – use platform-specific modules only
|
|
78
|
+
- Translated all Spanish docstrings and comments to English for professional codebase
|
|
79
|
+
- Improved YAML formatting with precise indentation (mapping=2, sequence=4, offset=2)
|
|
80
|
+
- Enhanced code quality with flake8, black, and isort integration
|
|
81
|
+
- Streamlined module exports to platform-specific imports only
|
|
82
|
+
|
|
83
|
+
### Fixed
|
|
84
|
+
- All flake8 code style issues resolved (F541, E501, E712, E999)
|
|
85
|
+
- YAML validation now passes with proper indentation and formatting
|
|
86
|
+
- Boolean comparisons in tests simplified to Pythonic style
|
|
87
|
+
- Line length violations fixed across entire codebase
|
|
88
|
+
- Pre-commit hooks now pass successfully on all files
|
|
89
|
+
|
|
90
|
+
### Removed
|
|
91
|
+
- Top-level backwards compatibility imports from __init__.py
|
|
92
|
+
- Spanish language docstrings and comments
|
|
93
|
+
- PyYAML dependency in favor of ruamel.yaml
|
|
94
|
+
- npm-groovy-lint from pre-commit (simplified validation)
|
|
95
|
+
|
|
96
|
+
## [1.0b2] - 2024-12-18
|
|
97
|
+
|
|
98
|
+
### Added
|
|
99
|
+
- Initial release with GitHub Actions, Jenkins, and AWS CodeBuild support
|
|
100
|
+
- Pydantic-based models for type safety and validation
|
|
101
|
+
- AI-powered documentation generation with Ollama
|
|
102
|
+
- Pipeline visualization with Graphviz
|
|
103
|
+
- Comprehensive examples and templates
|
|
104
|
+
- Pre-commit hooks for code quality
|
|
105
|
+
|
|
106
|
+
### Features
|
|
107
|
+
- Platform-specific modules: github_actions, jenkins_platform, aws_codebuild
|
|
108
|
+
- Type-safe pipeline generation with IDE autocompletion
|
|
109
|
+
- YAML/Groovy output with validation
|
|
110
|
+
- Modular architecture with clean API design
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: workflowforge
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.0b7
|
|
4
4
|
Summary: A robust and flexible library for creating GitHub Actions workflows, Jenkins pipelines, and AWS CodeBuild BuildSpecs programmatically in Python
|
|
5
5
|
Author-email: "Brainy Nimbus, LLC" <info@brainynimbus.io>
|
|
6
6
|
License: MIT
|
|
@@ -21,7 +21,7 @@ Requires-Python: >=3.11
|
|
|
21
21
|
Description-Content-Type: text/markdown
|
|
22
22
|
License-File: LICENSE
|
|
23
23
|
License-File: AUTHORS.md
|
|
24
|
-
Requires-Dist:
|
|
24
|
+
Requires-Dist: ruamel.yaml>=0.18.0
|
|
25
25
|
Requires-Dist: pydantic>=2.0.0
|
|
26
26
|
Requires-Dist: typing-extensions>=4.0.0
|
|
27
27
|
Requires-Dist: requests>=2.25.0
|
|
@@ -37,14 +37,39 @@ Dynamic: license-file
|
|
|
37
37
|
|
|
38
38
|
# WorkflowForge 🔨
|
|
39
39
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
[![
|
|
43
|
-
[![
|
|
44
|
-
[![PyPI
|
|
45
|
-
|
|
46
|
-
[![
|
|
47
|
-
[![
|
|
40
|
+
## 📊 Project Status
|
|
41
|
+
|
|
42
|
+
[![License: MIT][license-badge]][license-url]
|
|
43
|
+
[![PyPI version][pypi-badge]][pypi-url]
|
|
44
|
+
[![Test PyPI][testpypi-badge]][testpypi-url]
|
|
45
|
+
[![Python 3.11][python311-badge]][python311-url]
|
|
46
|
+
[![Python 3.12][python312-badge]][python312-url]
|
|
47
|
+
[![Python 3.13][python313-badge]][python313-url]
|
|
48
|
+
[![Tests][tests-badge]][tests-url]
|
|
49
|
+
[![pre-commit.ci status][precommit-badge]][precommit-url]
|
|
50
|
+
[![Formatted with Black][black-badge]][black-url]
|
|
51
|
+
[![Imports: isort][isort-badge]][isort-url]
|
|
52
|
+
|
|
53
|
+
[license-badge]: https://img.shields.io/badge/License-MIT-yellow.svg
|
|
54
|
+
[license-url]: https://opensource.org/licenses/MIT
|
|
55
|
+
[pypi-badge]: https://badge.fury.io/py/workflowforge.svg
|
|
56
|
+
[pypi-url]: https://badge.fury.io/py/workflowforge
|
|
57
|
+
[testpypi-badge]: https://img.shields.io/badge/Test%20PyPI-published-green
|
|
58
|
+
[testpypi-url]: https://test.pypi.org/project/workflowforge/
|
|
59
|
+
[python311-badge]: https://img.shields.io/badge/python-3.11-blue.svg
|
|
60
|
+
[python311-url]: https://www.python.org/downloads/release/python-3110/
|
|
61
|
+
[python312-badge]: https://img.shields.io/badge/python-3.12-blue.svg
|
|
62
|
+
[python312-url]: https://www.python.org/downloads/release/python-3120/
|
|
63
|
+
[python313-badge]: https://img.shields.io/badge/python-3.13-blue.svg
|
|
64
|
+
[python313-url]: https://www.python.org/downloads/release/python-3130/
|
|
65
|
+
[tests-badge]: https://github.com/brainynimbus/workflowforge/workflows/Publish%20WorkflowForge%20to%20PyPI/badge.svg
|
|
66
|
+
[tests-url]: https://github.com/brainynimbus/workflowforge/actions
|
|
67
|
+
[precommit-badge]: https://results.pre-commit.ci/badge/github/brainynimbus/workflowforge/main.svg
|
|
68
|
+
[precommit-url]: https://results.pre-commit.ci/latest/github/brainynimbus/workflowforge/main
|
|
69
|
+
[black-badge]: https://img.shields.io/badge/code%20style-black-000000.svg
|
|
70
|
+
[black-url]: https://github.com/psf/black
|
|
71
|
+
[isort-badge]: https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336
|
|
72
|
+
[isort-url]: https://pycqa.github.io/isort/
|
|
48
73
|
|
|
49
74
|
A robust and flexible library for creating GitHub Actions workflows, Jenkins pipelines, and AWS CodeBuild BuildSpecs programmatically in Python.
|
|
50
75
|
|
|
@@ -53,6 +78,7 @@ A robust and flexible library for creating GitHub Actions workflows, Jenkins pip
|
|
|
53
78
|
- **Intuitive API**: Fluent and easy-to-use syntax
|
|
54
79
|
- **Type Validation**: Built on Pydantic for automatic validation
|
|
55
80
|
- **IDE Support**: Full autocompletion with type hints
|
|
81
|
+
- **Type Safety**: Complete mypy compliance with strict type checking
|
|
56
82
|
- **Multi-Platform**: GitHub Actions, Jenkins, AWS CodeBuild
|
|
57
83
|
- **AI Documentation**: Optional AI-powered README generation with Ollama
|
|
58
84
|
- **Pipeline Visualization**: Automatic diagram generation with Graphviz
|
|
@@ -171,21 +197,7 @@ workflow.save(".github/workflows/hello.yml", generate_readme=True, generate_diag
|
|
|
171
197
|
# Creates: hello.yml + hello_README.md + My_Workflow.png
|
|
172
198
|
```
|
|
173
199
|
|
|
174
|
-
### Legacy Import Style (Still Supported)
|
|
175
200
|
|
|
176
|
-
```python
|
|
177
|
-
from workflowforge import (
|
|
178
|
-
Workflow, Job,
|
|
179
|
-
action, run,
|
|
180
|
-
on_push, on_pull_request
|
|
181
|
-
)
|
|
182
|
-
|
|
183
|
-
# Create workflow (PascalCase classes)
|
|
184
|
-
workflow = Workflow(
|
|
185
|
-
name="My Workflow",
|
|
186
|
-
on=on_push(branches=["main"])
|
|
187
|
-
)
|
|
188
|
-
```
|
|
189
201
|
|
|
190
202
|
### Jenkins Pipeline Usage
|
|
191
203
|
|
|
@@ -286,26 +298,10 @@ from workflowforge import aws_codebuild as cb
|
|
|
286
298
|
✅ **Platform separation** - Clear namespace for each platform
|
|
287
299
|
✅ **Snake case naming** - Follows Python PEP 8 conventions
|
|
288
300
|
✅ **IDE autocompletion** - Better IntelliSense support
|
|
289
|
-
✅ **Backwards compatibility** - Old imports still work
|
|
290
|
-
✅ **Shorter code** - `gh.action()` vs `github_actions.action()`
|
|
291
|
-
|
|
292
|
-
### Migration Guide
|
|
293
301
|
|
|
294
|
-
|
|
295
|
-
# Old style (still works)
|
|
296
|
-
from workflowforge import Workflow, Job, action, run, on_push
|
|
297
|
-
|
|
298
|
-
workflow = Workflow(name="CI", on=on_push())
|
|
299
|
-
job = Job(runs_on="ubuntu-latest")
|
|
300
|
-
job.add_step(action("actions/checkout@v4"))
|
|
302
|
+
✅ **Shorter code** - `gh.action()` vs `github_actions.action()`
|
|
301
303
|
|
|
302
|
-
# New style (recommended)
|
|
303
|
-
from workflowforge import github_actions as gh
|
|
304
304
|
|
|
305
|
-
workflow = gh.workflow(name="CI", on=gh.on_push())
|
|
306
|
-
job = gh.job(runs_on="ubuntu-latest")
|
|
307
|
-
job.add_step(gh.action("actions/checkout@v4"))
|
|
308
|
-
```
|
|
309
305
|
|
|
310
306
|
## 🔧 Advanced Examples
|
|
311
307
|
|
|
@@ -1,13 +1,38 @@
|
|
|
1
1
|
# WorkflowForge 🔨
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
[![
|
|
6
|
-
[![
|
|
7
|
-
[![PyPI
|
|
8
|
-
|
|
9
|
-
[![
|
|
10
|
-
[![
|
|
3
|
+
## 📊 Project Status
|
|
4
|
+
|
|
5
|
+
[![License: MIT][license-badge]][license-url]
|
|
6
|
+
[![PyPI version][pypi-badge]][pypi-url]
|
|
7
|
+
[![Test PyPI][testpypi-badge]][testpypi-url]
|
|
8
|
+
[![Python 3.11][python311-badge]][python311-url]
|
|
9
|
+
[![Python 3.12][python312-badge]][python312-url]
|
|
10
|
+
[![Python 3.13][python313-badge]][python313-url]
|
|
11
|
+
[![Tests][tests-badge]][tests-url]
|
|
12
|
+
[![pre-commit.ci status][precommit-badge]][precommit-url]
|
|
13
|
+
[![Formatted with Black][black-badge]][black-url]
|
|
14
|
+
[![Imports: isort][isort-badge]][isort-url]
|
|
15
|
+
|
|
16
|
+
[license-badge]: https://img.shields.io/badge/License-MIT-yellow.svg
|
|
17
|
+
[license-url]: https://opensource.org/licenses/MIT
|
|
18
|
+
[pypi-badge]: https://badge.fury.io/py/workflowforge.svg
|
|
19
|
+
[pypi-url]: https://badge.fury.io/py/workflowforge
|
|
20
|
+
[testpypi-badge]: https://img.shields.io/badge/Test%20PyPI-published-green
|
|
21
|
+
[testpypi-url]: https://test.pypi.org/project/workflowforge/
|
|
22
|
+
[python311-badge]: https://img.shields.io/badge/python-3.11-blue.svg
|
|
23
|
+
[python311-url]: https://www.python.org/downloads/release/python-3110/
|
|
24
|
+
[python312-badge]: https://img.shields.io/badge/python-3.12-blue.svg
|
|
25
|
+
[python312-url]: https://www.python.org/downloads/release/python-3120/
|
|
26
|
+
[python313-badge]: https://img.shields.io/badge/python-3.13-blue.svg
|
|
27
|
+
[python313-url]: https://www.python.org/downloads/release/python-3130/
|
|
28
|
+
[tests-badge]: https://github.com/brainynimbus/workflowforge/workflows/Publish%20WorkflowForge%20to%20PyPI/badge.svg
|
|
29
|
+
[tests-url]: https://github.com/brainynimbus/workflowforge/actions
|
|
30
|
+
[precommit-badge]: https://results.pre-commit.ci/badge/github/brainynimbus/workflowforge/main.svg
|
|
31
|
+
[precommit-url]: https://results.pre-commit.ci/latest/github/brainynimbus/workflowforge/main
|
|
32
|
+
[black-badge]: https://img.shields.io/badge/code%20style-black-000000.svg
|
|
33
|
+
[black-url]: https://github.com/psf/black
|
|
34
|
+
[isort-badge]: https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336
|
|
35
|
+
[isort-url]: https://pycqa.github.io/isort/
|
|
11
36
|
|
|
12
37
|
A robust and flexible library for creating GitHub Actions workflows, Jenkins pipelines, and AWS CodeBuild BuildSpecs programmatically in Python.
|
|
13
38
|
|
|
@@ -16,6 +41,7 @@ A robust and flexible library for creating GitHub Actions workflows, Jenkins pip
|
|
|
16
41
|
- **Intuitive API**: Fluent and easy-to-use syntax
|
|
17
42
|
- **Type Validation**: Built on Pydantic for automatic validation
|
|
18
43
|
- **IDE Support**: Full autocompletion with type hints
|
|
44
|
+
- **Type Safety**: Complete mypy compliance with strict type checking
|
|
19
45
|
- **Multi-Platform**: GitHub Actions, Jenkins, AWS CodeBuild
|
|
20
46
|
- **AI Documentation**: Optional AI-powered README generation with Ollama
|
|
21
47
|
- **Pipeline Visualization**: Automatic diagram generation with Graphviz
|
|
@@ -134,21 +160,7 @@ workflow.save(".github/workflows/hello.yml", generate_readme=True, generate_diag
|
|
|
134
160
|
# Creates: hello.yml + hello_README.md + My_Workflow.png
|
|
135
161
|
```
|
|
136
162
|
|
|
137
|
-
### Legacy Import Style (Still Supported)
|
|
138
163
|
|
|
139
|
-
```python
|
|
140
|
-
from workflowforge import (
|
|
141
|
-
Workflow, Job,
|
|
142
|
-
action, run,
|
|
143
|
-
on_push, on_pull_request
|
|
144
|
-
)
|
|
145
|
-
|
|
146
|
-
# Create workflow (PascalCase classes)
|
|
147
|
-
workflow = Workflow(
|
|
148
|
-
name="My Workflow",
|
|
149
|
-
on=on_push(branches=["main"])
|
|
150
|
-
)
|
|
151
|
-
```
|
|
152
164
|
|
|
153
165
|
### Jenkins Pipeline Usage
|
|
154
166
|
|
|
@@ -249,26 +261,10 @@ from workflowforge import aws_codebuild as cb
|
|
|
249
261
|
✅ **Platform separation** - Clear namespace for each platform
|
|
250
262
|
✅ **Snake case naming** - Follows Python PEP 8 conventions
|
|
251
263
|
✅ **IDE autocompletion** - Better IntelliSense support
|
|
252
|
-
✅ **Backwards compatibility** - Old imports still work
|
|
253
|
-
✅ **Shorter code** - `gh.action()` vs `github_actions.action()`
|
|
254
|
-
|
|
255
|
-
### Migration Guide
|
|
256
264
|
|
|
257
|
-
|
|
258
|
-
# Old style (still works)
|
|
259
|
-
from workflowforge import Workflow, Job, action, run, on_push
|
|
260
|
-
|
|
261
|
-
workflow = Workflow(name="CI", on=on_push())
|
|
262
|
-
job = Job(runs_on="ubuntu-latest")
|
|
263
|
-
job.add_step(action("actions/checkout@v4"))
|
|
265
|
+
✅ **Shorter code** - `gh.action()` vs `github_actions.action()`
|
|
264
266
|
|
|
265
|
-
# New style (recommended)
|
|
266
|
-
from workflowforge import github_actions as gh
|
|
267
267
|
|
|
268
|
-
workflow = gh.workflow(name="CI", on=gh.on_push())
|
|
269
|
-
job = gh.job(runs_on="ubuntu-latest")
|
|
270
|
-
job.add_step(gh.action("actions/checkout@v4"))
|
|
271
|
-
```
|
|
272
268
|
|
|
273
269
|
## 🔧 Advanced Examples
|
|
274
270
|
|
|
@@ -4,13 +4,9 @@ This directory contains examples demonstrating the new modular import structure
|
|
|
4
4
|
|
|
5
5
|
## New Import Style
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
Use the modular imports for a clear, type-safe API:
|
|
8
8
|
|
|
9
9
|
```python
|
|
10
|
-
# Old style (still works)
|
|
11
|
-
from workflowforge import Workflow, Job, action, run, on_push
|
|
12
|
-
|
|
13
|
-
# New modular style (recommended)
|
|
14
10
|
from workflowforge import github_actions
|
|
15
11
|
|
|
16
12
|
workflow = github_actions.workflow(name="CI")
|
|
@@ -54,5 +50,4 @@ python examples/run_all_examples.py
|
|
|
54
50
|
✅ **Platform separation** - Clear namespace for each platform
|
|
55
51
|
✅ **Snake case naming** - Follows Python conventions
|
|
56
52
|
✅ **IDE autocompletion** - Better IntelliSense support
|
|
57
|
-
✅ **Backwards compatibility** - Old imports still work
|
|
58
53
|
✅ **Shorter aliases** - `gh = github_actions` for convenience
|
|
@@ -6,14 +6,14 @@ env:
|
|
|
6
6
|
phases:
|
|
7
7
|
install:
|
|
8
8
|
commands:
|
|
9
|
-
|
|
9
|
+
- npm install
|
|
10
10
|
pre_build:
|
|
11
11
|
commands:
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
- npm run lint
|
|
13
|
+
- npm test
|
|
14
14
|
build:
|
|
15
15
|
commands:
|
|
16
|
-
|
|
16
|
+
- npm run build
|
|
17
17
|
artifacts:
|
|
18
18
|
files:
|
|
19
|
-
|
|
19
|
+
- dist/**/*
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# Do not modify - Generated with WorkflowForge
|
|
2
|
+
name: Basic CI Pipeline
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
jobs:
|
|
8
|
+
test:
|
|
9
|
+
steps:
|
|
10
|
+
- uses: actions/checkout@v4
|
|
11
|
+
name: Checkout code
|
|
12
|
+
- run: echo 'Hello from WorkflowForge!'
|
|
13
|
+
name: Say hello
|
|
14
|
+
runs-on: ubuntu-latest
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
# Do not modify - Generated with WorkflowForge
|
|
2
|
+
name: Python Matrix Testing
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
pull_request:
|
|
8
|
+
branches:
|
|
9
|
+
- main
|
|
10
|
+
jobs:
|
|
11
|
+
test:
|
|
12
|
+
steps:
|
|
13
|
+
- uses: actions/checkout@v4
|
|
14
|
+
- uses: actions/setup-python@v5
|
|
15
|
+
with:
|
|
16
|
+
python-version: ${{ matrix.python-version }}
|
|
17
|
+
- run: pip install pytest
|
|
18
|
+
- run: pytest tests/
|
|
19
|
+
strategy:
|
|
20
|
+
matrix:
|
|
21
|
+
python_version:
|
|
22
|
+
- '3.11'
|
|
23
|
+
- '3.12'
|
|
24
|
+
- '3.13'
|
|
25
|
+
os:
|
|
26
|
+
- ubuntu-latest
|
|
27
|
+
- windows-latest
|
|
28
|
+
runs-on: ubuntu-latest
|
|
@@ -7,17 +7,17 @@ pipeline {
|
|
|
7
7
|
stages {
|
|
8
8
|
stage('Build') {
|
|
9
9
|
steps {
|
|
10
|
-
mvn clean compile
|
|
10
|
+
sh 'mvn clean compile'
|
|
11
11
|
}
|
|
12
12
|
}
|
|
13
13
|
stage('Test') {
|
|
14
14
|
steps {
|
|
15
|
-
mvn test
|
|
15
|
+
sh 'mvn test'
|
|
16
16
|
}
|
|
17
17
|
}
|
|
18
18
|
stage('Package') {
|
|
19
19
|
steps {
|
|
20
|
-
mvn package
|
|
20
|
+
sh 'mvn package'
|
|
21
21
|
}
|
|
22
22
|
}
|
|
23
23
|
}
|
|
@@ -13,17 +13,17 @@ def main():
|
|
|
13
13
|
|
|
14
14
|
# Build stage
|
|
15
15
|
build_stage = jenkins_platform.stage("Build")
|
|
16
|
-
build_stage.add_step("mvn clean compile")
|
|
16
|
+
build_stage.add_step("sh 'mvn clean compile'")
|
|
17
17
|
pipeline.add_stage(build_stage)
|
|
18
18
|
|
|
19
19
|
# Test stage
|
|
20
20
|
test_stage = jenkins_platform.stage("Test")
|
|
21
|
-
test_stage.add_step("mvn test")
|
|
21
|
+
test_stage.add_step("sh 'mvn test'")
|
|
22
22
|
pipeline.add_stage(test_stage)
|
|
23
23
|
|
|
24
24
|
# Package stage
|
|
25
25
|
package_stage = jenkins_platform.stage("Package")
|
|
26
|
-
package_stage.add_step("mvn package")
|
|
26
|
+
package_stage.add_step("sh 'mvn package'")
|
|
27
27
|
pipeline.add_stage(package_stage)
|
|
28
28
|
|
|
29
29
|
# Save pipeline
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "workflowforge"
|
|
7
|
-
version = "1.
|
|
7
|
+
version = "1.0b7"
|
|
8
8
|
description = "A robust and flexible library for creating GitHub Actions workflows, Jenkins pipelines, and AWS CodeBuild BuildSpecs programmatically in Python"
|
|
9
9
|
authors = [{name = "Brainy Nimbus, LLC", email = "info@brainynimbus.io"}]
|
|
10
10
|
license = {text = "MIT"}
|
|
@@ -25,7 +25,7 @@ classifiers = [
|
|
|
25
25
|
"Topic :: Software Development :: Build Tools",
|
|
26
26
|
]
|
|
27
27
|
dependencies = [
|
|
28
|
-
"
|
|
28
|
+
"ruamel.yaml>=0.18.0",
|
|
29
29
|
"pydantic>=2.0.0",
|
|
30
30
|
"typing-extensions>=4.0.0",
|
|
31
31
|
"requests>=2.25.0",
|
|
@@ -60,16 +60,18 @@ profile = "black"
|
|
|
60
60
|
line_length = 88
|
|
61
61
|
|
|
62
62
|
[tool.mypy]
|
|
63
|
+
plugins = ["pydantic.mypy"]
|
|
63
64
|
python_version = "3.11"
|
|
64
|
-
strict =
|
|
65
|
+
strict = true
|
|
66
|
+
warn_return_any = true
|
|
67
|
+
warn_unused_configs = true
|
|
68
|
+
show_error_codes = true
|
|
69
|
+
|
|
70
|
+
[[tool.mypy.overrides]]
|
|
71
|
+
module = "requests"
|
|
65
72
|
ignore_missing_imports = true
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
check_untyped_defs = false
|
|
72
|
-
# Skip specific error types common with Pydantic
|
|
73
|
-
disable_error_code = ["call-arg", "assignment", "arg-type", "return-value", "var-annotated"]
|
|
74
|
-
# Allow dynamic attributes
|
|
75
|
-
allow_redefinition = true
|
|
73
|
+
|
|
74
|
+
[tool.pydantic-mypy]
|
|
75
|
+
init_forbid_extra = true
|
|
76
|
+
init_typed = true
|
|
77
|
+
warn_required_dynamic_aliases = true
|