- Notifications
You must be signed in to change notification settings - Fork 16
Issue 77: Add dynamic views #78
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This mirrors the Java implementation, but uses a context manager to provide cleaner entry/exit to the parallel sequence.
…ps to dynamic views
Codecov Report
@@ Coverage Diff @@ ## devel #78 +/- ## ========================================== + Coverage 91.87% 93.76% +1.88% ========================================== Files 70 74 +4 Lines 2155 2327 +172 Branches 215 241 +26 ========================================== + Hits 1980 2182 +202 + Misses 158 119 -39 - Partials 17 26 +9
Continue to review full report at Codecov.
|
…DynamicView. Also patched up big_bank.py example.
| I've just spotted that the relationship views need to be ordered when returned, so need to implement that before this PR is merged. |
OK, this is done now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the hard work on this PR. I did not actually run it but it looks well implemented from reading the code.
I am wondering about one potential design change. What if the order attribute's value was not a string but an actual instance of some SequenceNumber class? (Not necessarily like the one you have implemented at the moment.) One major benefit that I see is that the ordering is then encapsulated in that class simply the dunder methods __eq__ and __lt__. What do you think?
| For the ordering of views, I've added a new |
Rather than specifying software_system= or container= as constructor args, just have element= instead.
Add changes to docstrings.
… generally useful
| What a monster work! Thanks a lot 🙂 |
Add support for dynamic views, which show how element collaborate by sequencing interactions. Based on the Java implementation.
As well as the "parallel" sequence provided in the Java implementation, I've also added a "subsequence" which allows you to get the "1.2", "1.3" style numbering for sub-calls but doesn't seem to be in the Java implementation.
THIS SOFTWARE IS CONTRIBUTED SUBJECT TO THE TERMS OF THE Apache License v.2.0. YOU MAY OBTAIN A COPY OF THE LICENSE AT https://www.apache.org/licenses/LICENSE-2.0.
THIS SOFTWARE IS LICENSED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AND ANY WARRANTY OF NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. THIS SOFTWARE MAY BE REDISTRIBUTED TO OTHERS ONLY BY EFFECTIVELY USING THIS OR ANOTHER EQUIVALENT DISCLAIMER IN ADDITION TO ANY OTHER REQUIRED LICENSE TERMS.