-
Notifications
You must be signed in to change notification settings - Fork 996
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 data source classes to fix import issues #1723
Conversation
Signed-off-by: Achal Shah <achals@gmail.com>
Signed-off-by: Achal Shah <achals@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #1723 +/- ##
==========================================
- Coverage 84.47% 84.46% -0.01%
==========================================
Files 79 82 +3
Lines 7071 7093 +22
==========================================
+ Hits 5973 5991 +18
- Misses 1098 1102 +4
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
/restest |
Why do we need |
we don't, intellij added it. removing |
Signed-off-by: Achal Shah <achals@gmail.com>
from feast.registry import Registry | ||
from feast.repo_config import FeastConfigBaseModel, RepoConfig | ||
from feast.value_type import ValueType | ||
|
||
from .bigquery_source import BigQuerySource |
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.
This import is suspect. Should it be feast.bigquery_source
?
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.
No, it's a relative import - should work fine (tests are happy too)
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.
I can't remember where this has caused problems for me, but I distinctly remember always having to make all imports absolute. Somewhere I ran into problems with relative imports. I don't think there are any relative imports in the code base, except the __init__.py
files.
I'm fine leaving it as is and seeing if a problem pops up though.
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: achals, woop The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Signed-off-by: Achal Shah achals@gmail.com
What this PR does / why we need it:
By keeping the Source classes in the same files as the offline store implementations, we can't import the sources without the corresponding libraries installed. This is a terrible experience. This PR moves the classes to a different file, so they can be imported for just the declarative use cases and not require
boto
orgcloud
stuff to be installed.Which issue(s) this PR fixes:
Fixes #
Does this PR introduce a user-facing change?: