-
Notifications
You must be signed in to change notification settings - Fork 16
Conversation
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.
You're killing me with these huge PRs 😅 but I'm very grateful for all the work. I left a bunch of comments. Most are simple changes.
We should come to a design decision for the hydrate
and hydrate_arguments
methods. Probably best to discuss that in an issue.
Codecov Report
@@ Coverage Diff @@
## devel #19 +/- ##
==========================================
+ Coverage 79.39% 80.43% +1.04%
==========================================
Files 61 63 +2
Lines 1412 1661 +249
Branches 82 129 +47
==========================================
+ Hits 1121 1336 +215
- Misses 265 290 +25
- Partials 26 35 +9
Continue to review full report at Codecov.
|
@@ -820,3 +820,6 @@ flycheck_*.el | |||
|
|||
# Until we have sensible defaults, ignore VS code | |||
/.vscode/ | |||
|
|||
# Ignore default generated workspace DSL from get_workspace | |||
structurizr-*.json.gz |
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.
This should probably go into your .git/info/exclude
.
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.
It's quite hard to see which of the comments you have all implemented but I trust that you did the right thing 😃 One comment about the test case otherwise looks good!
@@ -73,4 +70,5 @@ def test_serialize_workspace(example, filename, monkeypatch): | |||
# TODO (midnighter): Use `from_orm` like `.construct` bypassing validation. ( | |||
# Requires a pull request on pydantic.) | |||
expected = WorkspaceIO.from_orm(Workspace.load(path)) | |||
assert WorkspaceIO.from_orm(example.main()) == expected | |||
actual = WorkspaceIO.from_orm(example.main()) | |||
assert json.loads(actual.json()) == json.loads(expected.json()) |
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.
Why not use .dict()
here? Or do you definitely want to load the JSON? In that case you could change it to:
assert json.loads(actual.json()) == json.loads(expected.json()) | |
assert json.loads(actual.json()) == json.load(path) |
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.
It's actually what I meant to do since our default values are not populated exactly like in the original examples. Mostly because the empty objects are populated in the C# SDK, but not default values, a behavior that I didn't find an easy way to reproduce exactly.
So, just to understand, the test that I'm doing is not perfect since it manipulates the expected JSON... But for now, that's what we have. I think that we should dive deeper into unit tests to make sure the functionality matches.
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.
My point is that:
json.loads(actual.json())
is the same as
actual.dict()
…son, software_system, perspective
fix: workspace hydrate method
Co-authored-by: Moritz E. Beber <[email protected]>
a004553
to
156d398
Compare
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.
Applied most comments now. It got a bit messy because the GitHub UI is hiding the majority of the comments. Thanks a lot for this chunk of work!
implement Implement models, views and styles #8
implement When auto-layout is used for a view, the client should not reset the locations #18
implement Understand how page layouts and coordinates are being decided by the client and implement them #7
implement Partial Big Bank Example #16
add an entry to the next release