-
Notifications
You must be signed in to change notification settings - Fork 0
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
Outputs comparison suite data to json and AtmosCO2 #129
Conversation
… into dev_plot2csv
The tests arefailing because I added a new import: |
this the package you added? https://anaconda.org/conda-forge/jsondiff |
Looks like that works, good job V. |
no failed test can ever stand a chance against me, bud 😁 |
bgcval2/analysis_compare.py
Outdated
details['dpi'] = input_yml_dict.get('dpi', None) | ||
details['savepdf'] = input_yml_dict.get('savepdf', False) | ||
details['savecsv'] = input_yml_dict.get('savecsv', False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Probably worth adding this functionality into documentation.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking about it, maybe it should be savejson
, instead of savecsv
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no IMHO since json is just the transport/payload, CSV is the final format no?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The final files are json format. It's basically a human readable python dictionary. Kinda like a shelve file that isn't a weird format.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
human-readable and json are not sitting well on the same bus, bud 😆
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too late! Changed it to json
!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whatever you think best, man - am merely devops here 😀
Ready for review @valeriupredoi! |
on it right now, buds 🍺 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looking good: remember about some docs (in README methinks) 🍺
title=title, | ||
ts=ts, | ||
csvFolder=csvFolder) | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
gets the prize for the function with most number of args I've seen 😁
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
""" | ||
if csvformat.lower() not in ['json', '.json']: | ||
print('Format not set up', csvformat ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
print('Format not set up', csvformat ) | |
print('Looking for a json or .json file extension. Format not set up', csvformat ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or
raise TypeError
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah if you need it to exit right away, maybe OSError instead? TypeError refers to a type of a Python(-already) object that can not be operated on
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changed
Okay - all good here. Happy to merge @valeriupredoi. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
go for it, buds 🍻
Two major changes: