From 57cd559e11c214f2d2a8da227794f914d9c745e2 Mon Sep 17 00:00:00 2001 From: Chetan Kini Date: Mon, 14 Nov 2022 10:37:19 -0500 Subject: [PATCH] [MAINTENANCE] Refactor out `termcolor` dependency (#6348) --- docs_rtd/requirements.txt | 1 - great_expectations/cli/pretty_printing.py | 40 ++++---- great_expectations/cli/v012/util.py | 46 ++++----- .../usage_statistics/package_dependencies.py | 1 - requirements.txt | 1 - tests/cli/test_datasource_pandas.py | 14 +-- tests/cli/test_datasource_sqlite.py | 14 +-- .../upgrade_helpers/test_upgrade_helper.py | 35 +++---- tests/cli/utils.py | 7 ++ tests/cli/v012/test_datasource_pandas.py | 27 +++--- tests/cli/v012/test_datasource_sqlite.py | 29 +++--- tests/cli/v012/test_init_pandas.py | 2 +- tests/cli/v012/test_store.py | 93 ++++++++++--------- tests/cli/v012/test_validation_operator.py | 51 +++++----- .../test_upgrade_helper_pre_v013.py | 27 +++--- .../usage_stats_event_examples.py | 6 -- ...ic_project_upgrade_expected_stdout.fixture | 41 ++++---- ...oject_upgrade_expected_v012_stdout.fixture | 39 ++++---- ...ade_with_exception_expected_stdout.fixture | 33 ++++--- ...ith_exception_expected_v012_stdout.fixture | 31 +++---- ..._with_manual_steps_expected_stdout.fixture | 33 ++++--- ..._manual_steps_expected_v012_stdout.fixture | 31 +++---- ...oject_upgrade_expected_v012_stdout.fixture | 19 ++-- ...rade_with_manual_steps_checkpoints.fixture | 21 ++--- ...lidation_operators_expected_stdout.fixture | 21 ++--- ...thout_manual_steps_expected_stdout.fixture | 17 ++-- 26 files changed, 328 insertions(+), 352 deletions(-) diff --git a/docs_rtd/requirements.txt b/docs_rtd/requirements.txt index 3d775595830c..ce689246d740 100644 --- a/docs_rtd/requirements.txt +++ b/docs_rtd/requirements.txt @@ -82,7 +82,6 @@ sphinxcontrib-jsmath==1.0.1 sphinxcontrib-qthelp==1.0.3 sphinxcontrib-serializinghtml==1.1.4 sybil==1.4.0 -termcolor==1.1.0 terminado==0.8.3 testpath==0.4.4 toml==0.10.1 diff --git a/great_expectations/cli/pretty_printing.py b/great_expectations/cli/pretty_printing.py index 77ab748ab4a3..a9754d30e72a 100644 --- a/great_expectations/cli/pretty_printing.py +++ b/great_expectations/cli/pretty_printing.py @@ -1,8 +1,17 @@ import re import sys -from typing import List, Optional +from typing import List, Optional, Tuple -from termcolor import colored +import click +from typing_extensions import Final + +SUPPORTED_CLI_COLORS: Final[Tuple[str, ...]] = ( + "blue", + "cyan", + "green", + "yellow", + "red", +) def cli_message(string: str) -> None: @@ -10,25 +19,14 @@ def cli_message(string: str) -> None: def cli_colorize_string(string: str) -> str: - # the DOTALL flag means that `.` includes newlines for multiline comments inside these tags - flags = re.DOTALL - mod_string = re.sub( - "(.*?)", colored(r"\g<1>", "blue"), string, flags=flags - ) - mod_string = re.sub( - "(.*?)", colored(r"\g<1>", "cyan"), mod_string, flags=flags - ) - mod_string = re.sub( - "(.*?)", colored(r"\g<1>", "green"), mod_string, flags=flags - ) - mod_string = re.sub( - "(.*?)", colored(r"\g<1>", "yellow"), mod_string, flags=flags - ) - mod_string = re.sub( - "(.*?)", colored(r"\g<1>", "red"), mod_string, flags=flags - ) - - return colored(mod_string) + for color in SUPPORTED_CLI_COLORS: + string = re.sub( + f"<{color}>(.*?)", + click.style(r"\g<1>", fg=color), + string, + flags=re.DOTALL, # the DOTALL flag means that `.` includes newlines for multiline comments inside these tags + ) + return string def display_not_implemented_message_and_exit() -> None: diff --git a/great_expectations/cli/v012/util.py b/great_expectations/cli/v012/util.py index 456c53e8862e..e2c006bcd226 100644 --- a/great_expectations/cli/v012/util.py +++ b/great_expectations/cli/v012/util.py @@ -2,10 +2,12 @@ import re import sys from types import ModuleType -from typing import Optional +from typing import Optional, Tuple +import click import pkg_resources from pkg_resources import Distribution, WorkingSet +from typing_extensions import Final from great_expectations.cli.v012 import toolkit from great_expectations.cli.v012.python_subprocess import ( @@ -13,36 +15,28 @@ ) from great_expectations.util import import_library_module, is_library_loadable -try: - from termcolor import colored -except ImportError: - colored = None +SUPPORTED_CLI_COLORS: Final[Tuple[str, ...]] = ( + "blue", + "cyan", + "green", + "yellow", + "red", +) -def cli_message(string) -> None: +def cli_message(string: str) -> None: print(cli_colorize_string(string)) -def cli_colorize_string(string): - # the DOTALL flag means that `.` includes newlines for multiline comments inside these tags - flags = re.DOTALL - mod_string = re.sub( - "(.*?)", colored(r"\g<1>", "blue"), string, flags=flags - ) - mod_string = re.sub( - "(.*?)", colored(r"\g<1>", "cyan"), mod_string, flags=flags - ) - mod_string = re.sub( - "(.*?)", colored(r"\g<1>", "green"), mod_string, flags=flags - ) - mod_string = re.sub( - "(.*?)", colored(r"\g<1>", "yellow"), mod_string, flags=flags - ) - mod_string = re.sub( - "(.*?)", colored(r"\g<1>", "red"), mod_string, flags=flags - ) - - return colored(mod_string) +def cli_colorize_string(string: str) -> str: + for color in SUPPORTED_CLI_COLORS: + string = re.sub( + f"<{color}>(.*?)", + click.style(r"\g<1>", fg=color), + string, + flags=re.DOTALL, # the DOTALL flag means that `.` includes newlines for multiline comments inside these tags + ) + return string def cli_message_list(string_list, list_intro_string=None) -> None: diff --git a/great_expectations/core/usage_statistics/package_dependencies.py b/great_expectations/core/usage_statistics/package_dependencies.py index 14fdc7e4a736..8a21d44aaf7a 100644 --- a/great_expectations/core/usage_statistics/package_dependencies.py +++ b/great_expectations/core/usage_statistics/package_dependencies.py @@ -54,7 +54,6 @@ class GEDependencies: "requests", "ruamel.yaml", "scipy", - "termcolor", "tqdm", "typing-extensions", "urllib3", diff --git a/requirements.txt b/requirements.txt index 488e71d4ced0..a4ff6dd8e72f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -22,7 +22,6 @@ pytz>=2021.3 requests>=2.20 ruamel.yaml>=0.16,<0.17.18 scipy>=0.19.0 -termcolor>=1.1.0,<2.1.0 # Temporary pin due to breaking change made in 2.1.0 tqdm>=4.59.0 typing-extensions>=3.10.0.0 # Leverage type annotations from recent Python releases tzlocal>=1.2 diff --git a/tests/cli/test_datasource_pandas.py b/tests/cli/test_datasource_pandas.py index f8fd69806beb..a44fa61eab1c 100644 --- a/tests/cli/test_datasource_pandas.py +++ b/tests/cli/test_datasource_pandas.py @@ -8,7 +8,7 @@ from great_expectations import DataContext from great_expectations.cli import cli -from tests.cli.utils import assert_no_logging_messages_or_tracebacks +from tests.cli.utils import assert_no_logging_messages_or_tracebacks, escape_ansi @mock.patch( @@ -75,13 +75,13 @@ def test_cli_datasource_list_on_project_with_one_datasource( catch_exceptions=False, ) - expected_output = """Using v3 (Batch Request) API\x1b[0m -1 Datasource found: - - - name: my_datasource - class_name: Datasource + expected_output = """Using v3 (Batch Request) API +1 Datasource found: + + - name: my_datasource + class_name: Datasource """.strip() - stdout = result.stdout.strip() + stdout = escape_ansi(result.stdout).strip() assert stdout == expected_output assert_no_logging_messages_or_tracebacks(caplog, result) diff --git a/tests/cli/test_datasource_sqlite.py b/tests/cli/test_datasource_sqlite.py index 662261853b41..8198edadd7f0 100644 --- a/tests/cli/test_datasource_sqlite.py +++ b/tests/cli/test_datasource_sqlite.py @@ -9,7 +9,7 @@ from great_expectations import DataContext from great_expectations.cli import cli -from tests.cli.utils import assert_no_logging_messages_or_tracebacks +from tests.cli.utils import assert_no_logging_messages_or_tracebacks, escape_ansi @mock.patch( @@ -46,13 +46,13 @@ def test_cli_datasource_list( catch_exceptions=False, ) expected_output = """\ -Using v3 (Batch Request) API\x1b[0m -1 Datasource found: - - - name: wow_a_datasource - class_name: SqlAlchemyDatasource +Using v3 (Batch Request) API +1 Datasource found: + + - name: wow_a_datasource + class_name: SqlAlchemyDatasource """.strip() - stdout = result.stdout.strip() + stdout = escape_ansi(result.stdout).strip() assert stdout == expected_output diff --git a/tests/cli/upgrade_helpers/test_upgrade_helper.py b/tests/cli/upgrade_helpers/test_upgrade_helper.py index 309a8f6fe2b2..7b27cf6a6b18 100644 --- a/tests/cli/upgrade_helpers/test_upgrade_helper.py +++ b/tests/cli/upgrade_helpers/test_upgrade_helper.py @@ -15,6 +15,7 @@ from tests.cli.utils import ( VALIDATION_OPERATORS_DEPRECATION_MESSAGE, assert_no_logging_messages_or_tracebacks, + escape_ansi, ) @@ -119,7 +120,7 @@ def test_upgrade_helper_intervention_on_cli_command( input="n\n", catch_exceptions=False, ) - stdout: str = result.stdout + stdout: str = escape_ansi(result.stdout).strip() assert ( "Your project appears to have an out-of-date config version (1.0) - the version number must be at least 3." @@ -131,12 +132,12 @@ def test_upgrade_helper_intervention_on_cli_command( in stdout ) assert ( - "Ok, exiting now. To upgrade at a later time, use the following command: great_expectations project " - "upgrade" in stdout + "Ok, exiting now. To upgrade at a later time, use the following command: great_expectations project " + "upgrade" in stdout ) assert ( - "To learn more about the upgrade process, visit [" - "36mhttps://docs.greatexpectations.io/docs/guides/miscellaneous/migration_guide#migrating-to-the-batch-request-v3-api" + "To learn more about the upgrade process, visit " + "https://docs.greatexpectations.io/docs/guides/miscellaneous/migration_guide#migrating-to-the-batch-request-v3-api" in stdout ) assert_no_logging_messages_or_tracebacks( @@ -197,7 +198,7 @@ def test_basic_project_upgrade(v10_project_directory, caplog): input="\n", catch_exceptions=False, ) - stdout: str = result.stdout + stdout: str = escape_ansi(result.stdout).strip() with open( file_relative_path( @@ -205,7 +206,7 @@ def test_basic_project_upgrade(v10_project_directory, caplog): "../../test_fixtures/upgrade_helper/test_basic_project_upgrade_expected_stdout.fixture", ) ) as f: - expected_stdout: str = f.read() + expected_stdout: str = f.read().strip() expected_stdout = expected_stdout.replace( "GE_PROJECT_DIR", v10_project_directory ) @@ -303,7 +304,7 @@ def test_project_upgrade_with_manual_steps( input="\n", catch_exceptions=False, ) - stdout: str = result.stdout + stdout: str = escape_ansi(result.stdout).strip() with open( file_relative_path( @@ -311,7 +312,7 @@ def test_project_upgrade_with_manual_steps( "../../test_fixtures/upgrade_helper/test_project_upgrade_with_manual_steps_expected_stdout.fixture", ) ) as f: - expected_stdout: str = f.read() + expected_stdout: str = f.read().strip() expected_stdout = expected_stdout.replace( "GE_PROJECT_DIR", v10_project_directory ) @@ -414,7 +415,7 @@ def test_project_upgrade_with_exception(v10_project_directory, caplog): input="\n", catch_exceptions=False, ) - stdout: str = result.stdout + stdout: str = escape_ansi(result.stdout).strip() with open( file_relative_path( @@ -422,7 +423,7 @@ def test_project_upgrade_with_exception(v10_project_directory, caplog): "../../test_fixtures/upgrade_helper/test_project_upgrade_with_exception_expected_stdout.fixture", ) ) as f: - expected_stdout: str = f.read() + expected_stdout: str = f.read().strip() expected_stdout = expected_stdout.replace( "GE_PROJECT_DIR", v10_project_directory ) @@ -511,7 +512,7 @@ def test_v2_to_v3_project_upgrade_with_all_manual_steps_checkpoints_datasources_ input="\n", catch_exceptions=False, ) - stdout: str = result.stdout + stdout: str = escape_ansi(result.stdout).strip() with open( file_relative_path( @@ -519,7 +520,7 @@ def test_v2_to_v3_project_upgrade_with_all_manual_steps_checkpoints_datasources_ "../../test_fixtures/upgrade_helper/test_v2_to_v3_project_upgrade_with_manual_steps_checkpoints_datasources_validation_operators_expected_stdout.fixture", ) ) as f: - expected_stdout: str = f.read() + expected_stdout: str = f.read().strip() expected_stdout = expected_stdout.replace( "GE_PROJECT_DIR", v20_project_directory ) @@ -618,7 +619,7 @@ def test_v2_to_v3_project_upgrade_with_manual_steps_checkpoints( input="\n", catch_exceptions=False, ) - stdout: str = result.stdout + stdout: str = escape_ansi(result.stdout).strip() with open( file_relative_path( @@ -626,7 +627,7 @@ def test_v2_to_v3_project_upgrade_with_manual_steps_checkpoints( "../../test_fixtures/upgrade_helper/test_v2_to_v3_project_upgrade_with_manual_steps_checkpoints.fixture", ) ) as f: - expected_stdout: str = f.read() + expected_stdout: str = f.read().strip() expected_stdout = expected_stdout.replace( "GE_PROJECT_DIR", v20_project_directory_with_v30_configuration_and_v20_checkpoints, @@ -732,7 +733,7 @@ def test_v2_to_v3_project_upgrade_without_manual_steps( input="\n", catch_exceptions=False, ) - stdout: str = result.stdout + stdout: str = escape_ansi(result.stdout).strip() with open( file_relative_path( @@ -740,7 +741,7 @@ def test_v2_to_v3_project_upgrade_without_manual_steps( "../../test_fixtures/upgrade_helper/test_v2_to_v3_project_upgrade_without_manual_steps_expected_stdout.fixture", ) ) as f: - expected_stdout: str = f.read() + expected_stdout: str = f.read().strip() expected_stdout = expected_stdout.replace( "GE_PROJECT_DIR", v20_project_directory_with_v30_configuration_and_no_checkpoints, diff --git a/tests/cli/utils.py b/tests/cli/utils.py index 8bf2a9545d84..99264a57a569 100644 --- a/tests/cli/utils.py +++ b/tests/cli/utils.py @@ -1,3 +1,4 @@ +import re import traceback from _pytest.logging import LogCaptureFixture @@ -128,3 +129,9 @@ def assert_no_tracebacks(click_result): except ValueError as ve: # sometimes stderr is not captured separately pass + + +def escape_ansi(line: str) -> str: + # https://stackoverflow.com/a/38662876 + ansi_escape = re.compile(r"(?:\x1B[@-_]|[\x80-\x9F])[0-?]*[ -/]*[@-~]") + return ansi_escape.sub("", line) diff --git a/tests/cli/v012/test_datasource_pandas.py b/tests/cli/v012/test_datasource_pandas.py index 5d91df59cf66..38e03863c36a 100644 --- a/tests/cli/v012/test_datasource_pandas.py +++ b/tests/cli/v012/test_datasource_pandas.py @@ -4,6 +4,7 @@ from great_expectations import DataContext from great_expectations.cli.v012 import cli +from tests.cli.utils import escape_ansi from tests.cli.v012.test_cli import yaml from tests.cli.v012.utils import ( assert_no_logging_messages_or_tracebacks, @@ -64,21 +65,21 @@ def test_cli_datasource_list(caplog, empty_data_context, filesystem_csv_2): cli, ["datasource", "list", "-d", project_root_dir], catch_exceptions=False ) expected_output = """ -1 Datasource found: - - - name: wow_a_datasource - module_name: great_expectations.datasource - class_name: PandasDatasource - batch_kwargs_generators: - subdir_reader: - class_name: SubdirReaderBatchKwargsGenerator - base_directory: {} - data_asset_type: - module_name: great_expectations.dataset - class_name: PandasDataset""".format( +1 Datasource found: + + - name: wow_a_datasource + module_name: great_expectations.datasource + class_name: PandasDatasource + batch_kwargs_generators: + subdir_reader: + class_name: SubdirReaderBatchKwargsGenerator + base_directory: {} + data_asset_type: + module_name: great_expectations.dataset + class_name: PandasDataset""".format( base_directory ).strip() - stdout = result.stdout.strip() + stdout = escape_ansi(result.stdout).strip() assert stdout == expected_output assert_no_logging_messages_or_tracebacks(caplog, result) diff --git a/tests/cli/v012/test_datasource_sqlite.py b/tests/cli/v012/test_datasource_sqlite.py index c8b0156a4e4f..3b1024a267cc 100644 --- a/tests/cli/v012/test_datasource_sqlite.py +++ b/tests/cli/v012/test_datasource_sqlite.py @@ -6,6 +6,7 @@ from great_expectations import DataContext from great_expectations.cli.v012 import cli +from tests.cli.utils import escape_ansi from tests.cli.v012.test_cli import yaml from tests.cli.v012.utils import ( assert_no_logging_messages_or_tracebacks, @@ -38,23 +39,23 @@ def test_cli_datasource_list(empty_data_context, empty_sqlite_db, caplog): ) url = str(empty_sqlite_db.engine.url) expected_output = """\ -1 Datasource found: - - - name: wow_a_datasource - module_name: great_expectations.datasource - class_name: SqlAlchemyDatasource - batch_kwargs_generators: - default: - class_name: TableBatchKwargsGenerator - credentials: - url: {} - data_asset_type: - class_name: SqlAlchemyDataset - module_name: None +1 Datasource found: + + - name: wow_a_datasource + module_name: great_expectations.datasource + class_name: SqlAlchemyDatasource + batch_kwargs_generators: + default: + class_name: TableBatchKwargsGenerator + credentials: + url: {} + data_asset_type: + class_name: SqlAlchemyDataset + module_name: None """.format( url ).strip() - stdout = result.stdout.strip() + stdout = escape_ansi(result.stdout).strip() assert stdout == expected_output diff --git a/tests/cli/v012/test_init_pandas.py b/tests/cli/v012/test_init_pandas.py index 5ebf929fcf78..bdd6d7bccd69 100644 --- a/tests/cli/v012/test_init_pandas.py +++ b/tests/cli/v012/test_init_pandas.py @@ -72,7 +72,7 @@ def test_cli_init_on_new_project( assert "Generating example Expectation Suite..." in stdout assert "Building" in stdout assert "Data Docs" in stdout - assert "Done generating example Expectation Suite" in stdout + assert "Done generating example Expectation Suite" in stdout assert "Great Expectations is now set up" in stdout assert os.path.isdir(os.path.join(project_dir, "great_expectations")) diff --git a/tests/cli/v012/test_store.py b/tests/cli/v012/test_store.py index f5f0507ba8aa..da5073d47ddc 100644 --- a/tests/cli/v012/test_store.py +++ b/tests/cli/v012/test_store.py @@ -2,6 +2,7 @@ from great_expectations import DataContext from great_expectations.cli.v012 import cli +from tests.cli.utils import escape_ansi from tests.cli.v012.utils import assert_no_logging_messages_or_tracebacks @@ -40,20 +41,20 @@ def test_store_list_with_two_stores(caplog, empty_data_context): runner = CliRunner(mix_stderr=False) expected_result = """\ -2 Stores found: - - - name: expectations_store - class_name: ExpectationsStore - store_backend: - class_name: TupleFilesystemStoreBackend - base_directory: expectations/ - - - name: checkpoint_store - class_name: CheckpointStore - store_backend: - class_name: TupleFilesystemStoreBackend - base_directory: checkpoints/ - suppress_store_backend_id: True""" +2 Stores found: + + - name: expectations_store + class_name: ExpectationsStore + store_backend: + class_name: TupleFilesystemStoreBackend + base_directory: expectations/ + + - name: checkpoint_store + class_name: CheckpointStore + store_backend: + class_name: TupleFilesystemStoreBackend + base_directory: checkpoints/ + suppress_store_backend_id: True""" result = runner.invoke( cli, @@ -62,7 +63,7 @@ def test_store_list_with_two_stores(caplog, empty_data_context): ) assert result.exit_code == 0 - assert result.output.strip() == expected_result + assert escape_ansi(result.output).strip() == expected_result.strip() assert_no_logging_messages_or_tracebacks(caplog, result) @@ -72,36 +73,36 @@ def test_store_list_with_four_stores(caplog, empty_data_context): runner = CliRunner(mix_stderr=False) expected_result = """\ -5 Stores found: - - - name: expectations_store - class_name: ExpectationsStore - store_backend: - class_name: TupleFilesystemStoreBackend - base_directory: expectations/ - - - name: validations_store - class_name: ValidationsStore - store_backend: - class_name: TupleFilesystemStoreBackend - base_directory: uncommitted/validations/ - - - name: evaluation_parameter_store - class_name: EvaluationParameterStore - - - name: checkpoint_store - class_name: CheckpointStore - store_backend: - class_name: TupleFilesystemStoreBackend - base_directory: checkpoints/ - suppress_store_backend_id: True - - - name: profiler_store - class_name: ProfilerStore - store_backend: - class_name: TupleFilesystemStoreBackend - base_directory: profilers/ - suppress_store_backend_id: True""" +5 Stores found: + + - name: expectations_store + class_name: ExpectationsStore + store_backend: + class_name: TupleFilesystemStoreBackend + base_directory: expectations/ + + - name: validations_store + class_name: ValidationsStore + store_backend: + class_name: TupleFilesystemStoreBackend + base_directory: uncommitted/validations/ + + - name: evaluation_parameter_store + class_name: EvaluationParameterStore + + - name: checkpoint_store + class_name: CheckpointStore + store_backend: + class_name: TupleFilesystemStoreBackend + base_directory: checkpoints/ + suppress_store_backend_id: True + + - name: profiler_store + class_name: ProfilerStore + store_backend: + class_name: TupleFilesystemStoreBackend + base_directory: profilers/ + suppress_store_backend_id: True""" result = runner.invoke( cli, f"store list -d {project_dir}", @@ -109,6 +110,6 @@ def test_store_list_with_four_stores(caplog, empty_data_context): ) print(result.output) assert result.exit_code == 0 - assert result.output.strip() == expected_result + assert escape_ansi(result.output).strip() == expected_result.strip() assert_no_logging_messages_or_tracebacks(caplog, result) diff --git a/tests/cli/v012/test_validation_operator.py b/tests/cli/v012/test_validation_operator.py index 7996e0b95803..1ed6c58d51c7 100644 --- a/tests/cli/v012/test_validation_operator.py +++ b/tests/cli/v012/test_validation_operator.py @@ -6,6 +6,7 @@ from great_expectations import DataContext from great_expectations.cli.v012 import cli +from tests.cli.utils import escape_ansi from tests.cli.v012.utils import ( VALIDATION_OPERATORS_DEPRECATION_MESSAGE, assert_no_logging_messages_or_tracebacks, @@ -307,12 +308,12 @@ def test_validation_operator_list_with_one_validation_operator( project_dir = filesystem_csv_data_context_with_validation_operators.root_directory runner = CliRunner(mix_stderr=False) - expected_result = """Heads up! This feature is Experimental. It may change. Please give us your feedback! -1 Validation Operator found: - - - name: action_list_operator - class_name: ActionListValidationOperator - action_list: store_validation_result (StoreValidationResultAction) => store_evaluation_params (StoreEvaluationParametersAction) => update_data_docs (UpdateDataDocsAction)""" + expected_result = """Heads up! This feature is Experimental. It may change. Please give us your feedback! +1 Validation Operator found: + + - name: action_list_operator + class_name: ActionListValidationOperator + action_list: store_validation_result (StoreValidationResultAction) => store_evaluation_params (StoreEvaluationParametersAction) => update_data_docs (UpdateDataDocsAction)""" result = runner.invoke( cli, @@ -321,7 +322,7 @@ def test_validation_operator_list_with_one_validation_operator( ) assert result.exit_code == 0 # _capture_ansi_codes_to_file(result) - assert result.output.strip() == expected_result + assert escape_ansi(result.output).strip() == expected_result.strip() assert_no_logging_messages_or_tracebacks( my_caplog=caplog, @@ -360,18 +361,18 @@ def test_validation_operator_list_with_multiple_validation_operators( }, ) context._save_project_config() - expected_result = """Heads up! This feature is Experimental. It may change. Please give us your feedback! -2 Validation Operators found: - - - name: action_list_operator - class_name: ActionListValidationOperator - action_list: store_validation_result (StoreValidationResultAction) => store_evaluation_params (StoreEvaluationParametersAction) => update_data_docs (UpdateDataDocsAction) - - - name: my_validation_operator - class_name: WarningAndFailureExpectationSuitesValidationOperator - action_list: store_validation_result (StoreValidationResultAction) => store_evaluation_params (StoreEvaluationParametersAction) => update_data_docs (UpdateDataDocsAction) - base_expectation_suite_name: new-years-expectations - slack_webhook: https://hooks.slack.com/services/dummy""" + expected_result = """Heads up! This feature is Experimental. It may change. Please give us your feedback! +2 Validation Operators found: + + - name: action_list_operator + class_name: ActionListValidationOperator + action_list: store_validation_result (StoreValidationResultAction) => store_evaluation_params (StoreEvaluationParametersAction) => update_data_docs (UpdateDataDocsAction) + + - name: my_validation_operator + class_name: WarningAndFailureExpectationSuitesValidationOperator + action_list: store_validation_result (StoreValidationResultAction) => store_evaluation_params (StoreEvaluationParametersAction) => update_data_docs (UpdateDataDocsAction) + base_expectation_suite_name: new-years-expectations + slack_webhook: https://hooks.slack.com/services/dummy""" result = runner.invoke( cli, @@ -379,20 +380,10 @@ def test_validation_operator_list_with_multiple_validation_operators( catch_exceptions=False, ) assert result.exit_code == 0 - # _capture_ansi_codes_to_file(result) - assert result.output.strip() == expected_result + assert escape_ansi(result.output).strip() == expected_result.strip() assert_no_logging_messages_or_tracebacks( my_caplog=caplog, click_result=result, allowed_deprecation_message=VALIDATION_OPERATORS_DEPRECATION_MESSAGE, ) - - -def _capture_ansi_codes_to_file(result): - """ - Use this to capture the ANSI color codes when updating snapshots. - NOT DEAD CODE. - """ - with open("ansi.txt", "w") as f: - f.write(result.output.strip()) diff --git a/tests/cli/v012/upgrade_helpers/test_upgrade_helper_pre_v013.py b/tests/cli/v012/upgrade_helpers/test_upgrade_helper_pre_v013.py index 08f7e33eb43b..eb3233f57d9b 100644 --- a/tests/cli/v012/upgrade_helpers/test_upgrade_helper_pre_v013.py +++ b/tests/cli/v012/upgrade_helpers/test_upgrade_helper_pre_v013.py @@ -14,6 +14,7 @@ from great_expectations.cli.v012 import cli from great_expectations.data_context.util import file_relative_path from great_expectations.util import gen_directory_tree_str +from tests.cli.utils import escape_ansi from tests.cli.v012.utils import ( VALIDATION_OPERATORS_DEPRECATION_MESSAGE, assert_no_logging_messages_or_tracebacks, @@ -60,7 +61,7 @@ def test_upgrade_helper_intervention_on_cli_command(v10_project_directory, caplo input="n\n", catch_exceptions=False, ) - stdout = result.stdout + stdout = escape_ansi(result.stdout).strip() assert ( "Your project appears to have an out-of-date config version (1.0) - the version number must be at least 3." @@ -72,12 +73,12 @@ def test_upgrade_helper_intervention_on_cli_command(v10_project_directory, caplo in stdout ) assert ( - "Ok, exiting now. To upgrade at a later time, use the following command: great_expectations project " - "upgrade" in stdout + "Ok, exiting now. To upgrade at a later time, use the following command: great_expectations project " + "upgrade" in stdout ) assert ( - "To learn more about the upgrade process, visit [" - "36mhttps://docs.greatexpectations.io/en/latest/how_to_guides/migrating_versions.html" + "To learn more about the upgrade process, visit " + "https://docs.greatexpectations.io/en/latest/how_to_guides/migrating_versions.html" in stdout ) assert_no_logging_messages_or_tracebacks(caplog, result) @@ -135,7 +136,7 @@ def test_basic_project_upgrade(v10_project_directory, caplog): input="\n", catch_exceptions=False, ) - stdout = result.stdout + stdout = escape_ansi(result.stdout).strip() with open( file_relative_path( @@ -143,7 +144,7 @@ def test_basic_project_upgrade(v10_project_directory, caplog): "../../../test_fixtures/upgrade_helper/test_basic_project_upgrade_expected_v012_stdout.fixture", ) ) as f: - expected_stdout = f.read() + expected_stdout = f.read().strip() expected_stdout = expected_stdout.replace( "GE_PROJECT_DIR", v10_project_directory ) @@ -241,7 +242,7 @@ def test_project_upgrade_with_manual_steps( input="\n", catch_exceptions=False, ) - stdout = result.stdout + stdout = escape_ansi(result.stdout).strip() with open( file_relative_path( @@ -249,7 +250,7 @@ def test_project_upgrade_with_manual_steps( "../../../test_fixtures/upgrade_helper/test_project_upgrade_with_manual_steps_expected_v012_stdout.fixture", ) ) as f: - expected_stdout = f.read() + expected_stdout = f.read().strip() expected_stdout = expected_stdout.replace( "GE_PROJECT_DIR", v10_project_directory ) @@ -352,7 +353,7 @@ def test_project_upgrade_with_exception(v10_project_directory, caplog): input="\n", catch_exceptions=False, ) - stdout = result.stdout + stdout = escape_ansi(result.stdout).strip() with open( file_relative_path( @@ -360,7 +361,7 @@ def test_project_upgrade_with_exception(v10_project_directory, caplog): "../../../test_fixtures/upgrade_helper/test_project_upgrade_with_exception_expected_v012_stdout.fixture", ) ) as f: - expected_stdout = f.read() + expected_stdout = f.read().strip() expected_stdout = expected_stdout.replace( "GE_PROJECT_DIR", v10_project_directory ) @@ -449,7 +450,7 @@ def test_v2_to_v3_project_upgrade(v20_project_directory, caplog): input="\n", catch_exceptions=False, ) - stdout = result.stdout + stdout = escape_ansi(result.stdout).strip() with open( file_relative_path( @@ -457,7 +458,7 @@ def test_v2_to_v3_project_upgrade(v20_project_directory, caplog): "../../../test_fixtures/upgrade_helper/test_v2_to_v3_project_upgrade_expected_v012_stdout.fixture", ) ) as f: - expected_stdout = f.read() + expected_stdout = f.read().strip() expected_stdout = expected_stdout.replace( "GE_PROJECT_DIR", v20_project_directory ) diff --git a/tests/integration/usage_statistics/usage_stats_event_examples.py b/tests/integration/usage_statistics/usage_stats_event_examples.py index 7e85d10a1c12..865dd61d3916 100644 --- a/tests/integration/usage_statistics/usage_stats_event_examples.py +++ b/tests/integration/usage_statistics/usage_stats_event_examples.py @@ -204,12 +204,6 @@ "installed": True, "version": "1.8.0", }, - { - "install_environment": "required", - "package_name": "termcolor", - "installed": True, - "version": "1.1.0", - }, { "install_environment": "required", "package_name": "tqdm", diff --git a/tests/test_fixtures/upgrade_helper/test_basic_project_upgrade_expected_stdout.fixture b/tests/test_fixtures/upgrade_helper/test_basic_project_upgrade_expected_stdout.fixture index b5a06ad81c89..331b616ce121 100644 --- a/tests/test_fixtures/upgrade_helper/test_basic_project_upgrade_expected_stdout.fixture +++ b/tests/test_fixtures/upgrade_helper/test_basic_project_upgrade_expected_stdout.fixture @@ -1,16 +1,16 @@ -Using v3 (Batch Request) API +Using v3 (Batch Request) API -Checking project... +Checking project... ================================================================================ - - -Your project appears to have an out-of-date config version (1.0) - the version number must be at least 3. + + +Your project appears to have an out-of-date config version (1.0) - the version number must be at least 3. Would you like to run the Upgrade Helper to bring your project up-to-date? [Y/n]: ================================================================================ - + ++====================================++ || UpgradeHelperV11: Upgrade Overview || ++====================================++ @@ -42,20 +42,20 @@ to learn more about the automated upgrade process: Would you like to proceed with the project upgrade? [Y/n]: -Upgrading project... +Upgrading project... ================================================================================ - -++================++ + +++================++ || Upgrade Report || -++================++ +++================++ -Your project was successfully upgraded to be compatible with Great Expectations 0.11.x. +Your project was successfully upgraded to be compatible with Great Expectations 0.11.x. The config_version of your great_expectations.yml has been automatically incremented to 2.0. A log detailing the upgrade can be found here: - - GE_PROJECT_DIR/uncommitted/logs/project_upgrades/UpgradeHelperV11_20190926T134241.000000Z.json + - GE_PROJECT_DIR/uncommitted/logs/project_upgrades/UpgradeHelperV11_20190926T134241.000000Z.json ++====================================++ || UpgradeHelperV13: Upgrade Overview || ++====================================++ @@ -91,21 +91,20 @@ Please consult the V3 API migration guide for instructions on how to complete an Would you like to proceed with the project upgrade? [Y/n]: -Upgrading project... +Upgrading project... ================================================================================ - -++================++ + +++================++ || Upgrade Report || -++================++ +++================++ -The Upgrade Helper has performed the automated upgrade steps as part of upgrading your project to be compatible with Great Expectations V3 API, and the config_version of your great_expectations.yml has been automatically incremented to 3.0. However, manual steps are required in order for the upgrade process to be completed successfully. +The Upgrade Helper has performed the automated upgrade steps as part of upgrading your project to be compatible with Great Expectations V3 API, and the config_version of your great_expectations.yml has been automatically incremented to 3.0. However, manual steps are required in order for the upgrade process to be completed successfully. A log detailing the upgrade can be found here: - - GE_PROJECT_DIR/uncommitted/logs/project_upgrades/UpgradeHelperV13_20190926T134241.000000Z.json + - GE_PROJECT_DIR/uncommitted/logs/project_upgrades/UpgradeHelperV13_20190926T134241.000000Z.json ================================================================================ - -Upgrade complete. Exiting... - + +Upgrade complete. Exiting... diff --git a/tests/test_fixtures/upgrade_helper/test_basic_project_upgrade_expected_v012_stdout.fixture b/tests/test_fixtures/upgrade_helper/test_basic_project_upgrade_expected_v012_stdout.fixture index 15b356a08c3c..f671d290e7ee 100644 --- a/tests/test_fixtures/upgrade_helper/test_basic_project_upgrade_expected_v012_stdout.fixture +++ b/tests/test_fixtures/upgrade_helper/test_basic_project_upgrade_expected_v012_stdout.fixture @@ -1,15 +1,15 @@ -Checking project... +Checking project... ================================================================================ - - -Your project appears to have an out-of-date config version (1.0) - the version number must be at least 3. + + +Your project appears to have an out-of-date config version (1.0) - the version number must be at least 3. Would you like to run the Upgrade Helper to bring your project up-to-date? [Y/n]: ================================================================================ - + ++=====================================================++ || UpgradeHelperV11: Upgrade Overview (V2-API Version) || ++=====================================================++ @@ -46,20 +46,20 @@ to learn more about the automated upgrade process: Would you like to proceed with the project upgrade? [Y/n]: -Upgrading project... +Upgrading project... ================================================================================ - -++================++ + +++================++ || Upgrade Report || -++================++ +++================++ -Your project was successfully upgraded to be compatible with Great Expectations 0.11.x. +Your project was successfully upgraded to be compatible with Great Expectations 0.11.x. The config_version of your great_expectations.yml has been automatically incremented to 2.0. A log detailing the upgrade can be found here: - - GE_PROJECT_DIR/uncommitted/logs/project_upgrades/UpgradeHelperV11_20190926T134241.000000Z.json + - GE_PROJECT_DIR/uncommitted/logs/project_upgrades/UpgradeHelperV11_20190926T134241.000000Z.json ++=====================================================++ || UpgradeHelperV13: Upgrade Overview (V2-API Version) || ++=====================================================++ @@ -95,22 +95,21 @@ Please consult the V3 API migration guide to learn more about the automated upgr Would you like to proceed with the project upgrade? [Y/n]: -Upgrading project... +Upgrading project... ================================================================================ - -++================++ + +++================++ || Upgrade Report || -++================++ +++================++ -Your project was successfully upgraded to be compatible with Great Expectations V3 API. +Your project was successfully upgraded to be compatible with Great Expectations V3 API. The config_version of your great_expectations.yml has been automatically incremented to 3.0. A log detailing the upgrade can be found here: - - GE_PROJECT_DIR/uncommitted/logs/project_upgrades/UpgradeHelperV13_20190926T134241.000000Z.json + - GE_PROJECT_DIR/uncommitted/logs/project_upgrades/UpgradeHelperV13_20190926T134241.000000Z.json ================================================================================ - -Upgrade complete. Exiting... - + +Upgrade complete. Exiting... diff --git a/tests/test_fixtures/upgrade_helper/test_project_upgrade_with_exception_expected_stdout.fixture b/tests/test_fixtures/upgrade_helper/test_project_upgrade_with_exception_expected_stdout.fixture index f82ab9dbd817..dd3987cf5845 100644 --- a/tests/test_fixtures/upgrade_helper/test_project_upgrade_with_exception_expected_stdout.fixture +++ b/tests/test_fixtures/upgrade_helper/test_project_upgrade_with_exception_expected_stdout.fixture @@ -1,16 +1,16 @@ -Using v3 (Batch Request) API +Using v3 (Batch Request) API -Checking project... +Checking project... ================================================================================ - - -Your project appears to have an out-of-date config version (1.0) - the version number must be at least 3. + + +Your project appears to have an out-of-date config version (1.0) - the version number must be at least 3. Would you like to run the Upgrade Helper to bring your project up-to-date? [Y/n]: ================================================================================ - + ++====================================++ || UpgradeHelperV11: Upgrade Overview || ++====================================++ @@ -42,28 +42,27 @@ to learn more about the automated upgrade process: Would you like to proceed with the project upgrade? [Y/n]: -Upgrading project... +Upgrading project... ================================================================================ - -++================++ + +++================++ || Upgrade Report || -++================++ +++================++ -The Upgrade Helper encountered some exceptions during the upgrade process. +The Upgrade Helper encountered some exceptions during the upgrade process. Please review the exceptions section of the upgrade log and migrate the affected files manually, as detailed in the 0.11.x migration guide. The upgrade log can be found here: - - GE_PROJECT_DIR/uncommitted/logs/project_upgrades/UpgradeHelperV11_20190926T134241.000000Z.json + - GE_PROJECT_DIR/uncommitted/logs/project_upgrades/UpgradeHelperV11_20190926T134241.000000Z.json ================================================================================ - -The Upgrade Helper was unable to perform a complete project upgrade. Next steps: + +The Upgrade Helper was unable to perform a complete project upgrade. Next steps: - Please perform any manual steps outlined in the Upgrade Overview and/or Upgrade Report above - - When complete, increment the config_version key in your great_expectations.yml to 2.0 + - When complete, increment the config_version key in your great_expectations.yml to 2.0 -To learn more about the upgrade process, visit https://docs.greatexpectations.io/docs/guides/miscellaneous/migration_guide#migrating-to-the-batch-request-v3-api - +To learn more about the upgrade process, visit https://docs.greatexpectations.io/docs/guides/miscellaneous/migration_guide#migrating-to-the-batch-request-v3-api diff --git a/tests/test_fixtures/upgrade_helper/test_project_upgrade_with_exception_expected_v012_stdout.fixture b/tests/test_fixtures/upgrade_helper/test_project_upgrade_with_exception_expected_v012_stdout.fixture index b37468223002..d68c706e9326 100644 --- a/tests/test_fixtures/upgrade_helper/test_project_upgrade_with_exception_expected_v012_stdout.fixture +++ b/tests/test_fixtures/upgrade_helper/test_project_upgrade_with_exception_expected_v012_stdout.fixture @@ -1,15 +1,15 @@ -Checking project... +Checking project... ================================================================================ - - -Your project appears to have an out-of-date config version (1.0) - the version number must be at least 3. + + +Your project appears to have an out-of-date config version (1.0) - the version number must be at least 3. Would you like to run the Upgrade Helper to bring your project up-to-date? [Y/n]: ================================================================================ - + ++=====================================================++ || UpgradeHelperV11: Upgrade Overview (V2-API Version) || ++=====================================================++ @@ -46,28 +46,27 @@ to learn more about the automated upgrade process: Would you like to proceed with the project upgrade? [Y/n]: -Upgrading project... +Upgrading project... ================================================================================ - -++================++ + +++================++ || Upgrade Report || -++================++ +++================++ -The Upgrade Helper encountered some exceptions during the upgrade process. +The Upgrade Helper encountered some exceptions during the upgrade process. Please review the exceptions section of the upgrade log and migrate the affected files manually, as detailed in the 0.11.x migration guide. The upgrade log can be found here: - - GE_PROJECT_DIR/uncommitted/logs/project_upgrades/UpgradeHelperV11_20190926T134241.000000Z.json + - GE_PROJECT_DIR/uncommitted/logs/project_upgrades/UpgradeHelperV11_20190926T134241.000000Z.json ================================================================================ - -The Upgrade Helper was unable to perform a complete project upgrade. Next steps: + +The Upgrade Helper was unable to perform a complete project upgrade. Next steps: - Please perform any manual steps outlined in the Upgrade Overview and/or Upgrade Report above - - When complete, increment the config_version key in your great_expectations.yml to 2.0 + - When complete, increment the config_version key in your great_expectations.yml to 2.0 -To learn more about the upgrade process, visit https://docs.greatexpectations.io/en/latest/how_to_guides/migrating_versions.html - +To learn more about the upgrade process, visit https://docs.greatexpectations.io/en/latest/how_to_guides/migrating_versions.html diff --git a/tests/test_fixtures/upgrade_helper/test_project_upgrade_with_manual_steps_expected_stdout.fixture b/tests/test_fixtures/upgrade_helper/test_project_upgrade_with_manual_steps_expected_stdout.fixture index 2851af4e8ba2..ad4c7f12fd11 100644 --- a/tests/test_fixtures/upgrade_helper/test_project_upgrade_with_manual_steps_expected_stdout.fixture +++ b/tests/test_fixtures/upgrade_helper/test_project_upgrade_with_manual_steps_expected_stdout.fixture @@ -1,16 +1,16 @@ -Using v3 (Batch Request) API +Using v3 (Batch Request) API -Checking project... +Checking project... ================================================================================ - - -Your project appears to have an out-of-date config version (1.0) - the version number must be at least 3. + + +Your project appears to have an out-of-date config version (1.0) - the version number must be at least 3. Would you like to run the Upgrade Helper to bring your project up-to-date? [Y/n]: ================================================================================ - + ++====================================++ || UpgradeHelperV11: Upgrade Overview || ++====================================++ @@ -47,25 +47,24 @@ to learn more about the automated upgrade process: Would you like to proceed with the project upgrade? [Y/n]: -Upgrading project... +Upgrading project... ================================================================================ - -++================++ + +++================++ || Upgrade Report || -++================++ +++================++ -The Upgrade Helper has completed the automated upgrade steps. +The Upgrade Helper has completed the automated upgrade steps. A log detailing the upgrade can be found here: - - GE_PROJECT_DIR/uncommitted/logs/project_upgrades/UpgradeHelperV11_20190926T134241.000000Z.json + - GE_PROJECT_DIR/uncommitted/logs/project_upgrades/UpgradeHelperV11_20190926T134241.000000Z.json ================================================================================ - -The Upgrade Helper was unable to perform a complete project upgrade. Next steps: + +The Upgrade Helper was unable to perform a complete project upgrade. Next steps: - Please perform any manual steps outlined in the Upgrade Overview and/or Upgrade Report above - - When complete, increment the config_version key in your great_expectations.yml to 2.0 + - When complete, increment the config_version key in your great_expectations.yml to 2.0 -To learn more about the upgrade process, visit https://docs.greatexpectations.io/docs/guides/miscellaneous/migration_guide#migrating-to-the-batch-request-v3-api - +To learn more about the upgrade process, visit https://docs.greatexpectations.io/docs/guides/miscellaneous/migration_guide#migrating-to-the-batch-request-v3-api diff --git a/tests/test_fixtures/upgrade_helper/test_project_upgrade_with_manual_steps_expected_v012_stdout.fixture b/tests/test_fixtures/upgrade_helper/test_project_upgrade_with_manual_steps_expected_v012_stdout.fixture index 1444453df70a..a4ba2416bdb1 100644 --- a/tests/test_fixtures/upgrade_helper/test_project_upgrade_with_manual_steps_expected_v012_stdout.fixture +++ b/tests/test_fixtures/upgrade_helper/test_project_upgrade_with_manual_steps_expected_v012_stdout.fixture @@ -1,15 +1,15 @@ -Checking project... +Checking project... ================================================================================ - - -Your project appears to have an out-of-date config version (1.0) - the version number must be at least 3. + + +Your project appears to have an out-of-date config version (1.0) - the version number must be at least 3. Would you like to run the Upgrade Helper to bring your project up-to-date? [Y/n]: ================================================================================ - + ++=====================================================++ || UpgradeHelperV11: Upgrade Overview (V2-API Version) || ++=====================================================++ @@ -51,25 +51,24 @@ to learn more about the automated upgrade process: Would you like to proceed with the project upgrade? [Y/n]: -Upgrading project... +Upgrading project... ================================================================================ - -++================++ + +++================++ || Upgrade Report || -++================++ +++================++ -The Upgrade Helper has completed the automated upgrade steps. +The Upgrade Helper has completed the automated upgrade steps. A log detailing the upgrade can be found here: - - GE_PROJECT_DIR/uncommitted/logs/project_upgrades/UpgradeHelperV11_20190926T134241.000000Z.json + - GE_PROJECT_DIR/uncommitted/logs/project_upgrades/UpgradeHelperV11_20190926T134241.000000Z.json ================================================================================ - -The Upgrade Helper was unable to perform a complete project upgrade. Next steps: + +The Upgrade Helper was unable to perform a complete project upgrade. Next steps: - Please perform any manual steps outlined in the Upgrade Overview and/or Upgrade Report above - - When complete, increment the config_version key in your great_expectations.yml to 2.0 + - When complete, increment the config_version key in your great_expectations.yml to 2.0 -To learn more about the upgrade process, visit https://docs.greatexpectations.io/en/latest/how_to_guides/migrating_versions.html - +To learn more about the upgrade process, visit https://docs.greatexpectations.io/en/latest/how_to_guides/migrating_versions.html diff --git a/tests/test_fixtures/upgrade_helper/test_v2_to_v3_project_upgrade_expected_v012_stdout.fixture b/tests/test_fixtures/upgrade_helper/test_v2_to_v3_project_upgrade_expected_v012_stdout.fixture index c2b9628ea751..82b281b8cf11 100644 --- a/tests/test_fixtures/upgrade_helper/test_v2_to_v3_project_upgrade_expected_v012_stdout.fixture +++ b/tests/test_fixtures/upgrade_helper/test_v2_to_v3_project_upgrade_expected_v012_stdout.fixture @@ -1,8 +1,8 @@ -Checking project... +Checking project... ================================================================================ - + ++=====================================================++ || UpgradeHelperV13: Upgrade Overview (V2-API Version) || ++=====================================================++ @@ -38,19 +38,18 @@ Please consult the V3 API migration guide to learn more about the automated upgr Would you like to proceed with the project upgrade? [Y/n]: -Upgrading project... +Upgrading project... ================================================================================ - -++================++ + +++================++ || Upgrade Report || -++================++ +++================++ -Your project was successfully upgraded to be compatible with Great Expectations V3 API. +Your project was successfully upgraded to be compatible with Great Expectations V3 API. The config_version of your great_expectations.yml has been automatically incremented to 3.0. A log detailing the upgrade can be found here: - - GE_PROJECT_DIR/uncommitted/logs/project_upgrades/UpgradeHelperV13_20210119T132639.000000Z.json -Your project is up-to-date - no further upgrade is necessary. - + - GE_PROJECT_DIR/uncommitted/logs/project_upgrades/UpgradeHelperV13_20210119T132639.000000Z.json +Your project is up-to-date - no further upgrade is necessary. diff --git a/tests/test_fixtures/upgrade_helper/test_v2_to_v3_project_upgrade_with_manual_steps_checkpoints.fixture b/tests/test_fixtures/upgrade_helper/test_v2_to_v3_project_upgrade_with_manual_steps_checkpoints.fixture index 210151d626da..624c9ba7691b 100644 --- a/tests/test_fixtures/upgrade_helper/test_v2_to_v3_project_upgrade_with_manual_steps_checkpoints.fixture +++ b/tests/test_fixtures/upgrade_helper/test_v2_to_v3_project_upgrade_with_manual_steps_checkpoints.fixture @@ -1,9 +1,9 @@ -Using v3 (Batch Request) API +Using v3 (Batch Request) API -Checking project... +Checking project... ================================================================================ - + ++====================================++ || UpgradeHelperV13: Upgrade Overview || ++====================================++ @@ -36,18 +36,17 @@ Please consult the V3 API migration guide for instructions on how to complete an Would you like to proceed with the project upgrade? [Y/n]: -Upgrading project... +Upgrading project... ================================================================================ - -++================++ + +++================++ || Upgrade Report || -++================++ +++================++ -The Upgrade Helper has performed the automated upgrade steps as part of upgrading your project to be compatible with Great Expectations V3 API, and the config_version of your great_expectations.yml has been automatically incremented to 3.0. However, manual steps are required in order for the upgrade process to be completed successfully. +The Upgrade Helper has performed the automated upgrade steps as part of upgrading your project to be compatible with Great Expectations V3 API, and the config_version of your great_expectations.yml has been automatically incremented to 3.0. However, manual steps are required in order for the upgrade process to be completed successfully. A log detailing the upgrade can be found here: - - GE_PROJECT_DIR/uncommitted/logs/project_upgrades/UpgradeHelperV13_20210119T132639.000000Z.json -Your project requires manual upgrade steps in order to be up-to-date. - + - GE_PROJECT_DIR/uncommitted/logs/project_upgrades/UpgradeHelperV13_20210119T132639.000000Z.json +Your project requires manual upgrade steps in order to be up-to-date. diff --git a/tests/test_fixtures/upgrade_helper/test_v2_to_v3_project_upgrade_with_manual_steps_checkpoints_datasources_validation_operators_expected_stdout.fixture b/tests/test_fixtures/upgrade_helper/test_v2_to_v3_project_upgrade_with_manual_steps_checkpoints_datasources_validation_operators_expected_stdout.fixture index df210d9b3bb6..20353d05b468 100644 --- a/tests/test_fixtures/upgrade_helper/test_v2_to_v3_project_upgrade_with_manual_steps_checkpoints_datasources_validation_operators_expected_stdout.fixture +++ b/tests/test_fixtures/upgrade_helper/test_v2_to_v3_project_upgrade_with_manual_steps_checkpoints_datasources_validation_operators_expected_stdout.fixture @@ -1,9 +1,9 @@ -Using v3 (Batch Request) API +Using v3 (Batch Request) API -Checking project... +Checking project... ================================================================================ - + ++====================================++ || UpgradeHelperV13: Upgrade Overview || ++====================================++ @@ -43,18 +43,17 @@ Please consult the V3 API migration guide for instructions on how to complete an Would you like to proceed with the project upgrade? [Y/n]: -Upgrading project... +Upgrading project... ================================================================================ - -++================++ + +++================++ || Upgrade Report || -++================++ +++================++ -The Upgrade Helper has performed the automated upgrade steps as part of upgrading your project to be compatible with Great Expectations V3 API, and the config_version of your great_expectations.yml has been automatically incremented to 3.0. However, manual steps are required in order for the upgrade process to be completed successfully. +The Upgrade Helper has performed the automated upgrade steps as part of upgrading your project to be compatible with Great Expectations V3 API, and the config_version of your great_expectations.yml has been automatically incremented to 3.0. However, manual steps are required in order for the upgrade process to be completed successfully. A log detailing the upgrade can be found here: - - GE_PROJECT_DIR/uncommitted/logs/project_upgrades/UpgradeHelperV13_20210119T132639.000000Z.json -Your project requires manual upgrade steps in order to be up-to-date. - + - GE_PROJECT_DIR/uncommitted/logs/project_upgrades/UpgradeHelperV13_20210119T132639.000000Z.json +Your project requires manual upgrade steps in order to be up-to-date. diff --git a/tests/test_fixtures/upgrade_helper/test_v2_to_v3_project_upgrade_without_manual_steps_expected_stdout.fixture b/tests/test_fixtures/upgrade_helper/test_v2_to_v3_project_upgrade_without_manual_steps_expected_stdout.fixture index 48d5b03da812..986861da5777 100644 --- a/tests/test_fixtures/upgrade_helper/test_v2_to_v3_project_upgrade_without_manual_steps_expected_stdout.fixture +++ b/tests/test_fixtures/upgrade_helper/test_v2_to_v3_project_upgrade_without_manual_steps_expected_stdout.fixture @@ -1,17 +1,16 @@ -Using v3 (Batch Request) API +Using v3 (Batch Request) API -Checking project... +Checking project... ================================================================================ - -++================++ + +++================++ || Upgrade Report || -++================++ +++================++ -Your project was successfully upgraded to be compatible with Great Expectations V3 API. The config_version of your great_expectations.yml has been automatically incremented to 3.0. +Your project was successfully upgraded to be compatible with Great Expectations V3 API. The config_version of your great_expectations.yml has been automatically incremented to 3.0. A log detailing the upgrade can be found here: - - GE_PROJECT_DIR/uncommitted/logs/project_upgrades/UpgradeHelperV13_20210119T132639.000000Z.json -Your project is up-to-date - no further upgrade is necessary. - + - GE_PROJECT_DIR/uncommitted/logs/project_upgrades/UpgradeHelperV13_20210119T132639.000000Z.json +Your project is up-to-date - no further upgrade is necessary.