Closed yt-ms closed 3 years ago
Merging #64 (b5d7f05) into devel (61888cb) will increase coverage by
0.57%
. The diff coverage is100.00%
.
@@ Coverage Diff @@
## devel #64 +/- ##
==========================================
+ Coverage 90.60% 91.18% +0.57%
==========================================
Files 69 69
Lines 2108 2109 +1
Branches 208 210 +2
==========================================
+ Hits 1910 1923 +13
+ Misses 177 167 -10
+ Partials 21 19 -2
Impacted Files | Coverage Δ | |
---|---|---|
src/structurizr/view/static_view.py | 100.00% <100.00%> (+20.58%) |
:arrow_up: |
src/structurizr/view/view.py | 73.46% <100.00%> (+5.76%) |
: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 61888cb...b5d7f05. Read the comment docs.
add_nearest_neighbours()
was calling_add_element()
withadd_relationships=True
which was resulting in the duplication. As the relationships are added explicitly based on the type filter, then simply setting this toFalse
solves the problem. Also added a check toView
to protect against other cases where someone may be unknowingly adding the same relationship twice.Got caught out by
flake8
yet again, so added this tomake qa
and updated the examples to be compliant.Also fixed issue 40 whilst in the area, so diagrams with blank descriptions in the Structurizr UI can now be loaded through the Python API. Not discovered any other similar incompatibilities yet.
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.