-
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 Environment class and DataSourceCreator API, and use fixtures for datasets and data sources #1790
Refactor Environment class and DataSourceCreator API, and use fixtures for datasets and data sources #1790
Conversation
Signed-off-by: Achal Shah <achals@gmail.com>
Codecov Report
@@ Coverage Diff @@
## master #1790 +/- ##
==========================================
- Coverage 85.32% 84.64% -0.68%
==========================================
Files 93 93
Lines 6950 6812 -138
==========================================
- Hits 5930 5766 -164
- Misses 1020 1046 +26
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
Signed-off-by: Achal Shah <achals@gmail.com>
Signed-off-by: Achal Shah <achals@gmail.com>
Signed-off-by: Achal Shah <achals@gmail.com>
Signed-off-by: Achal Shah <achals@gmail.com>
Signed-off-by: Achal Shah <achals@gmail.com>
Signed-off-by: Achal Shah <achals@gmail.com>
sdk/python/tests/integration/feature_repos/test_repo_configuration.py
Outdated
Show resolved
Hide resolved
sdk/python/tests/integration/feature_repos/universal/data_source_creator.py
Outdated
Show resolved
Hide resolved
sdk/python/tests/integration/feature_repos/universal/data_sources/bigquery.py
Outdated
Show resolved
Hide resolved
sdk/python/tests/integration/feature_repos/universal/data_sources/file.py
Show resolved
Hide resolved
sdk/python/tests/integration/feature_repos/test_repo_configuration.py
Outdated
Show resolved
Hide resolved
Signed-off-by: Achal Shah <achals@gmail.com>
Signed-off-by: Achal Shah <achals@gmail.com>
Signed-off-by: Achal Shah <achals@gmail.com>
Signed-off-by: Achal Shah <achals@gmail.com>
Signed-off-by: Achal Shah <achals@gmail.com>
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
sdk/python/tests/integration/feature_repos/universal/data_sources/bigquery.py
Outdated
Show resolved
Hide resolved
provider: str = "local" | ||
online_store: Union[str, Dict] = "sqlite" | ||
|
||
offline_store_creator: str = "tests.integration.feature_repos.universal.data_sources.file.FileDataSourceCreator" |
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.
Apologies if this has been mentioned before, but can you remind me why we use a string reference to the class instead of a code reference?
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.
Mainly to not have the repo_configuration file not have any code dependency on any specific offline store, similar to the online/offline store config.
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.
Is there any downside to having that code dependency?
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.
Oops missed this. For tests, presumably not. However I can imagine we'll want this to be extensible to support the test suite for when users bring their own offline stores with a custom DataSourceCreator, so it may be needed then. Happy to change it for YAGNI, or keep it for forward looking flexibility
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.
My personal preference is to YAGNI this baby until we need it, just because I feel like we might run into bugs with these strings.
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.
Aight sg
sdk/python/tests/integration/feature_repos/universal/data_source_creator.py
Outdated
Show resolved
Hide resolved
sdk/python/tests/integration/feature_repos/universal/data_source_creator.py
Outdated
Show resolved
Hide resolved
Signed-off-by: Achal Shah <achals@gmail.com>
Signed-off-by: Achal Shah <achals@gmail.com>
Signed-off-by: Achal Shah <achals@gmail.com>
Signed-off-by: Achal Shah <achals@gmail.com>
Signed-off-by: Achal Shah <achals@gmail.com>
/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:
This PR introduces a number of changes for speed and customizability:
ds
anddata_source
from the Environment class, since they were used in an older version of the Environment.construct_universal_test_environment
andconstruct_test_environment
for both happy path integration tests and non-universal-repo integration tests.get_prefixed_table_name
from the DataSourceCreator since it wasn't needed.Additionally,
Which issue(s) this PR fixes:
Fixes #1797
Does this PR introduce a user-facing change?: