0d5a9392bf
Comando poblar y opción --sin-poblar; servicios poblar* bajo el perfil hospital; hospital.yml y despliegue.yml como paso 1 y paso 2. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
3.0 KiB
3.0 KiB
What this repository is for
Simulated data for ISSSTELEON, written through Persistance, so the
indicators of indicadores_kit and the routes of WebApi can be tested
end to end without real data. It lives at ISSSTELEON/dev-data and
depends on ../Core, ../Persistance and ../indicadores_kit by path.
Nothing here is real patient data, and nothing here ships to production.
Commands
uv sync- install dependenciesuv run --python 3.12 pytest- the whole suite (3.12 is what CI runs)uv run --python 3.12 pytest tests/test_azar.py- one test fileuv run python -m dev_data tea --referencia 2026-01-01 --base sqlite:////path/tea.db- migrate, seed and calculate a TEA database (cacuandcamawork the same way); with--hospital <url>the rows go through a simulated hospital database firstuv run python -m dev_data poblar tea --referencia 2026-01-01 --hospital <url>- only generate and write into the hospital;--sin-poblaron the project command then seeds from it without ever writing to itmontura/poblar.shthenmontura/alimentar.sh- the test stack in two steps: MySQL as the hospital on 127.0.0.1:9505 with the generated data, then the SQLite databases seeded from it, WebApi on 9503 and WebApp on 9504, checked over HTTP.docker compose --profile hospital -f compose.prueba.yml down -vremoves it and its data. Never touch other compose projects on the server.gitea/workflows/montura.ymlruns both steps in the runner and tears everything down;hospital.yml(step 1) anddespliegue.yml(step 2) update the standing stack (dev-data-prueba) and leave it up. All three are manual- Tests need
../WebApiand../modelspresent (ISSSTELEON submodules) HOSPITAL_URL=mysql+pymysql://hospital:hospital@127.0.0.1:9505/hospital uv run --python 3.12 pytest tests/test_hospital_mysql.py- the hospital against the stack's MySQL (skipped without the variable; it drops the hospital tables)
Layout
hospital.py,repositorio.py,ingesta.py,montar.py,__main__.pyandproyecto.pyare generic and never name a project. What belongs to one project lives in its package (dev_data/tea/) and enters through aProyecto, registered inproyectos.py. A new project (cacu,cama) is a new package plus one line there
Rules
- Dependencies are added in
pyproject.toml. Do not add one without asking ../Core,../Persistance,../indicadores_kit,../WebApiand../WebAppare read-only from here- No
date.today(), no unseeded randomness: every generator takes anAzar(seed and reference date) - No push without the user's go-ahead
Documents
_docs/process.md- how work is organized_docs/tareas.md- the tasks, with their state_docs/hallazgos.md- what went wrong or surprised,I-D<n>_docs/supuestos.md- what was decided without asking,S-D<n>_docs/grooming.md- proposals that came up inside a task and are not solved in it,G-D<n>- Before writing tests, read
_docs/testing-guidelines.md