One-page reference for essential commands and workflows
New to the template? Start with Getting Started Guide | FAQ
# Clone template
git clone https://github.com/docxology/template.git
# Install dependencies
uv sync
# Run build
uv run python scripts/execute_pipeline.py --project {name} --core-only# Run tests only
pytest projects/code_project/tests/ --cov=projects.code_project.src --cov-report=html
# Generate figures only
uv run python scripts/02_run_analysis.py --project code_project
# Validate markdown
uv run python -m infrastructure.validation.cli markdown projects/code_project/manuscript/
# Open manuscript
open output/code_project/pdf/code_project_combined.pdf # Top-level output (example project)# pipeline execution
uv run python scripts/execute_pipeline.py --project {name} --core-only
# With specific stage
uv run python scripts/00_setup_environment.py --project code_project
uv run python scripts/01_run_tests.py --project code_project
uv run python scripts/02_run_analysis.py --project code_project
uv run python scripts/03_render_pdf.py --project code_project
uv run python scripts/04_validate_output.py --project code_project
# Validate PDFs (after copy stage or use project working tree)
uv run python -m infrastructure.validation.cli pdf output/code_project/pdf/code_project_combined.pdftemplate/
├── infrastructure/ # Reusable infrastructure (Layer 1)
├── scripts/ # Root pipeline orchestrators
├── tests/ # Infrastructure test suite
├── projects/ # Multiple independent research projects
│ └── code_project/
│ ├── src/ # Core business logic (Layer 2)
│ ├── tests/ # Project-specific test suite
│ ├── manuscript/ # Research sections & config.yaml
│ └── scripts/ # Thin orchestrators for data/figures
└── output/ # Final generated deliverables
# 1. Create markdown file
vim projects/code_project/manuscript/07_new_section.md
# 2. Add content with section label
echo "# New Section {#sec:new_section}" > projects/code_project/manuscript/07_new_section.md
# 3. Rebuild
uv run python scripts/execute_pipeline.py --project {name} --core-only# 1. Create script in project's scripts/ directory
vim projects/code_project/scripts/my_figure.py
# 2. Import from src/ (thin orchestrator pattern)
# from projects.code_project.src.example import calculate_average
# 3. Generate and save to output/figures/
# 4. Reference in manuscript:
# \includegraphics{../output/figures/my_figure.png}# 1. Create module
vim projects/code_project/src/my_module.py
# 2. Create tests (90% minimum coverage required)
vim projects/code_project/tests/test_my_module.py
# 3. Run tests
pytest projects/code_project/tests/test_my_module.py --cov=projects.code_project.src.my_module
# 4. Use in scripts (thin orchestrator pattern)
# from projects.code_project.src.my_module import my_function# 1. Check coverage
pytest projects/code_project/tests/ --cov=projects.code_project.src --cov-report=term-missing
# 2. Find missing lines (marked with ">>>>>")
# 3. Add tests for uncovered code
# 4. Re-run until 100%# Section reference
See Section \ref{sec:methodology}
# Equation reference
From Equation \eqref{eq:objective}
# Figure reference
Figure \ref{fig:convergence_plot} shows...\begin{equation}\label{eq:my_equation}
f(x) = x^2 + 2x + 1
\end{equation}
Reference it: \eqref{eq:my_equation}\begin{figure}[h]
\centering
\includegraphics[width=0.8\textwidth]{../output/figures/my_figure.png}
\caption{My figure caption}
\label{fig:my_figure}
\end{figure}
Reference it: \ref{fig:my_figure}| Problem | Quick Fix |
|---|---|
| Tests fail | pytest projects/code_project/tests/ -v to see details |
| Coverage < 100% | pytest --cov=projects.code_project.src --cov-report=term-missing |
| Import errors | Check PYTHONPATH or use uv run |
| PDF fails | Check pandoc --version and xelatex --version |
| Figures missing | Run uv run python scripts/02_run_analysis.py --project code_project first |
| References show ?? | Check label spelling and existence |
| Project not discovered | Ensure manuscript/config.yaml exists |
| Stage 4 fails silently | Check root pyproject.toml has project deps (details) |
| Config warnings | Nest custom keys under project_config: |
Current System Status (verify locally):
- Tests:
uv run pytest tests/infra_tests/ projects/<name>/tests/(thresholds inpyproject.toml) - Coverage: 90% minimum project
src/, 60% minimuminfrastructure/(enforced by pytest) - Build time: measure with
/usr/bin/timeon your project; depends on manuscript size and machine - Documentation: see documentation-index.md
See Pipeline Orchestration for details
I want to...
- Just write documents → Getting Started Guide
- Add figures → Figures and Analysis
- Write tests → Testing and Reproducibility
- Understand architecture → Architecture
- Contribute → Contributing
- Fix a problem → FAQ
- Guide - All 12 skill levels
- Common Workflows - Step-by-step recipes
- FAQ - Common questions
- Glossary - Terms and definitions
- Documentation Index - All docs
- Always run tests first:
pytest projects/code_project/tests/before building - Use thin orchestrator pattern: Scripts import from
projects/{name}/src/ - Coverage requirements: 90% minimum for project code, 60% for infrastructure
- Run pipeline:
uv run python scripts/execute_pipeline.py --project {name} --core-onlyexecutes all stages - Pipeline stages: Core
--core-onlyrun is eight stages by default (clean through copy); see RUN_GUIDE.md - Read build logs: Check
projects/{name}/output/logs/pipeline.logfor errors - Individual stages: Run
uv run python scripts/0X_stage_name.py --project {name}for specific stages - CI/CD friendly: Pipeline scripts support automated builds
Need more details? See Documentation Index
System Status: ✅ All operational | Pipeline Orchestration