(
repo_config: RepoConfig,
repo_path: Path,
skip_source_validation: bool,
skip_feature_view_validation: bool = False,
no_promote: bool = False,
)
| 506 | |
| 507 | |
| 508 | def 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 | |
| 539 | def teardown(repo_config: RepoConfig, repo_path: Optional[str]): |
no test coverage detected