Skip to content

Update prod#210

Open
Zalk0 wants to merge 24 commits intoprodfrom
main
Open

Update prod#210
Zalk0 wants to merge 24 commits intoprodfrom
main

Conversation

@Zalk0
Copy link
Copy Markdown
Collaborator

@Zalk0 Zalk0 commented Apr 1, 2026

This pull request introduces a major update to the project's Python dependency management, build system, and documentation. The most significant change is the migration from pip and requirements files to uv and pyproject.toml for dependency management. The CI/CD workflows, Docker setup, documentation, and developer instructions have all been updated to reflect this change. Additionally, GitHub Actions and pre-commit hooks have been improved for better security and maintainability, and some cleanup was performed in the codebase.

Dependency and Build System Modernization:

  • Migrated Python dependency management from pip/requirements.txt to uv and pyproject.toml, updating all relevant documentation, .dockerignore, and developer instructions to use uv sync and group-based installs. (.dockerignore, README.md, docs/tutorials/install.md, Dockerfile, [1] F9e72c52L1, [2] [3] [4] [5] [6] [7] [8] [9]

  • Updated Dockerfile to use the ghcr.io/astral-sh/uv:python3.14-alpine base image, leverage uv caching, and run the bot with uv run. (Dockerfile, DockerfileL1-R27)

  • Changed the default Python version to 3.14 and added .python-version for consistency across local and CI environments. (.python-version, .python-versionR1)

CI/CD and Automation Improvements:

  • Updated all GitHub Actions to use pinned digests for improved security, and migrated workflows to use uv for dependency installation and management. (.github/workflows/ci.yaml, .github/workflows/docker.yaml, .github/workflows/docs.yaml, [1] [2] [3] [4]

  • Refactored Renovate configuration to manage dependencies via pyproject.toml and uv.lock, and enabled lock file maintenance. (.github/renovate.json, [1] [2]

Developer Tooling and Pre-commit Hooks:

  • Upgraded pre-commit hooks, removed obsolete requirements-txt-fixer, and updated Ruff to the latest version and hook names for linting and formatting. (.pre-commit-config.yaml, .pre-commit-config.yamlL4-R21)

Minor Codebase Cleanup:

  • Fixed Sentry SDK configuration and logging directory creation order in __main__.py. (etuutt_bot/__main__.py, [1] [2] [3]

  • Removed unused context menu command for pinning messages in misc.py. (etuutt_bot/commands/misc.py, [1] [2]

Zalk0 and others added 16 commits April 1, 2026 16:29
…o v6 (#201)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
* feat: switch to uv

uv is faster than pip and is beginning to be widely adopted in the Python ecosystem

- update docs and README accordingly
- delete requirements files
- remove requirements-txt-fixer hook from pre-commit
- change legacy pre-commit hook ruff for ruff-check

* feat: update Docker config and dependencies to catch up to main

* feat: use Alpine image with Python installed as it's smaller and faster to build

* chore(deps-docs): update mkdocstrings to v2

* fix: missing updates to uv

* chore: remove spaces in dependencies declaration
* feat: update renovate config to accommodate the switch to uv

* chore: use commits SHA for GitHub Actions
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modernizes the project’s Python packaging and tooling by migrating dependency management from pip/requirements*.txt to uv with pyproject.toml/uv.lock, and updates Docker + GitHub Actions + docs accordingly.

Changes:

  • Replace requirements*.txt with pyproject.toml dependency groups and uv.lock; update docs/README commands to uv sync / uv run.
  • Update Docker build to use Astral’s uv base image and layer-cached uv sync.
  • Refresh CI/docs/docker workflows and Renovate config (pinned action digests, uv-based installs), plus small bot cleanup.

Reviewed changes

Copilot reviewed 15 out of 17 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
requirements.txt Removed in favor of pyproject.toml + uv.lock.
requirements-dev.txt Removed; dev deps moved to [dependency-groups].dev.
requirements-docs.txt Removed; docs deps moved to [dependency-groups].docs.
pyproject.toml Adds dependencies + dependency groups for uv-managed installs.
uv.lock New lockfile for reproducible installs.
README.md Updates setup/run instructions to use uv; config file guidance updated.
docs/tutorials/install.md Updates French install docs to include uv and uv-based commands.
Dockerfile Switches to ghcr.io/astral-sh/uv:* base and uv-based install/run.
.dockerignore Updates allowlist to include pyproject.toml and uv.lock for Docker builds.
.python-version Pins Python version for local/CI.
.pre-commit-config.yaml Updates hook versions and Ruff hook configuration.
.github/workflows/ci.yaml Pins action digests and updates Ruff action usage.
.github/workflows/docs.yaml Pins action digests and switches docs deploy to uv-based execution.
.github/workflows/docker.yaml Pins action digests and minor YAML formatting tweaks.
.github/renovate.json Switches Renovate Python dep management to pep621 + enables lock maintenance.
etuutt_bot/commands/misc.py Removes the pin/unpin context menu command.
etuutt_bot/main.py Tweaks Sentry config and moves log dir creation.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@Zalk0 Zalk0 requested review from gylfirst and tuturd April 1, 2026 14:57
@Zalk0
Copy link
Copy Markdown
Collaborator Author

Zalk0 commented Apr 1, 2026

L'image Docker est un peu plus grosse vu qu'il y a uv en plus mais ça va
~220Mo maintenant vs ~170Mo avant

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
@Zalk0 Zalk0 temporarily deployed to github-pages April 2, 2026 21:08 — with GitHub Actions Inactive
@Zalk0 Zalk0 temporarily deployed to github-pages April 2, 2026 22:11 — with GitHub Actions Inactive
Copy link
Copy Markdown
Member

@gylfirst gylfirst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM didn't test

Comment on lines +143 to +149
=== "Linux"

Sur Linux, vous pouvez installer uv à l'aide du script proposé.

```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
=== "Linux"
Sur Linux, vous pouvez installer uv à l'aide du script proposé.
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```
=== "Linux"
=== "Debian/Ubuntu"
Vous pouvez installer uv à l'aide du script proposé.
```bash
curl -LsSf https://astral.sh/uv/install.sh | sh
```
=== "Fedora"
```bash
sudo dnf install uv
```
=== "Arch Linux"
```bash
sudo pacman -S uv
```

- git ([documentation officielle](https://git-scm.com/book/fr/v2/D%C3%A9marrage-rapide-Installation-de-Git))
- Python >=3.10 ([documentation officielle](https://docs.python.org/3/))
- git ([documentation officielle](https://git-scm.com/book/fr/v2))
- Python >=3.10 ([documentation officielle](https://docs.python.org/fr/3/))
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Python 3.10 sera EOL avant la fin de l'année. Est-ce qu'il faudrait pas profiter de l'occasion pour monter la version de Python ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants