You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/translator_testing_model/datamodel/pydanticmodel.py
+53-1Lines changed: 53 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -267,6 +267,12 @@ class TestMetadata(TestEntity):
267
267
tags: Optional[List[str]] =Field(default_factory=list, description="""A human-readable tags for categorical memberships of a TestEntity (preferably a URI or CURIE). Typically used to aggregate instances of TestEntity into formally typed or ad hoc lists.""")
268
268
test_runner_settings: Optional[List[str]] =Field(default_factory=list, description="""Scalar parameters for the TestRunner processing a given TestEntity.""")
269
269
270
+
classPathfinderPathNode(ConfiguredBaseModel):
271
+
"""
272
+
Represents an output path node
273
+
"""
274
+
ids: Optional[List[str]] =Field(None)
275
+
name: Optional[str] =Field(None)
270
276
271
277
classTestAsset(TestEntity):
272
278
"""
@@ -295,6 +301,34 @@ class TestAsset(TestEntity):
295
301
tags: Optional[List[str]] =Field(default_factory=list, description="""One or more 'tags' slot values (inherited from TestEntity) should generally be defined to specify TestAsset membership in a \"Block List\" collection""")
296
302
test_runner_settings: Optional[List[str]] =Field(default_factory=list, description="""Scalar settings for the TestRunner, e.g. \"inferred\"""")
297
303
304
+
classPathfinderTestAsset(TestEntity):
305
+
"""
306
+
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.
association: Optional[str] =Field(None, description="""Specific Biolink Model association 'category' which applies to the test asset defined knowledge statement""")
318
+
qualifiers: Optional[List[Qualifier]] =Field(default_factory=list, description="""Optional qualifiers which constrain to the test asset defined knowledge statement. Note that this field records such qualifier slots and values as tag=value pairs, where the tag is the Biolink Model qualifier slot named and the value is an acceptable (Biolink Model enum?) value of the said qualifier slot.""")
test_reference: Optional[str] =Field(None, description="""Document URL where original test source particulars are registered (e.g. Github repo)""")
325
+
test_metadata: Optional[TestMetadata] =Field(None, description="""Test metadata describes the external provenance, cross-references and objectives for a given test.""")
326
+
id: str=Field(..., description="""A unique identifier for a Test Entity""")
327
+
name: Optional[str] =Field(None, description="""A human-readable name for a Test Entity""")
328
+
description: Optional[str] =Field(None, description="""A human-readable description for a Test Entity""")
329
+
tags: Optional[List[str]] =Field(default_factory=list, description="""One or more 'tags' slot values (inherited from TestEntity) should generally be defined to specify TestAsset membership in a \"Block List\" collection""")
330
+
test_runner_settings: Optional[List[str]] =Field(default_factory=list, description="""Scalar settings for the TestRunner, e.g. \"inferred\"""")
331
+
298
332
299
333
classAcceptanceTestAsset(TestAsset):
300
334
"""
@@ -397,6 +431,24 @@ class TestCase(TestEntity):
397
431
tags: Optional[List[str]] =Field(default_factory=list, description="""One or more 'tags' slot values (slot inherited from TestEntity) should generally be defined as filters to specify TestAsset membership in a \"Block List\" collection.""")
398
432
test_runner_settings: Optional[List[str]] =Field(default_factory=list, description="""Scalar parameters for the TestRunner processing a given TestEntity.""")
399
433
434
+
classPathfinderTestCase(TestEntity):
435
+
"""
436
+
Represents a single enumerated instance of Test Case, derived from a given collection of one or more TestAsset instances (the value of the 'test_assets' slot) which define the 'inputs' and 'outputs' of the TestCase, used to probe a particular test condition.
437
+
"""
438
+
query_type: Optional[QueryTypeEnum] =Field(None, description="""Type of TestCase query.""")
439
+
test_assets: List[PathfinderTestAsset] =Field(default_factory=list, description="""One or more 'tags' slot values (inherited from TestEntity) should generally be defined as filters to specify TestAsset membership in 'test_assets' slot (\"Block List\") collection.""")
trapi_template: Optional[TrapiTemplateEnum] =Field(None, description="""A template for a query, which can be used to generate a query for a test case. note: the current enumerated values for this slot come from the Benchmarks repo config/benchmarks.json \"templates\" collection and refer to the \"name\" field of each template. Templates themselves are currently stored in the config/[source_name]/templates directory.""")
442
+
test_case_objective: Optional[TestObjectiveEnum] =Field(None, description="""Testing objective behind specified set of test particulars (e.g. acceptance pass/fail; benchmark; quantitative; standards compliance; graph navigation integrity)""")
443
+
test_case_source: Optional[TestSourceEnum] =Field(None, description="""Provenance of a specific set of test assets, cases and/or suites. Or, the person who cares about this, know about this. We would like this to be an ORCID eventually, but currently it is just a string.""")
444
+
qualifiers: Optional[List[Qualifier]] =Field(default_factory=list, description="""Optional qualifiers which constrain to the test asset defined knowledge statement. Note that this field records such qualifier slots and values as tag=value pairs, where the tag is the Biolink Model qualifier slot named and the value is an acceptable (Biolink Model enum?) value of the said qualifier slot.""")
445
+
components: Optional[List[ComponentEnum]] =Field(default_factory=list, description="""The component that this test case is intended to run against. Most often this is the ARS for acceptance tests, but for the Benchmarks repo integration, this can also be individual components of the system like Aragorn, or ARAX.""")
446
+
test_env: Optional[TestEnvEnum] =Field(None, description="""Deployment environment within which the associated TestSuite is run.""")
447
+
id: str=Field(..., description="""A unique identifier for a Test Entity""")
448
+
name: Optional[str] =Field(None, description="""A human-readable name for a Test Entity""")
449
+
description: Optional[str] =Field(None, description="""A human-readable description for a Test Entity""")
450
+
tags: Optional[List[str]] =Field(default_factory=list, description="""One or more 'tags' slot values (slot inherited from TestEntity) should generally be defined as filters to specify TestAsset membership in a \"Block List\" collection.""")
451
+
test_runner_settings: Optional[List[str]] =Field(default_factory=list, description="""Scalar parameters for the TestRunner processing a given TestEntity.""")
400
452
401
453
classAcceptanceTestCase(TestCase):
402
454
"""
@@ -467,7 +519,7 @@ class TestSuite(TestEntity):
467
519
"""
468
520
test_metadata: Optional[TestMetadata] =Field(None, description="""Test metadata describes the external provenance, cross-references and objectives for a given test.""")
469
521
test_persona: Optional[TestPersonaEnum] =Field(None, description="""A Test persona describes the user or operational context of a given test.""")
470
-
test_cases: Optional[Dict[str, TestCase]] =Field(default_factory=dict, description="""List of explicitly enumerated Test Cases.""")
522
+
test_cases: Optional[Dict[str, Union[TestCase, PathfinderTestCase]]] =Field(default_factory=dict, description="""List of explicitly enumerated Test Cases.""")
471
523
test_suite_specification: Optional[TestSuiteSpecification] =Field(None, description="""Declarative specification of a Test Suite of Test Cases whose generation is deferred, (i.e. within a Test Runner) or whose creation is achieved by stream processing of an external data source.""")
472
524
id: str=Field(..., description="""A unique identifier for a Test Entity""")
473
525
name: Optional[str] =Field(None, description="""A human-readable name for a Test Entity""")
0 commit comments