pyMetaModel 0.2.6__tar.gz → 0.2.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.
Files changed (72) hide show
  1. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/PKG-INFO +2 -2
  2. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/README.md +1 -1
  3. pymetamodel-0.2.7/meta/__init__.py +1 -0
  4. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/meta/metamodel.py +15 -3
  5. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/tests/test_mw.py +7 -1
  6. pymetamodel-0.2.6/meta/__init__.py +0 -1
  7. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/.github/workflows/build.yml +0 -0
  8. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/.github/workflows/upload-to-pypi.yml +0 -0
  9. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/.gitignore +0 -0
  10. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/.project +0 -0
  11. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/.pydevproject +0 -0
  12. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/LICENSE +0 -0
  13. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/ceur-ws/ceur-ws.mermaid +0 -0
  14. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/ceur-ws/ceur-ws.puml +0 -0
  15. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/ceur-ws/ceur-ws.py +0 -0
  16. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/ceur-ws/ceur-ws.sidif +0 -0
  17. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/ceur-ws/ceur-ws.xlsx +0 -0
  18. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/ceur-ws/ceur-ws.yaml +0 -0
  19. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/ceur-ws/ceur-ws_puml.txt +0 -0
  20. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/city/city.mermaid +0 -0
  21. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/city/city.puml +0 -0
  22. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/city/city.py +0 -0
  23. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/city/city.sidif +0 -0
  24. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/city/city.xlsx +0 -0
  25. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/city/city.yaml +0 -0
  26. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/city/city_puml.txt +0 -0
  27. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/family/FamilyContext.mermaid +0 -0
  28. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/family/FamilyContext.puml +0 -0
  29. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/family/FamilyContext.py +0 -0
  30. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/family/FamilyContext.sidif +0 -0
  31. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/family/FamilyContext.xlsx +0 -0
  32. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/family/FamilyContext.yaml +0 -0
  33. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/family/FamilyContext_puml.txt +0 -0
  34. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/metamodel/metamodel.mermaid +0 -0
  35. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/metamodel/metamodel.puml +0 -0
  36. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/metamodel/metamodel.py +0 -0
  37. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/metamodel/metamodel.sidif +0 -0
  38. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/metamodel/metamodel.xlsx +0 -0
  39. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/metamodel/metamodel.yaml +0 -0
  40. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/metamodel/metamodel_puml.txt +0 -0
  41. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/scientific-events/scientific-events.mermaid +0 -0
  42. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/scientific-events/scientific-events.puml +0 -0
  43. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/scientific-events/scientific-events.py +0 -0
  44. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/scientific-events/scientific-events.sidif +0 -0
  45. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/scientific-events/scientific-events.xlsx +0 -0
  46. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/scientific-events/scientific-events.yaml +0 -0
  47. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/scientific-events/scientific-events_puml.txt +0 -0
  48. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/teaching/TeachingSchema.mermaid +0 -0
  49. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/teaching/TeachingSchema.puml +0 -0
  50. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/teaching/TeachingSchema.py +0 -0
  51. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/teaching/TeachingSchema.sidif +0 -0
  52. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/teaching/TeachingSchema.xlsx +0 -0
  53. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/teaching/TeachingSchema.yaml +0 -0
  54. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/examples/teaching/TeachingSchema_puml.txt +0 -0
  55. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/meta/metamodel_cmd.py +0 -0
  56. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/meta/mw.py +0 -0
  57. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/meta/profiler.py +0 -0
  58. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/meta/sidif2linkml.py +0 -0
  59. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/meta/smw_type.py +0 -0
  60. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/meta/uml.py +0 -0
  61. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/meta/version.py +0 -0
  62. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/pyproject.toml +0 -0
  63. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/scripts/genexamples +0 -0
  64. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/scripts/install +0 -0
  65. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/scripts/test +0 -0
  66. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/tests/__init__.py +0 -0
  67. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/tests/basemwtest.py +0 -0
  68. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/tests/basetest.py +0 -0
  69. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/tests/test_linkml.py +0 -0
  70. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/tests/test_metamodel.py +0 -0
  71. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/tests/test_plantuml.py +0 -0
  72. {pymetamodel-0.2.6 → pymetamodel-0.2.7}/tests/test_sidif.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: pyMetaModel
3
- Version: 0.2.6
3
+ Version: 0.2.7
4
4
  Project-URL: Home, https://github.com/WolfgangFahl/pyMetaModel
5
5
  Project-URL: Documentation, https://wiki.bitplan.com/index.php/PyMetaModel
6
6
  Project-URL: Source, https://github.com/WolfgangFahl/pyMetaModel
@@ -236,7 +236,7 @@ Description-Content-Type: text/markdown
236
236
  # pyMetaModel
237
237
  migrates https://wiki.bitplan.com/index.php/MetaModel#tab=Model to python
238
238
 
239
- [![Join the discussion at https://github.com/WolfgangFahl/pyMetaModel/discussions](https://img.shields.io/github/discussions/WolfgangFahl/pyMetaModel)](https://github.com/WolfgangFahl/pySemanticSlides/discussions)
239
+ [![Join the discussion at https://github.com/WolfgangFahl/pyMetaModel/discussions](https://img.shields.io/github/discussions/WolfgangFahl/pyMetaModel)](https://github.com/WolfgangFahl/pyMetaModel/discussions)
240
240
  [![pypi](https://img.shields.io/pypi/pyversions/pyMetaModel)](https://pypi.org/project/pyMetaModel/)
241
241
  [![Github Actions Build](https://github.com/WolfgangFahl/pyMetaModel/workflows/Build/badge.svg?branch=main)](https://github.com/WolfgangFahl/pyMetaModel/actions?query=workflow%3ABuild+branch%3Amain)
242
242
  [![PyPI Status](https://img.shields.io/pypi/v/pyMetaModel.svg)](https://pypi.python.org/pypi/pyMetaModel/)
@@ -1,7 +1,7 @@
1
1
  # pyMetaModel
2
2
  migrates https://wiki.bitplan.com/index.php/MetaModel#tab=Model to python
3
3
 
4
- [![Join the discussion at https://github.com/WolfgangFahl/pyMetaModel/discussions](https://img.shields.io/github/discussions/WolfgangFahl/pyMetaModel)](https://github.com/WolfgangFahl/pySemanticSlides/discussions)
4
+ [![Join the discussion at https://github.com/WolfgangFahl/pyMetaModel/discussions](https://img.shields.io/github/discussions/WolfgangFahl/pyMetaModel)](https://github.com/WolfgangFahl/pyMetaModel/discussions)
5
5
  [![pypi](https://img.shields.io/pypi/pyversions/pyMetaModel)](https://pypi.org/project/pyMetaModel/)
6
6
  [![Github Actions Build](https://github.com/WolfgangFahl/pyMetaModel/workflows/Build/badge.svg?branch=main)](https://github.com/WolfgangFahl/pyMetaModel/actions?query=workflow%3ABuild+branch%3Amain)
7
7
  [![PyPI Status](https://img.shields.io/pypi/v/pyMetaModel.svg)](https://pypi.python.org/pypi/pyMetaModel/)
@@ -0,0 +1 @@
1
+ __version__ = "0.2.7"
@@ -440,12 +440,13 @@ class Topic(MetaModelElement):
440
440
  markup=f"{sortClause}{orderClause}"
441
441
  return markup
442
442
 
443
- def askQuery(self,mainlabel:str=None,listLimit:int=None)->str:
443
+ def askQuery(self,mainlabel:str=None,filterShowInGrid:bool=True,listLimit:int=None)->str:
444
444
  """
445
445
  get the askQuery for the me topic
446
446
 
447
447
  Args:
448
448
  mainlabel(str): the mainlabel to use - topic.name as default
449
+ filterShowInGrid(bool): if True include only properties with showInGrid not being false
449
450
  listLimit(int): the list limit to use
450
451
  Returns:
451
452
  str: the markup for the query
@@ -458,8 +459,13 @@ class Topic(MetaModelElement):
458
459
  |mainlabel={mainlabel}
459
460
  """
460
461
  for prop in self.properties.values():
461
- markup+=f"|?{self.name} {prop.name} = {prop.name}\n"
462
- markup+=f"| limit={listLimit}\n"
462
+ if filterShowInGrid and hasattr(prop, "showInGrid"):
463
+ show=prop.showInGrid
464
+ else:
465
+ show=True
466
+ if show:
467
+ markup+=f"|?{self.name} {prop.name} = {prop.name}\n"
468
+ markup+=f"|limit={listLimit}\n"
463
469
  markup+=f"""{self.askSort()}}}}}"""
464
470
  return markup
465
471
 
@@ -468,6 +474,12 @@ class Property(MetaModelElement):
468
474
  """
469
475
  Provides helper functions and constants for properties
470
476
  """
477
+
478
+ def __init__(self):
479
+ """
480
+ constructor
481
+ """
482
+ MetaModelElement.__init__(self)
471
483
 
472
484
  @classmethod
473
485
  def getSamples(cls):
@@ -101,7 +101,7 @@ class TestMediawiki(BaseMediawikiTest):
101
101
 
102
102
  def testAskQuery4Topic(self):
103
103
  """
104
- test creating the askquery for a topic
104
+ test creating the ask query for a topic
105
105
  """
106
106
  debug=self.debug
107
107
  debug=True
@@ -161,6 +161,12 @@ class TestMediawiki(BaseMediawikiTest):
161
161
  self.assertIsNone(errMsg)
162
162
  self.assertTrue("OsProject" in context.topics)
163
163
  pass
164
+
165
+ def test_Issue23(self):
166
+ """
167
+ https://github.com/WolfgangFahl/pyMetaModel/issues/23
168
+ handle "showInGrid"
169
+ """
164
170
 
165
171
  def test_metamodel_from_wikis(self):
166
172
  """
@@ -1 +0,0 @@
1
- __version__ = "0.2.6"
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