Skip to content

Conversation

@cobycloud
Copy link
Contributor

Motivation

  • Provide a simpler functional API for mounting the OpenRPC spec so callers can pass only the app/api instance and omit the router argument.
  • Offer convenience instance methods on both TigrblApp and TigrblApi for mounting OpenRPC and Lens endpoints to improve ergonomics and parity with mount_jsonrpc.
  • Update integration tests to cover the new usage patterns and ensure both functional and bound forms behave identically.

Description

  • Changed mount_openrpc in tigrbl/system/docs/openrpc.py to accept router: Any | None = None and to default the target router to the provided api when router is not supplied, returning the target router.
  • Added mount_openrpc(...) and mount_lens(...) instance methods to TigrblApp (tigrbl/app/tigrbl_app.py) that delegate to the module-level mount functions.
  • Added the same mount_openrpc(...) and mount_lens(...) instance methods to TigrblApi (tigrbl/api/tigrbl_api.py) that delegate to the module-level mount functions.
  • Updated integration tests in tigrbl_tests to use the simplified functional API (mount_openrpc(app, path=...)) and added new tests exercising the bound instance methods for both TigrblApp and TigrblApi for mount_openrpc and mount_lens.

Testing

  • Ran formatting and linting for the changed packages with uv run --directory standards --package tigrbl ruff format . and uv run --directory standards --package tigrbl ruff check . --fix, and for the tests package with uv run --directory standards --package tigrbl-tests ruff format . and uv run --directory standards --package tigrbl-tests ruff check . --fix; all checks passed.
  • Executed the updated integration tests directly with uv run --package tigrbl-tests --directory standards pytest tigrbl_tests/tests/i9n/test_mountable_openrpc_uvicorn.py tigrbl_tests/tests/i9n/test_mountable_lens_uvicorn.py and they passed.
  • Ran the full tigrbl_tests suite with uv run --package tigrbl-tests --directory standards pytest tigrbl_tests/tests and observed successful results: 934 passed, 14 skipped, 4 xfailed.

Codex Task

@cobycloud cobycloud merged commit c395e3b into master Feb 12, 2026
5 checks passed
@cobycloud cobycloud deleted the bbdx/update-tigrbl-app-mounting-methods/2026-02-12 branch February 12, 2026 14:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant