Skip to content

Commit 00e11d3

Browse files
Explain the need to update the test directory structure in usethis-python-module-layout-modify (#1379)
1 parent 4bd7e97 commit 00e11d3

1 file changed

Lines changed: 14 additions & 1 deletion

File tree

  • .agents/skills/usethis-python-module-layout-modify

.agents/skills/usethis-python-module-layout-modify/SKILL.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,24 @@ description: Modify the Python module layout (create, move, rename, or delete mo
44
compatibility: usethis, Python
55
license: MIT
66
metadata:
7-
version: "1.1"
7+
version: "1.2"
88
---
99

1010
# Modifying the module layout for Python projects
1111

12+
## Procedure
13+
14+
When creating, moving, renaming, or deleting Python modules in the `src` directory:
15+
16+
1. Make the necessary changes to the module layout in the `src` directory.
17+
2. Update the test directory structure to match any changes in the `src` directory.
18+
3. Check for any broken references (e.g. import statements) and fix them.
19+
4. Update the Import Linter contracts using the `usethis-qa-import-linter` skill.
20+
21+
## Updating the test directory structure
22+
23+
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`.
24+
1225
## Strategy for broken references
1326

1427
Whenever:

0 commit comments

Comments
 (0)