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

Support edges to/from nested fields #149

Merged
merged 2 commits into from
Feb 19, 2025
Merged

Support edges to/from nested fields #149

merged 2 commits into from
Feb 19, 2025

Conversation

bjchambers
Copy link
Collaborator

No description provided.

This allows an edge like `("a.b", "b.c")`.
@@ -113,7 +113,11 @@ def _matches(self, filter: dict[str, Any] | None, content: Content) -> bool:
return True

for key, filter_value in filter.items():
content_value = content.metadata.get(key, SENTINEL)
content_value = content.metadata
for key_part in key.split("."):
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Split keys on .. This is questionable -- some people might put a.b in the key.

@@ -273,6 +314,10 @@ class AdapterComplianceSuite(abc.ABC):
loaded.
"""

def supports_nested_metadata(self) -> bool:
"""Return whether nested metadata is expected to work."""
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add some ability to create "features" that disable respective tests. Can refine later.

@@ -25,6 +28,16 @@ def adapter(
)

shredder = ShreddingTransformer()

# Chroma doesn't even support *writing* nested data currently, so we
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ugh. Chroma won't even persist things with nested data.

@coveralls
Copy link

coveralls commented Feb 19, 2025

Pull Request Test Coverage Report for Build 13423892143

Details

  • 24 of 24 (100.0%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage increased (+0.1%) to 92.981%

Totals Coverage Status
Change from base Build 13293582105: 0.1%
Covered Lines: 1525
Relevant Lines: 1613

💛 - Coveralls

Copy link

Test Results

    8 files  ±  0    8 suites  ±0   2m 45s ⏱️ +8s
  449 tests + 43  431 ✅ +25   18 💤 + 18  0 ❌ ±0 
1 796 runs  +172  964 ✅ +64  832 💤 +108  0 ❌ ±0 

Results for commit 70fe493. ± Comparison against base commit 7e41656.

@bjchambers bjchambers merged commit b99bddc into main Feb 19, 2025
11 checks passed
@bjchambers bjchambers deleted the nested-fileds branch February 19, 2025 23:06
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