Testing#
Every test suite runs offline by default. No test contacts a live service, a model provider or a production host. Fixtures that need infrastructure are opt-in and skip when absent, and a required check that was skipped is not a pass.
Run a component’s suite#
ci/validate.sh runs the offline checks of one component. From the repository root,
after setting up its environment (Development environment):
Target |
Runs |
|---|---|
|
Ruff, the server and parts’ pytest suites, the OpenAPI byte check, split and snapshot checks, and wheel builds |
|
The skills’ tests, contract checks and script smokes, including the maritime and template skills |
|
The NeMo agents’ lint, release trees, archives and tests |
|
The Sentinel ingest pipeline’s lint, tests and wheel |
|
The typed client’s tests |
|
The console’s schema check, type check and unit tests |
|
|
|
The strict documentation build |
For focused work, run pytest directly:
python -m pytest packs/nemotron/tests
python -m pytest knowledge/tests -k collection_layer
ruff check core knowledge tools packs
The root pyproject.toml lists every test folder, and conftest.py applies shared fixtures.
Tests live in each part’s tests/ folder and scripts in its scripts/.
Verify a checkout#
uv sync --locked --all-packages --extra dev
.venv/bin/ruff check core knowledge tools packs \
reference/application/monitoring \
reference/orchestration/agent-service \
deploy contracts/client/src contracts/tools ci
.venv/bin/pytest
.venv/bin/geonemo-services openapi \
--output /tmp/geonemo-openapi.json
Then validate the composition as shown in Compose files.
Root tests#
The repository-level checks in tests/ run without the server installed:
python3 -m unittest discover -s tests
They cover the contract files, the parts lists, the rendered pipelines, packaging, import
rules and the documentation site. A root test, and the ci/ code it imports, must not
import geonemo; skip server-only cases instead.
Optional integration fixtures#
These need a disposable fixture you provide. Without the variable, the test skips.
Variable |
Enables |
|---|---|
|
The agent service’s PostgreSQL tests, against a disposable local socket |
|
The directory the socket must be under |
|
The NeMo Platform SDK contract tests against a disposable Platform |
|
Scripts that qualify against an already running development API |
|
Checkouts the workflow tests read; |
Do not point these at a shared or production service.
Expectations for new tests#
Test behavior with synthetic fixtures. Keep binary fixtures and model weights out of the repository.
Use the typed client’s fakes (
geonemo.client.fakes) for code that calls the API.Update a feature’s fixtures in the same change as the feature. Keep exact inventories only for versioned contracts.
GPU, model-accuracy and live-service checks are separate, explicitly authorized runs.