This repository contains the MVP architecture and starter scaffolding for To_Exercises: a small service to import canonical LaTeX exercise files, store metadata, and generate PDFs.
Este repositório contém a arquitectura MVP e o esqueleto inicial para To_Exercises: um serviço pequeno para importar ficheiros LaTeX canónicos, guardar metadados e gerar PDFs.
Windows
- python -m venv .venv
- .venv\Scripts\activate
- pip install -e .[dev]
- pytest
- uvicorn to_exercises.main:app --reload
Windows (CMD):
- python -m venv .venv
- .venv\Scripts\activate.bat
- pip install -e .[dev]
- pytest
- uvicorn to_exercises.main:app --reload
Unix / macOS
- python -m venv .venv
- source .venv/bin/activate
- pip install -e .[dev]
- pytest
- uvicorn to_exercises.main:app --reload
-
Importer dry-run (scan a folder, produce JSON report):
- python -m to_exercises.importer dry-run path/to/ExerciseDatabase
-
Generator (placeholder):
- python -m to_exercises.generator generate "1 2 3"
Notes
- The generator requires a TeX toolchain to produce PDFs. CI will not run LaTeX by default; enable with RUN_LATEX=true if you provide a runner with TeX installed.
- Tests use in-memory SQLite for determinism; ensure you install dev dependencies (pytest, httpx).
Windows (PowerShell)
- python -m venv .venv
- .venv\Scripts\Activate.ps1
- pip install -e .[dev]
- pytest
- uvicorn to_exercises.main:app --reload
Unix / macOS (bash/zsh)
- python -m venv .venv
- source .venv/bin/activate
- pip install -e .[dev]
- pytest
- uvicorn to_exercises.main:app --reload
Continuous Integration (GitHub Actions)
- The CI workflow installs the package editable in the test step:
- pip install -e .[dev]
- pytest