Skip to content

Development and verification

Package Responsibility
src/omsbridge/accounts Accounts and client tokens
src/omsbridge/sessions Acquisition, leases, maintenance and session workers
src/omsbridge/trading Managed orders and broker translation
src/omsbridge/transport RPC handlers, stream hubs, wire conversion and contract generation
src/omsbridge/adapters Broker clients, CAPTCHA and SignalR
src/marketdata/runtime, service Supplier configuration, lifecycle and RPCs
src/marketdata/processing, storage Snapshots, pricing, schemas, cache and recording
src/marketdata/sources, simulation Direct OMS feeds and synthetic feeds
src/marketdata/jobs, logic Catalogue, calendar and instrument selection
src/generics Shared handwritten enums and normalized models
src/database Shared MongoDB and ClickHouse code

Versioned v1 packages own public clients and wire contracts. Generated Python protobuf types stay beside those contracts. Shared helpers live in src/utils.

Set PYTHONPATH=src, then run from the repository root:

Terminal window
uv run python -m tools.generate_proto --check
uv run python -m tools.generate_proto
uv run python -m tools.generate_marketdata_proto --check

The first command checks Bridge schema/stub parity; the second regenerates it. The Market Data generator checks its committed bindings and regenerates without --check. Preserve existing field numbers and meanings when evolving v1. Bridge schema definitions come from adapter signatures and contract-generation sources, rather than hand edits to generated .proto files.

The documentation build reads committed contracts and regenerates reference pages and downloadable copies. It does not regenerate application contracts or import the Python application.

Terminal window
uv run python -m unittest discover

Set OMSBRIDGE_TEST_MONGO_URI for MongoDB/gRPC integration tests with simulated brokers. Tests create and drop their own unique database.

The opt-in live suite runs authenticated gRPC through a local production Bridge and real MongoDB to broker HTTP/WebSocket APIs. Configure live-tests.example.toml, secrets and MongoDB, then use:

Terminal window
uv run --env-file .env python -m tools.run_live_tests

Live E2E exercises read-only broker operations and stream lifecycles. It always skips order submission, edit and cancellation. It does not verify HAProxy, TLS, deployment settings or nonempty responses for every broker method. Empty reports can pass; a skipped operation is not live-verified. See the root README for the full live-suite configuration and limits.

Terminal window
cd docs
bun install --frozen-lockfile
bun run build
bun run check
bun run preview

The build includes Pagefind search indexing. The check validates generated page links, fragments, assets and protobuf downloads. The Documentation CI workflow runs these checks and uploads the static site as an artifact.