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

Feature/datatype sitemap fix #753

Merged
merged 3 commits into from
Oct 6, 2023

Conversation

richawo
Copy link
Contributor

@richawo richawo commented Oct 1, 2023

Relevant Issues

Type of change

  • [ ✅] Bug fix (non-breaking change which fixes an issue)

Fix steps:

  • Added SitemapChunker in a new file: sitemap.py
  • Added this new class in DataFormatter
  • Extended a TestApp, adding test_add_sitemap specifically for sitemap.
  • Fixed the dereferencing in SitemapLoader.

How Has This Been Tested?

    @patch("chromadb.api.models.Collection.Collection.add", MagicMock)
    def test_add_sitemap(self):
        """
        In addition to the test_add function, this test checks that sitemaps can be added with the correct data type.
        """
        self.app.add("https://www.google.com/sitemap.xml", metadata={"meta": "meta-data"})
        self.assertEqual(self.app.user_asks, [["https://www.google.com/sitemap.xml", "sitemap", {"meta": "meta-data"}]])

New test added in line with previous tests. Passing locally.

Checklist:

  • [✅] My code follows the style guidelines of this project
  • [✅] I have performed a self-review of my own code
  • [✅] I have commented my code, particularly in hard-to-understand areas
  • [✅] I have made corresponding changes to the documentation
  • [✅] My changes generate no new warnings
  • [✅] I have added tests that prove my fix is effective or that my feature works
  • [✅] New and existing unit tests pass locally with my changes
  • [✅] Any dependent changes have been merged and published in downstream modules
  • [✅] I have checked my code and corrected any misspellings

Maintainer Checklist

Copy link
Collaborator

@deshraj deshraj left a comment

Choose a reason for hiding this comment

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

Nice, thanks for fixing.

@codecov
Copy link

codecov bot commented Oct 6, 2023

Codecov Report

All modified lines are covered by tests ✅

Files Coverage Δ
embedchain/chunkers/sitemap.py 100.00% <100.00%> (ø)
embedchain/data_formatter/data_formatter.py 87.50% <100.00%> (+0.22%) ⬆️
embedchain/loaders/sitemap.py 90.00% <100.00%> (+50.00%) ⬆️

... and 1 file with indirect coverage changes

📢 Thoughts on this report? Let us know!.

@deshraj deshraj merged commit 1741d3b into mem0ai:main Oct 6, 2023
5 checks passed
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.

Unsupported data type: DataType.SITEMAP
2 participants