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❌ Patch coverage is
Additional details and impacted files@@ 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. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
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>
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>
| 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.
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.
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.
Is there any downside to having that code dependency?
There was a problem hiding this comment.
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.
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.
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 DetailsNeeds 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:
dsanddata_sourcefrom the Environment class, since they were used in an older version of the Environment.construct_universal_test_environmentandconstruct_test_environmentfor both happy path integration tests and non-universal-repo integration tests.get_prefixed_table_namefrom the DataSourceCreator since it wasn't needed.Additionally,
Which issue(s) this PR fixes:
Fixes #1797
Does this PR introduce a user-facing change?: