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

pyyaml cannot read scientific notation #19

Closed
cchall opened this issue Sep 2, 2020 · 3 comments
Closed

pyyaml cannot read scientific notation #19

cchall opened this issue Sep 2, 2020 · 3 comments

Comments

@cchall
Copy link
Member

cchall commented Sep 2, 2020

pyyaml will read scientific notation to strings without restrictive formatting requirements: yaml/pyyaml#173. Given that no other scientific software we work with carries such the same restrictions this either needs to be fixed or pyyaml abandoned.

Options so far are:

@robnagler
Copy link
Member

The point of pkyaml is to wrap yaml to fix things with the API. Would you be able to fix pkyaml so that it implements what you need?

@robnagler
Copy link
Member

@cchall let me know if pkyaml does the right thing. Added pkyaml.dump_pretty, which is not 100% parallel to pkjson.dump_pretty, but the ruamel author thinks dump should not return a string. Anyway, let me know if you want me to build in getting the string back.

@cchall
Copy link
Member Author

cchall commented Sep 2, 2020

@robnagler This looks good for now. The YAML load now works as desired. I haven't written the corresponding dump but I don't think there is a case where you want the string back.

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

No branches or pull requests

2 participants