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

Remove ruamel.yaml dependency #212

Merged
merged 6 commits into from
Aug 2, 2021
Merged

Remove ruamel.yaml dependency #212

merged 6 commits into from
Aug 2, 2021

Conversation

FynnBe
Copy link
Member

@FynnBe FynnBe commented Aug 2, 2021

ruamel.yaml is not supported by Pyodide, therefor we use PyYAML instead.

problem: PyYAML currently only supports yaml 1.1, whereas ruamel.yaml (what we used until now) defaults to yaml 1.2.
Differences: https://yaml.readthedocs.io/en/latest/pyyaml.html#defaulting-to-yaml-1-2-support

The one difference that might be most relevant for us: "correct parsing of floating point scalars with exponentials" is added manually to the current ruamel.yaml replacement.
see yaml/pyyaml#173 and https://stackoverflow.com/questions/30458977/yaml-loads-5e-6-as-string-and-not-a-number.

Also note that not all valid json is compatible with yaml 1.1 (but with yaml 1.2).

With this yaml 1.1/1.2 hybrid we should be good for now and can hopefully switch easily to the full yaml 1.2 in the future.

@github-actions github-actions bot added documentation Improvements or additions to documentation removal Removals and Deprecations labels Aug 2, 2021
@FynnBe FynnBe requested a review from oeway August 2, 2021 13:12
@FynnBe
Copy link
Member Author

FynnBe commented Aug 2, 2021

fixes #209

Copy link
Collaborator

@constantinpape constantinpape left a comment

Choose a reason for hiding this comment

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

LGTM, feel free to merge.

@FynnBe FynnBe merged commit 65cdee7 into main Aug 2, 2021
@FynnBe FynnBe deleted the remove_ruamel_yaml branch August 2, 2021 15:24
@oeway
Copy link
Contributor

oeway commented Aug 2, 2021

@FynnBe Great! Could you make a new release so we can try it with pyodide?

@FynnBe
Copy link
Member Author

FynnBe commented Aug 2, 2021

sure, let's wait for #214 to be merged and then go ahead with a little new release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation removal Removals and Deprecations
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants