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

Stringify infinity in JSON output. #311

Merged
merged 1 commit into from
Jun 2, 2021

Conversation

grahamgower
Copy link
Member

This does require explicit conversion of string-valued "Infinity" when
loading the JSON file, but that code is quite modest.
See popsim-consortium/demes-spec#70

@codecov
Copy link

codecov bot commented Jun 1, 2021

Codecov Report

Merging #311 (a3e7b71) into main (e5619c5) will increase coverage by 0.08%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #311      +/-   ##
==========================================
+ Coverage   98.12%   98.21%   +0.08%     
==========================================
  Files           8        8              
  Lines        1549     1570      +21     
==========================================
+ Hits         1520     1542      +22     
+ Misses         29       28       -1     
Impacted Files Coverage Δ
demes/load_dump.py 100.00% <100.00%> (ø)
demes/hypothesis_strategies.py 98.63% <0.00%> (+0.68%) ⬆️

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 e5619c5...a3e7b71. Read the comment docs.

Copy link
Member

@jeromekelleher jeromekelleher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, minor comments

demes/load_dump.py Outdated Show resolved Hide resolved
demes/load_dump.py Outdated Show resolved Hide resolved
tests/test_load_dump.py Outdated Show resolved Hide resolved
tests/test_load_dump.py Outdated Show resolved Hide resolved
@grahamgower grahamgower added this to the 0.1.2 milestone Jun 2, 2021
This does require explicit conversion of string-valued "Infinity" when
loading the JSON file, but that code is quite modest.
See popsim-consortium/demes-spec#70
@grahamgower
Copy link
Member Author

Thanks @jeromekelleher. All good points, which are now resolved.

@grahamgower grahamgower merged commit 18c0350 into popsim-consortium:main Jun 2, 2021
@grahamgower grahamgower deleted the json branch June 2, 2021 18:23
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