Skip to content

docs: add "Wiring pyrer into rez" integration guide#76

Merged
doubleailes merged 1 commit into
mainfrom
docs-rez-integration
May 15, 2026
Merged

docs: add "Wiring pyrer into rez" integration guide#76
doubleailes merged 1 commit into
mainfrom
docs-rez-integration

Conversation

@doubleailes
Copy link
Copy Markdown
Owner

Summary

`pyrer` is the solver hotpath only — `rez` still owns discovery, env build, the `ResolvedContext` lifecycle. The README has the basic `pyrer.solve` API but doesn't say how to actually slot it behind a normal `rez env` flow. This PR fills that gap.

What's in the new docs page

`docs/content/docs/getting-started/rez-integration.md`:

  • The integration model: what pyrer is and isn't, with an ASCII pipeline diagram showing where rez stays and where pyrer takes over.
  • `build_pyrer_repo(package_paths)`: walks `rez.packages.iter_package_families` and produces the JSON shape `pyrer.solve` expects. ~15 lines.
  • Solving: calling `pyrer.solve` with the result shape and the three `status` values.
  • Result translation back to rez: how to turn `(name, version, variant_index)` tuples into rez `Variant` objects via `rez.packages.get_package(name, version).get_variant(idx)`.
  • A complete monkey-patch shim: minimum-viable replacement of `rez.resolver.Resolver._solve` that delegates to pyrer on the happy path and falls back to rez's own solver for any non-default config (custom orderer, filters, late-binding requires). Drop-in via `sitecustomize.py` or `plugin_path`.
  • Caveats: explicit list of what pyrer does not model yet — `VariantSelectMode::intersection_priority` (Solver: implement VariantSelectMode::intersection_priority #63), `@early` / `@late` requires, custom `PackageOrder` / `PackageFilter`, variant-index parity in the differential.
  • A sanity-check loop for diffing pyrer vs rez on the user's own repo.
  • Note on running many resolves against the same repo: build the dict once, plus pointer to pyrer's shared variant cache (perf(resolver): allow sharing the variant cache across solves #66).

Other changes

  • Link the new page from the introduction's "Next steps" list.
  • Compressed reference block in the README's "Using it from Python" section — the same three-step walk → solve → translate, with a link to the full docs page.

Verification

  • `zola build` — 16 pages, 8 sections, no warnings.
  • `zola check` — no broken links.

🤖 Generated with Claude Code

`pyrer` is the solver hotpath only — rez still owns discovery, env
build, the context lifecycle. The README has the `pyrer.solve` API
but doesn't say how to actually slot it behind a normal `rez env`
flow. Filling that gap.

New Zola page under getting-started:

- The integration model (what pyrer is / isn't), with an ASCII
  pipeline diagram showing where rez stays and where pyrer takes over.
- `build_pyrer_repo(package_paths)` — walks `iter_package_families`
  and produces the JSON shape `pyrer.solve` expects.
- Result translation back to rez `Variant` objects via
  `rez.packages.get_package(name, version).get_variant(idx)`.
- A minimum-viable monkey-patch of `rez.resolver.Resolver._solve`
  that delegates to pyrer on the happy path and falls back to rez's
  own solver for any non-default config (custom orderer, filters,
  late-binding requires).
- Caveats section explicitly listing what pyrer does *not* model
  yet: `VariantSelectMode::intersection_priority` (issue #63),
  `@early` / `@late` requires, custom `PackageOrder` / `PackageFilter`,
  variant-index parity in the differential.
- A sanity-check loop for diffing pyrer vs rez on your own repo.
- A note on running many resolves against the same repo: build the
  dict once, plus pointer to `pyrer`'s shared variant cache.

Also:

- Link the new page from the introduction's "Next steps" list so it's
  discoverable from the docs front page.
- Add a compressed reference block in the README's "Using it from
  Python" section (the same three steps: walk → solve → translate),
  with a pointer to the full docs page.

zola build / zola check both clean; 16 pages (was 15).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@qodo-code-review
Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@doubleailes doubleailes merged commit 89090b0 into main May 15, 2026
22 checks passed
@doubleailes doubleailes deleted the docs-rez-integration branch May 15, 2026 18:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant