-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
Open to alternative implementation strategies, but this issue should, in essence, check if both objects referenced in both "supplier" and "client" attributes of a Dependency object exist in the Package object, or Package objects recursively therein, when passed through a Package objects add() method.
e.g.,
>>> timemachine = sysml.Package('time machine')
>>> req = sysml.Requirement('top requirement', 'make time travel possible')
>>> fluxcapacitor = sysml.Block('flux capacitor')
>>> timemachine.add(Dependency(req, fluxcapacitor))
The above would raise an AttributeError, because neither timetravel nor fluxcapacitor are defined in timemachine
Working example:
>>> timemachine = sysml.Package('time machine')
>>> req = sysml.Requirement('top requirement', 'make time travel possible')
>>> fluxcapacitor = sysml.Block('flux capacitor')
>>> timemachine.add(req)
>>> timemachine.add(fluxcapacitor)
>>> timemachine.add(Dependency(req, fluxcapacitor))
Metadata
Metadata
Assignees
Labels
No labels