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 None values form asdf tree by default #212

Merged
merged 9 commits into from
Dec 11, 2020
Merged

Conversation

CagtayFabry
Copy link
Member

@CagtayFabry CagtayFabry commented Dec 10, 2020

This is to reproduce the old ASDF behavior pre asdf-format/asdf#863
Some tutorials seem to run now 👍

Also, some utilities provided by boltons could be useful for further tree manipulation
https://sedimental.org/remap.html#drop-empty-values
https://boltons.readthedocs.io/en/latest/iterutils.html#nested

Notes

  • We should discuss if we want this as default behavior
  • we can remove the drop_none_attr wrapper from weldx.asdf.utils with this (done)

Changes

  • default wrapper for to_tree now also removes None values

Related Issues

Closes # (add issue numbers)

Checks

  • updated CHANGELOG.md
  • updated tests
  • updated doc/
  • update example/tutorial notebooks

@CagtayFabry CagtayFabry changed the title Tree remove nones remove None values form asdf tree by default Dec 10, 2020
@CagtayFabry CagtayFabry changed the base branch from master to asdf_2.8 December 10, 2020 09:46
@CagtayFabry
Copy link
Member Author

this should work with any ASDF version so I think we should include this in master and rebase here once ready @vhirtham

this branch -> master -> asdf28

@CagtayFabry CagtayFabry changed the base branch from asdf_2.8 to master December 11, 2020 06:52
@CagtayFabry CagtayFabry marked this pull request as ready for review December 11, 2020 06:52
@CagtayFabry CagtayFabry requested a review from vhirtham December 11, 2020 06:52
@CagtayFabry CagtayFabry self-assigned this Dec 11, 2020
@codecov
Copy link

codecov bot commented Dec 11, 2020

Codecov Report

Merging #212 (796f0af) into master (af7a78b) will decrease coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #212      +/-   ##
==========================================
- Coverage   99.73%   99.72%   -0.01%     
==========================================
  Files          69       69              
  Lines        3719     3694      -25     
==========================================
- Hits         3709     3684      -25     
  Misses         10       10              
Impacted Files Coverage Δ
weldx/asdf/utils.py 100.00% <ø> (ø)
weldx/asdf/__init__.py 100.00% <100.00%> (ø)
weldx/asdf/tags/weldx/aws/design/base_metal.py 100.00% <100.00%> (ø)
weldx/asdf/tags/weldx/aws/design/connection.py 100.00% <100.00%> (ø)
...dx/asdf/tags/weldx/aws/design/joint_penetration.py 100.00% <100.00%> (ø)
weldx/asdf/tags/weldx/aws/design/sub_assembly.py 100.00% <100.00%> (ø)
weldx/asdf/tags/weldx/aws/design/weld_details.py 100.00% <100.00%> (ø)
weldx/asdf/tags/weldx/aws/design/weldment.py 100.00% <100.00%> (ø)
weldx/asdf/tags/weldx/aws/design/workpiece.py 100.00% <100.00%> (ø)
...asdf/tags/weldx/aws/process/arc_welding_process.py 100.00% <100.00%> (ø)
... and 17 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update af7a78b...796f0af. Read the comment docs.

@CagtayFabry CagtayFabry merged commit 26a89cb into master Dec 11, 2020
@CagtayFabry CagtayFabry deleted the tree_remove_nones branch December 11, 2020 11:41
@CagtayFabry CagtayFabry added this to the 0.3.0 milestone Jan 13, 2021
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.

2 participants