Skip to content

fix(plot): be robust against non-existing subindices#503

Merged
hanxiao merged 1 commit intomainfrom
fix-plot-subindex
Aug 26, 2022
Merged

fix(plot): be robust against non-existing subindices#503
hanxiao merged 1 commit intomainfrom
fix-plot-subindex

Conversation

@JohannesMessner
Copy link
Copy Markdown
Member

Sometimes .plot() can be called when ._subindices does not yet exist, resulting in an error.

This fix makes a check about the existence of subindices robust against that problem.

@codecov
Copy link
Copy Markdown

codecov bot commented Aug 26, 2022

Codecov Report

Merging #503 (9226633) into main (e52d749) will decrease coverage by 3.38%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main     #503      +/-   ##
==========================================
- Coverage   86.46%   83.07%   -3.39%     
==========================================
  Files         134      134              
  Lines        6702     6702              
==========================================
- Hits         5795     5568     -227     
- Misses        907     1134     +227     
Flag Coverage Δ
docarray 83.07% <100.00%> (-3.39%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
docarray/__init__.py 75.00% <100.00%> (ø)
docarray/array/mixins/plot.py 68.01% <100.00%> (ø)
docarray/array/mixins/embed.py 10.52% <0.00%> (-78.95%) ⬇️
docarray/array/mixins/post.py 18.60% <0.00%> (-74.42%) ⬇️
docarray/array/mixins/setitem.py 58.19% <0.00%> (-23.78%) ⬇️
docarray/array/mixins/getattr.py 63.63% <0.00%> (-18.19%) ⬇️
docarray/array/mixins/group.py 69.23% <0.00%> (-17.95%) ⬇️
docarray/array/storage/sqlite/helper.py 75.00% <0.00%> (-13.89%) ⬇️
docarray/helper.py 68.77% <0.00%> (-13.13%) ⬇️
docarray/array/mixins/delitem.py 74.46% <0.00%> (-12.77%) ⬇️
... and 8 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@hanxiao hanxiao enabled auto-merge (squash) August 26, 2022 12:10
@JohannesMessner JohannesMessner enabled auto-merge (squash) August 26, 2022 12:11
@hanxiao hanxiao disabled auto-merge August 26, 2022 12:12
@hanxiao hanxiao merged commit be78867 into main Aug 26, 2022
@hanxiao hanxiao deleted the fix-plot-subindex branch August 26, 2022 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants