-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix pytests and make TS conversion conditional (#205)
* Add wait flag for jobs, fix go proto path for dataset service * Rebase with master * Fix tests, update requirements * Update min version for pandas * Update integration testutils to use pandas nullable ints * Fix warehouse validate int32 * Distinguish pandas dtype and dtype * Add Int32 support for kafka producer * Remove print
- Loading branch information
1 parent
5bd6d4d
commit 7548e61
Showing
12 changed files
with
45 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
pandas==0.23.* | ||
pandas==0.24.* | ||
numpy==1.15.* | ||
kafka-python==1.4.* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -164,9 +164,8 @@ def test_from_df(self): | |
assert feature.id == "driver." + feature.name | ||
|
||
import_spec = importer.spec | ||
assert import_spec.type == "file" | ||
assert import_spec.type == "file.csv" | ||
assert import_spec.sourceOptions == { | ||
"format": "csv", | ||
"path": importer.remote_path | ||
} | ||
assert import_spec.entities == ["driver"] | ||
|
@@ -182,6 +181,27 @@ def test_from_df(self): | |
assert col == field.name | ||
if col in feature_columns: | ||
assert field.featureId == "driver." + col | ||
|
||
def test_stage_df_without_timestamp(self, mocker): | ||
mocker.patch("feast.sdk.importer.df_to_gcs", return_value=True) | ||
feature_columns = [ | ||
"avg_distance_completed", "avg_customer_distance_completed", | ||
"avg_distance_cancelled" | ||
] | ||
csv_path = "tests/data/driver_features.csv" | ||
entity_name = "driver" | ||
owner = "[email protected]" | ||
staging_location = "gs://test-bucket" | ||
id_column = "driver_id" | ||
importer = Importer.from_csv( | ||
path=csv_path, | ||
entity=entity_name, | ||
owner=owner, | ||
staging_location=staging_location, | ||
id_column=id_column, | ||
feature_columns=feature_columns) | ||
|
||
importer.stage() | ||
|
||
def _validate_csv_importer(self, | ||
importer, | ||
|
@@ -228,6 +248,7 @@ def _validate_csv_importer(self, | |
if col in feature_columns: | ||
assert field.featureId == '{}.{}'.format(entity_name, | ||
col).lower() | ||
|
||
|
||
|
||
class TestHelpers: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters