Skip to content

Commit 1c755fe

Browse files
authored
docs: clarify the differences between the loose and the tdd theme (#18)
1 parent 6d5cec5 commit 1c755fe

File tree

1 file changed

+34
-3
lines changed

1 file changed

+34
-3
lines changed

docs/commands.md

Lines changed: 34 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,42 @@ Have a look in [PEP-423](https://peps.python.org/pep-0423/#respect-ownership) fo
4949
Themes are an exclusive Python Polylith feature, and defines what kind of workspace structure to use.
5050

5151
#### loose (recommended)
52-
A theme to use for a more familiar structure for Python: _components/namespace/package_ and will put a _test_ folder at the root of the repository.
52+
A theme to use for a more familiar structure for Python, and will also put the _test_ folder at the root of the repository.
53+
It is the recommended theme for Python, and works really well with the existing Python dev tools out there.
54+
55+
##### Example structure for the loose theme
56+
57+
``` shell
58+
components/
59+
your_namespace/
60+
the_component/
61+
core.py
62+
63+
test/
64+
components/
65+
your_namespace/
66+
the_component/
67+
test_core.py
68+
```
5369

5470
#### tdd
55-
The default and will set the structure according to the original Polylith Clojure implementation, such as:
56-
_components/package/src/namespace/package_ with a corresponding _test_ folder.
71+
This theme will set the structure according to the original Clojure implementation. It is the standard in the Clojure community.
72+
Because of poor tooling support in __Python__ - such as when using __MyPy__ - the _loose_ theme is the recommended theme here.
73+
74+
##### Example structure for the tdd theme
75+
76+
``` shell
77+
components/
78+
the_component/
79+
src/
80+
your_namespace/
81+
the_component/
82+
core.py
83+
test/
84+
your_namespace/
85+
the_component/
86+
test_core.py
87+
```
5788

5889
#### What's the deal with the .keep files?
5990
When creating a new workspace, the Polylith tool will add `.keep` files in the newly created folders.

0 commit comments

Comments
 (0)