fix: doc from dataclass with list#1018
Merged
JohannesMessner merged 4 commits intomainfrom Jan 16, 2023
Merged
Conversation
Closed
added 2 commits
January 16, 2023 11:45
Signed-off-by: anna-charlotte <[email protected]>
Signed-off-by: anna-charlotte <[email protected]>
b878081 to
7aff87c
Compare
Codecov ReportBase: 88.55% // Head: 88.56% // Increases project coverage by
Additional details and impacted files@@ Coverage Diff @@
## main #1018 +/- ##
=======================================
Coverage 88.55% 88.56%
=======================================
Files 155 155
Lines 8058 8061 +3
=======================================
+ Hits 7136 7139 +3
Misses 922 922
Flags with carried forward coverage won't be shown. Click here to find out 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. |
added 2 commits
January 16, 2023 12:11
Signed-off-by: anna-charlotte <[email protected]>
Signed-off-by: anna-charlotte <[email protected]>
JohannesMessner
approved these changes
Jan 16, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Goals:
If we create a
Documentinstance from adataclassinstance, all attributes are gonna be stored in their own Documents in the chunks. If one of the attributes is an iterable, such as aList[Images], we want to be able to access thisDocumentArrayas such. If it is of length 1 though, when accesing the images, we get only oneDocumentinstead of aDocumentArrrayof length 1.To change this behaviour we need to check if the initial attribute type was an iterable, in which case return a DocumentArray.
Output:
Expected: