Skip to content

Commit 6c201d7

Browse files
update readme development section
1 parent cb5f3ad commit 6c201d7

File tree

1 file changed

+38
-3
lines changed

1 file changed

+38
-3
lines changed

README.md

Lines changed: 38 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,47 @@ The documentation of betterproto is available online: https://betterproto.github
5252

5353
- Python (3.10 or higher)
5454

55-
- [poetry](https://python-poetry.org/docs/#installation)
56-
*Needed to install dependencies in a virtual environment*
55+
- [uv](https://docs.astral.sh/uv/getting-started/installation/)
56+
*Modern Python package and project manager*
5757

5858
- [poethepoet](https://github.com/nat-n/poethepoet) for running development tasks as defined in pyproject.toml
5959
- Can be installed to your host environment via `pip install poethepoet` then executed as simple `poe`
60-
- or run from the poetry venv as `poetry run poe`
60+
- or run from the uv environment as `uv run poe`
61+
62+
### Getting Started
63+
64+
This project uses a uv workspace with two packages:
65+
- `betterproto2` - The main library
66+
- `betterproto2_compiler` - The protoc plugin
67+
68+
```bash
69+
# Install dependencies and sync the workspace
70+
uv sync
71+
72+
# Build all packages
73+
uv build --all-packages
74+
75+
# Set up test outputs (required before running tests)
76+
# Note: This requires grpcio-tools to be installed
77+
cd betterproto2_compiler && uv run poe generate
78+
cd ../betterproto2 && uv run poe get-local-compiled-tests
79+
cd ..
80+
81+
# Run tests (after setting up test outputs)
82+
uv run poe test
83+
84+
# Format code using ruff directly
85+
uv run ruff format betterproto2/src betterproto2/tests betterproto2_compiler/src betterproto2_compiler/tests
86+
87+
# Check code using ruff directly
88+
uv run ruff check betterproto2/src betterproto2/tests betterproto2_compiler/src betterproto2_compiler/tests
89+
```
90+
91+
### Notes
92+
93+
- The `generate` task requires `grpcio-tools` to be available. If you encounter import errors when running tests, you may need to install additional dependencies or use pre-generated test outputs.
94+
- The workspace-level poe tasks (format, check) reference directories that don't exist at the workspace root, so use the direct ruff commands shown above.
95+
- Individual packages have their own specific tasks - check `uv run poe --help` from within each package directory for more options.
6196

6297
## License
6398

0 commit comments

Comments
 (0)