spot-sdk-python 2.0.0b4__tar.gz → 2.0.0b6__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.
- {spot_sdk_python-2.0.0b4 → spot_sdk_python-2.0.0b6}/PKG-INFO +2 -2
- {spot_sdk_python-2.0.0b4 → spot_sdk_python-2.0.0b6}/README.md +1 -1
- {spot_sdk_python-2.0.0b4 → spot_sdk_python-2.0.0b6}/pyproject.toml +1 -1
- {spot_sdk_python-2.0.0b4 → spot_sdk_python-2.0.0b6}/spot_sdk/manifest.py +20 -0
- {spot_sdk_python-2.0.0b4 → spot_sdk_python-2.0.0b6}/spot_sdk/workflow.py +0 -3
- {spot_sdk_python-2.0.0b4 → spot_sdk_python-2.0.0b6}/spot_sdk/__init__.py +0 -0
- {spot_sdk_python-2.0.0b4 → spot_sdk_python-2.0.0b6}/spot_sdk/_json.py +0 -0
- {spot_sdk_python-2.0.0b4 → spot_sdk_python-2.0.0b6}/spot_sdk/app.py +0 -0
- {spot_sdk_python-2.0.0b4 → spot_sdk_python-2.0.0b6}/spot_sdk/clients.py +0 -0
- {spot_sdk_python-2.0.0b4 → spot_sdk_python-2.0.0b6}/spot_sdk/config.py +0 -0
- {spot_sdk_python-2.0.0b4 → spot_sdk_python-2.0.0b6}/spot_sdk/email.py +0 -0
- {spot_sdk_python-2.0.0b4 → spot_sdk_python-2.0.0b6}/spot_sdk/errors.py +0 -0
- {spot_sdk_python-2.0.0b4 → spot_sdk_python-2.0.0b6}/spot_sdk/knowledge.py +0 -0
- {spot_sdk_python-2.0.0b4 → spot_sdk_python-2.0.0b6}/spot_sdk/knowledge_tags.py +0 -0
- {spot_sdk_python-2.0.0b4 → spot_sdk_python-2.0.0b6}/spot_sdk/llm.py +0 -0
- {spot_sdk_python-2.0.0b4 → spot_sdk_python-2.0.0b6}/spot_sdk/logging.py +0 -0
- {spot_sdk_python-2.0.0b4 → spot_sdk_python-2.0.0b6}/spot_sdk/mime.py +0 -0
- {spot_sdk_python-2.0.0b4 → spot_sdk_python-2.0.0b6}/spot_sdk/orchestrator.py +0 -0
- {spot_sdk_python-2.0.0b4 → spot_sdk_python-2.0.0b6}/spot_sdk/py.typed +0 -0
- {spot_sdk_python-2.0.0b4 → spot_sdk_python-2.0.0b6}/spot_sdk/retriever.py +0 -0
- {spot_sdk_python-2.0.0b4 → spot_sdk_python-2.0.0b6}/spot_sdk/settings.py +0 -0
- {spot_sdk_python-2.0.0b4 → spot_sdk_python-2.0.0b6}/spot_sdk/signals.py +0 -0
- {spot_sdk_python-2.0.0b4 → spot_sdk_python-2.0.0b6}/spot_sdk/testing/README.md +0 -0
- {spot_sdk_python-2.0.0b4 → spot_sdk_python-2.0.0b6}/spot_sdk/testing/__init__.py +0 -0
- {spot_sdk_python-2.0.0b4 → spot_sdk_python-2.0.0b6}/spot_sdk/testing/contract.py +0 -0
- {spot_sdk_python-2.0.0b4 → spot_sdk_python-2.0.0b6}/spot_sdk/testing/fake_knowledge_client.py +0 -0
- {spot_sdk_python-2.0.0b4 → spot_sdk_python-2.0.0b6}/spot_sdk/testing/fake_llm.py +0 -0
- {spot_sdk_python-2.0.0b4 → spot_sdk_python-2.0.0b6}/spot_sdk/testing/fake_spot.py +0 -0
- {spot_sdk_python-2.0.0b4 → spot_sdk_python-2.0.0b6}/spot_sdk/testing/views.py +0 -0
- {spot_sdk_python-2.0.0b4 → spot_sdk_python-2.0.0b6}/spot_sdk/verdict.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: spot-sdk-python
|
|
3
|
-
Version: 2.0.
|
|
3
|
+
Version: 2.0.0b6
|
|
4
4
|
Summary: SPOT plugin SDK: the plugin contract, the plugin runtime, its clients and test helpers
|
|
5
5
|
License: Apache-2.0
|
|
6
6
|
Author: SPOT Project
|
|
@@ -50,7 +50,7 @@ plugins share:
|
|
|
50
50
|
## Install
|
|
51
51
|
|
|
52
52
|
```bash
|
|
53
|
-
pip install spot-sdk-python==2.0.
|
|
53
|
+
pip install spot-sdk-python==2.0.0b6
|
|
54
54
|
```
|
|
55
55
|
|
|
56
56
|
Python 3.11 to 3.15. Version 2 implements plugin contract 2, for
|
|
@@ -4,7 +4,7 @@ build-backend = "poetry.core.masonry.api"
|
|
|
4
4
|
|
|
5
5
|
[tool.poetry]
|
|
6
6
|
name = "spot-sdk-python"
|
|
7
|
-
version = "2.0.
|
|
7
|
+
version = "2.0.0b6"
|
|
8
8
|
description = "SPOT plugin SDK: the plugin contract, the plugin runtime, its clients and test helpers"
|
|
9
9
|
authors = ["SPOT Project <spot@sonn.lu>"]
|
|
10
10
|
license = "Apache-2.0"
|
|
@@ -69,6 +69,9 @@ _SETTING_VALUES: dict[SettingType, tuple[type, ...]] = {
|
|
|
69
69
|
SettingType.SECRET: (str,),
|
|
70
70
|
}
|
|
71
71
|
|
|
72
|
+
# The setting types whose value can have several lines.
|
|
73
|
+
_MULTILINE_TYPES = (SettingType.STRING, SettingType.SECRET)
|
|
74
|
+
|
|
72
75
|
|
|
73
76
|
class SettingField(BaseModel):
|
|
74
77
|
"""One setting of a plugin, as ``spot.plugin.settings`` declares it.
|
|
@@ -78,6 +81,11 @@ class SettingField(BaseModel):
|
|
|
78
81
|
an empty one, or one whose values do not fit ``type`` (``integer``: int,
|
|
79
82
|
never bool; ``number``: int or float, never bool; ``boolean``: bool;
|
|
80
83
|
``string``, ``url`` and ``secret``: str).
|
|
84
|
+
|
|
85
|
+
``multiline`` marks a value of several lines, such as a PEM certificate:
|
|
86
|
+
the dashboard renders a textarea and keeps the line breaks. It is for
|
|
87
|
+
``string`` and ``secret`` settings only; on any other type it is refused
|
|
88
|
+
in the same way.
|
|
81
89
|
"""
|
|
82
90
|
|
|
83
91
|
type: SettingType
|
|
@@ -88,6 +96,10 @@ class SettingField(BaseModel):
|
|
|
88
96
|
enum: list[Any] | None = Field(
|
|
89
97
|
default=None, description="Allowed values, each of the setting's type"
|
|
90
98
|
)
|
|
99
|
+
multiline: bool = Field(
|
|
100
|
+
default=False,
|
|
101
|
+
description="The value has several lines (a PEM certificate); string and secret only",
|
|
102
|
+
)
|
|
91
103
|
|
|
92
104
|
@model_validator(mode="after")
|
|
93
105
|
def _check_enum(self) -> Self:
|
|
@@ -100,6 +112,14 @@ class SettingField(BaseModel):
|
|
|
100
112
|
raise ValueError(f"enum[{index}] does not fit the type {self.type}")
|
|
101
113
|
return self
|
|
102
114
|
|
|
115
|
+
@model_validator(mode="after")
|
|
116
|
+
def _check_multiline(self) -> Self:
|
|
117
|
+
if self.multiline and self.type not in _MULTILINE_TYPES:
|
|
118
|
+
raise ValueError(
|
|
119
|
+
f"multiline is for string and secret settings, not {self.type}"
|
|
120
|
+
)
|
|
121
|
+
return self
|
|
122
|
+
|
|
103
123
|
|
|
104
124
|
def _fits(value: Any, setting_type: SettingType) -> bool:
|
|
105
125
|
"""Whether ``value`` is a value of ``setting_type``."""
|
|
@@ -176,9 +176,6 @@ class Workflow(BaseModel):
|
|
|
176
176
|
le=600000,
|
|
177
177
|
description="Total workflow timeout in milliseconds",
|
|
178
178
|
)
|
|
179
|
-
max_parallel_analyzers: int = Field(
|
|
180
|
-
default=10, ge=1, le=100, description="Maximum parallel analyzer executions"
|
|
181
|
-
)
|
|
182
179
|
created_by: str = Field(default="system", description="Creator of the workflow")
|
|
183
180
|
verdict_policy: VerdictPolicy = Field(default_factory=VerdictPolicy)
|
|
184
181
|
on_verdict: dict[VerdictClass, list[str]] = Field(
|
|
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
|
|
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
|
|
File without changes
|
|
File without changes
|
{spot_sdk_python-2.0.0b4 → spot_sdk_python-2.0.0b6}/spot_sdk/testing/fake_knowledge_client.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|