pyMetaModel 0.6.5__tar.gz → 0.6.7__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/PKG-INFO +1 -1
- pymetamodel-0.6.7/meta/__init__.py +1 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/meta/metamodel.py +8 -1
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/meta/version.py +1 -1
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/tests/test_metamodel.py +27 -0
- pymetamodel-0.6.5/meta/__init__.py +0 -1
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/.github/workflows/build.yml +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/.github/workflows/upload-to-pypi.yml +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/.gitignore +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/.project +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/.pydevproject +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/LICENSE +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/README.md +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/docs/index.md +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/ceur-ws/ceur-ws.mermaid +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/ceur-ws/ceur-ws.puml +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/ceur-ws/ceur-ws.py +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/ceur-ws/ceur-ws.sidif +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/ceur-ws/ceur-ws.xlsx +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/ceur-ws/ceur-ws.yaml +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/ceur-ws/ceur-ws_puml.txt +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/city/city.mermaid +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/city/city.puml +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/city/city.py +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/city/city.sidif +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/city/city.xlsx +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/city/city.yaml +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/city/city_puml.txt +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/family/FamilyContext.mermaid +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/family/FamilyContext.puml +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/family/FamilyContext.py +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/family/FamilyContext.sidif +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/family/FamilyContext.xlsx +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/family/FamilyContext.yaml +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/family/FamilyContext_puml.txt +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/infrastructure/infrastructure.mermaid +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/infrastructure/infrastructure.puml +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/infrastructure/infrastructure.py +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/infrastructure/infrastructure.sidif +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/infrastructure/infrastructure.xlsx +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/infrastructure/infrastructure.yaml +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/infrastructure/infrastructure_puml.txt +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/metamodel/metamodel.mermaid +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/metamodel/metamodel.puml +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/metamodel/metamodel.py +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/metamodel/metamodel.sidif +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/metamodel/metamodel.xlsx +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/metamodel/metamodel.yaml +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/metamodel/metamodel_puml.txt +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/scientific-events/scientific-events.mermaid +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/scientific-events/scientific-events.puml +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/scientific-events/scientific-events.py +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/scientific-events/scientific-events.sidif +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/scientific-events/scientific-events.xlsx +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/scientific-events/scientific-events.yaml +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/scientific-events/scientific-events_puml.txt +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/smartRQM/smartRQM.mermaid +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/smartRQM/smartRQM.puml +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/smartRQM/smartRQM.py +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/smartRQM/smartRQM.sidif +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/smartRQM/smartRQM.yaml +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/smartRQM/smartRQM_puml.txt +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/smwcon/smwcon.mermaid +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/smwcon/smwcon.puml +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/smwcon/smwcon.py +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/smwcon/smwcon.sidif +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/smwcon/smwcon.xlsx +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/smwcon/smwcon.yaml +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/smwcon/smwcon_puml.txt +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/teaching/TeachingSchema.mermaid +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/teaching/TeachingSchema.puml +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/teaching/TeachingSchema.py +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/teaching/TeachingSchema.sidif +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/teaching/TeachingSchema.xlsx +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/teaching/TeachingSchema.yaml +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/teaching/TeachingSchema_puml.txt +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/wiki/wiki.mermaid +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/wiki/wiki.puml +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/wiki/wiki.py +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/wiki/wiki.sidif +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/wiki/wiki.xlsx +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/wiki/wiki.yaml +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/wiki/wiki_puml.txt +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/meta/metamodel_cmd.py +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/meta/mw.py +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/meta/profiler.py +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/meta/sidif2linkml.py +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/meta/smw_type.py +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/meta/uml.py +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/metamodel.puml +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/mkdocs.yml +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/pyproject.toml +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/scripts/blackisort +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/scripts/doc +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/scripts/genexamples +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/scripts/install +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/scripts/release +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/scripts/test +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/tests/__init__.py +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/tests/basemwtest.py +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/tests/basesmwtest.py +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/tests/basetest.py +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/tests/test_generators.py +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/tests/test_linkml.py +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/tests/test_mw.py +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/tests/test_plantuml.py +0 -0
- {pymetamodel-0.6.5 → pymetamodel-0.6.7}/tests/test_sidif.py +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "0.6.7"
|
|
@@ -375,6 +375,13 @@ class Topic:
|
|
|
375
375
|
conceptProperty: Optional['Property'] = None
|
|
376
376
|
|
|
377
377
|
|
|
378
|
+
def get_primary_key_property(self) -> Optional['Property']:
|
|
379
|
+
"""Return the first property marked as primaryKey, or None."""
|
|
380
|
+
return next(
|
|
381
|
+
(p for p in self.properties.values() if getattr(p, "primaryKey", False)),
|
|
382
|
+
None,
|
|
383
|
+
)
|
|
384
|
+
|
|
378
385
|
def get_extends_topics(self, l: List['Topic'] = None) -> List['Topic']:
|
|
379
386
|
"""
|
|
380
387
|
Get the topics this topic is extending.
|
|
@@ -711,7 +718,7 @@ class Property:
|
|
|
711
718
|
self.showInGrid=True
|
|
712
719
|
if not hasattr(self, "label"):
|
|
713
720
|
self.label=getattr(self,"name")
|
|
714
|
-
if not hasattr(self, "type"):
|
|
721
|
+
if not hasattr(self, "type") or not self.type:
|
|
715
722
|
self.type="Text"
|
|
716
723
|
pass
|
|
717
724
|
|
|
@@ -16,7 +16,7 @@ class Version(object):
|
|
|
16
16
|
description = "pyMetaModel: MetaModel for Knowledge Graphs"
|
|
17
17
|
version = meta.__version__
|
|
18
18
|
date = "2022-11-30"
|
|
19
|
-
updated = "2025-09-
|
|
19
|
+
updated = "2025-09-19"
|
|
20
20
|
authors = "Wolfgang Fahl"
|
|
21
21
|
doc_url = "https://wiki.bitplan.com/index.php/pyMetaModel"
|
|
22
22
|
chat_url = "https://github.com/WolfgangFahl/pyMetaModel/discussions"
|
|
@@ -34,3 +34,30 @@ class TestMetaModel(BaseMediawikiTest):
|
|
|
34
34
|
if debug:
|
|
35
35
|
print(smw_type)
|
|
36
36
|
self.assertIsInstance(smw_type, SMW_Type)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
from meta.metamodel import Property, Topic
|
|
40
|
+
from tests.basetest import Basetest
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class TestTopic(Basetest):
|
|
44
|
+
"""
|
|
45
|
+
test Topic methods - see https://github.com/WolfgangFahl/pyMetaModel/issues/36
|
|
46
|
+
"""
|
|
47
|
+
|
|
48
|
+
def test_get_primary_key_property(self):
|
|
49
|
+
"""test get_primary_key_property returns the primaryKey property or None"""
|
|
50
|
+
topic = Topic()
|
|
51
|
+
topic.properties = {
|
|
52
|
+
"name": Property(name="name", primaryKey=True),
|
|
53
|
+
"at": Property(name="at"),
|
|
54
|
+
}
|
|
55
|
+
pk = topic.get_primary_key_property()
|
|
56
|
+
self.assertIsNotNone(pk)
|
|
57
|
+
self.assertEqual(pk.name, "name")
|
|
58
|
+
|
|
59
|
+
def test_get_primary_key_property_none(self):
|
|
60
|
+
"""test get_primary_key_property returns None when no primaryKey exists"""
|
|
61
|
+
topic = Topic()
|
|
62
|
+
topic.properties = {"at": Property(name="at")}
|
|
63
|
+
self.assertIsNone(topic.get_primary_key_property())
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = "0.6.5"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/scientific-events/scientific-events.mermaid
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pymetamodel-0.6.5 → pymetamodel-0.6.7}/examples/scientific-events/scientific-events_puml.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|