@@ -13,7 +13,7 @@ Do not be afraid to ask questions and share new ideas about possible directions
1313
1414## Contributing to the codebase
1515
16- Contributing code is done through standard github methods:
16+ We use uv for dependency management and virtual environments. Contributing code is done through standard github methods:
1717
18181 . Fork this repo
19192 . Make a change and commit your code
@@ -22,8 +22,22 @@ Contributing code is done through standard github methods:
2222``` commandline
2323git clone [email protected] :corl-team/xland-minigrid.git 2424cd xland-minigrid
25- pip install -e ".[dev]"
25+
26+ # Create and sync the development environment
27+ uv venv
28+ uv sync --extra dev --extra baselines
29+ ```
30+
31+ Add new dependencies using:
32+
2633```
34+ uv add <package>
35+
36+ # development-only dependencies
37+ uv add <package> --group dev
38+ ```
39+
40+ Do not use pip install for project dependencies, as it bypasses the lockfile and may cause inconsistent environments.
2741
2842## Code style
2943
@@ -32,17 +46,17 @@ The CI will run several checks on the new code pushed to the repository.
3246These checks can also be run locally without waiting for the CI by following the steps below:
3347
34481 . install [ pre-commit] ( https://pre-commit.com/#install )
35- 2 . install the Git hooks by running ` pre-commit install `
49+ 2 . install the Git hooks by running ` uv run pre-commit install`
3650
3751Once those two steps are done, the Git hooks will be run automatically at
3852every new commit. The Git hooks can also be run manually with
39- ` pre-commit run --all-files ` , and if needed they can be
53+ ` uv run pre-commit run` , and if needed they can be
4054skipped (not recommended) with ` git commit --no-verify ` .
4155
42- Be sure to run and fix all issues from the ` pre-commit run --all-files ` before the push!
43- If you want to see possible problems before pre-commit, you can run ` ruff check --diff . `
44- and ` ruff format --check ` to see exact linter and formatter suggestions and possible fixes.
45- Similarly, run ` pyright src/xminigrid ` to see possible problems with type hints.
56+ Be sure to run and fix all issues from the ` uv run pre-commit run --all-files` before the push!
57+ If you want to see possible problems before pre-commit, you can run ` uv run ruff check --diff .`
58+ and ` uv run ruff format --check` to see exact linter and formatter suggestions and possible fixes.
59+ Similarly, run ` uv run pyright src/xminigrid` to see possible problems with type hints.
4660
4761# License
4862
0 commit comments