Skip to content

Commit a6077dc

Browse files
committed
Update to v4.1.0
1 parent 2f5afe2 commit a6077dc

30 files changed

+657
-371
lines changed

.github/workflows/assign.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
pull-requests: write
1313
steps:
1414
- name: 'Auto-assign issue'
15-
uses: pozil/auto-assign-issue@v1
15+
uses: pozil/auto-assign-issue@v2
1616
with:
1717
repo-token: ${{ secrets.GITHUB_TOKEN }}
1818
assignees: fmind

.github/workflows/publish.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ jobs:
1515
- name: Checkout
1616
uses: actions/checkout@v4
1717
- name: Install uv
18-
uses: astral-sh/setup-uv@v4
18+
uses: astral-sh/setup-uv@v5
1919
with:
2020
enable-cache: true
2121
- name: Setup Python
2222
uses: actions/setup-python@v5
2323
with:
2424
python-version-file: .python-version
25-
- run: uv run invoke deploy
25+
- run: uv run just deploy

.python-version

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

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,13 +41,13 @@ To start contributing , you will need to set up your development environment:
4141
2. In the cloned repository directory, install dependencies using [uv](https://docs.astral.sh/uv/):
4242

4343
```bash
44-
invoke install
44+
uv run just install
4545
```
4646

4747
3. Serve the documentation locally (from that directory) to see course material in your browser:
4848

4949
```bash
50-
invoke serve
50+
uv run just serve
5151
```
5252

5353
You can then access the course at this URL from your computer: http://localhost:8000/

docs/1. Initializing/1.2. uv.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,10 +130,10 @@ uv tool run ruff --version
130130
- **Installing a specific Python version**:
131131

132132
```bash
133-
uv python install 3.12
133+
uv python install 3.13
134134
```
135135

136-
This command downloads and installs Python 3.12. You can then use this version to create virtual environments or run scripts.
136+
This command downloads and installs Python 3.13. You can then use this version to create virtual environments or run scripts.
137137

138138
- **Listing available Python versions**:
139139

@@ -150,7 +150,7 @@ uv python list --only-installed
150150
- **Removing a specific Python version**:
151151

152152
```bash
153-
uv python remove 3.12
153+
uv python remove 3.13
154154
```
155155

156156
## uv additional resources

docs/1. Initializing/1.3. uv (project).md

Lines changed: 39 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -61,29 +61,58 @@ Integrating uv into your MLOps project involves several key steps designed to co
6161
The `pyproject.toml` file plays a central role in defining your project’s dependencies and settings.
6262

6363
```toml
64-
# https://docs.astral.sh/uv/reference/pyproject-toml/
64+
# https://docs.astral.sh/uv/reference/settings/
65+
# https://packaging.python.org/en/latest/guides/writing-pyproject-toml/
66+
67+
# PROJECT
6568

6669
[project]
6770
name = "bikes"
68-
version = "1.0.0"
71+
version = "4.1.0"
6972
description = "Predict the number of bikes available."
70-
authors = [{ name = "Your Name", email = "Your Email" }]
73+
authors = [{ name = "Médéric HURIER", email = "[email protected]" }]
7174
readme = "README.md"
72-
requires-python = ">=3.12"
73-
dependencies = []
7475
license = { file = "LICENSE.txt" }
7576
keywords = ["mlops", "python", "package"]
77+
requires-python = ">=3.13"
78+
dependencies = [
79+
"loguru>=0.7.3",
80+
"matplotlib>=3.10.1",
81+
"mlflow>=2.20.3",
82+
"numba>=0.61.0",
83+
"numpy>=2.1.3",
84+
"omegaconf>=2.3.0",
85+
"pandas>=2.2.3",
86+
"pandera>=0.23.0",
87+
"plotly>=6.0.0",
88+
"plyer>=2.1.0",
89+
"psutil>=7.0.0",
90+
"pyarrow>=19.0.1",
91+
"pydantic-settings>=2.8.1",
92+
"pydantic>=2.10.6",
93+
"pynvml>=12.0.0",
94+
"scikit-learn>=1.6.1",
95+
"setuptools>=75.8.2",
96+
"shap>=0.46.0",
97+
"hatchling>=1.27.0",
98+
]
99+
100+
# LINKS
76101

77102
[project.urls]
78-
Homepage = "https://github.com/fmind/bikes"
79-
Documentation = "https://fmind.github.io/bikes/"
80-
Repository = "https://github.com/fmind/bikes"
81-
"Bug Tracker" = "https://github.com/fmind/bikes/issues"
82-
Changelog = "https://github.com/fmind/bikes/blob/main/CHANGELOG.md"
103+
Homepage = "https://github.com/fmind/mlops-python-package"
104+
Documentation = "https://fmind.github.io/mlops-python-package/bikes.html"
105+
Repository = "https://github.com/fmind/mlops-python-package"
106+
"Bug Tracker" = "https://github.com/fmind/mlops-python-package/issues"
107+
Changelog = "https://github.com/fmind/mlops-python-package/blob/main/CHANGELOG.md"
108+
109+
# SCRIPTS
83110

84111
[project.scripts]
85112
bikes = 'bikes.scripts:main'
86113

114+
# SYSTEMS
115+
87116
[build-system]
88117
requires = ["hatchling"]
89118
build-backend = "hatchling.build"

docs/1. Initializing/1.6. VS Code.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,6 @@ This section lists the extensions you can install from [VS Code Marketplace](htt
7979
- [**aaron-bond.better-comments**](https://marketplace.visualstudio.com/items?itemName=aaron-bond.better-comments): highlight comments based on a prefix (e.g., \*, !, ?, TODO, …).
8080
- [**bierner.markdown-mermaid**](https://marketplace.visualstudio.com/items?itemName=bierner.markdown-mermaid): display [Mermaid](https://mermaid.js.org/) diagrams in Markdown. Great to share and visualize complex concepts and design decisions.
8181
- [**christian-kohler.path-intellisense**](https://marketplace.visualstudio.com/items?itemName=christian-kohler.path-intellisense): autocomplete file paths on your system.
82-
- [**dchanco.vsc-invoke**](https://marketplace.visualstudio.com/items?itemName=dchanco.vsc-invoke): execute [Invoke](https://www.pyinvoke.org/) tasks from VS Code (alternative to [GNU Make](https://www.gnu.org/software/make/manual/make.html)).
8382
- [**donjayamanne.githistory**](https://marketplace.visualstudio.com/items?itemName=donjayamanne.githistory): visualize your Git history (files, branches, commits, …).
8483
- [**eamodio.gitlens**](https://marketplace.visualstudio.com/items?itemName=eamodio.gitlens): enhanced your git experience (e.g., git blame, code lens, …).
8584
- [**GitHub.remotehub**](https://marketplace.visualstudio.com/items?itemName=GitHub.remotehub): remotely browse and edit GitHub repositories.

docs/1. Initializing/1.7. pyenv (ARCHIVE).md renamed to docs/1. Initializing/archives/1.2. pyenv.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
description: Learn how to use pyenv to manage Python versions in MLOps projects and ensure that each project uses the correct Python version.
33
---
44

5-
# 1.7. pyenv (ARCHIVE)
5+
# 1.2. pyenv
66

77
## What is pyenv?
88

@@ -26,27 +26,27 @@ When setting up pyenv for MLOps projects, the key consideration is to select a P
2626

2727
## How to install the required version of Python for your project?
2828

29-
To install a particular Python version, like Python 3.12, use the command below with pyenv:
29+
To install a particular Python version, like Python 3.13, use the command below with pyenv:
3030

3131
```bash
32-
pyenv install 3.12
32+
pyenv install 3.13
3333
```
3434

3535
You can select the global version of Python to use on your system with this command:
3636

3737
```bash
38-
pyenv global 3.12
38+
pyenv global 3.13
3939
```
4040

4141
## How can you select the version of Python for your project?
4242

4343
To set a Python version for your project, proceed as follows:
4444

4545
1. Go to your project's root directory.
46-
2. Create a `.python-version` file, adding the desired Python version (e.g., `3.12`) to it:
46+
2. Create a `.python-version` file, adding the desired Python version (e.g., `3.13`) to it:
4747

4848
```text
49-
3.12
49+
3.13
5050
```
5151

5252
3. Once pyenv is configured and active, it will automatically switch to the version specified in the `.python-version` file upon entering the project directory. You can verify the active Python version with:

docs/1. Initializing/1.8. Poetry (ARCHIVE).md renamed to docs/1. Initializing/archives/1.3. Poetry.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
description: Discover how to use Poetry to manage project dependencies and build Python packages, streamlining the process of creating production-ready artifacts.
33
---
44

5-
# 1.8 Poetry (ARCHIVE)
5+
# 1.3 Poetry
66

77
## What is Poetry?
88

@@ -33,7 +33,7 @@ requests = "^2.25.1"
3333
pytest = "^5.2"
3434
```
3535

36-
You will learn more on how to construct and publish Python Package in the [Package section of this course](../3. Productionizing/3.0. Package.md).
36+
You will learn more on how to construct and publish Python Package in the [Package section of this course](../../3. Productionizing/3.0. Package.md).
3737

3838
## Why do you need a package manager?
3939

@@ -95,7 +95,7 @@ packages = [{ include = "bikes", from = "src" }]
9595
bikes = 'bikes.scripts:main'
9696

9797
[tool.poetry.dependencies]
98-
python = "^3.12"
98+
python = "^3.13"
9999

100100
[build-system]
101101
requires = ["poetry-core"]

docs/1. Initializing/index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,3 @@ The initialization phase is crucial in setting the stage for efficient and strea
1313
- **[1.4. git](./1.4. git.md)**: Focuses on `git`, the cornerstone version control system integral to GitHub. You'll learn how to initiate and manage repositories effectively, a critical skill for collaborative development.
1414
- **[1.5. GitHub](./1.5. GitHub.md)**: Discusses how to leverage GitHub for project hosting, version control, and collaboration. It's a pivotal component in modern development workflows, facilitating teamwork and project management.
1515
- **[1.6. VS Code](./1.6. VS Code.md)**: Highlights the setup of Visual Studio Code (VS Code), showing how to adapt this versatile editor into an integrated development environment (IDE) customized for Python and MLOps projects.
16-
- **[1.7. pyenv (ARCHIVE)](./1.7. pyenv (ARCHIVE).md)**: Explores `pyenv`, a Python version management tool that simplifies handling multiple Python versions on a single machine. It ensures each project uses the correct Python version, preventing conflicts and compatibility issues.
17-
- **[1.8. Poetry (ARCHIVE)](./1.8. Poetry (ARCHIVE).md)**: Introduces `Poetry`, a Python dependency management tool that simplifies package installation and project configuration. You'll learn how to create, manage, and publish Python packages using Poetry.

docs/3. Productionizing/3.0. Package.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ version = "3.0.0"
6767
description = "Predict the number of bikes available."
6868
authors = [{ name = "Médéric HURIER", email = "[email protected]" }]
6969
readme = "README.md"
70-
requires-python = ">=3.12"
70+
requires-python = ">=3.13"
7171
dependencies = []
7272
license = { file = "LICENSE.txt" }
7373
keywords = ["mlops", "python", "package"]
@@ -88,7 +88,6 @@ default-groups = ["checks", "commits", "dev", "docs", "notebooks"]
8888
[build-system]
8989
requires = ["hatchling"]
9090
build-backend = "hatchling.build"
91-
9291
```
9392

9493
This information not only aids users in understanding what your package does but also facilitates its discovery and integration into other projects.

docs/3. Productionizing/3.6. VS Code Workspace.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ VS Code Workspace configurations support [the same settings as user settings](ht
5252
"extensions": {
5353
"recommendations": [
5454
"charliermarsh.ruff",
55-
"dchanco.vsc-invoke",
5655
"ms-python.mypy-type-checker",
5756
"ms-python.python",
5857
"ms-python.vscode-pylance",

docs/4. Validating/4.0. Typing.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ class GridCVSearcher(pdt.BaseModel):
135135
[Mypy](https://mypy-lang.org/) is the primary tool for type checking in Python, providing [command-line](https://pypi.org/project/mypy/) and [IDE integration](https://marketplace.visualstudio.com/items?itemName=ms-python.mypy-type-checker) options.
136136

137137
```bash
138-
uv add --group checkers mypy
138+
uv add --group check mypy
139139
uv run mypy src/ tests/
140140
```
141141

@@ -158,7 +158,7 @@ Example mypy configuration in `pyproject.toml`:
158158
# improve error messages
159159
pretty = true
160160
# specify the python version
161-
python_version = "3.12"
161+
python_version = "3.13"
162162
# check untyped definitions
163163
check_untyped_defs = true
164164
# all missing imports in code

docs/4. Validating/4.1. Linting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ Linters are indispensable in Python development due to several key reasons:
2323

2424
```bash
2525
# ruff installation (one shot)
26-
uv add --group checkers ruff
26+
uv add --group check ruff
2727
# ruff code base linting
2828
uv run ruff src/ tests/
2929
```

docs/4. Validating/4.4. Security.md

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ To mitigate security risks in Python, tools like [Bandit](https://bandit.readthe
3434

3535
```bash
3636
# Bandit installation
37-
uv add --group checkers bandit
37+
uv add --group check bandit
3838
# Running Bandit to lint the codebase
3939
uv run bandit src/
4040
```
@@ -52,7 +52,18 @@ For detailed configuration options and best practices, the [Bandit documentation
5252

5353
Reducing security risks on GitHub involves leveraging its tools for dependency management and vulnerability scanning. [GitHub's Dependabot](https://docs.github.com/en/code-security/dependabot) is an automated tool that monitors your repositories for known vulnerabilities in dependencies and provides updates or patches. Configuring Dependabot and regular code audits can significantly enhance your project's security posture.
5454

55-
To set up Dependabot in your GitHub repository, you can add a `.github/dependabot.yml` file with configurations tailored to your project's specific needs, specifying the frequency of checks, the directories to monitor, and the package managers to use.
55+
To set up Dependabot in your GitHub repository, you can add a [`.github/dependabot.yml`](https://github.com/fmind/mlops-python-package/blob/main/.github/dependabot.yml) file with configurations tailored to your project's specific needs, specifying the frequency of checks, the directories to monitor, and the package managers to use.
56+
57+
```yaml
58+
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/dependabot-options-reference
59+
60+
version: 2
61+
updates:
62+
- package-ecosystem: "pip"
63+
directory: "/"
64+
schedule:
65+
interval: "weekly"
66+
```
5667
5768
By staying vigilant with updates, practicing secure coding standards, and utilizing available tools, developers can significantly reduce the security risks associated with Python and MLOps projects.
5869

docs/4. Validating/4.5. Formatting.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ You can format your codebase as follows:
3030

3131
```bash
3232
# ruff installation (one-time)
33-
uv add --group checkers ruff
33+
uv add --group check ruff
3434
# format the imports
3535
uv run ruff check --select you --fix src/ tests/
3636
# format the sources

0 commit comments

Comments
 (0)