pytest-orm-boundaries 0.7.0__tar.gz → 0.7.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (16) hide show
  1. {pytest_orm_boundaries-0.7.0 → pytest_orm_boundaries-0.7.1}/PKG-INFO +22 -12
  2. {pytest_orm_boundaries-0.7.0 → pytest_orm_boundaries-0.7.1}/README.md +21 -11
  3. {pytest_orm_boundaries-0.7.0 → pytest_orm_boundaries-0.7.1}/pyproject.toml +1 -1
  4. {pytest_orm_boundaries-0.7.0 → pytest_orm_boundaries-0.7.1}/LICENSE +0 -0
  5. {pytest_orm_boundaries-0.7.0 → pytest_orm_boundaries-0.7.1}/src/pytest_orm_boundaries/__init__.py +0 -0
  6. {pytest_orm_boundaries-0.7.0 → pytest_orm_boundaries-0.7.1}/src/pytest_orm_boundaries/allows.py +0 -0
  7. {pytest_orm_boundaries-0.7.0 → pytest_orm_boundaries-0.7.1}/src/pytest_orm_boundaries/callstack.py +0 -0
  8. {pytest_orm_boundaries-0.7.0 → pytest_orm_boundaries-0.7.1}/src/pytest_orm_boundaries/config.py +0 -0
  9. {pytest_orm_boundaries-0.7.0 → pytest_orm_boundaries-0.7.1}/src/pytest_orm_boundaries/crossings.py +0 -0
  10. {pytest_orm_boundaries-0.7.0 → pytest_orm_boundaries-0.7.1}/src/pytest_orm_boundaries/guard.py +0 -0
  11. {pytest_orm_boundaries-0.7.0 → pytest_orm_boundaries-0.7.1}/src/pytest_orm_boundaries/ignores.py +0 -0
  12. {pytest_orm_boundaries-0.7.0 → pytest_orm_boundaries-0.7.1}/src/pytest_orm_boundaries/model_resolution.py +0 -0
  13. {pytest_orm_boundaries-0.7.0 → pytest_orm_boundaries-0.7.1}/src/pytest_orm_boundaries/plugin.py +0 -0
  14. {pytest_orm_boundaries-0.7.0 → pytest_orm_boundaries-0.7.1}/src/pytest_orm_boundaries/prefetch_resolution.py +0 -0
  15. {pytest_orm_boundaries-0.7.0 → pytest_orm_boundaries-0.7.1}/src/pytest_orm_boundaries/report.py +0 -0
  16. {pytest_orm_boundaries-0.7.0 → pytest_orm_boundaries-0.7.1}/src/pytest_orm_boundaries/sql_parsing.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pytest-orm-boundaries
3
- Version: 0.7.0
3
+ Version: 0.7.1
4
4
  Summary: Pytest plugin that fails tests when ORM queries cross DDD aggregate boundaries (Django supported today).
5
5
  Keywords: django,pytest,plugin,orm,ddd,aggregate,boundaries,architecture
6
6
  Author: Evgeniia Chibisova
@@ -50,14 +50,22 @@ and reports access that crosses a configured boundary - through `__` lookups,
50
50
 
51
51
  ## Install
52
52
 
53
- Install the plugin with Django support:
53
+ Install the plugin in your Django project:
54
54
 
55
55
  ```bash
56
- pip install "pytest-orm-boundaries[django]"
56
+ pip install pytest-orm-boundaries
57
57
  ```
58
58
 
59
59
  pytest discovers the plugin automatically.
60
60
 
61
+ The plugin uses the Django version already installed by your project. If you are
62
+ installing into an environment without Django and want pip to install it too,
63
+ use the optional extra:
64
+
65
+ ```bash
66
+ pip install "pytest-orm-boundaries[django]"
67
+ ```
68
+
61
69
  ## Configure
62
70
 
63
71
  Declare your aggregates and their Django models in `boundaries.toml` at the project
@@ -151,18 +159,21 @@ Places are ordered by how many tests they affect. Pass `-v` to see every affecte
151
159
 
152
160
  ## Allow and ignore
153
161
 
154
- CQRS read models may cross boundaries intentionally, also existing application code may contain crossings you want to fix over time. [allow] and [ignore] let you tell the plugin which is which:
162
+ CQRS read models may cross aggregate boundaries by design, while existing
163
+ application code may contain crossings you want to fix over time. `[allow]` and
164
+ `[ignore]` let you tell the plugin which is which:
155
165
 
156
166
  - `[allow]` - the crossing is **intentional**. Use it for code that is meant to
157
- span aggregates, such as CQRS read models or cross-aggregate reports. An
158
- allowed crossing is suppressed and never reported.
167
+ span aggregates, such as CQRS read models. An allowed crossing is suppressed
168
+ and never reported.
159
169
  - `[ignore]` - the crossing is **known debt** you plan to fix. It is suppressed
160
- for now, and the plugin reminds you when an entry is no longer needed.
170
+ and the plugin reports the entry when its matching code runs without a
171
+ crossing.
161
172
 
162
173
  ```toml
163
174
  [allow]
164
175
  files = [
165
- "app/reports/sales_summary.py",
176
+ "app/read_models/sales.py",
166
177
  ]
167
178
 
168
179
  [ignore]
@@ -178,13 +189,12 @@ resolved relative to pytest's root directory and matched against either:
178
189
  - the file that issues the query, or
179
190
  - the test file.
180
191
 
181
- An `[ignore]` whose file runs through the whole suite without ever crossing a
182
- boundary is stale — it is clean now, so the plugin lists it for removal:
192
+ An `[ignore]` whose matching code runs through the whole suite without crossing
193
+ a boundary is stale, so the plugin lists it for removal:
183
194
 
184
195
  ```
185
196
  ======================= orm-boundaries: stale ignores ========================
186
- These [ignore] entries no longer suppress any boundary crossing - their files are clean now.
187
- Remove them from boundaries.toml:
197
+ These [ignore] entries matched files that ran without crossing a boundary. Remove them from boundaries.toml:
188
198
  - app/billing.py
189
199
  ```
190
200
 
@@ -21,14 +21,22 @@ and reports access that crosses a configured boundary - through `__` lookups,
21
21
 
22
22
  ## Install
23
23
 
24
- Install the plugin with Django support:
24
+ Install the plugin in your Django project:
25
25
 
26
26
  ```bash
27
- pip install "pytest-orm-boundaries[django]"
27
+ pip install pytest-orm-boundaries
28
28
  ```
29
29
 
30
30
  pytest discovers the plugin automatically.
31
31
 
32
+ The plugin uses the Django version already installed by your project. If you are
33
+ installing into an environment without Django and want pip to install it too,
34
+ use the optional extra:
35
+
36
+ ```bash
37
+ pip install "pytest-orm-boundaries[django]"
38
+ ```
39
+
32
40
  ## Configure
33
41
 
34
42
  Declare your aggregates and their Django models in `boundaries.toml` at the project
@@ -122,18 +130,21 @@ Places are ordered by how many tests they affect. Pass `-v` to see every affecte
122
130
 
123
131
  ## Allow and ignore
124
132
 
125
- CQRS read models may cross boundaries intentionally, also existing application code may contain crossings you want to fix over time. [allow] and [ignore] let you tell the plugin which is which:
133
+ CQRS read models may cross aggregate boundaries by design, while existing
134
+ application code may contain crossings you want to fix over time. `[allow]` and
135
+ `[ignore]` let you tell the plugin which is which:
126
136
 
127
137
  - `[allow]` - the crossing is **intentional**. Use it for code that is meant to
128
- span aggregates, such as CQRS read models or cross-aggregate reports. An
129
- allowed crossing is suppressed and never reported.
138
+ span aggregates, such as CQRS read models. An allowed crossing is suppressed
139
+ and never reported.
130
140
  - `[ignore]` - the crossing is **known debt** you plan to fix. It is suppressed
131
- for now, and the plugin reminds you when an entry is no longer needed.
141
+ and the plugin reports the entry when its matching code runs without a
142
+ crossing.
132
143
 
133
144
  ```toml
134
145
  [allow]
135
146
  files = [
136
- "app/reports/sales_summary.py",
147
+ "app/read_models/sales.py",
137
148
  ]
138
149
 
139
150
  [ignore]
@@ -149,13 +160,12 @@ resolved relative to pytest's root directory and matched against either:
149
160
  - the file that issues the query, or
150
161
  - the test file.
151
162
 
152
- An `[ignore]` whose file runs through the whole suite without ever crossing a
153
- boundary is stale — it is clean now, so the plugin lists it for removal:
163
+ An `[ignore]` whose matching code runs through the whole suite without crossing
164
+ a boundary is stale, so the plugin lists it for removal:
154
165
 
155
166
  ```
156
167
  ======================= orm-boundaries: stale ignores ========================
157
- These [ignore] entries no longer suppress any boundary crossing - their files are clean now.
158
- Remove them from boundaries.toml:
168
+ These [ignore] entries matched files that ran without crossing a boundary. Remove them from boundaries.toml:
159
169
  - app/billing.py
160
170
  ```
161
171
 
@@ -4,7 +4,7 @@ build-backend = "uv_build"
4
4
 
5
5
  [project]
6
6
  name = "pytest-orm-boundaries"
7
- version = "0.7.0"
7
+ version = "0.7.1"
8
8
  description = "Pytest plugin that fails tests when ORM queries cross DDD aggregate boundaries (Django supported today)."
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.11"