Midnighter / structurizr-python

A Python 3 port of Simon Brown's Structurizr diagrams-as-code architecture description tool.
https://structurizr.com/
Apache License 2.0
66 stars 16 forks source link

Issue 42: automatic addition of implied relationships #43

Closed yt-ms closed 3 years ago

yt-ms commented 3 years ago

Support the ability to automatically create implied relationships on ancestors when a relationship is added to a source/destination element. Multiple strategies supported, consistent with the Java implementation, and the desired strategy can be set via Model.implied_relationship_strategy.


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.

codecov-io commented 3 years ago

Codecov Report

Merging #43 into devel will increase coverage by 0.41%. The diff coverage is 98.11%.

Impacted file tree graph

@@            Coverage Diff             @@
##            devel      #43      +/-   ##
==========================================
+ Coverage   84.68%   85.10%   +0.41%     
==========================================
  Files          63       64       +1     
  Lines        1698     1745      +47     
  Branches      141      151      +10     
==========================================
+ Hits         1438     1485      +47     
  Misses        228      228              
  Partials       32       32              
Impacted Files Coverage Δ
src/structurizr/model/model.py 88.09% <88.88%> (+0.39%) :arrow_up:
src/structurizr/model/element.py 100.00% <100.00%> (ø)
...ructurizr/model/implied_relationship_strategies.py 100.00% <100.00%> (ø)
src/structurizr/model/relationship.py 95.45% <100.00%> (+0.33%) :arrow_up:

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 3811ba9...38b6a20. Read the comment docs.