msw-plugin-api 0.2.4__tar.gz → 0.3.0__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.
- {msw_plugin_api-0.2.4 → msw_plugin_api-0.3.0}/.gitignore +3 -0
- {msw_plugin_api-0.2.4 → msw_plugin_api-0.3.0}/PKG-INFO +1 -1
- msw_plugin_api-0.3.0/VERSION +1 -0
- {msw_plugin_api-0.2.4 → msw_plugin_api-0.3.0}/pyproject.toml +1 -1
- {msw_plugin_api-0.2.4 → msw_plugin_api-0.3.0}/src/msw_plugin_api/__init__.py +39 -0
- {msw_plugin_api-0.2.4 → msw_plugin_api-0.3.0}/src/msw_plugin_api/_version.py +2 -2
- msw_plugin_api-0.2.4/VERSION +0 -1
- {msw_plugin_api-0.2.4 → msw_plugin_api-0.3.0}/LICENSE +0 -0
- {msw_plugin_api-0.2.4 → msw_plugin_api-0.3.0}/README.md +0 -0
- {msw_plugin_api-0.2.4 → msw_plugin_api-0.3.0}/src/msw_plugin_api/py.typed +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: msw-plugin-api
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.0
|
|
4
4
|
Summary: Minimal structural interfaces for MSW plugin packages
|
|
5
5
|
Project-URL: Homepage, https://github.com/MurineShiftWork/msw-plugin-api
|
|
6
6
|
Project-URL: Issue Tracker, https://github.com/MurineShiftWork/msw-plugin-api/issues
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.3.0
|
|
@@ -95,3 +95,42 @@ class HostSessionProtocol(Protocol):
|
|
|
95
95
|
def stop(self) -> None:
|
|
96
96
|
"""Stop the recording session on the backend."""
|
|
97
97
|
...
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
@runtime_checkable
|
|
101
|
+
class MetadataProtocol(Protocol):
|
|
102
|
+
"""Structural protocol for an MSW metadata section.
|
|
103
|
+
|
|
104
|
+
A metadata addon owns exactly one top-level subtree of the manifest
|
|
105
|
+
``metadata`` key-tree (e.g. ``metadata.probes``, ``metadata.opto``). It
|
|
106
|
+
keeps its schema in its own package and advertises itself with an entry
|
|
107
|
+
point::
|
|
108
|
+
|
|
109
|
+
[project.entry-points."msw.metadata"]
|
|
110
|
+
probes = "my_package.metadata:ProbesMetadata"
|
|
111
|
+
|
|
112
|
+
MSW core discovers these via ``importlib.metadata`` and checks
|
|
113
|
+
``isinstance(obj, MetadataProtocol)``, so any object exposing ``subtree``,
|
|
114
|
+
``schema_version``, and ``validate`` satisfies it (no import of this
|
|
115
|
+
package required). ``validate`` must be non-fatal: it returns a list of
|
|
116
|
+
human-readable warnings and never raises, because ``metadata`` is optional
|
|
117
|
+
and legacy/partial trees must still load.
|
|
118
|
+
|
|
119
|
+
Attributes:
|
|
120
|
+
subtree: The reserved top-level metadata key this addon owns.
|
|
121
|
+
schema_version: The version of this subtree's schema.
|
|
122
|
+
"""
|
|
123
|
+
|
|
124
|
+
subtree: str
|
|
125
|
+
schema_version: int
|
|
126
|
+
|
|
127
|
+
def validate(self, block: object) -> list[str]:
|
|
128
|
+
"""Validate this addon's metadata subtree.
|
|
129
|
+
|
|
130
|
+
Args:
|
|
131
|
+
block: The value at ``metadata[self.subtree]``.
|
|
132
|
+
|
|
133
|
+
Returns:
|
|
134
|
+
A list of human-readable warnings (empty when valid). Never raises.
|
|
135
|
+
"""
|
|
136
|
+
...
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '0.
|
|
22
|
-
__version_tuple__ = version_tuple = (0,
|
|
21
|
+
__version__ = version = '0.3.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (0, 3, 0)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
msw_plugin_api-0.2.4/VERSION
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
0.2.4
|
|
File without changes
|
|
File without changes
|
|
File without changes
|