Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .agents/skills/usethis-python-module-layout-modify/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description: Modify the Python module layout (create, move, rename, or delete mo
compatibility: usethis, Python, pytest
license: MIT
metadata:
version: "1.2"
version: "1.3
---

# Modifying the module layout for Python projects
Expand All @@ -14,14 +14,16 @@ metadata:
When creating, moving, renaming, or deleting Python modules in the `src` directory:

1. Make the necessary changes to the module layout in the `src` directory.
2. Update the test directory structure to match any changes in the `src` directory.
2. Update the test directory structure to match any changes in the `src` directory, validate with `uv run pytest tests\test_suite.py::test_skeleton_matches`.
3. Check for any broken references (e.g. import statements) and fix them.
4. Update the Import Linter contracts using the `usethis-qa-import-linter` skill.

## Updating the test directory structure

Any changes in the `src` directory should be matched in the `tests` directory. For example, if we had `src/usethis/_a.py` and were splitting it into new submodules `usethis/_a/b.py` and `usethis/_a/c.py`, we would also need to split `tests/test_a.py` into `tests/_a_/test_b.py` and `tests/_a_/test_c.py`.

You should validate the changes are successful via the command `uv run pytest tests\test_suite.py::test_skeleton_matches`.

## Strategy for broken references

Whenever:
Expand Down