Setup¶
git clone https://github.com/QuantEcon/benchmark.translate-zh-cn.git
cd benchmark.translate-zh-cn
uv sync --extra devRunning Tests¶
uv run pytest tests/ -vAll tests should pass before submitting a PR.
Code Style¶
We use ruff for linting and formatting:
uv run ruff check src/ tests/
uv run ruff format src/ tests/Project Structure¶
src/qebench/— main package codetests/— pytest testsdata/— benchmark dataset (JSON files)results/— output data (translation attempts, XP, Elo)docs/— documentation
See Architecture for the full module map.
Adding a New Command¶
Create
src/qebench/commands/yourcommand.pywith a functionRegister it in
src/qebench/cli.pyviaapp.command()Add tests in
tests/test_yourcommand.pyDocument in
docs/user/cli-reference.md
Adding Data Entries¶
Use qebench add for interactive entry creation. For bulk imports, write a
script in scripts/ following the pattern in scripts/seed_from_glossary.py.
Branch Workflow¶
Work on a feature branch
Open a PR against
mainAll tests must pass
Get review from a team member