|
25 | 25 | from dateutil import parser |
26 | 26 | from pygments import formatters, highlight, lexers |
27 | 27 |
|
28 | | -from feast import flags, flags_helper, utils |
| 28 | +from feast import utils |
29 | 29 | from feast.constants import DEFAULT_FEATURE_TRANSFORMATION_SERVER_PORT |
30 | 30 | from feast.errors import FeastObjectNotFoundException, FeastProviderLoginError |
31 | 31 | from feast.feature_store import FeatureStore |
@@ -662,113 +662,6 @@ def serve_transformations_command(ctx: click.Context, port: int): |
662 | 662 | store.serve_transformations(port) |
663 | 663 |
|
664 | 664 |
|
665 | | -@cli.group(name="alpha") |
666 | | -def alpha_cmd(): |
667 | | - """ |
668 | | - Access alpha features |
669 | | - """ |
670 | | - pass |
671 | | - |
672 | | - |
673 | | -@alpha_cmd.command("list") |
674 | | -@click.pass_context |
675 | | -def list_alpha_features(ctx: click.Context): |
676 | | - """ |
677 | | - Lists all alpha features |
678 | | - """ |
679 | | - repo = ctx.obj["CHDIR"] |
680 | | - cli_check_repo(repo) |
681 | | - repo_path = str(repo) |
682 | | - store = FeatureStore(repo_path=repo_path) |
683 | | - |
684 | | - flags_to_show = flags.FLAG_NAMES.copy() |
685 | | - flags_to_show.remove(flags.FLAG_ALPHA_FEATURES_NAME) |
686 | | - print("Alpha features:") |
687 | | - for flag in flags_to_show: |
688 | | - enabled_string = ( |
689 | | - "enabled" |
690 | | - if flags_helper.feature_flag_enabled(store.config, flag) |
691 | | - else "disabled" |
692 | | - ) |
693 | | - print(f"{flag}: {enabled_string}") |
694 | | - |
695 | | - |
696 | | -@alpha_cmd.command("enable-all") |
697 | | -@click.pass_context |
698 | | -def enable_alpha_features(ctx: click.Context): |
699 | | - """ |
700 | | - Enables all alpha features |
701 | | - """ |
702 | | - repo = ctx.obj["CHDIR"] |
703 | | - cli_check_repo(repo) |
704 | | - repo_path = str(repo) |
705 | | - store = FeatureStore(repo_path=repo_path) |
706 | | - |
707 | | - if store.config.flags is None: |
708 | | - store.config.flags = {} |
709 | | - for flag_name in flags.FLAG_NAMES: |
710 | | - store.config.flags[flag_name] = True |
711 | | - store.config.write_to_path(Path(repo_path)) |
712 | | - |
713 | | - |
714 | | -@alpha_cmd.command("enable") |
715 | | -@click.argument("name", type=click.STRING) |
716 | | -@click.pass_context |
717 | | -def enable_alpha_feature(ctx: click.Context, name: str): |
718 | | - """ |
719 | | - Enables an alpha feature |
720 | | - """ |
721 | | - if name not in flags.FLAG_NAMES: |
722 | | - raise ValueError(f"Flag name, {name}, not valid.") |
723 | | - |
724 | | - repo = ctx.obj["CHDIR"] |
725 | | - cli_check_repo(repo) |
726 | | - repo_path = str(repo) |
727 | | - store = FeatureStore(repo_path=repo_path) |
728 | | - |
729 | | - if store.config.flags is None: |
730 | | - store.config.flags = {} |
731 | | - store.config.flags[flags.FLAG_ALPHA_FEATURES_NAME] = True |
732 | | - store.config.flags[name] = True |
733 | | - store.config.write_to_path(Path(repo_path)) |
734 | | - |
735 | | - |
736 | | -@alpha_cmd.command("disable") |
737 | | -@click.argument("name", type=click.STRING) |
738 | | -@click.pass_context |
739 | | -def disable_alpha_feature(ctx: click.Context, name: str): |
740 | | - """ |
741 | | - Disables an alpha feature |
742 | | - """ |
743 | | - if name not in flags.FLAG_NAMES: |
744 | | - raise ValueError(f"Flag name, {name}, not valid.") |
745 | | - |
746 | | - repo = ctx.obj["CHDIR"] |
747 | | - cli_check_repo(repo) |
748 | | - repo_path = str(repo) |
749 | | - store = FeatureStore(repo_path=repo_path) |
750 | | - |
751 | | - if store.config.flags is None or name not in store.config.flags: |
752 | | - return |
753 | | - store.config.flags[name] = False |
754 | | - store.config.write_to_path(Path(repo_path)) |
755 | | - |
756 | | - |
757 | | -@alpha_cmd.command("disable-all") |
758 | | -@click.pass_context |
759 | | -def disable_alpha_features(ctx: click.Context): |
760 | | - """ |
761 | | - Disables all alpha features |
762 | | - """ |
763 | | - repo = ctx.obj["CHDIR"] |
764 | | - cli_check_repo(repo) |
765 | | - repo_path = str(repo) |
766 | | - store = FeatureStore(repo_path=repo_path) |
767 | | - |
768 | | - store.config.flags = None |
769 | | - store.config.write_to_path(Path(repo_path)) |
770 | | - |
771 | | - |
772 | 665 | @cli.command("validate") |
773 | 666 | @click.option( |
774 | 667 | "--feature-service", "-f", help="Specify a feature service name", |
|
0 commit comments