Skip to content

Conversation

@zhang-yuanrui
Copy link
Collaborator

@zhang-yuanrui zhang-yuanrui commented Dec 17, 2024

This PR fulfill 2 parts of functionalities:

  1. Exporting templates with hierarchy into a JSON file by the interface get_templates_as_json
  2. Importing a JSON file and build the templates from the JSON by the interface load_templates

Things not done yet in this PR:

  1. Checking comprehensive user errors when loading a JSON file. I did some basic JSON format error checking but not exhaustive.
  2. Prompting users if they want to rename when loading a root template with the same name as the existing one.

Please note that: in this PR, load_templates is supposed to be working when given a correct JSON input, ideally, the original / unchanged JSON file from get_templates_as_json

@zhang-yuanrui zhang-yuanrui added the enhancement New feature or request label Dec 17, 2024
@zhang-yuanrui zhang-yuanrui self-assigned this Dec 17, 2024
@zhang-yuanrui zhang-yuanrui marked this pull request as ready for review December 17, 2024 18:36
@codecov-commenter
Copy link

codecov-commenter commented Dec 17, 2024

Codecov Report

Attention: Patch coverage is 92.10526% with 6 lines in your changes missing coverage. Please review.

Project coverage is 60.56%. Comparing base (699d4d0) to head (4470afe).

Files with missing lines Patch % Lines
...ynamicreporting/core/utils/report_remote_server.py 92.10% 2 Missing and 4 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #207      +/-   ##
==========================================
+ Coverage   60.17%   60.56%   +0.39%     
==========================================
  Files          22       22              
  Lines        6626     6702      +76     
  Branches     1264     1280      +16     
==========================================
+ Hits         3987     4059      +72     
  Misses       2269     2269              
- Partials      370      374       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zhang-yuanrui zhang-yuanrui enabled auto-merge (squash) December 19, 2024 16:03
@zhang-yuanrui zhang-yuanrui merged commit 86259c5 into main Dec 19, 2024
23 checks passed
@zhang-yuanrui zhang-yuanrui deleted the feat/yuanrui/json branch December 19, 2024 16:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants