MCPcopy
hub / github.com/feast-dev/feast / plan

Function plan

sdk/python/feast/repo_operations.py:244–269  ·  view source on GitHub ↗
(
    repo_config: RepoConfig,
    repo_path: Path,
    skip_source_validation: bool,
    skip_feature_view_validation: bool = False,
)

Source from the content-addressed store, hash-verified

242
243
244def plan(
245 repo_config: RepoConfig,
246 repo_path: Path,
247 skip_source_validation: bool,
248 skip_feature_view_validation: bool = False,
249):
250 os.chdir(repo_path)
251 repo = _get_repo_contents(repo_path, repo_config.project, repo_config)
252 for project in repo.projects:
253 repo_config.project = project.name
254 store, registry = _get_store_and_registry(repo_config)
255 # TODO: When we support multiple projects in a single repo, we should filter repo contents by project
256 if not skip_source_validation:
257 provider = store._get_provider()
258 data_sources = [
259 t.batch_source for t in repo.feature_views if t.batch_source is not None
260 ]
261 # Make sure the data source used by this feature view is supported by Feast
262 for data_source in data_sources:
263 provider.validate_data_source(store.config, data_source)
264
265 registry_diff, infra_diff, _ = store.plan(
266 repo, skip_feature_view_validation=skip_feature_view_validation
267 )
268 click.echo(registry_diff.to_string())
269 click.echo(infra_diff.to_string())
270
271
272def _get_repo_contents(

Callers 1

plan_commandFunction · 0.90

Calls 6

_get_repo_contentsFunction · 0.85
_get_store_and_registryFunction · 0.85
_get_providerMethod · 0.45
validate_data_sourceMethod · 0.45
planMethod · 0.45
to_stringMethod · 0.45

Tested by

no test coverage detected