aboutsummaryrefslogtreecommitdiffstats
path: root/CLAUDE.md
diff options
context:
space:
mode:
authorChristophe Besson <cbesson@gmail.com>2026-09-17 13:50:35 +0200
committerChristophe Besson <cbesson@gmail.com>2026-09-17 13:50:35 +0200
commit3ef083fa750e21e252180585d1477990015cacee (patch)
treea2f1a8bc7cfe6a2bb58db231532cd3480848928d /CLAUDE.md
parent36401ac2038c03c78f6f5bfea90d05f7493ccd0c (diff)
downloadmeshbay-3ef083fa750e21e252180585d1477990015cacee.tar.gz
docs: install the [dev] extras, not a hand-written list
The documented setup was `pip install pytest pytest-asyncio aiosqlite`, three lines under a rule saying not to install packages that are not declared in a pyproject.toml. All three packages declare a `dev` extra, and the hand-written list missed what was in it. It cost three invisible things. Without `piexif`, `test_enrich_photo.py` fails at import and the whole node suite stops at collection — not one test, the run. Without `pytest-timeout`, `timeout = 60` in pyproject.toml is an unknown config option, so the protection its own comment describes ("a hung test must not wedge the run") was absent, announced only in a warning among the deprecation notices. Without `ruff`, the project's linter is not installed. `aiosqlite` never needed naming: it is a runtime dependency of the hub and the node and arrives with the `-e` installs. Verified with the corrected line: 2804 tests collected, 2800 passed, 4 skipped, and no unknown-option warning — nothing exceeds the timeout that is now actually enforced. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UGY17EPph5LsLzePPXhUVc
Diffstat (limited to 'CLAUDE.md')
-rw-r--r--CLAUDE.md15
1 files changed, 13 insertions, 2 deletions
diff --git a/CLAUDE.md b/CLAUDE.md
index 384e86a..e576326 100644
--- a/CLAUDE.md
+++ b/CLAUDE.md
@@ -45,14 +45,25 @@ 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
-pip install -e packages/meshbay-common -e packages/meshbay-hub -e packages/meshbay-node
-pip install pytest pytest-asyncio aiosqlite # extras dev
+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`.
+> **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`.
+
> **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`.