Modify SnapshotTracer to generate JSON#1339
Conversation
Coverage Report for CI Build 26258168223Warning Build has drifted: This PR's base is out of sync with its target branch, so coverage data may include unrelated changes. Coverage remained the same at 90.539%Details
Uncovered ChangesNo uncovered changes found. Coverage RegressionsNo coverage regressions found. Coverage Stats
💛 - Coveralls |
david-yz-liu
left a comment
There was a problem hiding this comment.
Hi @shirleyyzhang, great progress. I left one inline comment. Please also remove the output_directory attribute of the SnapshotTracer class, as it's no longer being used.
To maintain backwards compatibility you can leave the argument in the initializer, but if it is provided please use warnings.warn (import warnings) to emit a message saying that this argument is deprecated.
| json_data = snapshot_to_json(snapshot_output, id_tracker=self.id_tracker) | ||
| self._add_json_to_map(json_data, frame.f_lineno) | ||
|
|
||
| def _add_json_to_map(self, json_data: list[dict], line: int) -> None: |
There was a problem hiding this comment.
I don't think this method is really necessary any more, please just put the body inline above
Proposed Changes
(Describe your changes here. Also describe the motivation for your changes: what problem do they solve, or how do they improve the application or codebase? If this pull request fixes an open issue, use a keyword to link this pull request to the issue.)
snapshot_to_jsonfunction was modified to handle compound data types during recursive processing.Screenshots of your changes (if applicable)
Type of Change
(Write an
Xor a brief description next to the type or types that best describe your changes.)Checklist
(Complete each of the following items for your pull request. Indicate that you have completed an item by changing the
[ ]into a[x]in the raw text, or by clicking on the checkbox in the rendered description on GitHub.)Before opening your pull request:
After opening your pull request:
Questions and Comments