-
Notifications
You must be signed in to change notification settings - Fork 7
Open
0 / 10 of 1 issue completedLabels
data modelRelated to the hermes data modelRelated to the hermes data model
Description
Implement as follows:
Use the Schema.org names SoftwareSourceCode and SoftwareApplication and provide classes for both (here still called SoftwareMetadata), or (perhaps better) add a flag software_application: bool = False to auto-add @type to the returned data.
from .types.software_metadata import SoftwareMetadata- Create
SoftwareMetadataclass in.types.software_metadatasimilar to the following, but taking either:- a single schema or a list of schemas, or
- a list of schemas (as below)
class SoftwareMetadata(ld_dict):
def __init__(self, extra_contexts=[]):
super().__init__([{}], context=[*ld_context.HERMES_BASE_CONTEXT, *extra_contexts])Now, clients can access data (and inject new schemas to be used) by doing:
from hermes.model import SoftwareMetadata
data = SoftwareMetadata(extra_contexts=[{"my_schema": "https://my_schema.tld", "other_schema": "https://other_schema.tld"}])
data["my_schema:field"] = "foo"
data["other_schema:field"] = "bar"
data["funding"] = "nope" # from CodeMeta
return dataSub-issues
Metadata
Metadata
Assignees
Labels
data modelRelated to the hermes data modelRelated to the hermes data model