Skip to content

Commit

Permalink
Merge pull request #36 from TranslatorSRI/make-testmetadata-optional
Browse files Browse the repository at this point in the history
test_metadata made optional
  • Loading branch information
sierra-moxon authored Apr 25, 2024
2 parents 1e11527 + 1c7319e commit c360233
Show file tree
Hide file tree
Showing 32 changed files with 1,110 additions and 1,258 deletions.
41 changes: 9 additions & 32 deletions examples/Bad-TestAsset-001.yaml
Original file line number Diff line number Diff line change
@@ -1,38 +1,15 @@
# Example TestAsset data object
---
# TODO: the TestAsset example data needs further elaboration

#
# TestAsset:
# description: >-
# Represents a Test Asset, which is a single specific instance of
# TestCase-agnostic semantic parameters representing the
# specification of a Translator test target with inputs and (expected) outputs.
# is_a: TestEntity
# slots:
# - input_id
# - input_name
# - predicate
# - output_id
# - output_name
# - expected_output
# - test_issue
# - semantic_severity
# - in_v1
# - well_known
# - test_metadata
# slot_usage:
# id:
# aliases: ["AssetIdentifier"]
# range: uriorcurie
# tags:
# description: >-
# One or more 'tags' slot values (inherited from TestEntity) should generally
# be defined to specify TestAsset membership in a "Block List" collection
#
# Bad Query 1 - Missing required identifier?

# id: example:TestAsset001
name: foo bar
description: This is a test asset
test_meta_data: { "foo": "bar" }
name: TestAsset001
description: Fingolimod treats multiple sclerosis
input_id: PUBCHEM.COMPOUND:107970
predicate_name: treats
output_id: MONDO:0005301
expected_output: Acceptable
test_runner_settings:
- "inferred"
- "test"
38 changes: 0 additions & 38 deletions examples/Bad-TestCase-001.yaml

This file was deleted.

2 changes: 2 additions & 0 deletions examples/Bad-TestEntity-001.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
# - id
# - name
# - description
# - tags
# - test_runner_settings
#
# where the slots are:
#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
# - id
# - name
# - description
# - tags
# - test_runner_settings
#
# where the slots are:
#
Expand Down
19 changes: 11 additions & 8 deletions examples/Good-AcceptanceTestAsset-001.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Example AcceptanceTestAsset data object
---
# TODO: the AcceptanceTestAsset example data needs further elaboration
# (there don't seem to be any required: true AcceptanceTestAsset-specific fields)

#
# AcceptanceTestAsset:
Expand All @@ -21,14 +22,16 @@
# - notes
#
id: example:AcceptanceTestAsset001
name: foo bar
description: This is a acceptance test case'
runner_settings:
name: AcceptanceTestAsset001
description: Iron treats Aceruloplasminemia
input_id: MONDO:0011426
predicate_name: treats
output_id: DRUGBANK:DB01592
expected_output: NeverShow
test_metadata:
id: "test:1"
test_source: SMURF
test_runner_settings:
- "inferred"
- "test"
test_metadata:
id: 1
test_source: SMURF,
test_reference: https://github.com/NCATSTranslator/Feedback/issues/506
test_objective: AcceptanceTest

20 changes: 15 additions & 5 deletions examples/Good-AcceptanceTestCase-001.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,20 @@
id: example:AcceptanceTestCase001
name: foo bar
description: This is an acceptance test case
test_runner_settings:
- "inferred"
- "test"
test_assets:
- id: example:TestAsset001
name: foo bar
description: This is a test asset
runner_settings:
- id: example:AcceptanceTestAsset001
name: AcceptanceTestAsset001
description: Iron treats Aceruloplasminemia
input_id: MONDO:0011426
predicate_name: treats
output_id: DRUGBANK:DB01592
expected_output: NeverShow
test_runner_settings:
- "inferred"
- "test"
- "test"
test_metadata:
id: "test:1"
test_source: SMURF
19 changes: 8 additions & 11 deletions examples/Good-TestAsset-001.json
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
{
"id": "example:TestAsset001",
"name": "foo bar",
"description": "This is a test asset",
"runner_settings": ["inferred", "test"],
"name": "TestAsset001",
"description": "Fingolimod treats multiple sclerosis",
"input_id": "PUBCHEM.COMPOUND:107970",
"predicate_name": "treats",
"output_id": "MONDO:0005301",
"expected_output": "Acceptable",
"test_runner_settings": ["inferred", "test"],
"test_metadata": {
"id": "1",
"name": null,
"description": null,
"tags": [],
"test_source": "SMURF",
"test_reference": "https://github.com/NCATSTranslator/Feedback/issues/506",
"test_objective": "AcceptanceTest",
"test_annotations": []
"id": "example:TestAsset001"
}
}
27 changes: 15 additions & 12 deletions examples/Good-TestAsset-001.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
# Example TestAsset data object
---
# TODO: the TestAsset example data needs further elaboration
# TODO: the TestAsset example data may need further elaboration

#
#
# TestAsset:
# description: >-
Expand All @@ -12,15 +13,20 @@
# slots:
# - input_id
# - input_name
# - predicate
# - input_category
# - predicate_id
# - predicate_name
# - output_id
# - output_name
# - output_category
# - association
# - qualifiers
# - expected_output
# - test_issue
# - semantic_severity
# - in_v1
# - well_known
# - runner_settings
# - test_reference
# slot_usage:
# id:
# aliases: ["AssetIdentifier"]
Expand All @@ -29,7 +35,7 @@
# description: >-
# One or more 'tags' slot values (inherited from TestEntity) should generally
# be defined to specify TestAsset membership in a "Block List" collection
# runner_settings:
# test_runner_settings:
# description: >-
# Settings for the test harness, e.g. "inferred"
#
Expand All @@ -38,19 +44,16 @@ name: TestAsset001
description: Iron treats Aceruloplasminemia
input_id: MONDO:0011426
input_name: Aceruloplasminemia
predicate: Treats
predicate_name: treats
output_id: DRUGBANK:DB01592
output_name: Iron (PUBCHEM)
expected_output: NeverShow
test_reference: https://github.com/NCATSTranslator/Feedback/issues/506
semantic_severity: NotApplicable
in_v1: True
well_known: False
runner_settings:
- "inferred"
- "test"
test_metadata:
id: 1
test_source: SMURF,
test_reference: https://github.com/NCATSTranslator/Feedback/issues/506
test_objective: AcceptanceTest
id: "example:TestAsset001"
test_runner_settings:
- "inferred"
- "test"
16 changes: 12 additions & 4 deletions examples/Good-TestCase-001.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,17 @@
"test_assets": [
{
"id": "example:TestAsset001",
"name": "foo bar",
"description": "This is a test asset",
"runner_settings": ["inferred","test_setting"]
"name": "TestAsset001",
"description": "Fingolimod treats multiple sclerosis",
"input_id": "PUBCHEM.COMPOUND:107970",
"predicate_name": "treats",
"output_id": "MONDO:0005301",
"expected_output": "Acceptable",
"test_runner_settings": ["inferred", "test"],
"test_metadata": {
"id": "example:TestMetadata001"
}
}
]
],
"test_runner_settings": ["inferred", "test"]
}
17 changes: 14 additions & 3 deletions examples/Good-TestCase-001.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
---
# TODO: the TestCase example data needs further elaboration
#
#
# TestCase:
# description: >-
# Represents a single enumerated instance of Test Case, derived from a
Expand Down Expand Up @@ -34,10 +35,20 @@
id: example:TestCase001
name: foo bar
description: This is a test case
# NOTE: we only provide the minimal set of TestAsset slots where required: true
test_assets:
- id: example:TestAsset001
name: foo bar
description: This is a test asset
runner_settings:
name: TestAsset001
input_id: MONDO:0011426
predicate_name: treats
output_id: DRUGBANK:DB01592
expected_output: NeverShow
test_runner_settings:
- "inferred"
- "test"
test_metadata:
id: test:1
test_source: SMURF
test_runner_settings:
- "inferred"
- "test"
4 changes: 4 additions & 0 deletions examples/Good-TestCaseSpecification-001.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,7 @@
id: example:TestCaseSpecification001
name: foo bar
description: This is a test case specification
test_case_specification_runner_settings:
- "inferred"
- "test"

2 changes: 2 additions & 0 deletions examples/Good-TestEntity-Complete.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
# - id
# - name
# - description
# - tags
# - test_runner_settings
#
# where the slots are:
#
Expand Down
3 changes: 3 additions & 0 deletions examples/Good-TestSuite-001.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,6 @@
id: example:TestSuite001
name: foo bar
description: This is a test suite
test_metadata:
id: test:1
test_source: SMURF
34 changes: 22 additions & 12 deletions examples/SampleTestAssetList.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,30 @@
[
{
"id": "example:TestAsset001",
"name": "foo bar",
"description": "This is a test asset",
"runner_settings": ["inferred","test_setting"]
"name": "TestAsset001",
"description": "Fingolimod treats multiple sclerosis",
"input_id": "PUBCHEM.COMPOUND:107970",
"predicate_name": "treats",
"output_id": "MONDO:0005301",
"expected_output": "Acceptable",
"runner_settings": ["inferred", "test"],
"test_metadata": {
"id": "example:TestAsset001",
"source": "SMURF"
}
},
{
"id": "example:TestAsset002",
"name": "tweedle dee",
"description": "This is another test asset",
"runner_settings": ["inferred","test_setting"]
},
{
"id": "example:TestAsset003",
"name": "tweedle dum",
"description": "This is yetanuder test asset",
"runner_settings": ["inferred","test_setting"]
"name": "TestAsset002",
"description": "Carbamazepine treats Cerebral palsy",
"input_id": "PUBCHEM.COMPOUND:2554",
"predicate_name": "treats",
"output_id": "MONDO:0006497",
"expected_output": "number_2_Acceptable",
"runner_settings": ["inferred", "test"],
"test_metadata": {
"id": "example:TestAsset001",
"source": "SMURF"
}
}
]
Binary file modified project/excel/translator_testing_model.xlsx
Binary file not shown.
Loading

0 comments on commit c360233

Please sign in to comment.