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

json dump nested dicts and lists attrs #1417

Merged
merged 4 commits into from
Oct 15, 2020
Merged

Conversation

OriolAbril
Copy link
Member

@OriolAbril OriolAbril commented Oct 14, 2020

Description

I have had some problems when saving to netcdf with the new extended attrs, seems related to pydata/xarray#2868. This uses json.dumps to convert the nested objects to strings that can be stored in netcdf and if necessary recovered by parsing the json again.

Checklist

  • Follows official PR format
  • Includes new or updated tests to cover the new feature. Should there be a writing test in test_pystan?
  • Code style correct (follows pylint and black guidelines)
  • Changes are listed in changelog

@codecov
Copy link

codecov bot commented Oct 15, 2020

Codecov Report

Merging #1417 into master will decrease coverage by 0.01%.
The diff coverage is 71.42%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1417      +/-   ##
==========================================
- Coverage   91.57%   91.56%   -0.02%     
==========================================
  Files         105      105              
  Lines       11090    11097       +7     
==========================================
+ Hits        10156    10161       +5     
- Misses        934      936       +2     
Impacted Files Coverage Δ
arviz/data/io_pystan.py 96.00% <71.42%> (-0.34%) ⬇️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 99aff55...2fc70fd. Read the comment docs.

@OriolAbril OriolAbril merged commit a30e829 into arviz-devs:master Oct 15, 2020
@OriolAbril OriolAbril deleted the pystan branch October 15, 2020 20:29
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.

2 participants