asb-schema 0.3.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.
- asb_schema/__init__.py +42 -0
- asb_schema/asb.yaml +34 -0
- asb_schema/asb_capsule.schema.json +1430 -0
- asb_schema/asb_capsule.yaml +183 -0
- asb_schema/asb_card.schema.json +1316 -0
- asb_schema/asb_card.yaml +1087 -0
- asb_schema/asb_skill_bundle.schema.json +741 -0
- asb_schema/asb_skill_bundle.yaml +592 -0
- asb_schema/asb_skill_collection.schema.json +1071 -0
- asb_schema/asb_skill_collection.yaml +349 -0
- asb_schema/asb_skill_collection_registry.schema.json +954 -0
- asb_schema/asb_skill_collection_registry.yaml +111 -0
- asb_schema/asb_trace.schema.json +209 -0
- asb_schema/asb_trace.yaml +192 -0
- asb_schema/compat.py +71 -0
- asb_schema/context.jsonld +206 -0
- asb_schema-0.3.0.dist-info/METADATA +73 -0
- asb_schema-0.3.0.dist-info/RECORD +21 -0
- asb_schema-0.3.0.dist-info/WHEEL +5 -0
- asb_schema-0.3.0.dist-info/licenses/LICENSE +201 -0
- asb_schema-0.3.0.dist-info/top_level.txt +1 -0
asb_schema/__init__.py
ADDED
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"""ASB Standard LinkML schema package (v0.3.0; replaces the legacy package in earlier releases)."""
|
|
2
|
+
from importlib.resources import files
|
|
3
|
+
|
|
4
|
+
__version__ = "0.3.0"
|
|
5
|
+
|
|
6
|
+
PACKAGE_DIR = files(__name__)
|
|
7
|
+
|
|
8
|
+
KNOWN_SCHEMAS = (
|
|
9
|
+
"asb_card",
|
|
10
|
+
"asb_capsule",
|
|
11
|
+
"asb_skill_bundle",
|
|
12
|
+
"asb_skill_collection",
|
|
13
|
+
"asb_skill_collection_registry",
|
|
14
|
+
)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def schema_path(filename: str):
|
|
18
|
+
"""Return the Path to a bundled schema file (legacy helper)."""
|
|
19
|
+
return PACKAGE_DIR / filename
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
def get_schema_path(name: str) -> str:
|
|
23
|
+
"""Return the path to a bundled LinkML schema file.
|
|
24
|
+
|
|
25
|
+
Args:
|
|
26
|
+
name: one of KNOWN_SCHEMAS
|
|
27
|
+
"""
|
|
28
|
+
if name not in KNOWN_SCHEMAS:
|
|
29
|
+
raise ValueError(f"Unknown schema {name!r}; valid: {KNOWN_SCHEMAS}")
|
|
30
|
+
return str(PACKAGE_DIR.joinpath(f"{name}.yaml"))
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
def get_json_schema_path(name: str) -> str:
|
|
34
|
+
"""Return the path to a bundled JSON Schema file."""
|
|
35
|
+
if name not in KNOWN_SCHEMAS:
|
|
36
|
+
raise ValueError(f"Unknown schema {name!r}; valid: {KNOWN_SCHEMAS}")
|
|
37
|
+
return str(PACKAGE_DIR.joinpath(f"{name}.schema.json"))
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def get_jsonld_context_path() -> str:
|
|
41
|
+
"""Return the path to the bundled JSON-LD @context emitted from the LinkML schema."""
|
|
42
|
+
return str(PACKAGE_DIR.joinpath("context.jsonld"))
|
asb_schema/asb.yaml
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
id: https://w3id.org/holobiomicslab/asb-schema/v0.2
|
|
2
|
+
name: asb_standard
|
|
3
|
+
description: >-
|
|
4
|
+
ASB Standard v0.2 — schema for scientific benchmark substrates and curated
|
|
5
|
+
skill / tool release collections. Imports sub-schemas for ASB Cards,
|
|
6
|
+
Capsules, Skill Bundles, Skill Collections, and the SkillCollectionRegistry.
|
|
7
|
+
|
|
8
|
+
license: CC-BY-4.0
|
|
9
|
+
version: "0.2.0"
|
|
10
|
+
|
|
11
|
+
prefixes:
|
|
12
|
+
linkml: https://w3id.org/linkml/
|
|
13
|
+
asb: https://w3id.org/holobiomicslab/asb-schema/
|
|
14
|
+
asbskill: https://w3id.org/holobiomicslab/asb-skill/
|
|
15
|
+
schema: http://schema.org/
|
|
16
|
+
dcterms: http://purl.org/dc/terms/
|
|
17
|
+
pplan: http://purl.org/net/p-plan#
|
|
18
|
+
prov: http://www.w3.org/ns/prov#
|
|
19
|
+
EDAM: http://edamontology.org/
|
|
20
|
+
rocrate: https://w3id.org/ro/crate#
|
|
21
|
+
|
|
22
|
+
imports:
|
|
23
|
+
- linkml:types
|
|
24
|
+
- asb_card
|
|
25
|
+
- asb_capsule
|
|
26
|
+
- asb_skill_bundle
|
|
27
|
+
- asb_skill_collection
|
|
28
|
+
- asb_skill_collection_registry
|
|
29
|
+
# NOTE: LinkML resolves imports by appending .yaml; run gen-jsonschema per schema file.
|
|
30
|
+
# Use generate.sh from the repo root to regenerate all artefacts:
|
|
31
|
+
# bash asb-schema/generate.sh
|
|
32
|
+
|
|
33
|
+
default_prefix: asb
|
|
34
|
+
default_range: string
|