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

Implement DeploymentView #59

Closed yt-ms closed 3 years ago

yt-ms commented 3 years ago

Add implementation of DeploymentView, based on the Java equivalent. Tests are also based on the Java version but with better coverage.


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 #59 (6e6e47d) into devel (36a797b) will increase coverage by 0.44%. The diff coverage is 91.27%.

Impacted file tree graph

@@            Coverage Diff             @@
##            devel      #59      +/-   ##
==========================================
+ Coverage   90.16%   90.60%   +0.44%     
==========================================
  Files          68       69       +1     
  Lines        1962     2108     +146     
  Branches      174      208      +34     
==========================================
+ Hits         1769     1910     +141     
- Misses        173      177       +4     
- Partials       20       21       +1     
Impacted Files Coverage Δ
src/structurizr/view/animation.py 100.00% <ø> (ø)
src/structurizr/view/view.py 67.70% <54.54%> (+6.34%) :arrow_up:
src/structurizr/view/view_set.py 60.27% <65.21%> (+0.92%) :arrow_up:
src/structurizr/model/deployment_node.py 100.00% <100.00%> (ø)
src/structurizr/view/deployment_view.py 100.00% <100.00%> (ø)

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 36a797b...6e6e47d. Read the comment docs.

yt-ms commented 3 years ago

Can you look into that, please?

Yep, will do.

yt-ms commented 3 years ago

OK, I think I've fixed that upload problem - it looked to be due to a bug in DeploymentNode where child nodes weren't picking up the environment from their parent (the error from Structurizr wasn't the most helpful). Not related to this PR, but I've added the fix in here anyway.

Midnighter commented 3 years ago

Beautiful, and the graphviz-based auto-layout does a decent job: https://structurizr.com/share/61189

yt-ms commented 3 years ago

Beautiful, and the graphviz-based auto-layout does a decent job: https://structurizr.com/share/61189

Nice!