Hi - I answer from the OpenSmartRoute documentation: routing, the API, plans and quotas, self-hosting. Ask away, or open a support ticket if you need a person.
Grounded in the docs - follow a source before acting on it.
tests - Skill - OpenSmartRoute
Skillv1.0.0
tests
Running tests Run tests via ``` docker compose up -d test-db docker compose run app pytest ... ```
Instruction file imported from doc-sheet/seer (.cursor/rules/tests.mdc). Copyright stays with the author.
Running tests
Run tests via
docker compose up -d test-db
docker compose run app pytest ...
Writing tests
ALWAYS make sure you're actually writing some meaningful test that tests the actual functionality of the application, not testing a mock you wrote or logging.
Avoid testing logs, for example with caplog, because it makes the test flaky.
Database Use
We have a test db that can be brought up via docker compose up -d test-db that can and should be used in tests, so we don't have to mock db reads and writes.
Use it
Copy one of these into your project. Installing also returns the manifest and these snippets.
# after Install: the listing is in your workspace's routing pool - a plan picks it for its slot
curl -s -X POST https://api.opensmartroute.ai/api/v1/route -H 'Authorization: Bearer $OSR_API_KEY' -H 'Content-Type: application/json' -d '{"text": "...", "plan": true}'
Manifest
An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.
doc-sheet-seer-tests-rule.ocm.jsonjson
{
"ocm": "1",
"id": "doc-sheet-seer-tests-rule",
"kind": "skill",
"name": "tests",
"description": "Running tests Run tests via ``` docker compose up -d test-db docker compose run app pytest ... ```",
"publisher": "doc-sheet",
"version": "1.0.0",
"capabilities": {
"domains": [
"coding",
"observability"
],
"tags": [
"skill-md",
"github-cursor-rules"
],
"languages": [
"en"
]
},
"quality_prior": 0.6,
"examples": [
"Running tests Run tests via ``` docker compose up -d test-db docker compose run app pytest ... ```"
],
"primary": false,
"metadata": {
"source": {
"provider": "github-cursor-rules",
"repository": "https://github.com/doc-sheet/seer",
"path": ".cursor/rules/tests.mdc",
"ref": "b070c782e495159bfb4b4f6529a9ea5224e9a22e",
"url": "https://github.com/doc-sheet/seer/blob/b070c782e495159bfb4b4f6529a9ea5224e9a22e/.cursor/rules/tests.mdc",
"key": "doc-sheet/seer/.cursor/rules/tests.mdc"
}
},
"instructions": "## Running tests\nRun tests via\n```\ndocker compose up -d test-db\ndocker compose run app pytest ...\n```\n\n## Writing tests\n\n- ALWAYS make sure you're actually writing some meaningful test that tests the actual functionality of the application, not testing a mock you wrote or logging.\n- Avoid testing logs, for example with `caplog`, because it makes the test flaky.\n\n### Database Use\nWe have a test db that can be brought up via `docker compose up -d test-db` that can and should be used in tests, so we don't have to mock db reads and writes.",
"cost": {
"context_tokens": 135
}
}
Fetch it by URL: GET /api/v1/registry/doc-sheet-seer-tests-rule/manifest?version=1.0.0
Reviews
Star ratings from people who tried it. One review per account; edit yours any time.
No reviews yet. Install it, try it, and be the first to rate it.