Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit7073a6a

Browse files
authored
V4.0.0 (#45)
1 parent1954f1f commit7073a6a

File tree

57 files changed

+3005
-1831
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+3005
-1831
lines changed

‎.cruft.json‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@
99
"repository":"mlops-python-package",
1010
"package":"bikes",
1111
"license":"MIT",
12-
"version":"1.1.3",
12+
"version":"4.0.0",
1313
"description":"Predict the number of bikes available",
14-
"python_version":"3.12",
15-
"mlflow_version":"2.14.3",
14+
"python_version":"3.13",
15+
"mlflow_version":"2.20.3",
1616
"_template":"https://github.com/fmind/cookiecutter-mlops-package"
1717
}
1818
},
File renamed without changes.

‎.github/actions/setup/action.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ runs:
44
using:composite
55
steps:
66
-name:Install uv
7-
uses:astral-sh/setup-uv@v4
7+
uses:astral-sh/setup-uv@v5
88
with:
99
enable-cache:true
1010
-name:Setup Python

‎.github/workflows/check.yml‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,9 +12,9 @@ jobs:
1212
steps:
1313
-uses:actions/checkout@v4
1414
-uses:./.github/actions/setup
15-
-run:uv sync --group=checks
16-
-run:uv runinvoke checks.format
17-
-run:uv runinvoke checks.type
18-
-run:uv runinvoke checks.code
19-
-run:uv runinvoke checks.security
20-
-run:uv runinvoke checks.coverage
15+
-run:uv sync --group=check
16+
-run:uv runjust check-code
17+
-run:uv runjust check-type
18+
-run:uv runjust check-format
19+
-run:uv runjust check-security
20+
-run:uv runjust check-coverage

‎.github/workflows/publish.yml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ jobs:
1515
steps:
1616
-uses:actions/checkout@v4
1717
-uses:./.github/actions/setup
18-
-run:uv sync --group=docs
19-
-run:uv runinvoke docs
18+
-run:uv sync --group=doc
19+
-run:uv runjust docs
2020
-uses:JamesIves/github-pages-deploy-action@v4
2121
with:
2222
folder:docs/
@@ -29,7 +29,7 @@ jobs:
2929
-uses:actions/checkout@v4
3030
-uses:./.github/actions/setup
3131
-run:uv sync --only-dev
32-
-run:uv runinvoke packages
32+
-run:uv runjust packages
3333
-uses:docker/login-action@v3
3434
with:
3535
registry:ghcr.io

‎.pre-commit-config.yaml‎

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22
# https://pre-commit.com/hooks.html
33

44
default_language_version:
5-
python:python3.12
5+
python:python3.13
66
repos:
77
-repo:https://github.com/pre-commit/pre-commit-hooks
8-
rev:v5.0.0
8+
rev:'v5.0.0'
99
hooks:
1010
-id:check-added-large-files
1111
-id:check-case-conflict
@@ -17,12 +17,16 @@ repos:
1717
-id:mixed-line-ending
1818
-id:trailing-whitespace
1919
-repo:https://github.com/astral-sh/ruff-pre-commit
20-
rev:v0.8.1
20+
rev:'v0.9.9'
2121
hooks:
2222
-id:ruff
2323
-id:ruff-format
24+
-repo:https://github.com/PyCQA/bandit
25+
rev:'1.8.3'
26+
hooks:
27+
-id:bandit
2428
-repo:https://github.com/commitizen-tools/commitizen
25-
rev:v4.0.0
29+
rev:'v4.4.1'
2630
hooks:
2731
-id:commitizen
2832
-id:commitizen-branch

‎.python-version‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
3.12
1+
3.13

‎CHANGELOG.md‎

Lines changed: 8 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,20 @@
1-
##v3.0.0 (2024-12-14)
1+
##v4.0.0 (2025-03-04)
22

33
###Feat
44

5-
-**mlflow**: bump to 2.19.0
6-
-**manager**: switch from poetry to uv (#22)
7-
-**manager**: switch from poetry to uv
5+
-**tasks**: switch from pyinvoke to just (#42)
6+
-**workflows**: bump GitHub action versions (#41)
7+
-**versions**: bump python and package version (#40)
8+
-**mindmap**: add mindmap of the package (#32)
89

910
###Fix
1011

11-
-**tasks**: merge conflict
12-
-**tasks**: fix mlflow.serve task attribute
13-
-**github-actions**: run check on all PR
12+
-**version**: ready to bump
13+
-**datasets**: fix dtype backend (#44)
1414

1515
###Refactor
1616

17-
-**release**: prepare before release
18-
-**actions**: split check tasks into subtask for easier debugging (#29)
19-
-**code**: improve abstractions (#28)
17+
-**cruft**: update to new template version
2018

2119
##v2.0.0 (2024-07-28)
2220

@@ -42,32 +40,6 @@
4240

4341
-**publish**: fix publication workflow by installing dev dependencies
4442

45-
##v1.1.0 (2024-07-21)
46-
47-
###Feat
48-
49-
-**kpi**: add key performance indicators
50-
-**mlproject**: add mlflow project and tasks
51-
-**monitoring**: add mlflow.evaluate API
52-
-**lineage**: add lineage features through mlflow data api
53-
-**explanations**: add explainability features and tooling
54-
-**data**: add train, test, and sample data
55-
-**notification**: add service and alerts with plyer
56-
-**observability**: add alerting with plyer notifications
57-
-**observability**: add infrastructure through mlflow system metrics
58-
59-
###Fix
60-
61-
-**kpi**: add key performance indicators
62-
-**projects**: change naming convention
63-
-**evaluation**: add evaluation files
64-
-**loading**: use version or alias for loading models
65-
-**warnings**: improve styles and remove warnings
66-
-**mlflow**: remove input examples following the addition of lineage
67-
-**paths**: fix path for explanation job
68-
-**data**: fix models explanations name
69-
-**data**: add parquet data
70-
7143
##v1.0.1 (2024-06-28)
7244

7345
###Fix

‎Dockerfile‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# https://docs.docker.com/engine/reference/builder/
22

3-
FROM ghcr.io/astral-sh/uv:python3.12-bookworm
3+
FROM ghcr.io/astral-sh/uv:python3.13-bookworm
44
COPY dist/*.whl .
55
RUN uv pip install --system *.whl
66
CMD ["bikes","--help"]

‎README.md‎

Lines changed: 86 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ You can use this package as part of your MLOps toolkit or platform (e.g., Model
3636
-[Automation](#automation-1)
3737
-[Commits: Commitizen](#commits-commitizen)
3838
-[Git Hooks: Pre-Commit](#git-hooks-pre-commit)
39-
-[Tasks:PyInvoke](#tasks-pyinvoke)
39+
-[Tasks:Just](#tasks-just)
4040
-[CI/CD](#cicd)
4141
-[Runner: GitHub Actions](#runner-github-actions)
4242
-[CLI](#cli)
@@ -76,7 +76,7 @@ You can use this package as part of your MLOps toolkit or platform (e.g., Model
7676
-[Runtime: Docker](#runtime-docker)
7777
-[Programming](#programming)
7878
-[Language: Python](#language-python)
79-
-[Version:Pyenv](#version-pyenv)
79+
-[Version:Uv](#version-uv)
8080
-[Observability](#observability)
8181
-[Reproducibility: Mlflow Project](#reproducibility-mlflow-project)
8282
-[Monitoring : Mlflow Evaluate](#monitoring--mlflow-evaluate)
@@ -121,7 +121,7 @@ This section details the requirements, actions, and next steps to kickstart your
121121

122122
##Prerequisites
123123

124-
-[Python>=3.12](https://www.python.org/downloads/): to benefit from[the latest features and performance improvements](https://docs.python.org/3/whatsnew/3.12.html)
124+
-[Python>=3.13](https://www.python.org/downloads/): to benefit from[the latest features and performance improvements](https://docs.python.org/3/whatsnew/3.13.html)
125125
-[uv>=0.5.5](https://docs.astral.sh/uv/): to initialize the project[virtual environment](https://docs.python.org/3/library/venv.html) and its dependencies
126126

127127
##Installation
@@ -220,71 +220,90 @@ with job as runner:
220220

221221
This project includes several automation tasks to easily repeat common actions.
222222

223-
You can invoke the actions from the [command-line](https://www.pyinvoke.org/) or [VS Code extension](https://marketplace.visualstudio.com/items?itemName=dchanco.vsc-invoke).
223+
You can invoke the actions from the [command-line](https://just.systems/man/en/introduction.html) or [VS Code extension](https://marketplace.visualstudio.com/items?itemName=nefrob.vscode-just-syntax).
224224

225225
```bash
226226
# execute the project DAG
227-
$inv projects
227+
$just project
228228
# create a code archive
229-
$inv packages
229+
$just package
230230
# list other actions
231-
$inv --list
231+
$just
232232
```
233233

234234
**Available tasks**:
235-
- **checks.all (checks)** - Run all check tasks.
236-
- **checks.code** - Check the codes with ruff.
237-
- **checks.coverage** - Check the coverage with coverage.
238-
- **checks.format** - Check the formats with ruff.
239-
- **checks.security** - Check the security with bandit.
240-
- **checks.test** - Check the tests with pytest.
241-
- **checks.type** - Check the types with mypy.
242-
- **cleans.all (cleans)** - Run all tools and folders tasks.
243-
- **cleans.cache** - Clean the cache folder.
244-
- **cleans.coverage** - Clean the coverage tool.
245-
- **cleans.dist** - Clean the dist folder.
246-
- **cleans.docs** - Clean the docs folder.
247-
- **cleans.environment** - Clean the project environment file.
248-
- **cleans.folders** - Run all folders tasks.
249-
- **cleans.mlruns** - Clean the mlruns folder.
250-
- **cleans.mypy** - Clean the mypy tool.
251-
- **cleans.outputs** - Clean the outputs folder.
252-
- **cleans.projects** - Run all projects tasks.
253-
- **cleans.pytest** - Clean the pytest tool.
254-
- **cleans.python** - Clean python caches and bytecodes.
255-
- **cleans.requirements** - Clean the project requirements file.
256-
- **cleans.reset** - Run all tools, folders, and sources tasks.
257-
- **cleans.ruff** - Clean the ruff tool.
258-
- **cleans.sources** - Run all sources tasks.
259-
- **cleans.tools** - Run all tools tasks.
260-
- **cleans.uv** - Clean uv lock file.
261-
- **cleans.venv** - Clean the venv folder.
262-
- **commits.all (commits)** - Run all commit tasks.
263-
- **commits.bump** - Bump the version of the package.
264-
- **commits.commit** - Commit all changes with a message.
265-
- **commits.info** - Print a guide for messages.
266-
- **containers.all (containers)** - Run all container tasks.
267-
- **containers.build** - Build the container image with the given tag.
268-
- **containers.compose** - Start up docker compose.
269-
- **containers.run** - Run the container image with the given tag.
270-
- **docs.all (docs)** - Run all docs tasks.
271-
- **docs.api** - Document the API with pdoc using the given format and output directory.
272-
- **docs.serve** - Serve the API docs with pdoc using the given format and computer port.
273-
- **formats.all** - (formats) Run all format tasks.
274-
- **formats.imports** - Format python imports with ruff.
275-
- **formats.sources** - Format python sources with ruff.
276-
- **installs.all (installs)** - Run all install tasks.
277-
- **installs.pre-commit** - Install pre-commit hooks on git.
278-
- **installs.uv** - Install uv packages.
279-
- **mlflow.all (mlflow)** - Run all mlflow tasks.
280-
- **mlflow.doctor** - Run mlflow doctor to diagnose issues.
281-
- **mlflow.serve** - Start mlflow server with the given host, port, and backend uri.
282-
- **packages.all (packages)** - Run all package tasks.
283-
- **packages.build** - Build a python package with the given format.
284-
- **projects.all (projects)** - Run all project tasks.
285-
- **projects.environment** - Export the project environment file.
286-
- **projects.requirements** - Export the project requirements file.
287-
- **projects.run** - Run an mlflow project from MLproject file.
235+
236+
```toml
237+
default # display help information
238+
239+
[check]
240+
check # run check tasks
241+
check-code # check code quality
242+
check-coverage numprocesses="auto" cov_fail_under="80" # check code coverage
243+
check-format # check code format
244+
check-security # check code security
245+
check-test numprocesses="auto" # check unit tests
246+
check-type # check code typing
247+
248+
[clean]
249+
clean # run clean tasks
250+
clean-build # clean build folders
251+
clean-cache # clean cache folder
252+
clean-constraints # clean constraints file
253+
clean-coverage # clean coverage files
254+
clean-docs # clean docs folder
255+
clean-environment # clean environment file
256+
clean-mlruns # clean mlruns folder
257+
clean-mypy # clean mypy folders
258+
clean-outputs # clean outputs folder
259+
clean-pytest # clean pytest cache
260+
clean-python # clean python caches
261+
clean-requirements # clean requirements file
262+
clean-ruff # clean ruff cache
263+
clean-venv # clean venv folder
264+
265+
[commit]
266+
commit-bump # bump package
267+
commit-files # commit package
268+
commit-info # get commit info
269+
270+
[doc]
271+
doc # run doc tasks
272+
doc-build format="google" output="docs" # build documentation
273+
doc-serve format="google" port="8088" # serve documentation
274+
275+
[docker]
276+
docker # run docker tasks
277+
docker-build tag="latest" # build docker image
278+
docker-compose # start docker compose
279+
docker-run tag="latest" # run latest docker image
280+
281+
[format]
282+
format # run format tasks
283+
format-import # format code import
284+
format-source # format code source
285+
286+
[install]
287+
install # run install tasks
288+
install-hooks # install git hooks
289+
install-project # install the project
290+
291+
[mlflow]
292+
mlflow # run mlflow tasks
293+
mlflow-doctor # run mlflow doctor
294+
mlflow-serve host="127.0.0.1" port="5000" uri="./mlruns" # start mlflow server
295+
296+
[package]
297+
package # run package tasks
298+
package-build constraints="constraints.txt" # build python package
299+
package-constraints constraints="constraints.txt" # build package constraints
300+
301+
[project]
302+
project # run project tasks
303+
project-environment # export environment file
304+
project-requirements # export requirements file
305+
project-run job # run project job using mlflow
306+
```
288307

289308
## Workflows
290309

@@ -324,16 +343,17 @@ Pre-defined actions to automate your project development.
324343
- **Alternatives**:
325344
-[Git Hooks](https://git-scm.com/book/en/v2/Customizing-Git-Git-Hooks):less convenient to use
326345

327-
### Tasks: [PyInvoke](https://www.pyinvoke.org/)
346+
### Tasks: [Just](https://just.systems/man/en/introduction.html)
328347

329348
- **Motivations**:
330349
-Automate project workflows
331350
-Sane syntax compared to alternatives
332-
-Good trade-off between power/simplicity
351+
-Good trade-off between power andsimplicity
333352
- **Limitations**:
334353
-Not familiar to most developers
335354
- **Alternatives**:
336355
-[Make](https://www.gnu.org/software/make/manual/make.html):most popular, but awful syntax
356+
-[PyInvoke](https://www.pyinvoke.org/):pythonic, but verbose and less straightforward.
337357

338358
## CI/CD
339359

@@ -581,8 +601,8 @@ Generate and share the project documentations.
581601
- **Limitations**:
582602
-Only support API docs (i.e., no custom docs)
583603
- **Alternatives**:
584-
-[Sphinx](https://www.sphinx-doc.org/en/master/):Most complete, overkill for simple projects
585-
-[Mkdocs](https://www.mkdocs.org/):no support for API doc, which is the core feature
604+
-[Sphinx](https://www.sphinx-doc.org/en/master/):More complete, overkill for simple projects
605+
-[Mkdocs](https://www.mkdocs.org/):More complete, but requires more setup
586606

587607
### Format: [Google](https://google.github.io/styleguide/pyguide.html)
588608

@@ -727,7 +747,7 @@ Select your programming environment.
727747
-[R](https://www.r-project.org/):specific purpose language
728748
-[Julia](https://julialang.org/):specific purpose language
729749

730-
### Version: [Pyenv](https://github.com/pyenv/pyenv)
750+
### Version: [Uv](https://docs.astral.sh/uv/guides/install-python/)
731751

732752
- **Motivations**:
733753
-Switch between Python version
@@ -737,6 +757,7 @@ Select your programming environment.
737757
-Require some shell configurations
738758
- **Alternatives**:
739759
-Manual installation:time consuming
760+
-[PyEnv](https://github.com/pyenv/pyenv):shell-based, require more setup
740761

741762
## Observability
742763

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp