Skip to content

chore: improve test guidelines in AGENTS.md#387

Merged
nabinchha merged 2 commits intomainfrom
nmulepati/chore/update-agents.md
Mar 9, 2026
Merged

chore: improve test guidelines in AGENTS.md#387
nabinchha merged 2 commits intomainfrom
nmulepati/chore/update-agents.md

Conversation

@nabinchha
Copy link
Contributor

@nabinchha nabinchha commented Mar 9, 2026

Summary

  • Add explicit test guidelines: test public APIs only (no _-prefixed internals), require type annotations on tests/fixtures, keep imports at module level
  • Fix fixture reference to reflect the actual pytest_plugins layout (data_designer.config.testing.fixtures / data_designer.engine.testing.fixtures) instead of a nonexistent tests/conftest.py
  • Recommend ids= with @pytest.mark.parametrize for readable test names

Test plan

  • Verify AGENTS.md renders correctly on GitHub

Made with Cursor

Add explicit rules for testing public APIs only, requiring type
annotations on tests/fixtures, and keeping imports at module level.
Fix fixture reference to reflect the actual pytest_plugins layout.

Made-with: Cursor
@nabinchha nabinchha requested a review from a team as a code owner March 9, 2026 18:16
@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 9, 2026

Greptile Summary

This PR improves the test guidelines section of AGENTS.md with three targeted documentation fixes:

  • Fixture reference corrected: The old bullet pointed to a non-existent top-level tests/conftest.py. The new text accurately reflects the actual pytest_plugins declarations found in every package conftest.pydata_designer.config.testing.fixtures and data_designer.engine.testing.fixtures — which was confirmed to match the real fixture files on disk.
  • New test guidelines added: Three new rules — test public APIs only, require type annotations on tests/fixtures, and keep imports at module level — are consistent with existing project conventions (isort, ruff annotations rules) and the rest of the guide.
  • ids= recommendation: Adds a small but useful clarification to the @pytest.mark.parametrize guideline for readable test names.
  • Blank line fix in code example: Adds the missing blank line between the import block and the function definition, conforming to PEP 8 / ruff E302.

Confidence Score: 5/5

  • This PR is safe to merge — it is a pure documentation change with no code logic or behaviour modifications.
  • All changes are limited to AGENTS.md. The fixture module paths added (data_designer.config.testing.fixtures, data_designer.engine.testing.fixtures) were verified to match the actual files on disk and the pytest_plugins declarations in the real conftest.py files. The new guidelines are accurate, self-consistent, and aligned with the existing project conventions. No functional code is touched.
  • No files require special attention.

Important Files Changed

Filename Overview
AGENTS.md Documentation-only update: fixes the fixture reference from a non-existent tests/conftest.py to the correct pytest_plugins module paths, and adds three new, accurate test guidelines (public-API-only, type annotations, module-level imports) plus a ids= recommendation for parametrize.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[pytest test run] --> B{Package conftest.py}
    B --> C[pytest_plugins declaration]
    C --> D[data_designer.config.testing.fixtures]
    C --> E[data_designer.engine.testing.fixtures]
    D --> F[stub_data_designer_config_str\nand other config fixtures]
    E --> G[engine-level shared fixtures]
    B --> H[Local conftest.py\nin each test directory]
    H --> I[Package/module-specific fixtures]
    F & G & I --> J[Individual test functions]
Loading

Last reviewed commit: 36580d7

@nabinchha nabinchha merged commit 7384da2 into main Mar 9, 2026
47 checks passed
@nabinchha nabinchha deleted the nmulepati/chore/update-agents.md branch March 9, 2026 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants