Skip to content

Commit

Permalink
feat: update entity and namedentity blueprints
Browse files Browse the repository at this point in the history
  • Loading branch information
pbullhove committed Nov 7, 2023
1 parent edd6d90 commit a632e03
Show file tree
Hide file tree
Showing 28 changed files with 119 additions and 83 deletions.
20 changes: 18 additions & 2 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ deepdiff = "^5.8.1"
pygments = "^2.16.1"
pytest = "^7.4.3"
dictdiffer = "^0.9.0"
setuptools = "^68.2.2"

[tool.pytest]
addopts = ["--ignore gen"]
Expand Down
34 changes: 31 additions & 3 deletions src/home/system/SIMOS/Entity.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,36 @@
{
"name": "Entity",
"type": "dmss://system/SIMOS/Blueprint",
"description": "Blueprint for a DMT reference",
"extends": [
"dmss://system/SIMOS/NamedEntity"
"description": "Blueprint for an entity.",
"attributes": [
{
"name": "name",
"type": "dmss://system/SIMOS/BlueprintAttribute",
"optional": true,
"attributeType": "string",
"label": "Name"
},
{
"name": "type",
"type": "dmss://system/SIMOS/BlueprintAttribute",
"attributeType": "string",
"label": "Type",
"default": "",
"optional": false
},
{
"name": "description",
"type": "dmss://system/SIMOS/BlueprintAttribute",
"attributeType": "string",
"default": "",
"optional": true,
"label": "Description"
},
{
"name": "_meta_",
"type": "dmss://system/SIMOS/BlueprintAttribute",
"attributeType": "dmss://system/SIMOS/Meta",
"optional": true
}
]
}
25 changes: 3 additions & 22 deletions src/home/system/SIMOS/NamedEntity.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,35 +2,16 @@
"name": "NamedEntity",
"type": "dmss://system/SIMOS/Blueprint",
"description": "Blueprint for an entity which MUST have a name",
"extends": [
"dmss://system/SIMOS/Entity"
],
"attributes": [
{
"name": "name",
"type": "dmss://system/SIMOS/BlueprintAttribute",
"optional": false,
"attributeType": "string",
"label": "Name"
},
{
"name": "type",
"type": "dmss://system/SIMOS/BlueprintAttribute",
"attributeType": "string",
"label": "Type",
"default": "",
"optional": false
},
{
"name": "description",
"type": "dmss://system/SIMOS/BlueprintAttribute",
"attributeType": "string",
"default": "",
"optional": true,
"label": "Description"
},
{
"name": "_meta_",
"type": "dmss://system/SIMOS/BlueprintAttribute",
"attributeType": "dmss://system/SIMOS/Meta",
"optional": true
}
]
}
2 changes: 1 addition & 1 deletion src/home/system/SIMOS/recipe_links/pdf.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"type": "dmss://system/SIMOS/RecipeLink",
"_blueprintPath_": "dmss://system/SIMOS/blob_types/PDF",
"extends": [
"dmss://system/SIMOS/Entity",
"dmss://system/SIMOS/NamedEntity",
"_default_"
],
"uiRecipes": [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ class ValidateEntityTestCase(unittest.TestCase):
def setUp(self) -> None:
simos_blueprints = [
"dmss://system/SIMOS/Blueprint",
"dmss://system/SIMOS/Entity",
"dmss://system/SIMOS/NamedEntity",
"dmss://system/SIMOS/BlueprintAttribute",
]
Expand Down
2 changes: 1 addition & 1 deletion src/tests/unit/common/tree/test_tree_node_delete.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class TreeNodeDeleteTest(unittest.TestCase):
def setUp(self) -> None:
simos_blueprints = ["dmss://system/SIMOS/NamedEntity"]
simos_blueprints = ["dmss://system/SIMOS/Entity", "dmss://system/SIMOS/NamedEntity"]
mock_blueprint_folder = "src/tests/unit/common/tree/mock_data/mock_blueprints"
mock_blueprints_and_file_names = {
"Blueprint4": "Blueprint4.blueprint.json",
Expand Down
1 change: 1 addition & 0 deletions src/tests/unit/common/tree/test_tree_node_from_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ class TreeNodeFromDictTestCase(unittest.TestCase):
def setUp(self) -> None:
simos_blueprints = [
"dmss://system/SIMOS/Reference",
"dmss://system/SIMOS/Entity",
"dmss://system/SIMOS/NamedEntity",
]
mock_blueprint_folder = "src/tests/unit/common/tree/mock_data/mock_blueprints"
Expand Down
1 change: 1 addition & 0 deletions src/tests/unit/common/tree/test_tree_node_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ def setUp(self) -> None:
).provider
simos_blueprints = [
"dmss://system/SIMOS/Reference",
"dmss://system/SIMOS/Entity",
"dmss://system/SIMOS/NamedEntity",
]
mock_blueprint_folder = "src/tests/unit/common/tree/mock_data/mock_blueprints"
Expand Down
2 changes: 1 addition & 1 deletion src/tests/unit/common/tree/test_tree_node_to_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

class TreeNodeToDictTestCase(unittest.TestCase):
def setUp(self) -> None:
simos_blueprints = ["dmss://system/SIMOS/NamedEntity"]
simos_blueprints = ["dmss://system/SIMOS/NamedEntity", "dmss://system/SIMOS/Entity"]
mock_blueprint_folder = "src/tests/unit/common/tree/mock_data/mock_blueprints"
mock_blueprints_and_file_names = {
"all_contained_cases_blueprint": "all_contained_cases_blueprint.blueprint.json",
Expand Down
1 change: 1 addition & 0 deletions src/tests/unit/common/tree/test_tree_node_to_ref_dict.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ def setUp(self) -> None:
simos_blueprints = [
"dmss://system/SIMOS/Package",
"dmss://system/SIMOS/Reference",
"dmss://system/SIMOS/Entity",
"dmss://system/SIMOS/NamedEntity",
]
mock_blueprint_folder = "src/tests/unit/common/tree/mock_data/mock_blueprints"
Expand Down
1 change: 1 addition & 0 deletions src/tests/unit/common/tree/test_tree_node_update.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
class DocumentServiceTestCase(unittest.TestCase):
def setUp(self) -> None:
simos_blueprints = [
"dmss://system/SIMOS/Entity",
"dmss://system/SIMOS/NamedEntity",
"dmss://system/SIMOS/Reference",
"dmss://system/SIMOS/Action",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "dmss://system/SIMOS/Blueprint",
"description": "Test for a blueprint with storageAffinity in storageRecipe",
"extends": [
"dmss://system/SIMOS/NamedEntity"
"dmss://system/SIMOS/Entity"
],
"attributes": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "dmss://system/SIMOS/Blueprint",
"description": "uncontained_blueprint",
"extends": [
"dmss://system/SIMOS/NamedEntity"
"dmss://system/SIMOS/Entity"
],
"attributes": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
"type": "dmss://system/SIMOS/Blueprint",
"description": "A cat has an owner, but the owner is both storage and model uncontained.",
"extends": [
"dmss://system/SIMOS/NamedEntity"
"dmss://system/SIMOS/Entity"
],
"attributes": [
{
"name": "owner",
"type": "dmss://system/SIMOS/BlueprintAttribute",
"attributeType": "dmss://system/SIMOS/NamedEntity",
"attributeType": "dmss://system/SIMOS/Entity",
"contained": false
}
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "dmss://system/SIMOS/Blueprint",
"description": "This is a cage that contains a cat. The cat is model and storage contained in the cage. If the cage is removed, so is the cat.",
"extends": [
"dmss://system/SIMOS/NamedEntity"
"dmss://system/SIMOS/Entity"
],
"attributes": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"type": "dmss://system/SIMOS/Blueprint",
"description": "Two People ",
"extends": [
"dmss://system/SIMOS/NamedEntity"
"dmss://system/SIMOS/Entity"
],
"attributes": [
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@
"type": "dmss://system/SIMOS/Blueprint",
"description": "This blueprint has attributes for all the possible cases of storage uncontained. This is set in the storage recipe, that ",
"extends": [
"dmss://system/SIMOS/NamedEntity"
"dmss://system/SIMOS/Entity"
],
"attributes": [
{
"name": "containedPersonInfo",
"type": "dmss://system/SIMOS/BlueprintAttribute",
"attributeType": "dmss://system/SIMOS/NamedEntity"
"attributeType": "dmss://system/SIMOS/Entity"
},
{
"name": "storageUncontainedBestFriend",
"type": "dmss://system/SIMOS/BlueprintAttribute",
"attributeType": "dmss://system/SIMOS/NamedEntity"
"attributeType": "dmss://system/SIMOS/Entity"
},
{
"name": "storageUncontainedListOfFriends",
"type": "dmss://system/SIMOS/BlueprintAttribute",
"attributeType": "dmss://system/SIMOS/NamedEntity",
"attributeType": "dmss://system/SIMOS/Entity",
"dimensions": "*"
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

class DataSourceTestCase(unittest.TestCase):
def setUp(self) -> None:
simos_blueprints = ["dmss://system/SIMOS/NamedEntity"]
simos_blueprints = ["dmss://system/SIMOS/Entity", "dmss://system/SIMOS/NamedEntity"]
mock_blueprint_folder = "src/tests/unit/services/document_service/mock_blueprints/blob_blueprints"
mock_blueprints_and_file_names = {
"blobContainer": "blobContainer.blueprint.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ def setUp(self):
self.document_repository.find = self.mock_find

simos_blueprints = [
"dmss://system/SIMOS/Entity",
"dmss://system/SIMOS/NamedEntity",
"dmss://system/SIMOS/Reference",
]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

class GetExtendedBlueprintTestCase(unittest.TestCase):
def setUp(self):
simos_blueprints = ["dmss://system/SIMOS/NamedEntity"]
simos_blueprints = ["dmss://system/SIMOS/Entity", "dmss://system/SIMOS/NamedEntity"]
mock_blueprint_folder = "src/tests/unit/services/document_service/mock_blueprints/extended_blueprints"
mock_blueprints_and_file_names = {
"SecondLevelExtendedBlueprint": "SecondLevelExtendedBlueprint.blueprint.json",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ class GetDocumentResolveTestCase(unittest.TestCase):
def setUp(self) -> None:
simos_blueprints = [
"dmss://system/SIMOS/Package",
"dmss://system/SIMOS/Entity",
"dmss://system/SIMOS/NamedEntity",
]
mock_blueprint_folder = "src/tests/unit/services/document_service/mock_blueprints/car_rental_blueprints"
Expand Down
Loading

0 comments on commit a632e03

Please sign in to comment.