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

docs: update docs for YAML 1.2 compatibility mitigation #3579

Merged
merged 1 commit into from
May 24, 2022

Conversation

bobertlo
Copy link
Contributor

See iterative/dvc#5971

adds note to parameter values section metioning scientific notation for SEO
use ruamel.yaml in example instead of PyYAML and add note

You may disregard these recommendations if you used the Edit on GitHub button from dvc.org to improve a doc in place.

❗ Please read the guidelines in the Contributing to the Documentation list if you make any substantial changes to the documentation or JS engine.

🐛 Please make sure to mention Fix #issue (if applicable) in the description of the PR. This causes GitHub to close it automatically when the PR is merged.

Please choose to allow us to edit your branch when creating the PR.

Thank you for the contribution - we'll try to review it as soon as possible. 🙏

@shcheklein shcheklein requested review from skshetry and dberenbaum May 21, 2022 17:11
@@ -58,6 +58,10 @@ as the tree path to find those values. Supported types are: string, integer,
float, and arrays (groups of params). Note that DVC does not ascribe any
specific meaning to these values.

> YAML 1.2 stores very large and very small numbers in scientific notation. Some
Copy link
Contributor

Choose a reason for hiding this comment

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

I like that you specify a common problem here with scientific notation. In the note below, I like that you specify that PyYAML doesn't support YAML 1.2. Maybe you can combine them and have pretty much the same note in both places?

It would also be great to suggest solutions in both places (ruamel.yaml, JSON or other file formats).

@dberenbaum
Copy link
Contributor

Thank you @bobertlo! I left some comments but also open to merging as is and iterating since it's already an improvement.

@bobertlo
Copy link
Contributor Author

bobertlo commented May 23, 2022 via email

@dberenbaum
Copy link
Contributor

@bobertlo I'm not sure without seeing it but could be nice. As I mentioned before, I'm open to merging as is or in any form that's better than what we have today (no warning about YAML incompatibility).

@bobertlo
Copy link
Contributor Author

bobertlo commented May 23, 2022 via email

See iterative/dvc#5971

use ruamel.yaml in examples instead of PyYAML and add warnings

add note to parameter values section metioning scientific notation for SEO
@bobertlo
Copy link
Contributor Author

I did my best to reconcile some of the ideas mentioned and got the other two places where import yaml was included in examples.

Feel free to make any language edits you feel are helpful if needed.

@daavoo daavoo merged commit ec2225e into iterative:master May 24, 2022
@bobertlo bobertlo deleted the yaml1.2 branch May 24, 2022 12:00
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.

4 participants