diff --git a/python/README.md b/python/README.md new file mode 100644 index 0000000..0836e4f --- /dev/null +++ b/python/README.md @@ -0,0 +1,24 @@ +# Show, Don't Tell — Python exercise workspace + +Python track for the "Show, Don't Tell — Using Examples with Coding Agents" exercise (Python 3.13 / uv / pytest). + +## Prerequisites + +- Python 3.13 and [uv](https://docs.astral.sh/uv/), versions pinned in `mise.toml` +- If you use [mise](https://mise.jdx.dev): `mise install` installs both + +## Set up and run the tests + +```sh +uv sync +uv run pytest +``` + +## Layout + +| Directory | Contents | +| --- | --- | +| `src/order_domain`, `tests/order_tests` | Order domain with discount behaviour, and its tests (Round 1) | +| `src/order_book_domain`, `tests/order_book_tests` | OrderBook state machine, and its integration tests (Round 2) | + +The exercise starts in its START state: all tests are green, the refactoring participants should do is NOT applied. The custom matcher example lives in `tests/order_tests` (`order_state.py`). diff --git a/python/mise.toml b/python/mise.toml new file mode 100644 index 0000000..509612f --- /dev/null +++ b/python/mise.toml @@ -0,0 +1,3 @@ +[tools] +python = "3.13.16" +uv = "0.12.21" diff --git a/python/pyproject.toml b/python/pyproject.toml new file mode 100644 index 0000000..8e8bce8 --- /dev/null +++ b/python/pyproject.toml @@ -0,0 +1,11 @@ +[project] +name = "showdonttell" +version = "0.1.0" +requires-python = ">=3.13" + +[dependency-groups] +dev = ["pytest>=8"] + +[tool.pytest.ini_options] +pythonpath = ["src"] +testpaths = ["tests"] diff --git a/python/src/order_book_domain/__init__.py b/python/src/order_book_domain/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/python/src/order_domain/__init__.py b/python/src/order_domain/__init__.py new file mode 100644 index 0000000..e69de29