Development and Debugging Guide¶
This guide is for contributors who prefer Python-native workflows (python -m ...)
for development, testing, and debugging.
Setup¶
Use a virtual environment and editable install so code changes are picked up without reinstalling on every edit.
python -m venv .venv
# Windows PowerShell
.venv\Scripts\Activate.ps1
# Linux/macOS
# source .venv/bin/activate
python -m pip install --upgrade pip
python -m pip install -e .[dev]
If your shell does not support extras syntax, run:
CLI During Development¶
Installed CLI commands (end-user style):
Python module style (recommended while developing/debugging):
python -m multilingualprogramming repl
python -m multilingualprogramming run hello.ml --lang fr
python -m multilingualprogramming compile hello.ml
python -m multilingualprogramming smoke --all
Use module style when you want certainty about which Python interpreter and environment are executing the code.
Targeted Tests¶
Run all tests:
Run one test file:
Run a focused subset:
Show print output during debugging:
Lint and Basic Quality Checks¶
On Windows PowerShell, if command substitution is unavailable in your shell:
Build Docs Locally¶
Stage root markdown files into docs/ and run a strict MkDocs build:
Debugging Tips¶
Debug CLI path with Python module execution:
Debug parser/codegen behavior quickly:
Use temporary breakpoints in code:
Then run the exact module path you are testing:
Packaging Sanity Check¶
After entry-point changes in pyproject.toml, reinstall editable package:
Then verify commands: