dirigent-testing 0.18.1__tar.gz → 0.18.3__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.
- {dirigent_testing-0.18.1 → dirigent_testing-0.18.3}/PKG-INFO +3 -3
- {dirigent_testing-0.18.1 → dirigent_testing-0.18.3}/pyproject.toml +3 -3
- {dirigent_testing-0.18.1 → dirigent_testing-0.18.3}/pyproject.toml.orig +3 -3
- {dirigent_testing-0.18.1 → dirigent_testing-0.18.3}/src/dirigent_testing/conformance.py +10 -4
- {dirigent_testing-0.18.1 → dirigent_testing-0.18.3}/LICENSE +0 -0
- {dirigent_testing-0.18.1 → dirigent_testing-0.18.3}/README.md +0 -0
- {dirigent_testing-0.18.1 → dirigent_testing-0.18.3}/src/dirigent_testing/__init__.py +0 -0
- {dirigent_testing-0.18.1 → dirigent_testing-0.18.3}/src/dirigent_testing/doubles.py +0 -0
- {dirigent_testing-0.18.1 → dirigent_testing-0.18.3}/src/dirigent_testing/environment.py +0 -0
- {dirigent_testing-0.18.1 → dirigent_testing-0.18.3}/src/dirigent_testing/fixtures.py +0 -0
- {dirigent_testing-0.18.1 → dirigent_testing-0.18.3}/src/dirigent_testing/messages.py +0 -0
- {dirigent_testing-0.18.1 → dirigent_testing-0.18.3}/src/dirigent_testing/py.typed +0 -0
- {dirigent_testing-0.18.1 → dirigent_testing-0.18.3}/src/dirigent_testing/running.py +0 -0
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: dirigent-testing
|
|
3
|
-
Version: 0.18.
|
|
3
|
+
Version: 0.18.3
|
|
4
4
|
Summary: Test doubles and pytest fixtures for writing and testing dirigent blocks.
|
|
5
5
|
License-Expression: LicenseRef-Proprietary
|
|
6
6
|
License-File: LICENSE
|
|
7
7
|
Classifier: Programming Language :: Python :: 3
|
|
8
8
|
Classifier: Programming Language :: Python :: 3.13
|
|
9
|
-
Requires-Dist: dirigent-common==0.18.
|
|
10
|
-
Requires-Dist: dirigent-plugin==0.18.
|
|
9
|
+
Requires-Dist: dirigent-common==0.18.3
|
|
10
|
+
Requires-Dist: dirigent-plugin==0.18.3
|
|
11
11
|
Requires-Dist: httpx2>=2.12.0
|
|
12
12
|
Requires-Dist: pydantic>=2.13.5
|
|
13
13
|
Requires-Dist: pytest>=9.1.1
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "dirigent-testing"
|
|
3
|
-
version = "0.18.
|
|
3
|
+
version = "0.18.3"
|
|
4
4
|
description = "Test doubles and pytest fixtures for writing and testing dirigent blocks."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.13"
|
|
@@ -11,8 +11,8 @@ classifiers = [
|
|
|
11
11
|
"Programming Language :: Python :: 3.13",
|
|
12
12
|
]
|
|
13
13
|
dependencies = [
|
|
14
|
-
"dirigent-common==0.18.
|
|
15
|
-
"dirigent-plugin==0.18.
|
|
14
|
+
"dirigent-common==0.18.3",
|
|
15
|
+
"dirigent-plugin==0.18.3",
|
|
16
16
|
"httpx2>=2.12.0",
|
|
17
17
|
"pydantic>=2.13.5",
|
|
18
18
|
"pytest>=9.1.1",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "dirigent-testing"
|
|
3
|
-
version = "0.18.
|
|
3
|
+
version = "0.18.3"
|
|
4
4
|
description = "Test doubles and pytest fixtures for writing and testing dirigent blocks."
|
|
5
5
|
readme = "README.md"
|
|
6
6
|
requires-python = ">=3.13"
|
|
@@ -11,8 +11,8 @@ classifiers = [
|
|
|
11
11
|
"Programming Language :: Python :: 3.13",
|
|
12
12
|
]
|
|
13
13
|
dependencies = [
|
|
14
|
-
"dirigent-common==0.18.
|
|
15
|
-
"dirigent-plugin==0.18.
|
|
14
|
+
"dirigent-common==0.18.3",
|
|
15
|
+
"dirigent-plugin==0.18.3",
|
|
16
16
|
"httpx2>=2.12.0",
|
|
17
17
|
"pydantic>=2.13.5",
|
|
18
18
|
"pytest>=9.1.1",
|
|
@@ -22,7 +22,7 @@ from jsonschema.validators import extend as extend_validator # pyright: ignore[
|
|
|
22
22
|
from pydantic import JsonValue
|
|
23
23
|
|
|
24
24
|
from dirigent_common import BlockModel, HumaneJsonSchema, JsonMap
|
|
25
|
-
from dirigent_plugin import AnyOperator, AnySensor, Contribution
|
|
25
|
+
from dirigent_plugin import AnyOperator, AnySensor, Contribution, mark_refusal
|
|
26
26
|
|
|
27
27
|
#: A ``${...}`` reference, matched the way the engine matches one.
|
|
28
28
|
_REFERENCE: Final = re.compile(r"\$\{[^{}]+\}")
|
|
@@ -186,13 +186,15 @@ def _config_issues(label: Path, name: str, config: JsonMap, schema: JsonMap) ->
|
|
|
186
186
|
|
|
187
187
|
|
|
188
188
|
def assert_contribution_conforms(contribution: Contribution) -> list[str]:
|
|
189
|
-
"""List the ways a contribution
|
|
189
|
+
"""List the ways a contribution is malformed, beyond what constructing it enforces.
|
|
190
190
|
|
|
191
191
|
A ``Contribution`` already rejects colliding ids when it is built, and a block id is a
|
|
192
192
|
pattern that forbids an empty one, so a valid contribution passes those. This adds the
|
|
193
193
|
check the contract cannot make on its own: that every operator's and sensor's
|
|
194
|
-
``config_model`` and ``output_model`` is a :class:`BlockModel`.
|
|
195
|
-
|
|
194
|
+
``config_model`` and ``output_model`` is a :class:`BlockModel`. A connection kind's ``mark``
|
|
195
|
+
is checked through :func:`dirigent_plugin.mark_refusal`, which is what registration holds
|
|
196
|
+
it to, so a pack reads the same refusal here as it would at startup; a kind that declares
|
|
197
|
+
none passes. An empty list means the contribution conforms.
|
|
196
198
|
"""
|
|
197
199
|
issues: list[str] = []
|
|
198
200
|
seen: set[str] = set()
|
|
@@ -208,4 +210,8 @@ def assert_contribution_conforms(contribution: Contribution) -> list[str]:
|
|
|
208
210
|
model = getattr(block, role)
|
|
209
211
|
if not (isinstance(model, type) and issubclass(model, BlockModel)):
|
|
210
212
|
issues.append(f"{block_id or label} {role} is not a BlockModel")
|
|
213
|
+
for connection in contribution.connection_kinds:
|
|
214
|
+
refusal = mark_refusal(connection.id, connection.mark)
|
|
215
|
+
if refusal is not None:
|
|
216
|
+
issues.append(refusal)
|
|
211
217
|
return issues
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|