diff options
| -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 ``` |