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

Function apply_total

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

Source from the content-addressed store, hash-verified

506
507
508def apply_total(
509 repo_config: RepoConfig,
510 repo_path: Path,
511 skip_source_validation: bool,
512 skip_feature_view_validation: bool = False,
513 no_promote: bool = False,
514):
515 os.chdir(repo_path)
516 repo = _get_repo_contents(repo_path, repo_config.project, repo_config)
517 for project in repo.projects:
518 repo_config.project = project.name
519 store, registry = _get_store_and_registry(repo_config)
520 if not is_valid_name(project.name):
521 print(
522 f"{project.name} is not valid. Project name should only have "
523 f"alphanumerical values, underscores, and hyphens but not start with an underscore or hyphen."
524 )
525 sys.exit(1)
526 # TODO: When we support multiple projects in a single repo, we should filter repo contents by project. Currently there is no way to associate Feast objects to project.
527 print(f"Applying changes for project {project.name}")
528 apply_total_with_repo_instance(
529 store,
530 project.name,
531 registry,
532 repo,
533 skip_source_validation,
534 skip_feature_view_validation,
535 no_promote=no_promote,
536 )
537
538
539def teardown(repo_config: RepoConfig, repo_path: Optional[str]):

Callers 2

apply_repoMethod · 0.90
apply_total_commandFunction · 0.90

Calls 4

_get_repo_contentsFunction · 0.85
_get_store_and_registryFunction · 0.85
is_valid_nameFunction · 0.85

Tested by

no test coverage detected