|
Some checks are pending
CI / Lint bridge (Biome) (push) Waiting to run
CI / Type-check bridge (push) Blocked by required conditions
CI / Tests unit bridge (push) Blocked by required conditions
CI / Tests integration bridge (push) Blocked by required conditions
CI / Security scan (push) Waiting to run
CI / Docker build + healthcheck (push) Blocked by required conditions
I4 — Forms publics + space etudiant : - baserow/seed/seed_forms.py : cree forms publics sur attribution + intervention (saisie heures via lien sans compte). Form cree OK, field-options endpoint retourne 404 sur Baserow 1.30 — a investiguer (URL different selon version). - docmost/setup/create-space-etudiant.py : cree space prive + invite etudiant + page Welcome template. Slug strict lettres+chiffres only (fix Docmost). I5 — Ops : - scripts/healthcheck.sh : check UI + API health (Docmost+Baserow), affiche status containers Docker. 4/4 OK en local. - scripts/cron-install.sh : installe cron quotidien backup + healthcheck */5min. Makefile : targets seed-baserow-forms, create-space-etudiant. Tous les targets utilisent maintenant .venv/ local pour eviter pip systeme. .gitignore : exclut .venv/ + __pycache__/. |
||
|---|---|---|
| .. | ||
| README.md | ||
| requirements.txt | ||
| schema.json | ||
| seed.py | ||
| seed_forms.py | ||
Baserow seed
Cree les 9 tables formation-hub dans Baserow via l'API. Idempotent — skip ce qui existe.
Quickstart (4 etapes, ~5 min)
1. Creer le compte admin Baserow (premier boot — manuel UI)
Aller sur http://localhost:8080. La premiere page propose de creer un compte. Remplir :
- Workspace name :
Acadenice - Email :
admin@acadenice.fr(ou autre admin) - Password : password robuste (a sauvegarder dans pass/vault)
2. Pre-requis Python
cd baserow/seed
pip install -r requirements.txt
# OU si tu prefere : python -m venv .venv && source .venv/bin/activate && pip install -r requirements.txt
3. Run le seed
BASEROW_URL=http://localhost:8080 \
BASEROW_EMAIL=admin@acadenice.fr \
BASEROW_PASSWORD='ton-password' \
python baserow/seed/seed.py
Output attendu :
[1/5] Login http://localhost:8080
[auth] Logged in as admin@acadenice.fr
[2/5] Workspace 'Acadenice'
[workspace] Reuse 'Acadenice' id=1
[3/5] Database 'formation-hub'
[db] Created 'formation-hub' id=1
[4/5] Tables + primitive fields
[table] Created 'personne' id=1
[field] Created 'personne_prenom' (text)
...
[5/5] Link fields (2nd pass)
[link] Created bloc.bloc_formation -> formation
...
=== Seed OK ===
Workspace: Acadenice
Database : formation-hub
Tables : 9
Links : 10
4. Verifier dans l'UI
Ouvrir http://localhost:8080, naviguer dans le workspace Acadenice → database formation-hub → 9 tables doivent etre presentes avec leurs champs et liens.
Re-runnable
Le script est idempotent. Tu peux le relancer apres modifications du schema — il ne recree pas ce qui existe deja.
Pour reset complet : drop la database via l'UI Baserow, puis relancer.
Schema
schema.json decrit les 9 tables + 10 liens FK. Format JSON declaratif, modifiable.
Les formulas (rollups, heures_restantes, etc.) sont creees au pass 6/6. Le schema declaratif inclut 17 formulas dans schema.json (section formulas).
Si une formula echoue (syntaxe Baserow strict), le seed s'arrete et affiche l'erreur — corrige le schema.json et re-run.
Troubleshooting
| Symptome | Cause probable | Fix |
|---|---|---|
401 Unauthorized |
Mauvais email/password | Verifier BASEROW_EMAIL et BASEROW_PASSWORD |
400 Bad Request sur field |
Type non supporte version Baserow | Voir logs detail, ajuster _field_to_payload |
| Field deja existant | Idempotent OK | Aucune action |
| Tables creees mais vides | Normal — pas de seed data Phase 1 | Sera ajoute iteration 6 (migration data) |
References
- Baserow API doc : https://baserow.io/api-docs
- Doc 15 MPD (mapping fields → Baserow types) :
docs/15-baserow-mpd.md