-
Notifications
You must be signed in to change notification settings - Fork 5
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
vega_templates: Handle content
as dict instead of string.
#124
Conversation
31002b2
to
85ad4de
Compare
Prevent unnecessary `dumps`/`loads` calls. Closes #23
85ad4de
to
73a1961
Compare
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #124 +/- ##
==========================================
- Coverage 96.55% 94.47% -2.09%
==========================================
Files 19 19
Lines 697 724 +27
Branches 100 112 +12
==========================================
+ Hits 673 684 +11
- Misses 20 27 +7
- Partials 4 13 +9
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report in Codecov by Sentry. |
|
||
if skip_anchors is None: | ||
skip_anchors = [] | ||
|
||
content = deepcopy(self.template.content) |
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.
Without deep-copying, we may accidentally modify the same contents.
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.
Without deep-copying, we may accidentally modify the same contents.
I added reset()
method to bypass the need of deepcopy (which was also taking time)
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.
That’s only protected because replace_value copies the whole collection, right?
Prevent unnecessary
dumps
/loads
calls.Closes #23