diff --git a/schemas/deployments-schema.yaml b/schemas/deployments-schema.yaml index 2ba4b9da..8bd432e4 100644 --- a/schemas/deployments-schema.yaml +++ b/schemas/deployments-schema.yaml @@ -359,6 +359,99 @@ properties: This section may also include links to the data product itself, if publicly available. tier: 1 type: string + evidence_sources: + description_long: | + This section includes links to white papers, blogposts, or other sources that describe the deployment. + This section may also include links to the data product itself, if publicly available. + tier: 1 + type: object + patternProperties: + ^\w+$: + oneOf: + - + type: object + additionalProperties: False + properties: + evidence_source_type: { $ref: "#/$defs/evidence_source_type" } + article: { $ref: "#/$defs/bibtex_fields" } + - + type: object + additionalProperties: False + properties: + evidence_source_type: { $ref: "#/$defs/evidence_source_type" } + book: { $ref: "#/$defs/bibtex_fields" } + - + type: object + additionalProperties: False + properties: + evidence_source_type: { $ref: "#/$defs/evidence_source_type" } + booklet: { $ref: "#/$defs/bibtex_fields" } + - + type: object + additionalProperties: False + properties: + evidence_source_type: { $ref: "#/$defs/evidence_source_type" } + conference: { $ref: "#/$defs/bibtex_fields" } + - + type: object + additionalProperties: False + properties: + evidence_source_type: { $ref: "#/$defs/evidence_source_type" } + inbook: { $ref: "#/$defs/bibtex_fields" } + - + type: object + additionalProperties: False + properties: + evidence_source_type: { $ref: "#/$defs/evidence_source_type" } + incollection: { $ref: "#/$defs/bibtex_fields" } + - + type: object + additionalProperties: False + properties: + evidence_source_type: { $ref: "#/$defs/evidence_source_type" } + inproceedings: { $ref: "#/$defs/bibtex_fields" } + - + type: object + additionalProperties: False + properties: + evidence_source_type: { $ref: "#/$defs/evidence_source_type" } + manual: { $ref: "#/$defs/bibtex_fields" } + - + type: object + additionalProperties: False + properties: + evidence_source_type: { $ref: "#/$defs/evidence_source_type" } + mastersthesis: { $ref: "#/$defs/bibtex_fields" } + - + type: object + additionalProperties: False + properties: + evidence_source_type: { $ref: "#/$defs/evidence_source_type" } + misc: { $ref: "#/$defs/bibtex_fields" } + - + type: object + additionalProperties: False + properties: + evidence_source_type: { $ref: "#/$defs/evidence_source_type" } + phdthesis: { $ref: "#/$defs/bibtex_fields" } + - + type: object + additionalProperties: False + properties: + evidence_source_type: { $ref: "#/$defs/evidence_source_type" } + proceedings: { $ref: "#/$defs/bibtex_fields" } + - + type: object + additionalProperties: False + properties: + evidence_source_type: { $ref: "#/$defs/evidence_source_type" } + techreport: { $ref: "#/$defs/bibtex_fields" } + - + type: object + additionalProperties: False + properties: + evidence_source_type: { $ref: "#/$defs/evidence_source_type" } + unpublished: { $ref: "#/$defs/bibtex_fields" } notes: tier: 1 type: string @@ -368,3 +461,50 @@ properties: items: type: string minItems: 1 +$defs: + string_or_number: + # We want to avoid spurious validation errors + # if someone enters an unquoted number in yaml. + # Downstream string concatenation will work either way. + anyOf: + - type: string + - type: number + evidence_source_type: + type: string + enum: + - Peer-reviewed publication + - Formal publication by the deploying organization + - Authorized organizational attestation + - Other public source + bibtex_fields: + type: object + additionalProperties: False + properties: + address: { type: string } + annote: { type: string } + author: { type: string } + booktitle: { type: string } + chapter: { $ref: "#/$defs/string_or_number" } + # crossref (https://bibtex.eu/fields/ only) + doi: { $ref: "#/$defs/string_or_number" } + edition: { $ref: "#/$defs/string_or_number" } + editor: { type: string } + email: { type: string } + howpublished: { type: string } + institution: { type: string } + issn: { $ref: "#/$defs/string_or_number" } + isbn: { $ref: "#/$defs/string_or_number" } + journal: { type: string } + month: { $ref: "#/$defs/string_or_number" } + note: { type: string } + number: { $ref: "#/$defs/string_or_number" } + organization: { type: string } + pages: { $ref: "#/$defs/string_or_number" } + publisher: { type: string } + school: { type: string } + type: { type: string } + series: { type: string } + title: { type: string } + url: { type: string } + volume: { $ref: "#/$defs/string_or_number" } + year: { $ref: "#/$defs/string_or_number" } diff --git a/tests/good_deployments/template.yaml b/tests/good_deployments/template.yaml index 7904caef..ff824378 100644 --- a/tests/good_deployments/template.yaml +++ b/tests/good_deployments/template.yaml @@ -51,6 +51,37 @@ deployment: administrative: sources: '' # white papers + evidence_sources: + example_source_1: + evidence_source_type: "Peer-reviewed publication" + article: + address: '' + annote: '' + author: '' + booktitle: '' + chapter: '' + doi: '' + edition: '' + editor: '' + email: '' + howpublished: '' + institution: '' + issn: '' + isbn: '' + journal: '' + month: '' + note: '' + number: '' + organization: '' + pages: '' + publisher: '' + school: '' + type: '' + series: '' + title: '' + url: '' + volume: '' + year: '' notes: '' # other extra information registry_authors: - '' # Fill in correct value. diff --git a/tests/test_schema.py b/tests/test_schema.py index a35bec58..553b36e5 100644 --- a/tests/test_schema.py +++ b/tests/test_schema.py @@ -40,6 +40,7 @@ def test_node_has_details(path, node): "/deployment/implementation", "/deployment/administrative", "/deployment/administrative/sources", + "/deployment/administrative/evidence_sources", "/deployment/administrative/notes", ]: assert "description" not in node.keys() @@ -111,5 +112,7 @@ def test_object_has_additional_properties_false(path, node): def test_template_is_complete(): - template_paths = [path for path, node in path_templates] + template_paths = [ + path for path, node in path_templates if "evidence_sources/" not in path + ] assert template_paths == paths diff --git a/tests/test_ui_hints.py b/tests/test_ui_hints.py index 99a203bc..89626c05 100644 --- a/tests/test_ui_hints.py +++ b/tests/test_ui_hints.py @@ -68,7 +68,9 @@ def test_deployments_in_order(yaml_path): # UI code will be simpler if it can rely on deployment YAML # always being in the prescribed order. deployment = load(yaml_path.open(), Loader=Loader) - deployment_paths = list(walk_dict(deployment)) + deployment_paths = [ + path for path in walk_dict(deployment) if "evidence_sources/" not in path + ] misordered = out_of_order(deployment_paths, paths) assert ( not misordered