Skip to content

Commit

Permalink
<Enhancement>[Generated XML]: <PyutStereotype update>
Browse files Browse the repository at this point in the history
[PyutModel fixed this for us;  We react]

[#16]
  • Loading branch information
Humberto Sanchez II committed Dec 31, 2022
1 parent 1cb9a3f commit 83929e4
Show file tree
Hide file tree
Showing 7 changed files with 32 additions and 23 deletions.
6 changes: 3 additions & 3 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ jobs:
pip install html-testRunner~=1.2.1
pip install attrdict3
pip install -U -f https://extras.wxpython.org/wxPython4/extras/linux/gtk3/ubuntu-22.04 wxPython
pip install pyutmodel~=1.2.0
pip install ogl~=0.60.15
pip install untanglepyut==0.6.2
pip install pyutmodel~=1.3.3
pip install ogl~=0.60.25
pip install untanglepyut==0.6.4
- run:
name: run tests
command: |
Expand Down
5 changes: 3 additions & 2 deletions oglio/toXmlV10/PyutToDom.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
from pyutmodel.PyutParameter import PyutParameter
from pyutmodel.PyutSDInstance import PyutSDInstance
from pyutmodel.PyutSDMessage import PyutSDMessage
from pyutmodel.PyutStereotype import PyutStereotype
from pyutmodel.PyutText import PyutText
from pyutmodel.PyutUseCase import PyutUseCase
from pyutmodel.PyutVisibilityEnum import PyutVisibilityEnum
Expand Down Expand Up @@ -53,9 +54,9 @@ def pyutClassToDom(self, pyutClass: PyutClass, xmlDoc: Document) -> Element:
pyutClassElement.setAttribute(XmlConstants.ATTR_ID, str(classId))
pyutClassElement.setAttribute(XmlConstants.ATTR_NAME, pyutClass.name)

stereotype = pyutClass.stereotype
stereotype: PyutStereotype = pyutClass.stereotype
if stereotype is not None:
pyutClassElement.setAttribute(XmlConstants.ATTR_STEREOTYPE, stereotype.name)
pyutClassElement.setAttribute(XmlConstants.ATTR_STEREOTYPE, stereotype.value)

pyutClassElement.setAttribute(XmlConstants.ATTR_FILENAME, pyutClass.fileName)

Expand Down
12 changes: 6 additions & 6 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
wheel==0.38.4
setuptools==65.6.0
twine==4.0.1
setuptools==65.6.3
twine==4.0.2
build==0.9.0
html-testRunner~=1.2.1

mypy==0.991
mypy-extensions~= 0.4.3
typing_extensions==4.4.0
types-setuptools==65.6.0.0
types-setuptools==65.6.0.2

wxpython~=4.2.0

pyutmodel==1.2.0
ogl~=0.60.15
untanglepyut~=0.6.2
pyutmodel==1.3.3
ogl==0.60.25
untanglepyut==0.6.4
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

setup(
name="oglio",
version="0.5.20",
version="0.5.30",
author_email='Humberto.A.Sanchez.II@gmail.com',
maintainer='Humberto A. Sanchez II',
maintainer_email='humberto.a.sanchez.ii@gmail.com',
Expand All @@ -27,8 +27,8 @@
},
install_requires=[
'wxPython==4.2.0',
'pyutmodel~=1.2.0',
'ogl~=0.60.15',
'untanglepyut~=0.6.2',
'pyutmodel~=1.3.3',
'ogl~=0.60.25',
'untanglepyut~=0.6.4',
],
)
8 changes: 8 additions & 0 deletions tests/oglio/toXmlV10/TestOglToDomV10.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,14 @@ def tearDown(self):
super().tearDown()

def testSimpleSerialization(self):
"""
TODO: This test is sensitive to the ogl preferences for text
text_bold = False
text_italicize = False
text_font_family = Swiss
text_font_size = 14
Save the current preferences; Set these; then at test conclusion restore them
"""

self._cleanupGenerated(MULTI_LINK_DOCUMENT_FILENAME)

Expand Down
2 changes: 1 addition & 1 deletion tests/resources/testdata/ManyNotes.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<PyutProject version="10" CodePath="">
<PyutDocument type="CLASS_DIAGRAM" title="Many Notes" scrollPositionX="0" scrollPositionY="0" pixelsPerUnitX="20" pixelsPerUnitY="20">
<GraphicClass width="116" height="20" x="525" y="75">
<Class id="1" name="ManyNotesAttached" stereotype="" filename="" description="" showMethods="True" showFields="True" showStereotype="True" displayParameters="Unspecified"/>
<Class id="1" name="ManyNotesAttached" stereotype="noStereotype" filename="" description="" showMethods="True" showFields="True" showStereotype="True" displayParameters="Unspecified"/>
</GraphicClass>
<GraphicNote width="100" height="50" x="150" y="225">
<Note id="2" content="Note 1" filename=""/>
Expand Down
14 changes: 7 additions & 7 deletions tests/resources/testdata/MultiLinkDocument.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@
<PyutProject version="10" CodePath="">
<PyutDocument type="CLASS_DIAGRAM" title="MultiLink" scrollPositionX="5" scrollPositionY="0" pixelsPerUnitX="20" pixelsPerUnitY="20">
<GraphicClass width="77" height="40" x="150" y="150">
<Class id="1" name="Folder" stereotype="" filename="" description="" showMethods="True" showFields="True" showStereotype="True" displayParameters="Unspecified">
<Class id="1" name="Folder" stereotype="noStereotype" filename="" description="" showMethods="True" showFields="True" showStereotype="True" displayParameters="Unspecified">
<Field visibility="PRIVATE">
<Param name="permissions" type="" defaultValue=""/>
</Field>
</Class>
</GraphicClass>
<GraphicClass width="88" height="50" x="150" y="325">
<Class id="2" name="File" stereotype="" filename="" description="" showMethods="True" showFields="True" showStereotype="True" displayParameters="Unspecified">
<Class id="2" name="File" stereotype="noStereotype" filename="" description="" showMethods="True" showFields="True" showStereotype="True" displayParameters="Unspecified">
<Field visibility="PRIVATE">
<Param name="size" type="" defaultValue=""/>
</Field>
Expand All @@ -19,7 +19,7 @@
</Class>
</GraphicClass>
<GraphicClass width="129" height="70" x="517" y="125">
<Class id="3" name="Car" stereotype="" filename="" description="" showMethods="True" showFields="True" showStereotype="True" displayParameters="Unspecified">
<Class id="3" name="Car" stereotype="noStereotype" filename="" description="" showMethods="True" showFields="True" showStereotype="True" displayParameters="Unspecified">
<Field visibility="PRIVATE">
<Param name="make" type="" defaultValue=""/>
</Field>
Expand All @@ -35,7 +35,7 @@
</Class>
</GraphicClass>
<GraphicClass width="81" height="50" x="550" y="325">
<Class id="4" name="Wheel" stereotype="" filename="" description="" showMethods="True" showFields="True" showStereotype="True" displayParameters="Unspecified">
<Class id="4" name="Wheel" stereotype="noStereotype" filename="" description="" showMethods="True" showFields="True" showStereotype="True" displayParameters="Unspecified">
<Field visibility="PRIVATE">
<Param name="size" type="" defaultValue=""/>
</Field>
Expand All @@ -45,7 +45,7 @@
</Class>
</GraphicClass>
<GraphicClass width="172" height="75" x="850" y="175">
<Class id="5" name="Interface" stereotype="" filename="" description="" showMethods="True" showFields="True" showStereotype="True" displayParameters="Unspecified">
<Class id="5" name="Interface" stereotype="noStereotype" filename="" description="" showMethods="True" showFields="True" showStereotype="True" displayParameters="Unspecified">
<Method name="floatMethod" visibility="PUBLIC">
<Return type="float"/>
<SourceCode/>
Expand All @@ -61,10 +61,10 @@
</Class>
</GraphicClass>
<GraphicClass width="99" height="44" x="875" y="350">
<Class id="6" name="Implementor" stereotype="" filename="" description="" showMethods="True" showFields="True" showStereotype="True" displayParameters="Unspecified"/>
<Class id="6" name="Implementor" stereotype="noStereotype" filename="" description="" showMethods="True" showFields="True" showStereotype="True" displayParameters="Unspecified"/>
</GraphicClass>
<GraphicClass width="140" height="48" x="325" y="625">
<Class id="7" name="LollipopImplementor" stereotype="" filename="" description="" showMethods="True" showFields="True" showStereotype="True" displayParameters="Unspecified"/>
<Class id="7" name="LollipopImplementor" stereotype="noStereotype" filename="" description="" showMethods="True" showFields="True" showStereotype="True" displayParameters="Unspecified"/>
</GraphicClass>
<GraphicText width="221" height="73" x="500" y="400" textSize="14" isBold="False" isItalicized="False" fontFamily="Swiss">
<Text id="8" content="Aggregation associates two objects describes the 'have a' relationship."/>
Expand Down

0 comments on commit 83929e4

Please sign in to comment.