transpiler-mate-api 1.0.0__py3-none-any.whl
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.
- transpiler_mate/api/__about__.py +18 -0
- transpiler_mate/api/__init__.py +65 -0
- transpiler_mate/api/plugin.py +201 -0
- transpiler_mate/api/py.typed +0 -0
- transpiler_mate/api/software_application_models.py +540 -0
- transpiler_mate_api-1.0.0.dist-info/METADATA +23 -0
- transpiler_mate_api-1.0.0.dist-info/RECORD +9 -0
- transpiler_mate_api-1.0.0.dist-info/WHEEL +4 -0
- transpiler_mate_api-1.0.0.dist-info/licenses/LICENSE +201 -0
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
# Copyright 2026 Terradue
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
# This workflow will install Python dependencies, run tests and lint with a single version of Python
|
|
16
|
+
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
|
|
17
|
+
|
|
18
|
+
__version__ = "1.0.0"
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# Copyright 2026 Terradue
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
"""Stable contracts for independently packaged transpiler-mate plugins."""
|
|
16
|
+
|
|
17
|
+
from transpiler_mate.api.plugin import (
|
|
18
|
+
EmptyOptions,
|
|
19
|
+
PluginError,
|
|
20
|
+
PluginExecutionError,
|
|
21
|
+
PluginFailureError,
|
|
22
|
+
PluginRegistration,
|
|
23
|
+
TranspilerContext,
|
|
24
|
+
TranspilerContextResolver,
|
|
25
|
+
TranspilerPlugin,
|
|
26
|
+
transpiler_plugin,
|
|
27
|
+
)
|
|
28
|
+
from transpiler_mate.api.software_application_models import (
|
|
29
|
+
AuthorRole,
|
|
30
|
+
ContributorRole,
|
|
31
|
+
CreativeWork,
|
|
32
|
+
DefinedTerm,
|
|
33
|
+
ImageObject,
|
|
34
|
+
Model,
|
|
35
|
+
Organization,
|
|
36
|
+
Person,
|
|
37
|
+
Role,
|
|
38
|
+
SoftwareApplication,
|
|
39
|
+
SoftwareApplicationModel,
|
|
40
|
+
SoftwareSourceCode,
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
__all__ = [
|
|
44
|
+
"AuthorRole",
|
|
45
|
+
"ContributorRole",
|
|
46
|
+
"CreativeWork",
|
|
47
|
+
"DefinedTerm",
|
|
48
|
+
"EmptyOptions",
|
|
49
|
+
"ImageObject",
|
|
50
|
+
"Model",
|
|
51
|
+
"Organization",
|
|
52
|
+
"Person",
|
|
53
|
+
"PluginError",
|
|
54
|
+
"PluginExecutionError",
|
|
55
|
+
"PluginFailureError",
|
|
56
|
+
"PluginRegistration",
|
|
57
|
+
"Role",
|
|
58
|
+
"SoftwareApplication",
|
|
59
|
+
"SoftwareApplicationModel",
|
|
60
|
+
"SoftwareSourceCode",
|
|
61
|
+
"TranspilerContext",
|
|
62
|
+
"TranspilerContextResolver",
|
|
63
|
+
"TranspilerPlugin",
|
|
64
|
+
"transpiler_plugin",
|
|
65
|
+
]
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
# Copyright 2026 Terradue
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
"""Framework-independent plugin contracts."""
|
|
16
|
+
|
|
17
|
+
from __future__ import annotations
|
|
18
|
+
|
|
19
|
+
from collections.abc import Callable, Iterable, Mapping
|
|
20
|
+
from typing import (
|
|
21
|
+
TYPE_CHECKING,
|
|
22
|
+
Annotated,
|
|
23
|
+
Generic,
|
|
24
|
+
Protocol,
|
|
25
|
+
TypeVar,
|
|
26
|
+
runtime_checkable,
|
|
27
|
+
)
|
|
28
|
+
|
|
29
|
+
from cwl_utils.parser import Process
|
|
30
|
+
from pydantic import AnyUrl, BaseModel, ConfigDict, Field
|
|
31
|
+
|
|
32
|
+
from transpiler_mate.api.software_application_models import SoftwareApplication
|
|
33
|
+
|
|
34
|
+
if TYPE_CHECKING:
|
|
35
|
+
from types import UnionType
|
|
36
|
+
|
|
37
|
+
OptionsT = TypeVar("OptionsT", bound=BaseModel)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
class PluginError(Exception):
|
|
41
|
+
"""Base class for errors intentionally exposed by a transpiler plugin."""
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class PluginExecutionError(PluginError):
|
|
45
|
+
"""Unexpected technical error that prevents a plugin from completing."""
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
class PluginFailureError(PluginError):
|
|
49
|
+
"""Expected domain failure reported by an otherwise working plugin."""
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
@runtime_checkable
|
|
53
|
+
class TranspilerContextResolver(Protocol):
|
|
54
|
+
"""Resolves a source into an execution context."""
|
|
55
|
+
|
|
56
|
+
def resolve(self, location: str) -> TranspilerContext: ...
|
|
57
|
+
|
|
58
|
+
|
|
59
|
+
class TranspilerContext(BaseModel):
|
|
60
|
+
"""Resolved CWL input and normalized metadata prepared by a runtime."""
|
|
61
|
+
|
|
62
|
+
model_config = ConfigDict(
|
|
63
|
+
arbitrary_types_allowed=True,
|
|
64
|
+
extra="forbid",
|
|
65
|
+
frozen=True,
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
source: Annotated[AnyUrl, Field(description="The input CWL document URL")]
|
|
69
|
+
process_id: Annotated[
|
|
70
|
+
str | None, Field(default=None, description="The Process fragment identifier")
|
|
71
|
+
] = None
|
|
72
|
+
metadata: Annotated[
|
|
73
|
+
SoftwareApplication, Field(description="The input CWL document metadata")
|
|
74
|
+
]
|
|
75
|
+
document: Annotated[
|
|
76
|
+
Mapping[str, Process],
|
|
77
|
+
Field(description="The input CWL document declared Processes"),
|
|
78
|
+
]
|
|
79
|
+
|
|
80
|
+
resolver: Annotated[
|
|
81
|
+
TranspilerContextResolver,
|
|
82
|
+
Field(description="The resolver instance to parse other CWL documents"),
|
|
83
|
+
]
|
|
84
|
+
|
|
85
|
+
@property
|
|
86
|
+
def processes(self) -> Iterable[Process]:
|
|
87
|
+
"""Return an immutable iterable view while preserving `document`."""
|
|
88
|
+
return self.document.values()
|
|
89
|
+
|
|
90
|
+
def get_processes_by_type(
|
|
91
|
+
self,
|
|
92
|
+
process_type: type[Process] | UnionType,
|
|
93
|
+
process_ids: Iterable[str] | None = None,
|
|
94
|
+
fail_if_empty: bool = True,
|
|
95
|
+
) -> Iterable[Process]:
|
|
96
|
+
"""Return processes matching a process class or runtime union of classes."""
|
|
97
|
+
|
|
98
|
+
computed_list: list[Process] = []
|
|
99
|
+
|
|
100
|
+
computed_process_ids: Iterable[str] = process_ids or self.document.keys()
|
|
101
|
+
|
|
102
|
+
for process_id in computed_process_ids:
|
|
103
|
+
resolved_process: Process | None = self.document.get(process_id, None)
|
|
104
|
+
|
|
105
|
+
if resolved_process and isinstance(resolved_process, process_type):
|
|
106
|
+
computed_list.append(resolved_process)
|
|
107
|
+
|
|
108
|
+
if not computed_list and fail_if_empty:
|
|
109
|
+
raise PluginExecutionError(
|
|
110
|
+
f"No {process_type}(s) found in input {self.source} CWL document"
|
|
111
|
+
)
|
|
112
|
+
|
|
113
|
+
return computed_list
|
|
114
|
+
|
|
115
|
+
@property
|
|
116
|
+
def resolved_process(self) -> Process:
|
|
117
|
+
if not self.process_id:
|
|
118
|
+
raise PluginExecutionError(
|
|
119
|
+
f"No #<process-id> specified in input CWL document {self.source}"
|
|
120
|
+
)
|
|
121
|
+
|
|
122
|
+
resolved_process: Process | None = self.document.get(self.process_id, None)
|
|
123
|
+
|
|
124
|
+
if not resolved_process:
|
|
125
|
+
raise PluginExecutionError(
|
|
126
|
+
f"Process {self.process_id} does not exist in input CWL document {self.source}, only {self.document.keys()} available."
|
|
127
|
+
)
|
|
128
|
+
|
|
129
|
+
return resolved_process
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
class EmptyOptions(BaseModel):
|
|
133
|
+
"""Configuration model for a plugin with no parameters."""
|
|
134
|
+
|
|
135
|
+
model_config = ConfigDict(extra="forbid")
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
class PluginRegistration(BaseModel, Generic[OptionsT]):
|
|
139
|
+
"""Immutable metadata and execution function for a stateless plugin."""
|
|
140
|
+
|
|
141
|
+
model_config = ConfigDict(
|
|
142
|
+
arbitrary_types_allowed=True,
|
|
143
|
+
extra="forbid",
|
|
144
|
+
frozen=True,
|
|
145
|
+
)
|
|
146
|
+
|
|
147
|
+
name: Annotated[str, Field(description="The plugin name")]
|
|
148
|
+
description: Annotated[str, Field(description="The plugin description")]
|
|
149
|
+
options_model: Annotated[
|
|
150
|
+
type[OptionsT], Field(description="The plugin model type for input options")
|
|
151
|
+
]
|
|
152
|
+
execute: Annotated[
|
|
153
|
+
Callable[[TranspilerContext, OptionsT], None],
|
|
154
|
+
Field(description="The plugin execution method"),
|
|
155
|
+
]
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
def transpiler_plugin(
|
|
159
|
+
*,
|
|
160
|
+
name: str,
|
|
161
|
+
description: str,
|
|
162
|
+
options_model: type[OptionsT],
|
|
163
|
+
) -> Callable[
|
|
164
|
+
[Callable[[TranspilerContext, OptionsT], None]],
|
|
165
|
+
PluginRegistration[OptionsT],
|
|
166
|
+
]:
|
|
167
|
+
"""Register a stateless plugin from its typed execution function."""
|
|
168
|
+
|
|
169
|
+
def register(
|
|
170
|
+
execute: Callable[[TranspilerContext, OptionsT], None],
|
|
171
|
+
) -> PluginRegistration[OptionsT]:
|
|
172
|
+
return PluginRegistration(
|
|
173
|
+
name=name,
|
|
174
|
+
description=description,
|
|
175
|
+
options_model=options_model,
|
|
176
|
+
execute=execute,
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
return register
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
@runtime_checkable
|
|
183
|
+
class TranspilerPlugin(Protocol[OptionsT]):
|
|
184
|
+
"""Public contract implemented by one independently packaged plugin."""
|
|
185
|
+
|
|
186
|
+
@property
|
|
187
|
+
def name(self) -> str: ...
|
|
188
|
+
|
|
189
|
+
@property
|
|
190
|
+
def description(self) -> str: ...
|
|
191
|
+
|
|
192
|
+
@property
|
|
193
|
+
def options_model(self) -> type[OptionsT]: ...
|
|
194
|
+
|
|
195
|
+
def execute(
|
|
196
|
+
self,
|
|
197
|
+
context: TranspilerContext,
|
|
198
|
+
options: OptionsT,
|
|
199
|
+
) -> None:
|
|
200
|
+
"""Execute without assumptions about CLI, HTTP, workers, or notebooks."""
|
|
201
|
+
...
|
|
File without changes
|
|
@@ -0,0 +1,540 @@
|
|
|
1
|
+
# Copyright 2025-2026 Terradue
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
# generated by datamodel-codegen:
|
|
16
|
+
# filename: software_application.yaml
|
|
17
|
+
# timestamp: 2026-03-05T14:51:11+00:00
|
|
18
|
+
|
|
19
|
+
from __future__ import annotations
|
|
20
|
+
|
|
21
|
+
from datetime import date, datetime
|
|
22
|
+
from typing import Any, Literal
|
|
23
|
+
|
|
24
|
+
from pydantic import (
|
|
25
|
+
AliasChoices,
|
|
26
|
+
AnyUrl,
|
|
27
|
+
BaseModel,
|
|
28
|
+
ConfigDict,
|
|
29
|
+
EmailStr,
|
|
30
|
+
Field,
|
|
31
|
+
RootModel,
|
|
32
|
+
)
|
|
33
|
+
|
|
34
|
+
|
|
35
|
+
class SoftwareApplicationModel(BaseModel):
|
|
36
|
+
model_config = ConfigDict(
|
|
37
|
+
validate_by_name=True,
|
|
38
|
+
extra="allow",
|
|
39
|
+
use_enum_values=True, # Enums dump as .value everywhere
|
|
40
|
+
)
|
|
41
|
+
|
|
42
|
+
# Default dumps to JSON-friendly types (URLs -> str, datetimes -> ISO, etc.)
|
|
43
|
+
def model_dump(self, *args: Any, **kwargs: Any) -> dict[str, Any]:
|
|
44
|
+
kwargs.setdefault("mode", "json")
|
|
45
|
+
kwargs.setdefault("exclude_none", True)
|
|
46
|
+
return super().model_dump(*args, **kwargs)
|
|
47
|
+
|
|
48
|
+
def model_dump_json(self, *args: Any, **kwargs: Any) -> str:
|
|
49
|
+
# stays consistent with model_dump default
|
|
50
|
+
kwargs.setdefault("indent", None)
|
|
51
|
+
return super().model_dump_json(*args, **kwargs)
|
|
52
|
+
|
|
53
|
+
|
|
54
|
+
class Organization(SoftwareApplicationModel):
|
|
55
|
+
"""
|
|
56
|
+
An organization such as a school, NGO, corporation, club, etc.
|
|
57
|
+
"""
|
|
58
|
+
|
|
59
|
+
field_type: Literal["https://schema.org/Organization"] = Field(
|
|
60
|
+
default="https://schema.org/Organization",
|
|
61
|
+
validation_alias="@type",
|
|
62
|
+
serialization_alias="@type",
|
|
63
|
+
)
|
|
64
|
+
name: str = Field(
|
|
65
|
+
...,
|
|
66
|
+
validation_alias=AliasChoices("name", "https://schema.org/name"),
|
|
67
|
+
serialization_alias="https://schema.org/name",
|
|
68
|
+
)
|
|
69
|
+
"""
|
|
70
|
+
The name of the item.
|
|
71
|
+
"""
|
|
72
|
+
email: EmailStr | list[EmailStr] | None = Field(
|
|
73
|
+
default=None,
|
|
74
|
+
validation_alias=AliasChoices("email", "https://schema.org/email"),
|
|
75
|
+
serialization_alias="https://schema.org/email",
|
|
76
|
+
)
|
|
77
|
+
"""
|
|
78
|
+
Email address.
|
|
79
|
+
"""
|
|
80
|
+
identifier: AnyUrl | str | None = Field(
|
|
81
|
+
default=None,
|
|
82
|
+
validation_alias=AliasChoices("identifier", "https://schema.org/identifier"),
|
|
83
|
+
serialization_alias="https://schema.org/identifier",
|
|
84
|
+
)
|
|
85
|
+
"""
|
|
86
|
+
The identifier property represents any kind of identifier for any kind of [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See [background notes](/docs/datamodel.html#identifierBg) for more details.
|
|
87
|
+
|
|
88
|
+
"""
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
class Person(SoftwareApplicationModel):
|
|
92
|
+
"""
|
|
93
|
+
A person (alive, dead, undead, or fictional).
|
|
94
|
+
"""
|
|
95
|
+
|
|
96
|
+
field_type: Literal["https://schema.org/Person"] = Field(
|
|
97
|
+
default="https://schema.org/Person",
|
|
98
|
+
validation_alias="@type",
|
|
99
|
+
serialization_alias="@type",
|
|
100
|
+
)
|
|
101
|
+
given_name: str = Field(
|
|
102
|
+
...,
|
|
103
|
+
validation_alias=AliasChoices("givenName", "https://schema.org/givenName"),
|
|
104
|
+
serialization_alias="https://schema.org/givenName",
|
|
105
|
+
)
|
|
106
|
+
"""
|
|
107
|
+
Given name. In the U.S., the first name of a Person.
|
|
108
|
+
"""
|
|
109
|
+
family_name: str = Field(
|
|
110
|
+
...,
|
|
111
|
+
validation_alias=AliasChoices("familyName", "https://schema.org/familyName"),
|
|
112
|
+
serialization_alias="https://schema.org/familyName",
|
|
113
|
+
)
|
|
114
|
+
"""
|
|
115
|
+
Family name. In the U.S., the last name of a Person.
|
|
116
|
+
"""
|
|
117
|
+
email: EmailStr | list[EmailStr] = Field(
|
|
118
|
+
...,
|
|
119
|
+
validation_alias=AliasChoices("email", "https://schema.org/email"),
|
|
120
|
+
serialization_alias="https://schema.org/email",
|
|
121
|
+
)
|
|
122
|
+
"""
|
|
123
|
+
Email address.
|
|
124
|
+
"""
|
|
125
|
+
identifier: AnyUrl | str | None = Field(
|
|
126
|
+
default=None,
|
|
127
|
+
validation_alias=AliasChoices("identifier", "https://schema.org/identifier"),
|
|
128
|
+
serialization_alias="https://schema.org/identifier",
|
|
129
|
+
)
|
|
130
|
+
"""
|
|
131
|
+
The identifier property represents any kind of identifier for any kind of [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See [background notes](/docs/datamodel.html#identifierBg) for more details.
|
|
132
|
+
|
|
133
|
+
"""
|
|
134
|
+
affiliation: Organization | list[Organization] = Field(
|
|
135
|
+
...,
|
|
136
|
+
validation_alias=AliasChoices("affiliation", "https://schema.org/affiliation"),
|
|
137
|
+
serialization_alias="https://schema.org/affiliation",
|
|
138
|
+
)
|
|
139
|
+
"""
|
|
140
|
+
An organization that this person is affiliated with. For example, a school/university, a club, or a team.
|
|
141
|
+
"""
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
class Role(SoftwareApplicationModel):
|
|
145
|
+
"""
|
|
146
|
+
Represents additional information about a relationship or property.
|
|
147
|
+
"""
|
|
148
|
+
|
|
149
|
+
field_type: Literal["https://schema.org/Role"] = Field(
|
|
150
|
+
default="https://schema.org/Role",
|
|
151
|
+
validation_alias="@type",
|
|
152
|
+
serialization_alias="@type",
|
|
153
|
+
)
|
|
154
|
+
role_name: str = Field(
|
|
155
|
+
...,
|
|
156
|
+
validation_alias=AliasChoices("roleName", "https://schema.org/roleName"),
|
|
157
|
+
serialization_alias="https://schema.org/roleName",
|
|
158
|
+
)
|
|
159
|
+
"""
|
|
160
|
+
A role played, performed or filled by a person or organization.
|
|
161
|
+
"""
|
|
162
|
+
start_date: date | None = Field(
|
|
163
|
+
default=None,
|
|
164
|
+
validation_alias=AliasChoices("startDate", "https://schema.org/startDate"),
|
|
165
|
+
serialization_alias="https://schema.org/startDate",
|
|
166
|
+
)
|
|
167
|
+
end_date: date | None = Field(
|
|
168
|
+
default=None,
|
|
169
|
+
validation_alias=AliasChoices("endDate", "https://schema.org/endDate"),
|
|
170
|
+
serialization_alias="https://schema.org/endDate",
|
|
171
|
+
)
|
|
172
|
+
"""
|
|
173
|
+
The end date and time of the item
|
|
174
|
+
"""
|
|
175
|
+
additional_type: AnyUrl | None = Field(
|
|
176
|
+
default=None,
|
|
177
|
+
validation_alias=AliasChoices(
|
|
178
|
+
"additionalType", "https://schema.org/additionalType"
|
|
179
|
+
),
|
|
180
|
+
serialization_alias="https://schema.org/additionalType",
|
|
181
|
+
)
|
|
182
|
+
"""
|
|
183
|
+
An additional type for the item, typically used for adding more specific types from external vocabularies in microdata syntax.
|
|
184
|
+
"""
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
class AuthorRole(Role):
|
|
188
|
+
author: Person = Field(
|
|
189
|
+
...,
|
|
190
|
+
validation_alias=AliasChoices("author", "https://schema.org/author"),
|
|
191
|
+
serialization_alias="https://schema.org/author",
|
|
192
|
+
)
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
class ContributorRole(Role):
|
|
196
|
+
contributor: Person = Field(
|
|
197
|
+
...,
|
|
198
|
+
validation_alias=AliasChoices("contributor", "https://schema.org/contributor"),
|
|
199
|
+
serialization_alias="https://schema.org/contributor",
|
|
200
|
+
)
|
|
201
|
+
|
|
202
|
+
|
|
203
|
+
class DefinedTerm(SoftwareApplicationModel):
|
|
204
|
+
"""
|
|
205
|
+
A word, name, acronym, phrase, etc. with a formal definition. Often used in the context of category or subject classification, glossaries or dictionaries, product or creative work types, etc. Use the name property for the term being defined, use termCode if the term has an alpha-numeric code allocated, use description to provide the definition of the term.
|
|
206
|
+
"""
|
|
207
|
+
|
|
208
|
+
field_type: Literal["https://schema.org/DefinedTerm"] = Field(
|
|
209
|
+
default="https://schema.org/DefinedTerm",
|
|
210
|
+
validation_alias="@type",
|
|
211
|
+
serialization_alias="@type",
|
|
212
|
+
)
|
|
213
|
+
name: str | None = Field(
|
|
214
|
+
default=None,
|
|
215
|
+
validation_alias=AliasChoices("name", "https://schema.org/name"),
|
|
216
|
+
serialization_alias="https://schema.org/name",
|
|
217
|
+
)
|
|
218
|
+
"""
|
|
219
|
+
The name of the item.
|
|
220
|
+
"""
|
|
221
|
+
description: str | None = Field(
|
|
222
|
+
default=None,
|
|
223
|
+
validation_alias=AliasChoices("description", "https://schema.org/description"),
|
|
224
|
+
serialization_alias="https://schema.org/description",
|
|
225
|
+
)
|
|
226
|
+
"""
|
|
227
|
+
A description of the item.
|
|
228
|
+
"""
|
|
229
|
+
term_code: str | None = Field(
|
|
230
|
+
default=None,
|
|
231
|
+
validation_alias=AliasChoices("termCode", "https://schema.org/termCode"),
|
|
232
|
+
serialization_alias="https://schema.org/termCode",
|
|
233
|
+
)
|
|
234
|
+
"""
|
|
235
|
+
A code that identifies this [[DefinedTerm]] within a [[DefinedTermSet]].
|
|
236
|
+
"""
|
|
237
|
+
in_defined_term_set: AnyUrl | None = Field(
|
|
238
|
+
default=None,
|
|
239
|
+
validation_alias=AliasChoices(
|
|
240
|
+
"inDefinedTermSet", "https://schema.org/inDefinedTermSet"
|
|
241
|
+
),
|
|
242
|
+
serialization_alias="https://schema.org/inDefinedTermSet",
|
|
243
|
+
)
|
|
244
|
+
"""
|
|
245
|
+
A [[DefinedTermSet]] that contains this term.
|
|
246
|
+
"""
|
|
247
|
+
|
|
248
|
+
|
|
249
|
+
class CreativeWork(SoftwareApplicationModel):
|
|
250
|
+
"""
|
|
251
|
+
The most generic kind of creative work, including books, movies, photographs, software programs, etc.
|
|
252
|
+
"""
|
|
253
|
+
|
|
254
|
+
field_type: Literal["https://schema.org/CreativeWork"] = Field(
|
|
255
|
+
default="https://schema.org/CreativeWork",
|
|
256
|
+
validation_alias="@type",
|
|
257
|
+
serialization_alias="@type",
|
|
258
|
+
)
|
|
259
|
+
name: str | None = Field(
|
|
260
|
+
default=None,
|
|
261
|
+
validation_alias=AliasChoices("name", "https://schema.org/name"),
|
|
262
|
+
serialization_alias="https://schema.org/name",
|
|
263
|
+
)
|
|
264
|
+
"""
|
|
265
|
+
The name of the item.
|
|
266
|
+
"""
|
|
267
|
+
url: AnyUrl | None = Field(
|
|
268
|
+
default=None,
|
|
269
|
+
validation_alias=AliasChoices("url", "https://schema.org/url"),
|
|
270
|
+
serialization_alias="https://schema.org/url",
|
|
271
|
+
)
|
|
272
|
+
"""
|
|
273
|
+
URL of the item.
|
|
274
|
+
"""
|
|
275
|
+
identifier: AnyUrl | str | None = Field(
|
|
276
|
+
default=None,
|
|
277
|
+
validation_alias=AliasChoices("identifier", "https://schema.org/identifier"),
|
|
278
|
+
serialization_alias="https://schema.org/identifier",
|
|
279
|
+
)
|
|
280
|
+
"""
|
|
281
|
+
The identifier property represents any kind of identifier for any kind of [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See [background notes](/docs/datamodel.html#identifierBg) for more details.
|
|
282
|
+
|
|
283
|
+
"""
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
class ImageObject(SoftwareApplicationModel):
|
|
287
|
+
"""
|
|
288
|
+
An image file.
|
|
289
|
+
"""
|
|
290
|
+
|
|
291
|
+
field_type: Literal["https://schema.org/ImageObject"] = Field(
|
|
292
|
+
default="https://schema.org/ImageObject",
|
|
293
|
+
validation_alias="@type",
|
|
294
|
+
serialization_alias="@type",
|
|
295
|
+
)
|
|
296
|
+
content_url: AnyUrl | None = Field(
|
|
297
|
+
default=None,
|
|
298
|
+
validation_alias=AliasChoices("contentUrl", "https://schema.org/contentUrl"),
|
|
299
|
+
serialization_alias="https://schema.org/contentUrl",
|
|
300
|
+
)
|
|
301
|
+
"""
|
|
302
|
+
Actual bytes of the media object, for example the image file or video file.
|
|
303
|
+
"""
|
|
304
|
+
caption: str | None = Field(
|
|
305
|
+
default=None,
|
|
306
|
+
validation_alias=AliasChoices("caption", "https://schema.org/caption"),
|
|
307
|
+
serialization_alias="https://schema.org/caption",
|
|
308
|
+
)
|
|
309
|
+
"""
|
|
310
|
+
The caption for this object.
|
|
311
|
+
"""
|
|
312
|
+
encoding_format: str | None = Field(
|
|
313
|
+
default=None,
|
|
314
|
+
validation_alias=AliasChoices(
|
|
315
|
+
"encodingFormat", "https://schema.org/encodingFormat"
|
|
316
|
+
),
|
|
317
|
+
serialization_alias="https://schema.org/encodingFormat",
|
|
318
|
+
)
|
|
319
|
+
"""
|
|
320
|
+
Media type typically expressed using a MIME format (see [IANA site](http://www.iana.org/assignments/media-types/media-types.xhtml) and [MDN reference](https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types)), e.g. application/zip for a SoftwareApplication binary, audio/mpeg for .mp3 etc.
|
|
321
|
+
|
|
322
|
+
"""
|
|
323
|
+
width: int | None = Field(
|
|
324
|
+
default=None,
|
|
325
|
+
validation_alias=AliasChoices("width", "https://schema.org/width"),
|
|
326
|
+
serialization_alias="https://schema.org/width",
|
|
327
|
+
)
|
|
328
|
+
"""
|
|
329
|
+
The width of the item.
|
|
330
|
+
"""
|
|
331
|
+
height: int | None = Field(
|
|
332
|
+
default=None,
|
|
333
|
+
validation_alias=AliasChoices("height", "https://schema.org/height"),
|
|
334
|
+
serialization_alias="https://schema.org/height",
|
|
335
|
+
)
|
|
336
|
+
"""
|
|
337
|
+
The height of the item.
|
|
338
|
+
"""
|
|
339
|
+
|
|
340
|
+
|
|
341
|
+
class SoftwareApplication(SoftwareApplicationModel):
|
|
342
|
+
"""
|
|
343
|
+
A software application.
|
|
344
|
+
"""
|
|
345
|
+
|
|
346
|
+
field_type: Literal["https://schema.org/SoftwareApplication"] = Field(
|
|
347
|
+
default="https://schema.org/SoftwareApplication",
|
|
348
|
+
validation_alias="@type",
|
|
349
|
+
serialization_alias="@type",
|
|
350
|
+
)
|
|
351
|
+
name: str = Field(
|
|
352
|
+
...,
|
|
353
|
+
validation_alias=AliasChoices("name", "https://schema.org/name"),
|
|
354
|
+
serialization_alias="https://schema.org/name",
|
|
355
|
+
)
|
|
356
|
+
"""
|
|
357
|
+
The name of the item.
|
|
358
|
+
"""
|
|
359
|
+
description: str = Field(
|
|
360
|
+
...,
|
|
361
|
+
validation_alias=AliasChoices("description", "https://schema.org/description"),
|
|
362
|
+
serialization_alias="https://schema.org/description",
|
|
363
|
+
)
|
|
364
|
+
"""
|
|
365
|
+
A description of the item.
|
|
366
|
+
"""
|
|
367
|
+
date_created: date | datetime = Field(
|
|
368
|
+
...,
|
|
369
|
+
validation_alias=AliasChoices("dateCreated", "https://schema.org/dateCreated"),
|
|
370
|
+
serialization_alias="https://schema.org/dateCreated",
|
|
371
|
+
)
|
|
372
|
+
"""
|
|
373
|
+
The date on which the CreativeWork was created or the item was added to a DataFeed.
|
|
374
|
+
"""
|
|
375
|
+
license: CreativeWork | AnyUrl | list[CreativeWork | AnyUrl] = Field(
|
|
376
|
+
...,
|
|
377
|
+
validation_alias=AliasChoices("license", "https://schema.org/license"),
|
|
378
|
+
serialization_alias="https://schema.org/license",
|
|
379
|
+
)
|
|
380
|
+
"""
|
|
381
|
+
A license document that applies to this content, typically indicated by URL.
|
|
382
|
+
"""
|
|
383
|
+
identifier: AnyUrl | str | None = Field(
|
|
384
|
+
default=None,
|
|
385
|
+
validation_alias=AliasChoices("identifier", "https://schema.org/identifier"),
|
|
386
|
+
serialization_alias="https://schema.org/identifier",
|
|
387
|
+
)
|
|
388
|
+
"""
|
|
389
|
+
The identifier property represents any kind of identifier for any kind of [[Thing]], such as ISBNs, GTIN codes, UUIDs etc. Schema.org provides dedicated properties for representing many of these, either as textual strings or as URL (URI) links. See [background notes](/docs/datamodel.html#identifierBg) for more details.
|
|
390
|
+
|
|
391
|
+
"""
|
|
392
|
+
same_as: AnyUrl | list[AnyUrl] | None = Field(
|
|
393
|
+
default=None,
|
|
394
|
+
validation_alias=AliasChoices("sameAs", "https://schema.org/sameAs"),
|
|
395
|
+
serialization_alias="https://schema.org/sameAs",
|
|
396
|
+
)
|
|
397
|
+
"""
|
|
398
|
+
URL of a reference Web page that unambiguously indicates the item's identity. E.g. the URL of the item's Wikipedia page, Wikidata entry, or official website.
|
|
399
|
+
"""
|
|
400
|
+
keywords: str | AnyUrl | DefinedTerm | list[str | AnyUrl | DefinedTerm] | None = (
|
|
401
|
+
Field(
|
|
402
|
+
default=None,
|
|
403
|
+
validation_alias=AliasChoices("keywords", "https://schema.org/keywords"),
|
|
404
|
+
serialization_alias="https://schema.org/keywords",
|
|
405
|
+
)
|
|
406
|
+
)
|
|
407
|
+
"""
|
|
408
|
+
Keywords or tags used to describe some item. Multiple textual entries in a keywords list are typically delimited by commas, or by repeating the property.
|
|
409
|
+
"""
|
|
410
|
+
operating_system: str | list[str] | None = Field(
|
|
411
|
+
default=None,
|
|
412
|
+
validation_alias=AliasChoices(
|
|
413
|
+
"operatingSystem", "https://schema.org/operatingSystem"
|
|
414
|
+
),
|
|
415
|
+
serialization_alias="https://schema.org/operatingSystem",
|
|
416
|
+
)
|
|
417
|
+
"""
|
|
418
|
+
Operating systems supported (Windows 7, OS X 10.6, Android 1.6).
|
|
419
|
+
"""
|
|
420
|
+
software_requirements: str | AnyUrl | list[str | AnyUrl] | None = Field(
|
|
421
|
+
default=None,
|
|
422
|
+
validation_alias=AliasChoices(
|
|
423
|
+
"softwareRequirements", "https://schema.org/softwareRequirements"
|
|
424
|
+
),
|
|
425
|
+
serialization_alias="https://schema.org/softwareRequirements",
|
|
426
|
+
)
|
|
427
|
+
"""
|
|
428
|
+
Component dependency requirements for application. This includes runtime environments and shared libraries that are not included in the application distribution package, but required to run the application (examples: DirectX, Java or .NET runtime).
|
|
429
|
+
"""
|
|
430
|
+
software_version: str = Field(
|
|
431
|
+
...,
|
|
432
|
+
validation_alias=AliasChoices(
|
|
433
|
+
"softwareVersion", "https://schema.org/softwareVersion"
|
|
434
|
+
),
|
|
435
|
+
serialization_alias="https://schema.org/softwareVersion",
|
|
436
|
+
)
|
|
437
|
+
"""
|
|
438
|
+
Version of the software instance.
|
|
439
|
+
"""
|
|
440
|
+
software_help: CreativeWork | list[CreativeWork] = Field(
|
|
441
|
+
...,
|
|
442
|
+
validation_alias=AliasChoices(
|
|
443
|
+
"softwareHelp", "https://schema.org/softwareHelp"
|
|
444
|
+
),
|
|
445
|
+
serialization_alias="https://schema.org/softwareHelp",
|
|
446
|
+
)
|
|
447
|
+
"""
|
|
448
|
+
Software application help.
|
|
449
|
+
"""
|
|
450
|
+
publisher: Organization = Field(
|
|
451
|
+
...,
|
|
452
|
+
validation_alias=AliasChoices("publisher", "https://schema.org/publisher"),
|
|
453
|
+
serialization_alias="https://schema.org/publisher",
|
|
454
|
+
)
|
|
455
|
+
"""
|
|
456
|
+
The publisher of the article in question.
|
|
457
|
+
"""
|
|
458
|
+
author: AuthorRole | Person | list[AuthorRole | Person] = Field(
|
|
459
|
+
...,
|
|
460
|
+
validation_alias=AliasChoices("author", "https://schema.org/author"),
|
|
461
|
+
serialization_alias="https://schema.org/author",
|
|
462
|
+
)
|
|
463
|
+
"""
|
|
464
|
+
The author of this content or rating. Please note that author is special in that HTML 5 provides a special mechanism for indicating authorship via the rel tag. That is equivalent to this and may be used interchangeably.
|
|
465
|
+
"""
|
|
466
|
+
contributor: ContributorRole | Person | list[ContributorRole | Person] | None = (
|
|
467
|
+
Field(
|
|
468
|
+
default=None,
|
|
469
|
+
validation_alias=AliasChoices(
|
|
470
|
+
"contributor", "https://schema.org/contributor"
|
|
471
|
+
),
|
|
472
|
+
serialization_alias="https://schema.org/contributor",
|
|
473
|
+
)
|
|
474
|
+
)
|
|
475
|
+
"""
|
|
476
|
+
A secondary contributor to the CreativeWork or Event.
|
|
477
|
+
"""
|
|
478
|
+
thumbnail: ImageObject | None = Field(
|
|
479
|
+
default=None,
|
|
480
|
+
validation_alias=AliasChoices("thumbnail", "https://schema.org/thumbnail"),
|
|
481
|
+
serialization_alias="https://schema.org/thumbnail",
|
|
482
|
+
)
|
|
483
|
+
"""
|
|
484
|
+
Thumbnail image for an image or video.
|
|
485
|
+
"""
|
|
486
|
+
|
|
487
|
+
|
|
488
|
+
class SoftwareSourceCode(SoftwareApplicationModel):
|
|
489
|
+
"""
|
|
490
|
+
Computer programming source code.
|
|
491
|
+
"""
|
|
492
|
+
|
|
493
|
+
field_type: Literal["https://schema.org/SoftwareSourceCode"] = Field(
|
|
494
|
+
default="https://schema.org/SoftwareSourceCode",
|
|
495
|
+
validation_alias="@type",
|
|
496
|
+
serialization_alias="@type",
|
|
497
|
+
)
|
|
498
|
+
code_repository: AnyUrl = Field(
|
|
499
|
+
...,
|
|
500
|
+
validation_alias=AliasChoices(
|
|
501
|
+
"codeRepository", "https://schema.org/codeRepository"
|
|
502
|
+
),
|
|
503
|
+
serialization_alias="https://schema.org/codeRepository",
|
|
504
|
+
)
|
|
505
|
+
"""
|
|
506
|
+
Link to the repository where the un-compiled, human readable code and related code is located (SVN, GitHub, CodePlex).
|
|
507
|
+
"""
|
|
508
|
+
target_product: SoftwareApplication = Field(
|
|
509
|
+
...,
|
|
510
|
+
validation_alias=AliasChoices(
|
|
511
|
+
"targetProduct", "https://schema.org/targetProduct"
|
|
512
|
+
),
|
|
513
|
+
serialization_alias="https://schema.org/targetProduct",
|
|
514
|
+
)
|
|
515
|
+
"""
|
|
516
|
+
Target Operating System / Product to which the code applies. If applies to several versions, just the product name can be used.
|
|
517
|
+
"""
|
|
518
|
+
continuous_integration: AnyUrl | None = Field(
|
|
519
|
+
default=None,
|
|
520
|
+
validation_alias=AliasChoices(
|
|
521
|
+
"continuousIntegration", "https://schema.org/continuousIntegration"
|
|
522
|
+
),
|
|
523
|
+
serialization_alias="https://schema.org/continuousIntegration",
|
|
524
|
+
)
|
|
525
|
+
issue_tracker: AnyUrl | None = Field(
|
|
526
|
+
default=None,
|
|
527
|
+
validation_alias=AliasChoices(
|
|
528
|
+
"issueTracker", "https://schema.org/issueTracker"
|
|
529
|
+
),
|
|
530
|
+
serialization_alias="https://schema.org/issueTracker",
|
|
531
|
+
)
|
|
532
|
+
related_link: AnyUrl | list[AnyUrl] | None = Field(
|
|
533
|
+
default=None,
|
|
534
|
+
validation_alias=AliasChoices("relatedLink", "https://schema.org/relatedLink"),
|
|
535
|
+
serialization_alias="https://schema.org/relatedLink",
|
|
536
|
+
)
|
|
537
|
+
|
|
538
|
+
|
|
539
|
+
class Model(RootModel[SoftwareApplication]):
|
|
540
|
+
root: SoftwareApplication
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: transpiler-mate-api
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Stable, execution-environment-neutral contracts for transpiler-mate plugins
|
|
5
|
+
Project-URL: Documentation, https://transpiler-mate.github.io/transpiler-mate-api/
|
|
6
|
+
Project-URL: Issues, https://github.com/transpiler-mate/transpiler-mate-api/issues
|
|
7
|
+
Project-URL: Source, https://github.com/transpiler-mate/transpiler-mate-api
|
|
8
|
+
Author-email: Simone Tripodi <simone.tripodi@terradue.com>, Fabrice Brito <fabrice.brito@terradue.com>
|
|
9
|
+
License-Expression: Apache-2.0
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Programming Language :: Python
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
18
|
+
Classifier: Programming Language :: Python :: Implementation :: CPython
|
|
19
|
+
Classifier: Programming Language :: Python :: Implementation :: PyPy
|
|
20
|
+
Requires-Python: >=3.10
|
|
21
|
+
Requires-Dist: cwl-utils<1,>=0.43
|
|
22
|
+
Requires-Dist: email-validator>=2.3.0
|
|
23
|
+
Requires-Dist: pydantic<3,>=2.13.4
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
transpiler_mate/api/__about__.py,sha256=8YusF-3dJvR_O2nhUy165aTcJC-2y0VUzn-6MBBz2Dw,816
|
|
2
|
+
transpiler_mate/api/__init__.py,sha256=MBDoPBf3R9iEBdyXbgi_3rmMfgTbuulUaJ2YOLiaa0E,1667
|
|
3
|
+
transpiler_mate/api/plugin.py,sha256=cpU3Y86Xft6C7ImfCGfPnsbnr0dSxD__MhJNMcQ0YPU,6035
|
|
4
|
+
transpiler_mate/api/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
5
|
+
transpiler_mate/api/software_application_models.py,sha256=sngNyZUqQNiQuFyGx5anD4auaJdlJEVrkWCE7dWjDkY,19539
|
|
6
|
+
transpiler_mate_api-1.0.0.dist-info/METADATA,sha256=Fa8XtaVdAcWX1y9_-YaiiUWi8IpInuFBk5u5pxeuLyw,1159
|
|
7
|
+
transpiler_mate_api-1.0.0.dist-info/WHEEL,sha256=zOwg4jB6zX2kU910N-cMawjivD6tO8NEWvE12je1bVk,87
|
|
8
|
+
transpiler_mate_api-1.0.0.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
|
|
9
|
+
transpiler_mate_api-1.0.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,201 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction,
|
|
10
|
+
and distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work
|
|
38
|
+
(an example is provided in the Appendix below).
|
|
39
|
+
|
|
40
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
41
|
+
form, that is based on (or derived from) the Work and for which the
|
|
42
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
43
|
+
represent, as a whole, an original work of authorship. For the purposes
|
|
44
|
+
of this License, Derivative Works shall not include works that remain
|
|
45
|
+
separable from, or merely link (or bind by name) to the interfaces of,
|
|
46
|
+
the Work and Derivative Works thereof.
|
|
47
|
+
|
|
48
|
+
"Contribution" shall mean any work of authorship, including
|
|
49
|
+
the original version of the Work and any modifications or additions
|
|
50
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
51
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
52
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
53
|
+
the copyright owner. For the purposes of this definition, "submitted"
|
|
54
|
+
means any form of electronic, verbal, or written communication sent
|
|
55
|
+
to the Licensor or its representatives, including but not limited to
|
|
56
|
+
communication on electronic mailing lists, source code control systems,
|
|
57
|
+
and issue tracking systems that are managed by, or on behalf of, the
|
|
58
|
+
Licensor for the purpose of discussing and improving the Work, but
|
|
59
|
+
excluding communication that is conspicuously marked or otherwise
|
|
60
|
+
designated in writing by the copyright owner as "Not a Contribution."
|
|
61
|
+
|
|
62
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
63
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
64
|
+
subsequently incorporated within the Work.
|
|
65
|
+
|
|
66
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
67
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
68
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
69
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
70
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
71
|
+
Work and such Derivative Works in Source or Object form.
|
|
72
|
+
|
|
73
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
74
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
75
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
76
|
+
(except as stated in this section) patent license to make, have made,
|
|
77
|
+
use, offer to sell, sell, import, and otherwise transfer the Work,
|
|
78
|
+
where such license applies only to those patent claims licensable
|
|
79
|
+
by such Contributor that are necessarily infringed by their
|
|
80
|
+
Contribution(s) alone or by combination of their Contribution(s)
|
|
81
|
+
with the Work to which such Contribution(s) was submitted. If You
|
|
82
|
+
institute patent litigation against any entity (including a
|
|
83
|
+
cross-claim or counterclaim in a lawsuit) alleging that the Work
|
|
84
|
+
or a Contribution incorporated within the Work constitutes direct
|
|
85
|
+
or contributory patent infringement, then any patent licenses
|
|
86
|
+
granted to You under this License for that Work shall terminate
|
|
87
|
+
as of the date such litigation is filed.
|
|
88
|
+
|
|
89
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
90
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
91
|
+
modifications, and in Source or Object form, provided that You
|
|
92
|
+
meet the following conditions:
|
|
93
|
+
|
|
94
|
+
(a) You must give any other recipients of the Work or
|
|
95
|
+
Derivative Works a copy of this License; and
|
|
96
|
+
|
|
97
|
+
(b) You must cause any modified files to carry prominent notices
|
|
98
|
+
stating that You changed the files; and
|
|
99
|
+
|
|
100
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
101
|
+
that You distribute, all copyright, patent, trademark, and
|
|
102
|
+
attribution notices from the Source form of the Work,
|
|
103
|
+
excluding those notices that do not pertain to any part of
|
|
104
|
+
the Derivative Works; and
|
|
105
|
+
|
|
106
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
107
|
+
distribution, then any Derivative Works that You distribute must
|
|
108
|
+
include a readable copy of the attribution notices contained
|
|
109
|
+
within such NOTICE file, excluding those notices that do not
|
|
110
|
+
pertain to any part of the Derivative Works, in at least one
|
|
111
|
+
of the following places: within a NOTICE text file distributed
|
|
112
|
+
as part of the Derivative Works; within the Source form or
|
|
113
|
+
documentation, if provided along with the Derivative Works; or,
|
|
114
|
+
within a display generated by the Derivative Works, if and
|
|
115
|
+
wherever such third-party notices normally appear. The contents
|
|
116
|
+
of the NOTICE file are for informational purposes only and
|
|
117
|
+
do not modify the License. You may add Your own attribution
|
|
118
|
+
notices within Derivative Works that You distribute, alongside
|
|
119
|
+
or as an addendum to the NOTICE text from the Work, provided
|
|
120
|
+
that such additional attribution notices cannot be construed
|
|
121
|
+
as modifying the License.
|
|
122
|
+
|
|
123
|
+
You may add Your own copyright statement to Your modifications and
|
|
124
|
+
may provide additional or different license terms and conditions
|
|
125
|
+
for use, reproduction, or distribution of Your modifications, or
|
|
126
|
+
for any such Derivative Works as a whole, provided Your use,
|
|
127
|
+
reproduction, and distribution of the Work otherwise complies with
|
|
128
|
+
the conditions stated in this License.
|
|
129
|
+
|
|
130
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
131
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
132
|
+
by You to the Licensor shall be under the terms and conditions of
|
|
133
|
+
this License, without any additional terms or conditions.
|
|
134
|
+
Notwithstanding the above, nothing herein shall supersede or modify
|
|
135
|
+
the terms of any separate license agreement you may have executed
|
|
136
|
+
with Licensor regarding such Contributions.
|
|
137
|
+
|
|
138
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
139
|
+
names, trademarks, service marks, or product names of the Licensor,
|
|
140
|
+
except as required for reasonable and customary use in describing the
|
|
141
|
+
origin of the Work and reproducing the content of the NOTICE file.
|
|
142
|
+
|
|
143
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
144
|
+
agreed to in writing, Licensor provides the Work (and each
|
|
145
|
+
Contributor provides its Contributions) on an "AS IS" BASIS,
|
|
146
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
147
|
+
implied, including, without limitation, any warranties or conditions
|
|
148
|
+
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
|
|
149
|
+
PARTICULAR PURPOSE. You are solely responsible for determining the
|
|
150
|
+
appropriateness of using or redistributing the Work and assume any
|
|
151
|
+
risks associated with Your exercise of permissions under this License.
|
|
152
|
+
|
|
153
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
154
|
+
whether in tort (including negligence), contract, or otherwise,
|
|
155
|
+
unless required by applicable law (such as deliberate and grossly
|
|
156
|
+
negligent acts) or agreed to in writing, shall any Contributor be
|
|
157
|
+
liable to You for damages, including any direct, indirect, special,
|
|
158
|
+
incidental, or consequential damages of any character arising as a
|
|
159
|
+
result of this License or out of the use or inability to use the
|
|
160
|
+
Work (including but not limited to damages for loss of goodwill,
|
|
161
|
+
work stoppage, computer failure or malfunction, or any and all
|
|
162
|
+
other commercial damages or losses), even if such Contributor
|
|
163
|
+
has been advised of the possibility of such damages.
|
|
164
|
+
|
|
165
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
166
|
+
the Work or Derivative Works thereof, You may choose to offer,
|
|
167
|
+
and charge a fee for, acceptance of support, warranty, indemnity,
|
|
168
|
+
or other liability obligations and/or rights consistent with this
|
|
169
|
+
License. However, in accepting such obligations, You may act only
|
|
170
|
+
on Your own behalf and on Your sole responsibility, not on behalf
|
|
171
|
+
of any other Contributor, and only if You agree to indemnify,
|
|
172
|
+
defend, and hold each Contributor harmless for any liability
|
|
173
|
+
incurred by, or claims asserted against, such Contributor by reason
|
|
174
|
+
of your accepting any such warranty or additional liability.
|
|
175
|
+
|
|
176
|
+
END OF TERMS AND CONDITIONS
|
|
177
|
+
|
|
178
|
+
APPENDIX: How to apply the Apache License to your work.
|
|
179
|
+
|
|
180
|
+
To apply the Apache License to your work, attach the following
|
|
181
|
+
boilerplate notice, with the fields enclosed by brackets "[]"
|
|
182
|
+
replaced with your own identifying information. (Don't include
|
|
183
|
+
the brackets!) The text should be enclosed in the appropriate
|
|
184
|
+
comment syntax for the file format. We also recommend that a
|
|
185
|
+
file or class name and description of purpose be included on the
|
|
186
|
+
same "printed page" as the copyright notice for easier
|
|
187
|
+
identification within third-party archives.
|
|
188
|
+
|
|
189
|
+
Copyright [yyyy] [name of copyright owner]
|
|
190
|
+
|
|
191
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
|
192
|
+
you may not use this file except in compliance with the License.
|
|
193
|
+
You may obtain a copy of the License at
|
|
194
|
+
|
|
195
|
+
http://www.apache.org/licenses/LICENSE-2.0
|
|
196
|
+
|
|
197
|
+
Unless required by applicable law or agreed to in writing, software
|
|
198
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
|
199
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
200
|
+
See the License for the specific language governing permissions and
|
|
201
|
+
limitations under the License.
|