diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-09-25 11:50:17 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-09-25 11:51:06 +0200 |
| commit | 43b2fcb90a0649de052fbbac77311a3b90a2349c (patch) | |
| tree | 9bc1ff40e719fc442cdadeb59b3d42e7fd59a866 | |
| parent | 0bdce359c0bf19fa98f1b7f9975be32704abe1f0 (diff) | |
| download | meshbay-43b2fcb90a0649de052fbbac77311a3b90a2349c.tar.gz | |
docs(claude): translate the Python environment section into English
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| -rw-r--r-- | CLAUDE.md | 38 |
1 files changed, 19 insertions, 19 deletions
@@ -48,36 +48,36 @@ Jamais de processus orphelins ni de ports ouverts après un test. - **Build backend:** hatchling (per package `pyproject.toml`) ```bash -# Créer le venv (--clear si recréation sur une autre machine/OS) +# Create the venv (--clear when recreating it on another machine/OS) python3 -m venv .venv --clear source .venv/bin/activate -# Toutes les dépendances sont déclarées dans les pyproject.toml — un seul pip install suffit +# All dependencies are declared in the pyproject.toml files — a single pip install is enough pip install -e "packages/meshbay-common[dev]" -e "packages/meshbay-hub[dev]" \ -e "packages/meshbay-node[dev]" ``` -Les deps clés (aioquic, watchdog, fastapi, blake3, etc.) sont dans les `pyproject.toml` -et installées automatiquement. Ne pas ajouter manuellement des packages sans les déclarer -dans le bon `pyproject.toml`. +The key deps (aioquic, watchdog, fastapi, blake3, etc.) are in the `pyproject.toml` files +and installed automatically. Do not add packages by hand without declaring them +in the right `pyproject.toml`. -> **L'extra `[dev]`, pas une liste à la main.** Cette ligne a longtemps été -> `pip install pytest pytest-asyncio aiosqlite`, ce qui contredisait la règle -> ci-dessus et coûtait trois choses invisibles. Sans `piexif`, -> `test_enrich_photo.py` échoue à l'import et **toute la suite du nœud s'arrête à -> la collecte**. Sans `pytest-timeout`, le `timeout = 60` du `pyproject.toml` est -> une option inconnue : la protection que son propre commentaire décrit — « un -> test bloqué ne doit pas coincer le run » — n'existe pas, et pytest ne le dit que -> dans un warning parmi d'autres. Sans `ruff`, le linter du projet n'est pas là. -> `aiosqlite` n'avait pas à être cité : c'est une dépendance de runtime du hub et -> du nœud, déjà installée par les `-e`. +> **The `[dev]` extra, not a hand-written list.** This line was long +> `pip install pytest pytest-asyncio aiosqlite`, which contradicted the rule +> above and cost three invisible things. Without `piexif`, +> `test_enrich_photo.py` fails at import and **the whole node suite stops at +> collection**. Without `pytest-timeout`, the `timeout = 60` in `pyproject.toml` is +> an unknown option: the protection its own comment describes — "a +> hung test must not jam the run" — does not exist, and pytest only says so +> in one warning among others. Without `ruff`, the project's linter is not there. +> `aiosqlite` did not need to be listed: it is a runtime dependency of the hub and +> the node, already installed by the `-e`. -> **Ne jamais copier `.venv/` entre machines d'OS différents.** Si rsync depuis Fedora vers Ubuntu, -> exclure `.venv/` et recréer sur la cible avec `python3 -m venv .venv --clear`. -> Sans `--clear`, `certifi.where()` pointe vers un chemin Fedora inexistant sur Ubuntu → `FileNotFoundError`. +> **Never copy `.venv/` between machines running different OSes.** If rsyncing from Fedora to Ubuntu, +> exclude `.venv/` and recreate it on the target with `python3 -m venv .venv --clear`. +> Without `--clear`, `certifi.where()` points to a Fedora path that does not exist on Ubuntu → `FileNotFoundError`. ```bash -# Lancer les tests +# Run the tests .venv/bin/pytest ``` |