Skip to content

feat: propagate context enter and exit to subindices#737

Merged
JoanFM merged 13 commits intomainfrom
fix-propagate-context-subindices
Nov 9, 2022
Merged

feat: propagate context enter and exit to subindices#737
JoanFM merged 13 commits intomainfrom
fix-propagate-context-subindices

Conversation

@JohannesMessner
Copy link
Copy Markdown
Member

Currently, with da only call the context manager on da itself, no on the subindices of da.

This pr propagates __enter__ and __exit__ to all subindices so that they get handled properly, independently of any potential custom logic in a storage backend's enter/exit implementation.

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Nov 9, 2022

Codecov Report

Base: 84.05% // Head: 54.94% // Decreases project coverage by -29.10% ⚠️

Coverage data is based on head (62c4fd1) compared to base (1e56daf).
Patch coverage: 100.00% of modified lines in pull request are covered.

❗ Current head 62c4fd1 differs from pull request most recent head 0320860. Consider uploading reports for the commit 0320860 to get more accurate results

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #737       +/-   ##
===========================================
- Coverage   84.05%   54.94%   -29.11%     
===========================================
  Files         133      133               
  Lines        6602     6608        +6     
===========================================
- Hits         5549     3631     -1918     
- Misses       1053     2977     +1924     
Flag Coverage Δ
docarray 54.94% <100.00%> (-29.11%) ⬇️

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

Impacted Files Coverage Δ
docarray/array/document.py 87.93% <100.00%> (+1.39%) ⬆️
docarray/array/queryset/__init__.py 0.00% <0.00%> (-100.00%) ⬇️
docarray/document/strawberry_type.py 0.00% <0.00%> (-100.00%) ⬇️
docarray/array/mixins/dataloader/helper.py 0.00% <0.00%> (-100.00%) ⬇️
docarray/document/mixins/rich_embedding.py 0.00% <0.00%> (-100.00%) ⬇️
docarray/math/evaluation.py 0.00% <0.00%> (-94.83%) ⬇️
docarray/array/queryset/parser.py 0.00% <0.00%> (-88.34%) ⬇️
docarray/document/mixins/mesh.py 16.66% <0.00%> (-83.34%) ⬇️
docarray/document/mixins/strawberry.py 16.27% <0.00%> (-79.07%) ⬇️
docarray/array/queryset/lookup.py 0.00% <0.00%> (-78.68%) ⬇️
... and 87 more

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

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@JohannesMessner JohannesMessner marked this pull request as ready for review November 9, 2022 10:46
@JoanFM JoanFM merged commit bb9d1c3 into main Nov 9, 2022
@JoanFM JoanFM deleted the fix-propagate-context-subindices branch November 9, 2022 10:47
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.

3 participants