Metadata-Version: 2.4
Name: w3d
Version: 0.0.1
Summary: DDD python library
Requires-Python: >=3.14
Requires-Dist: pydantic>=2
Requires-Dist: python-ulid>=3.1.0
Description-Content-Type: text/markdown

# w3d

`w3d` is Python library that provides **generic DDD**.

## Requirements

- **Python 3.14+**
- [uv](https://docs.astral.sh/uv/) for dependency and environment management

## Installation

Clone the repository and sync the environment with uv:

```bash
git clone <repo-url> w3d
cd w3d
uv sync
```

This creates a virtual environment and installs both runtime (`pydantic`) and dev dependencies from `uv.lock`.

To add `w3d` to another project, install it from its source path (until it is published):

```bash
uv add /path/to/w3d
```

## Usage

See [docs/usage.md](docs/usage.md) for a worked example.

## Development

This project uses **uv** for everything; always run tools through it so they use the project venv.

| Task       | Command              |
| ---------- | -------------------- |
| Run tests  | `uv run pytest`      |
| Lint       | `uv run ruff check`  |
| Format     | `uv run ruff format` |
| Type check | `uv run ty check`    |
| Sync env   | `uv sync`            |

Type checking uses [ty](https://github.com/astral-sh/ty) (Astral's type checker), not mypy.

Before committing, run all checks in one pass:

```bash
./before_commit.zsh
```

It runs (fail-fast) `ruff format` (reformats in place), `ruff check`, `ty check`, then `pytest` with a 100% coverage gate, listing any files below 100%.

## Project layout

```
w3d/            # the library (command.py, result.py)
tests/          # behavioral tests
docs/adr/       # architecture decision records
CONTEXT.md      # ubiquitous language / domain glossary
```
