Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
140 changes: 140 additions & 0 deletions schemas/deployments-schema.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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" }
31 changes: 31 additions & 0 deletions tests/good_deployments/template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,37 @@ deployment:

administrative:
sources: '' # white papers
evidence_sources:
example_source_1:
evidence_source_type: "Peer-reviewed publication"
article:
Comment thread
tercer marked this conversation as resolved.
Resolved
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.
5 changes: 4 additions & 1 deletion tests/test_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down Expand Up @@ -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
4 changes: 3 additions & 1 deletion tests/test_ui_hints.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Loading