You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- This is a deprecated compatibility shim area and should not grow.
137
+
- Flag any PR that adds new files under this path as a blocking issue.
138
+
- New evaluation code should be added under `packages/nvidia_nat_eval/src/nat/plugins/eval/` instead.
139
+
- Changes in this path should be limited to compatibility-only fixes that are explicitly justified in PR notes.
140
+
134
141
- path: "packages/**/*"
135
142
instructions: >-
136
143
- This directory contains packages for the toolkit, each should contain a `pyproject.toml` file.
@@ -145,17 +152,31 @@ reviews:
145
152
- `nvidia-nat-test` should likely be listed as an optional dependency in the `test` extra
146
153
- A single dependency should be listed on each line and should always have a version specifier.
147
154
- All dependencies should be listed under the `[tool.setuptools_dynamic_dependencies]` section
148
-
- Any dependency that is an NVIDIA NeMo Agent Toolkit package should be declared with a version constraint of `== {version}`
155
+
- Any dependency that is an NVIDIA NeMo Agent Toolkit package should be declared with a version constraint of `== {version}`
156
+
157
+
- path: "packages/nvidia_nat_core/pyproject.toml"
158
+
instructions: >-
159
+
- This package is part of the thin-core strategy; default to minimizing direct dependencies.
160
+
- Treat any new dependency addition as high-risk and require explicit justification in PR review notes.
161
+
- Prefer moving framework-specific or optional capabilities into non-core plugin packages instead of adding dependencies here.
162
+
- If a new dependency is unavoidable, confirm it is required by core contracts/runtime and not by optional evaluators, exporters, profiling, or framework integrations.
163
+
164
+
- path: "packages/nvidia_nat_eval/pyproject.toml"
165
+
instructions: >-
166
+
- This package follows a thin-core eval strategy; prioritize keeping dependencies minimal.
167
+
- Treat any new dependency addition as high-risk and require explicit justification in PR review notes.
Copy file name to clipboardExpand all lines: .cursor/rules/nat-tests/general.mdc
+16-9Lines changed: 16 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -23,11 +23,26 @@ All tests in NeMo Agent Toolkit use pytest. See the general coding guidelines fo
23
23
24
24
- Use `pytest` for all unit tests
25
25
- Name test files `test_*.py`
26
-
- Use `@pytest.fixture(name="fixture_name")` decorator pattern
27
26
- Mock external services with `pytest_httpserver` or `unittest.mock`
28
27
- Maintain ≥ 80% code coverage
29
28
- Do NOT add `@pytest.mark.asyncio` to any test - async tests are automatically detected and run by the async runner
30
29
30
+
### Fixtures
31
+
- Use `@pytest.fixture(name="fixture_name")` decorator pattern
32
+
- Fixtures that are used in multiple tests should be defined in the `packages/nvidia_nat_test/src/nat/test/plugin.py` file, fixtures specific to a single package should be defined in a `conftest.py` file in the `tests` directory of the package, and fixtures that are specific to a single test can be defined in the test file itself.
There are many more fixtures available, refer to the [plugin.py](mdc:packages/nvidia_nat_test/src/nat/test/plugin.py) file and any `conftest.py` files defined in the file hierarchy of the current test file for the complete list.
45
+
31
46
### Integration Tests
32
47
33
48
For workflows that require actual LLM services or external services, follow the integration testing guidelines:
0 commit comments