Skip to content
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

Schema to json #159

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open

Conversation

rcjackson
Copy link

@rcjackson rcjackson commented Jan 13, 2023

This adds functionality to BatchSchema to dump the properties of a BatchSchema to a json file. All you do is, for a given BatchSchema bs, do

json_str = bs.to_json() 

to have the JSON representation in a string.

To put the JSON representation in a file, do:

bs.to_file('file.json')

Fixes #155

@maxrjones maxrjones self-requested a review January 13, 2023 21:07
@codecov-commenter
Copy link

codecov-commenter commented Jan 13, 2023

Codecov Report

Merging #159 (c43d917) into main (963a8d3) will increase coverage by 1.39%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #159      +/-   ##
==========================================
+ Coverage   96.04%   97.44%   +1.39%     
==========================================
  Files           6        6              
  Lines         329      352      +23     
  Branches       70       74       +4     
==========================================
+ Hits          316      343      +27     
+ Misses          8        6       -2     
+ Partials        5        3       -2     
Impacted Files Coverage Δ
xbatcher/generators.py 97.39% <100.00%> (+2.72%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add batch_schema.to_json method
2 participants