-
Notifications
You must be signed in to change notification settings - Fork 5
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
refactor: refactor source.py #351
Conversation
Trivy scanning results. |
Code Coverage Summary
Diff against main
Results for commit: 172d0c4 Minimum allowed coverage is ♻️ This comment has been updated with latest results |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
imo we should create package ragbits.document_search.documents.sources
and there create separate modules per source type.
Preferably to not change public API let's expose all the sources in init.py making sure that correct extras are in place.
please check my changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks better, but please keep naming consistent with the rest of the lib. should be:
- sources/base.py (we can also put source resolver here)
- sources/gcs.py
- sources/hf.py
- sources/local.py
I've changed the names of files and I've moved the source resolver to the base.py file |
packages/ragbits-document-search/src/ragbits/document_search/documents/sources/base.py
Outdated
Show resolved
Hide resolved
packages/ragbits-document-search/src/ragbits/document_search/documents/sources/base.py
Outdated
Show resolved
Hide resolved
# Conflicts: # packages/ragbits-document-search/src/ragbits/document_search/documents/sources.py
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
extract sources to separate files