mlops-project-generator 1.0.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.
- mlops_project_generator-1.0.0/.github/workflows/ci.yml +71 -0
- mlops_project_generator-1.0.0/.github/workflows/publish.yml +133 -0
- mlops_project_generator-1.0.0/LICENSE +21 -0
- mlops_project_generator-1.0.0/MANIFEST.in +36 -0
- mlops_project_generator-1.0.0/PKG-INFO +461 -0
- mlops_project_generator-1.0.0/README.md +395 -0
- mlops_project_generator-1.0.0/docs/PUBLISHING.md +281 -0
- mlops_project_generator-1.0.0/generator/__init__.py +8 -0
- mlops_project_generator-1.0.0/generator/cli.py +133 -0
- mlops_project_generator-1.0.0/generator/prompts.py +306 -0
- mlops_project_generator-1.0.0/generator/renderer.py +191 -0
- mlops_project_generator-1.0.0/generator/utils.py +390 -0
- mlops_project_generator-1.0.0/generator/validators.py +168 -0
- mlops_project_generator-1.0.0/mlops_project_generator.egg-info/PKG-INFO +461 -0
- mlops_project_generator-1.0.0/mlops_project_generator.egg-info/SOURCES.txt +45 -0
- mlops_project_generator-1.0.0/mlops_project_generator.egg-info/dependency_links.txt +1 -0
- mlops_project_generator-1.0.0/mlops_project_generator.egg-info/entry_points.txt +2 -0
- mlops_project_generator-1.0.0/mlops_project_generator.egg-info/requires.txt +14 -0
- mlops_project_generator-1.0.0/mlops_project_generator.egg-info/top_level.txt +1 -0
- mlops_project_generator-1.0.0/pyproject.toml +138 -0
- mlops_project_generator-1.0.0/setup.cfg +4 -0
- mlops_project_generator-1.0.0/templates/common/Makefile +51 -0
- mlops_project_generator-1.0.0/templates/common/configs/config.yaml.j2 +155 -0
- mlops_project_generator-1.0.0/templates/pytorch/src/inference.py.j2 +378 -0
- mlops_project_generator-1.0.0/templates/pytorch/src/models/classification_model.py.j2 +196 -0
- mlops_project_generator-1.0.0/templates/pytorch/src/models/regression_model.py.j2 +285 -0
- mlops_project_generator-1.0.0/templates/pytorch/src/models/timeseries_model.py.j2 +310 -0
- mlops_project_generator-1.0.0/templates/pytorch/src/train.py.j2 +388 -0
- mlops_project_generator-1.0.0/templates/pytorch/src/utils/training_utils.py.j2 +374 -0
- mlops_project_generator-1.0.0/templates/sklearn/src/data/data_loader.py.j2 +232 -0
- mlops_project_generator-1.0.0/templates/sklearn/src/features/feature_engineering.py.j2 +243 -0
- mlops_project_generator-1.0.0/templates/sklearn/src/inference.py.j2 +270 -0
- mlops_project_generator-1.0.0/templates/sklearn/src/models/classification_model.py.j2 +155 -0
- mlops_project_generator-1.0.0/templates/sklearn/src/models/regression_model.py.j2 +138 -0
- mlops_project_generator-1.0.0/templates/sklearn/src/models/timeseries_model.py.j2 +212 -0
- mlops_project_generator-1.0.0/templates/sklearn/src/train.py.j2 +224 -0
- mlops_project_generator-1.0.0/templates/tensorflow/src/inference.py.j2 +360 -0
- mlops_project_generator-1.0.0/templates/tensorflow/src/models/classification_model.py.j2 +246 -0
- mlops_project_generator-1.0.0/templates/tensorflow/src/models/regression_model.py.j2 +246 -0
- mlops_project_generator-1.0.0/templates/tensorflow/src/models/timeseries_model.py.j2 +324 -0
- mlops_project_generator-1.0.0/templates/tensorflow/src/train.py.j2 +345 -0
- mlops_project_generator-1.0.0/templates/tensorflow/src/utils/training_utils.py.j2 +465 -0
- mlops_project_generator-1.0.0/tests/__init__.py +3 -0
- mlops_project_generator-1.0.0/tests/conftest.py +142 -0
- mlops_project_generator-1.0.0/tests/test_cli.py +227 -0
- mlops_project_generator-1.0.0/tests/test_renderer.py +227 -0
- mlops_project_generator-1.0.0/tests/test_validators.py +328 -0
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ main, develop ]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [ main ]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
test:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
python-version: ['3.8', '3.9', '3.10', '3.11']
|
|
15
|
+
|
|
16
|
+
steps:
|
|
17
|
+
- uses: actions/checkout@v4
|
|
18
|
+
|
|
19
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
20
|
+
uses: actions/setup-python@v4
|
|
21
|
+
with:
|
|
22
|
+
python-version: ${{ matrix.python-version }}
|
|
23
|
+
|
|
24
|
+
- name: Install dependencies
|
|
25
|
+
run: |
|
|
26
|
+
python -m pip install --upgrade pip
|
|
27
|
+
pip install -e ".[dev]"
|
|
28
|
+
|
|
29
|
+
- name: Run tests
|
|
30
|
+
run: |
|
|
31
|
+
pytest tests/ -v --cov=generator --cov-report=xml
|
|
32
|
+
|
|
33
|
+
- name: Check code quality
|
|
34
|
+
run: |
|
|
35
|
+
black --check generator/ tests/
|
|
36
|
+
isort --check-only generator/ tests/
|
|
37
|
+
flake8 generator/ tests/
|
|
38
|
+
mypy generator/
|
|
39
|
+
|
|
40
|
+
- name: Upload coverage to Codecov
|
|
41
|
+
uses: codecov/codecov-action@v3
|
|
42
|
+
with:
|
|
43
|
+
file: ./coverage.xml
|
|
44
|
+
flags: unittests
|
|
45
|
+
name: codecov-umbrella
|
|
46
|
+
|
|
47
|
+
integration-test:
|
|
48
|
+
runs-on: ubuntu-latest
|
|
49
|
+
needs: test
|
|
50
|
+
|
|
51
|
+
steps:
|
|
52
|
+
- uses: actions/checkout@v4
|
|
53
|
+
|
|
54
|
+
- name: Set up Python
|
|
55
|
+
uses: actions/setup-python@v4
|
|
56
|
+
with:
|
|
57
|
+
python-version: '3.10'
|
|
58
|
+
|
|
59
|
+
- name: Install package
|
|
60
|
+
run: |
|
|
61
|
+
python -m pip install --upgrade pip
|
|
62
|
+
pip install -e .
|
|
63
|
+
|
|
64
|
+
- name: Test CLI commands
|
|
65
|
+
run: |
|
|
66
|
+
mlops-project-generator --help
|
|
67
|
+
mlops-project-generator version
|
|
68
|
+
|
|
69
|
+
- name: Test project generation
|
|
70
|
+
run: |
|
|
71
|
+
mlops-project-generator init --help
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
name: Publish to PyPI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
release:
|
|
5
|
+
types: [published]
|
|
6
|
+
workflow_dispatch:
|
|
7
|
+
inputs:
|
|
8
|
+
version:
|
|
9
|
+
description: 'Version to publish (e.g., 1.0.0)'
|
|
10
|
+
required: true
|
|
11
|
+
type: string
|
|
12
|
+
test_pypi:
|
|
13
|
+
description: 'Publish to Test PyPI first?'
|
|
14
|
+
required: true
|
|
15
|
+
default: true
|
|
16
|
+
type: boolean
|
|
17
|
+
|
|
18
|
+
jobs:
|
|
19
|
+
build:
|
|
20
|
+
runs-on: ubuntu-latest
|
|
21
|
+
strategy:
|
|
22
|
+
matrix:
|
|
23
|
+
python-version: ['3.8', '3.9', '3.10', '3.11']
|
|
24
|
+
|
|
25
|
+
steps:
|
|
26
|
+
- uses: actions/checkout@v4
|
|
27
|
+
with:
|
|
28
|
+
fetch-depth: 0
|
|
29
|
+
|
|
30
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
31
|
+
uses: actions/setup-python@v4
|
|
32
|
+
with:
|
|
33
|
+
python-version: ${{ matrix.python-version }}
|
|
34
|
+
|
|
35
|
+
- name: Install dependencies
|
|
36
|
+
run: |
|
|
37
|
+
python -m pip install --upgrade pip
|
|
38
|
+
pip install build twine wheel
|
|
39
|
+
pip install -e ".[dev]"
|
|
40
|
+
|
|
41
|
+
- name: Run tests
|
|
42
|
+
run: |
|
|
43
|
+
pytest tests/ -v --cov=generator --cov-report=xml
|
|
44
|
+
|
|
45
|
+
- name: Check code quality
|
|
46
|
+
run: |
|
|
47
|
+
black --check generator/ tests/
|
|
48
|
+
isort --check-only generator/ tests/
|
|
49
|
+
flake8 generator/ tests/
|
|
50
|
+
mypy generator/
|
|
51
|
+
|
|
52
|
+
- name: Build package
|
|
53
|
+
run: |
|
|
54
|
+
python -m build
|
|
55
|
+
|
|
56
|
+
- name: Check package
|
|
57
|
+
run: |
|
|
58
|
+
twine check dist/*
|
|
59
|
+
|
|
60
|
+
- name: Upload coverage to Codecov
|
|
61
|
+
uses: codecov/codecov-action@v3
|
|
62
|
+
with:
|
|
63
|
+
file: ./coverage.xml
|
|
64
|
+
flags: unittests
|
|
65
|
+
name: codecov-umbrella
|
|
66
|
+
|
|
67
|
+
publish-test:
|
|
68
|
+
needs: build
|
|
69
|
+
runs-on: ubuntu-latest
|
|
70
|
+
if: github.event.inputs.test_pypi == 'true' || github.event_name == 'release'
|
|
71
|
+
|
|
72
|
+
steps:
|
|
73
|
+
- uses: actions/checkout@v4
|
|
74
|
+
|
|
75
|
+
- name: Set up Python
|
|
76
|
+
uses: actions/setup-python@v4
|
|
77
|
+
with:
|
|
78
|
+
python-version: '3.10'
|
|
79
|
+
|
|
80
|
+
- name: Install dependencies
|
|
81
|
+
run: |
|
|
82
|
+
python -m pip install --upgrade pip
|
|
83
|
+
pip install build twine
|
|
84
|
+
|
|
85
|
+
- name: Build package
|
|
86
|
+
run: |
|
|
87
|
+
python -m build
|
|
88
|
+
|
|
89
|
+
- name: Publish to Test PyPI
|
|
90
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
91
|
+
with:
|
|
92
|
+
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
|
|
93
|
+
repository_url: https://test.pypi.org/legacy/
|
|
94
|
+
packages_dir: dist/
|
|
95
|
+
|
|
96
|
+
publish-prod:
|
|
97
|
+
needs: [build, publish-test]
|
|
98
|
+
runs-on: ubuntu-latest
|
|
99
|
+
if: github.event_name == 'release' || (github.event.inputs.test_pypi == 'false' && github.event_name == 'workflow_dispatch')
|
|
100
|
+
|
|
101
|
+
steps:
|
|
102
|
+
- uses: actions/checkout@v4
|
|
103
|
+
|
|
104
|
+
- name: Set up Python
|
|
105
|
+
uses: actions/setup-python@v4
|
|
106
|
+
with:
|
|
107
|
+
python-version: '3.10'
|
|
108
|
+
|
|
109
|
+
- name: Install dependencies
|
|
110
|
+
run: |
|
|
111
|
+
python -m pip install --upgrade pip
|
|
112
|
+
pip install build twine
|
|
113
|
+
|
|
114
|
+
- name: Build package
|
|
115
|
+
run: |
|
|
116
|
+
python -m build
|
|
117
|
+
|
|
118
|
+
- name: Publish to PyPI
|
|
119
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
120
|
+
with:
|
|
121
|
+
password: ${{ secrets.PYPI_API_TOKEN }}
|
|
122
|
+
packages_dir: dist/
|
|
123
|
+
|
|
124
|
+
- name: Create GitHub Release
|
|
125
|
+
if: github.event_name == 'workflow_dispatch'
|
|
126
|
+
uses: actions/create-release@v1
|
|
127
|
+
env:
|
|
128
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
129
|
+
with:
|
|
130
|
+
tag_name: v${{ github.event.inputs.version }}
|
|
131
|
+
release_name: Release v${{ github.event.inputs.version }}
|
|
132
|
+
draft: false
|
|
133
|
+
prerelease: false
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 H A R S H H A A
|
|
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,36 @@
|
|
|
1
|
+
include README.md
|
|
2
|
+
include LICENSE
|
|
3
|
+
include pyproject.toml
|
|
4
|
+
include MANIFEST.in
|
|
5
|
+
|
|
6
|
+
# Include templates
|
|
7
|
+
recursive-include templates *.j2 *.yaml *.yml *.txt *.md *.gitignore Makefile
|
|
8
|
+
|
|
9
|
+
# Include source code
|
|
10
|
+
recursive-include generator *.py
|
|
11
|
+
|
|
12
|
+
# Include tests
|
|
13
|
+
recursive-include tests *.py
|
|
14
|
+
|
|
15
|
+
# Include documentation
|
|
16
|
+
recursive-include docs *.md *.rst *.txt
|
|
17
|
+
|
|
18
|
+
# Include configuration files
|
|
19
|
+
include .github/workflows/*.yml
|
|
20
|
+
include .github/workflows/*.yaml
|
|
21
|
+
|
|
22
|
+
# Exclude development files
|
|
23
|
+
global-exclude *.pyc
|
|
24
|
+
global-exclude *.pyo
|
|
25
|
+
global-exclude *.pyd
|
|
26
|
+
global-exclude __pycache__
|
|
27
|
+
global-exclude .git*
|
|
28
|
+
global-exclude .DS_Store
|
|
29
|
+
global-exclude *.so
|
|
30
|
+
global-exclude .coverage
|
|
31
|
+
global-exclude .pytest_cache
|
|
32
|
+
global-exclude .mypy_cache
|
|
33
|
+
global-exclude .tox
|
|
34
|
+
global-exclude build
|
|
35
|
+
global-exclude dist
|
|
36
|
+
global-exclude *.egg-info
|