Skip to content

Commit 302800c

Browse files
committed
feat(cruft): adopt cruft and link it to cookiecutter-mlops-package
BREAKING CHANGE:
1 parent 6859476 commit 302800c

File tree

11 files changed

+137
-492
lines changed

11 files changed

+137
-492
lines changed

.cruft.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"template": "https://github.com/fmind/cookiecutter-mlops-package",
3+
"commit": "00fef7106e4abd8ddc7a1625ebe7342fcb145f6c",
4+
"checkout": null,
5+
"context": {
6+
"cookiecutter": {
7+
"user": "fmind",
8+
"name": "MLOps Python Package",
9+
"repository": "mlops-python-package",
10+
"package": "bikes",
11+
"license": "MIT",
12+
"version": "1.1.3",
13+
"description": "Predict the number of bikes available",
14+
"python_version": "3.12",
15+
"mlflow_version": "2.14.3",
16+
"_template": "https://github.com/fmind/cookiecutter-mlops-package"
17+
}
18+
},
19+
"directory": null
20+
}

.github/FUNDING.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# These are supported funding model platforms
2+
3+
# github: ["MLOps-Courses"]
4+
custom: ["https://donate.stripe.com/4gw8xT9oVbCc98s7ss"]

LICENCE.txt

Lines changed: 4 additions & 392 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ The package leverages several [tools](#tools) and [tips](#tips) to make your MLO
1212

1313
You can use this package as part of your MLOps toolkit or platform (e.g., Model Registry, Experiment Tracking, Realtime Inference, ...).
1414

15-
**NEW: Check the [MLOps Coding Course](https://mlops-coding-course.fmind.dev/) to learn how to create and use this package for your projects: https://github.com/MLOps-Courses/mlops-coding-course.**
15+
**Related Resources**:
16+
- **[MLOps Coding Course (Learning)](https://github.com/MLOps-Courses/mlops-coding-course)**: Learn how to create, develop, and maintain a state-of-the-art MLOps code base.
17+
- **[Cookiecutter MLOps Package (Template)](https://github.com/fmind/cookiecutter-mlops-package)**: Start building and deploying Python packages and Docker images for MLOps tasks.
1618

1719
# Table of Contents
1820

docker-compose.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
services:
44
mlflow:
5-
image: ghcr.io/mlflow/mlflow:v2.14.1
5+
image: ghcr.io/mlflow/mlflow:v2.14.3
66
ports:
77
- 5000:5000
88
environment:

invoke.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ run:
44
echo: true
55
project:
66
name: bikes
7+
package: bikes
8+
repository: bikes

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ repository = "https://github.com/fmind/mlops-python-package"
1010
documentation = "https://fmind.github.io/mlops-python-package/"
1111
authors = ["Médéric HURIER <github@fmind.dev>"]
1212
readme = "README.md"
13-
license = "CC BY"
13+
license = "MIT"
1414
keywords = ["mlops", "python", "package"]
1515
packages = [{ include = "bikes", from = "src" }]
1616

python_env.yaml

Lines changed: 93 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,93 @@
1-
python: '3.12'
2-
dependencies:
3-
- alembic==1.13.2
4-
- aniso8601==9.0.1
5-
- annotated-types==0.7.0
6-
- antlr4-python3-runtime==4.9.3
7-
- blinker==1.8.2
8-
- cachetools==5.4.0
9-
- certifi==2024.7.4
10-
- charset-normalizer==3.3.2
11-
- click==8.1.7
12-
- cloudpickle==3.0.0
13-
- colorama==0.4.6
14-
- contourpy==1.2.1
15-
- cycler==0.12.1
16-
- deprecated==1.2.14
17-
- docker==7.1.0
18-
- entrypoints==0.4
19-
- flask==3.0.3
20-
- fonttools==4.53.1
21-
- gitdb==4.0.11
22-
- gitpython==3.1.43
23-
- graphene==3.3
24-
- graphql-core==3.2.3
25-
- graphql-relay==3.2.0
26-
- greenlet==3.0.3
27-
- gunicorn==22.0.0
28-
- idna==3.7
29-
- importlib-metadata==7.2.1
30-
- itsdangerous==2.2.0
31-
- jinja2==3.1.4
32-
- joblib==1.4.2
33-
- kiwisolver==1.4.5
34-
- llvmlite==0.43.0
35-
- loguru==0.7.2
36-
- mako==1.3.5
37-
- markdown==3.6
38-
- markupsafe==2.1.5
39-
- matplotlib==3.9.1
40-
- mlflow==2.14.3
41-
- multimethod==1.10
42-
- mypy-extensions==1.0.0
43-
- numba==0.60.0
44-
- numpy==1.26.4
45-
- omegaconf==2.3.0
46-
- opentelemetry-api==1.26.0
47-
- opentelemetry-sdk==1.26.0
48-
- opentelemetry-semantic-conventions==0.47b0
49-
- packaging==24.1
50-
- pandas==2.2.2
51-
- pandera==0.20.3
52-
- pillow==10.4.0
53-
- plotly==5.23.0
54-
- plyer==2.1.0
55-
- protobuf==4.25.4
56-
- psutil==6.0.0
57-
- pyarrow==15.0.2
58-
- pydantic-core==2.20.1
59-
- pydantic-settings==2.3.4
60-
- pydantic==2.8.2
61-
- pynvml==11.5.3
62-
- pyparsing==3.1.2
63-
- python-dateutil==2.9.0.post0
64-
- python-dotenv==1.0.1
65-
- pytz==2024.1
66-
- pyyaml==6.0.1
67-
- querystring-parser==1.2.4
68-
- requests==2.32.3
69-
- scikit-learn==1.4.2
70-
- scipy==1.14.0
71-
- setuptools==71.1.0
72-
- shap==0.46.0
73-
- six==1.16.0
74-
- slicer==0.0.8
75-
- smmap==5.0.1
76-
- sqlalchemy==2.0.31
77-
- sqlparse==0.5.1
78-
- tenacity==8.5.0
79-
- threadpoolctl==3.5.0
80-
- tqdm==4.66.4
81-
- typeguard==4.3.0
82-
- typing-extensions==4.12.2
83-
- typing-inspect==0.9.0
84-
- tzdata==2024.1
85-
- urllib3==2.2.2
86-
- waitress==3.0.0
87-
- werkzeug==3.0.3
88-
- win32-setctime==1.1.0
89-
- wrapt==1.16.0
90-
- zipp==3.19.2
1+
{
2+
"python": "3.12",
3+
"dependencies": [
4+
"alembic==1.13.2",
5+
"aniso8601==9.0.1",
6+
"annotated-types==0.7.0",
7+
"antlr4-python3-runtime==4.9.3",
8+
"blinker==1.8.2",
9+
"cachetools==5.4.0",
10+
"certifi==2024.7.4",
11+
"charset-normalizer==3.3.2",
12+
"click==8.1.7",
13+
"cloudpickle==3.0.0",
14+
"colorama==0.4.6",
15+
"contourpy==1.2.1",
16+
"cycler==0.12.1",
17+
"deprecated==1.2.14",
18+
"docker==7.1.0",
19+
"entrypoints==0.4",
20+
"flask==3.0.3",
21+
"fonttools==4.53.1",
22+
"gitdb==4.0.11",
23+
"gitpython==3.1.43",
24+
"graphene==3.3",
25+
"graphql-core==3.2.3",
26+
"graphql-relay==3.2.0",
27+
"greenlet==3.0.3",
28+
"gunicorn==22.0.0",
29+
"idna==3.7",
30+
"importlib-metadata==7.2.1",
31+
"itsdangerous==2.2.0",
32+
"jinja2==3.1.4",
33+
"joblib==1.4.2",
34+
"kiwisolver==1.4.5",
35+
"llvmlite==0.43.0",
36+
"loguru==0.7.2",
37+
"mako==1.3.5",
38+
"markdown==3.6",
39+
"markupsafe==2.1.5",
40+
"matplotlib==3.9.1",
41+
"mlflow==2.14.3",
42+
"multimethod==1.10",
43+
"mypy-extensions==1.0.0",
44+
"numba==0.60.0",
45+
"numpy==1.26.4",
46+
"omegaconf==2.3.0",
47+
"opentelemetry-api==1.26.0",
48+
"opentelemetry-sdk==1.26.0",
49+
"opentelemetry-semantic-conventions==0.47b0",
50+
"packaging==24.1",
51+
"pandas==2.2.2",
52+
"pandera==0.20.3",
53+
"pillow==10.4.0",
54+
"plotly==5.23.0",
55+
"plyer==2.1.0",
56+
"protobuf==4.25.4",
57+
"psutil==6.0.0",
58+
"pyarrow==15.0.2",
59+
"pydantic-core==2.20.1",
60+
"pydantic-settings==2.3.4",
61+
"pydantic==2.8.2",
62+
"pynvml==11.5.3",
63+
"pyparsing==3.1.2",
64+
"python-dateutil==2.9.0.post0",
65+
"python-dotenv==1.0.1",
66+
"pytz==2024.1",
67+
"pyyaml==6.0.1",
68+
"querystring-parser==1.2.4",
69+
"requests==2.32.3",
70+
"scikit-learn==1.4.2",
71+
"scipy==1.14.0",
72+
"setuptools==71.1.0",
73+
"shap==0.46.0",
74+
"six==1.16.0",
75+
"slicer==0.0.8",
76+
"smmap==5.0.1",
77+
"sqlalchemy==2.0.31",
78+
"sqlparse==0.5.1",
79+
"tenacity==8.5.0",
80+
"threadpoolctl==3.5.0",
81+
"tqdm==4.66.4",
82+
"typeguard==4.3.0",
83+
"typing-extensions==4.12.2",
84+
"typing-inspect==0.9.0",
85+
"tzdata==2024.1",
86+
"urllib3==2.2.2",
87+
"waitress==3.0.0",
88+
"werkzeug==3.0.3",
89+
"win32-setctime==1.1.0",
90+
"wrapt==1.16.0",
91+
"zipp==3.19.2"
92+
]
93+
}

tasks/containers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,13 +23,13 @@ def compose(ctx: Context) -> None:
2323
@task(pre=[packages.build])
2424
def build(ctx: Context, tag: str = IMAGE_TAG) -> None:
2525
"""Build the container image."""
26-
ctx.run(f"docker build --tag={ctx.project.name}:{tag} .")
26+
ctx.run(f"docker build --tag={ctx.project.repository}:{tag} .")
2727

2828

2929
@task
3030
def run(ctx: Context, tag: str = IMAGE_TAG) -> None:
3131
"""Run the container image."""
32-
ctx.run(f"docker run --rm {ctx.project.name}:{tag}")
32+
ctx.run(f"docker run --rm {ctx.project.repository}:{tag}")
3333

3434

3535
@task(pre=[build, run], default=True)

tasks/docs.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,14 @@
1818
@task
1919
def serve(ctx: Context, format: str = DOC_FORMAT, port: int = 8088) -> None:
2020
"""Serve the API docs with pdoc."""
21-
ctx.run(f"poetry run pdoc --docformat={format} --port={port} src/{ctx.project.name}")
21+
ctx.run(f"poetry run pdoc --docformat={format} --port={port} src/{ctx.project.package}")
2222

2323

2424
@task
2525
def api(ctx: Context, format: str = DOC_FORMAT, output_dir: str = OUTPUT_DIR) -> None:
2626
"""Generate the API docs with pdoc."""
2727
ctx.run(
28-
f"poetry run pdoc --docformat={format} --output-directory={output_dir} src/{ctx.project.name}"
28+
f"poetry run pdoc --docformat={format} --output-directory={output_dir} src/{ctx.project.package}"
2929
)
3030

3131

0 commit comments

Comments
 (0)