Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ Quick start:
```bash
git clone https://github.com/reflex-dev/xy.git
cd xy
uv venv && uv pip install -e ".[dev]"
make setup # dev environment + native core (needs Rust)
make check # fast gate
make check-full # full production gate (needs Rust + Node 18+)
make check-full # full production gate (also needs Node 18+ and clippy)
```

## Check the active backend
Expand Down
3 changes: 2 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ help:
@printf '%s\n' \
'xy developer shortcuts' \
'' \
' make setup create .venv and install .[dev]' \
' make setup create .venv, install .[dev], and build the native core' \
' make setup-browser install the pinned Playwright browser-test driver' \
' make check run the fast local verification gate' \
' make check-full run JS, Rust, and ABI gates too' \
Expand Down Expand Up @@ -46,6 +46,7 @@ help:
setup:
uv venv
uv pip install -e ".[dev]"
cargo build --release

setup-browser:
npm install
Expand Down
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -213,8 +213,7 @@ Engineering references:
## Development

```bash
uv venv
uv pip install -e ".[dev]"
make setup # installs .[dev] and builds the required native core
make check
```

Expand Down
9 changes: 5 additions & 4 deletions docs/api-reference/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,13 +15,14 @@ the engineering version contains the complete release and browser checklists.
~~~bash
git clone https://github.com/reflex-dev/xy.git
cd xy
uv venv
uv pip install -e ".[dev]"
make setup
make check
~~~

Source development needs Python 3.11+, a Rust toolchain for the native core,
and Node 18+ for bundle checks. Confirm the active compute backend explicitly:
`make setup` installs the editable development package and builds the required
native core. Source development needs Python 3.11+, a Rust toolchain for that
core, and Node 18+ for bundle checks. Confirm the active compute backend
explicitly:

~~~bash
python -c "import xy.kernels as k; print(k.BACKEND)"
Expand Down
9 changes: 6 additions & 3 deletions docs/engineering/contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,16 @@ the hard-won production invariants while the chart surface grows.

## Local Checks

Install the dev environment:
Install the dev environment and build the required native core:

```bash
uv venv
uv pip install -e ".[dev]"
make setup
```

`make setup` requires a Rust toolchain because it runs `cargo build --release`
after installing the editable Python package. This leaves the checkout ready
to import `xy.kernels` and run the fast gate.

Run the fast local gate:

```bash
Expand Down
18 changes: 18 additions & 0 deletions tests/test_verify_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -470,6 +470,24 @@ def test_makefile_exposes_sdist_verification_shortcut() -> None:
assert "make check-sdist" in makefile


def test_contributor_setup_builds_native_core_and_docs_use_it() -> None:
makefile = (ROOT / "Makefile").read_text(encoding="utf-8")
setup_recipe = makefile.split("setup:\n", 1)[1].split("\n\n", 1)[0]

assert "uv venv" in setup_recipe
assert 'uv pip install -e ".[dev]"' in setup_recipe
assert "cargo build --release" in setup_recipe

contributor_docs = (
(ROOT / "CONTRIBUTING.md").read_text(encoding="utf-8"),
(ENGINEERING_DOCS / "contributing.md").read_text(encoding="utf-8"),
(ROOT / "README.md").read_text(encoding="utf-8"),
(ROOT / "docs" / "api-reference" / "contributing.md").read_text(encoding="utf-8"),
)
for text in contributor_docs:
assert "make setup" in text


def test_makefile_exposes_wheel_verification_shortcut() -> None:
makefile = (ROOT / "Makefile").read_text(encoding="utf-8")

Expand Down
Loading