Skip to content

Commit

Permalink
Merge pull request #127 from BESSER-PEARL/development
Browse files Browse the repository at this point in the history
release 1.4.0
  • Loading branch information
ivan-alfonso authored Nov 15, 2024
2 parents a3666cb + a2e6ad7 commit 2179c62
Show file tree
Hide file tree
Showing 59 changed files with 3,119 additions and 955 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
__pycache__/

# pipenv
# virtual env
Pipfile
Pipfile.lock
besser_venv/
.env

# package
Expand All @@ -22,4 +23,3 @@ besser/.idea/workspace.xml
*.iml
.idea/inspectionProfiles/profiles_settings.xml
*.xml
besser_venv
32 changes: 16 additions & 16 deletions besser/BUML/metamodel/object/object.py
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ def link_ends(self) -> set:
return ends

def __repr__(self):
return f'Object({self.name}, {self.classifier}, {self.slots})'
return f'Object({self.name}, {self.classifier}, {self.slots})'


class DataValue(Instance):
Expand All @@ -149,8 +149,8 @@ def __init__(self, classifier: Type, value, name=""):

@property
def value(self):
"""Method to retrieve Value"""
return self.__value
"""Method to retrieve Value"""
return self.__value

@value.setter
def value(self, val):
Expand Down Expand Up @@ -178,8 +178,8 @@ def __init__(self, name:str, association_end: Property, object: Object):

@property
def association_end(self):
"""Property: Method to retrieve the association end"""
return self.__association_end
"""Property: Method to retrieve the association end"""
return self.__association_end

@association_end.setter
def association_end(self, association_end: Property):
Expand All @@ -188,8 +188,8 @@ def association_end(self, association_end: Property):

@property
def object(self):
"""Object: Method to retrieve the object"""
return self.__object
"""Object: Method to retrieve the object"""
return self.__object

@object.setter
def object(self, object: Object):
Expand Down Expand Up @@ -217,8 +217,8 @@ def __init__(self, name: str, association: Association, connections: list[LinkEn

@property
def association(self):
"""Association: Method to retrieve the association"""
return self.__association
"""Association: Method to retrieve the association"""
return self.__association

@association.setter
def association(self, association: Association):
Expand All @@ -227,8 +227,8 @@ def association(self, association: Association):

@property
def connections(self):
"""list[LinkEnd]: Method to retrieve the connections"""
return self.__connections
"""list[LinkEnd]: Method to retrieve the connections"""
return self.__connections

@connections.setter
def connections(self, connections: list[LinkEnd]):
Expand All @@ -242,7 +242,7 @@ def connections(self, connections: list[LinkEnd]):

def add_to_connection(self,linkEnd):
"""Method to add linkend"""
self.connection.append(linkEnd)
self.connections.append(linkEnd)

class ObjectModel(NamedElement):
""" An object model is the root element that comprises a number of instances and links.
Expand All @@ -264,8 +264,8 @@ def __init__(self, name: str, instances: set[Instance], links: set[Link]):

@property
def instances(self):
"""Association: Method to retrieve the instances"""
return self.__instances
"""Association: Method to retrieve the instances"""
return self.__instances

@instances.setter
def instances(self, instances: set[Instance]):
Expand All @@ -274,8 +274,8 @@ def instances(self, instances: set[Instance]):

@property
def links(self):
"""Association: Method to retrieve the links"""
return self.__links
"""Association: Method to retrieve the links"""
return self.__links

@links.setter
def links(self, links: set[Instance]):
Expand Down
2 changes: 1 addition & 1 deletion besser/BUML/metamodel/ocl/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
from .rules import *
from .ocl import *
File renamed without changes.
6 changes: 6 additions & 0 deletions besser/BUML/metamodel/state_machine/state_machine.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,11 @@ def initial_state(self) -> State or None:
return None

def set_global_fallback_body(self, body: Body) -> None:
"""Set the global fallback body for all states in the state machine.
Args:
body (Body): The fallback body to be set for all states.
"""
for state in self.states:
state.fallback_body = body

Expand Down Expand Up @@ -336,3 +341,4 @@ def move(self, transition: Transition) -> None:
transition (Transition): the transition that points to the state to move
"""
pass

Loading

0 comments on commit 2179c62

Please sign in to comment.