Replace pyyaml with ruamel.yaml
This PR closes #391. By updating ruamel.yaml it appears that we can remove some older logic in asdf that provided handling for omap types. It looks like pyyaml handled those in an idiosyncratic way, whereas ruamel.yaml handles them better (see https://github.com/yaml/pyyaml/issues/78).
This PR does not address #642. The solution does not appear to be straightforward and so it will need to be fixed in a separate PR.
Hi there @drdavella :wave: - thanks for the pull request! I'm just a friendly :robot: that checks for issues related to the changelog. I help make sure that this pull request is milestoned and labeled correctly. This is mainly intended for the maintainers, so if you are not a maintainer you can ignore this, and a maintainer will let you know if any action is required on your part :smiley:.
Everything looks good from my point of view! :+1:
If there are any issues with this message, please report them here.
Hi there @drdavella :wave: - thanks for the pull request! I'm just a friendly :robot: that checks for issues related to the changelog. I help make sure that this pull request is milestoned and labeled correctly. This is mainly intended for the maintainers, so if you are not a maintainer you can ignore this, and a maintainer will let you know if any action is required on your part :smiley:.
Everything looks good from my point of view! :+1:
If there are any issues with this message, please report them here.
Codecov Report
Merging #677 into master will increase coverage by
0.14%. The diff coverage is100%.
@@ Coverage Diff @@
## master #677 +/- ##
==========================================
+ Coverage 93.41% 93.55% +0.14%
==========================================
Files 39 39
Lines 4341 4313 -28
==========================================
- Hits 4055 4035 -20
+ Misses 286 278 -8
| Impacted Files | Coverage Δ | |
|---|---|---|
| asdf/yamlutil.py | 99.18% <100%> (+1.26%) |
:arrow_up: |
| asdf/__init__.py | 100% <100%> (+24%) |
:arrow_up: |
| asdf/block.py | 95.59% <100%> (ø) |
:arrow_up: |
| asdf/schema.py | 94.16% <100%> (ø) |
:arrow_up: |
| asdf/versioning.py | 92.85% <100%> (ø) |
:arrow_up: |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact),ø = not affected,? = missing dataPowered by Codecov. Last update 1d9a56c...b69c9c3. Read the comment docs.
This looks awesome :smile: Do you have any indication if this has any performance impact one way or another?
All the jwst package unit tests pass with this change. So we are 👍
@Cadair I have not had time to look into performance yet. My intuition is that it will be no worse than pyyaml, but it should be measured.
This isn't a great benchmark, but I did
%timeit asdf.test()
On this branch:
18.7 s ± 27.8 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
On master:
18 s ± 32.9 ms per loop (mean ± std. dev. of 7 runs, 1 loop each)
See this issue for related discussion. I'm not sure whether this is a strong enough reason to hold off on this PR, though.
Closing. This has become too out of date and stale.