Skip to content

enable check_json hook #2760

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

Merged
merged 1 commit into from
Aug 28, 2023
Merged

enable check_json hook #2760

merged 1 commit into from
Aug 28, 2023

Conversation

njzjz
Copy link
Member

@njzjz njzjz commented Aug 27, 2023

Number _comment keys so there will be no duplicated keys.

from glob import glob

for ii in glob("**/*.json", recursive=True):
    with open(ii) as f:
        content = f.read()
    count = 1
    while True:
        if r'"_comment"' not in content:
            break
        content = content.replace('"_comment"', '"_comment%d"' % count, 1)
        count += 1
    with open(ii, "w") as f:
        f.write(content)

Signed-off-by: Jinzhe Zeng <jinzhe.zeng@rutgers.edu>
@codecov
Copy link

codecov bot commented Aug 27, 2023

Codecov Report

Patch coverage has no change and project coverage change: +0.02% 🎉

Comparison is base (282c2a0) 78.69% compared to head (bee6200) 78.72%.

Additional details and impacted files
@@            Coverage Diff             @@
##            devel    #2760      +/-   ##
==========================================
+ Coverage   78.69%   78.72%   +0.02%     
==========================================
  Files         241      241              
  Lines       25610    25610              
  Branches     1517     1517              
==========================================
+ Hits        20155    20162       +7     
+ Misses       5065     5058       -7     
  Partials      390      390              

see 8 files with indirect coverage changes

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

@wanghan-iapcm wanghan-iapcm merged commit f97b4f2 into deepmodeling:devel Aug 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants