def _register_resources(client, entities_fldr, features_fldr): resources = [] for ent_file in os.listdir(entities_fldr): resources.append(Entity.from_yaml(os.path.join(entities_fldr, ent_file))) for feat_file in os.listdir(features_fldr): resources.append(Feature.from_yaml(os.path.join(features_fldr, feat_file))) client.apply(resources)
def test_read_from_yaml(self): feature = Feature.from_yaml("tests/sample/valid_feature.yaml") assert feature.id == "myentity.feature_bool_redis1" assert feature.name == "feature_bool_redis1" assert feature.entity == "myentity" assert feature.owner == "*****@*****.**" assert feature.description == "test entity." assert feature.value_type == ValueType.BOOL assert feature.uri == "https://github.com/bob/example"
def test_read_from_yaml(self): feature = Feature.from_yaml("tests/sample/valid_feature.yaml") assert feature.id == "myentity.none.feature_bool_redis1" assert feature.name == "feature_bool_redis1" assert feature.entity == "myentity" assert feature.owner == "*****@*****.**" assert feature.description == "test entity." assert feature.value_type == ValueType.BOOL assert feature.granularity == Granularity.NONE assert feature.uri == "https://github.com/bob/example" assert feature.serving_store.id == "REDIS1" assert feature.warehouse_store.id == "BIGQUERY1"