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
15 changes: 14 additions & 1 deletion .agents/skills/usethis-python-module-layout-modify/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,24 @@ description: Modify the Python module layout (create, move, rename, or delete mo
compatibility: usethis, Python
license: MIT
metadata:
version: "1.1"
version: "1.2"
---

# Modifying the module layout for Python projects

## Procedure

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.
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`.

## Strategy for broken references

Whenever:
Expand Down