diff --git a/.github/workflows/ci-integration-db-live.yaml b/.github/workflows/ci-integration-db-live.yaml index b8b27ca1e..fe19cbd04 100644 --- a/.github/workflows/ci-integration-db-live.yaml +++ b/.github/workflows/ci-integration-db-live.yaml @@ -15,6 +15,10 @@ jobs: python-version: ['3.11'] os: [ubuntu-latest] runs-on: ${{ matrix.os }} + + env: + PLOOMBER_VERSION_CHECK_DISABLED: true + steps: - name: Checkout uses: actions/checkout@v2 diff --git a/.github/workflows/ci-integration-db.yaml b/.github/workflows/ci-integration-db.yaml index c6665324e..2ac20a03c 100644 --- a/.github/workflows/ci-integration-db.yaml +++ b/.github/workflows/ci-integration-db.yaml @@ -12,6 +12,10 @@ jobs: python-version: ['3.11'] os: [ubuntu-latest] runs-on: ${{ matrix.os }} + + env: + PLOOMBER_VERSION_CHECK_DISABLED: true + steps: - name: Checkout diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5250fe44f..6aa445d55 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -81,6 +81,7 @@ jobs: needs: [preliminary] if: needs.preliminary.outputs.check_doc_modified == 'failure' uses: ./.github/workflows/ci-integration-db.yaml + test: needs: [preliminary] if: needs.preliminary.outputs.check_doc_modified == 'failure' @@ -91,6 +92,9 @@ jobs: runs-on: ${{ matrix.os }} + env: + PLOOMBER_VERSION_CHECK_DISABLED: true + steps: - name: Checkout @@ -141,6 +145,9 @@ jobs: runs-on: ${{ matrix.os }} + env: + PLOOMBER_VERSION_CHECK_DISABLED: true + steps: - name: Checkout diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d7bd2712..af0e3c75f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,7 @@ * [Fix] Adding `--with` back because of issues with sqlglot query parser (#684) * [Fix] Improving << parsing logic (#610) * [Fix] Fixed vertical color breaks in histograms (#702) +* [Fix] Migrate user feedback to use display module (#548) ## 0.7.9 (2023-06-19) diff --git a/src/sql/connection.py b/src/sql/connection.py index d5435055b..e70d7ae12 100644 --- a/src/sql/connection.py +++ b/src/sql/connection.py @@ -489,7 +489,7 @@ def close_all(cls, verbose=False): conn.close(key) if verbose: - print(f"Closing {key}") + display.message(f"Closing {key}") cls.connections = {} diff --git a/src/sql/magic.py b/src/sql/magic.py index 2ec092792..336d188ff 100644 --- a/src/sql/magic.py +++ b/src/sql/magic.py @@ -168,7 +168,7 @@ def __init__(self, shell): @validate("displaylimit") def _valid_displaylimit(self, proposal): if proposal["value"] is None: - print("displaylimit: Value None will be treated as 0 (no limit)") + display.message("displaylimit: Value None will be treated as 0 (no limit)") return 0 try: value = int(proposal["value"]) @@ -188,7 +188,9 @@ def _mutex_autopandas_autopolars(self, change): other = "autopolars" if change["name"] == "autopandas" else "autopandas" if getattr(self, other): setattr(self, other, False) - print(f"Disabled '{other}' since '{change['name']}' was enabled.") + display.message( + f"Disabled '{other}' since '{change['name']}' was enabled." + ) def check_random_arguments(self, line="", cell=""): # check only for cell magic @@ -411,7 +413,7 @@ def interactive_execute_wrapper(**kwargs): interactive_dict = {} for key in args.interact: interactive_dict[key] = local_ns[key] - print( + display.message( "Interactive mode, please interact with below " "widget(s) to control the variable" ) @@ -527,7 +529,7 @@ def interactive_execute_wrapper(**kwargs): result = result.dict() if self.feedback: - print( + display.message( "Returning data to local variables [{}]".format(", ".join(keys)) ) diff --git a/src/sql/plot.py b/src/sql/plot.py index b817e54ca..e5c31fbfd 100644 --- a/src/sql/plot.py +++ b/src/sql/plot.py @@ -7,7 +7,7 @@ from sql.util import flatten from sqlalchemy.exc import ProgrammingError -from sql import exceptions +from sql import exceptions, display try: import matplotlib.pyplot as plt @@ -682,7 +682,7 @@ def _bar(table, column, with_=None, conn=None): x_ = column[0] height_ = column[1] - print(f"Removing NULLs, if there exists any from {x_} and {height_}") + display.message(f"Removing NULLs, if there exists any from {x_} and {height_}") template_ = """ select "{{x_}}" as x, "{{height_}}" as height @@ -701,7 +701,7 @@ def _bar(table, column, with_=None, conn=None): query = template.render(table=table, x_=x_, height_=height_) else: - print(f"Removing NULLs, if there exists any from {column}") + display.message(f"Removing NULLs, if there exists any from {column}") template_ = """ select "{{column}}" as x, count("{{column}}") as height @@ -866,7 +866,9 @@ def _pie(table, column, with_=None, conn=None): labels_ = column[0] size_ = column[1] - print(f"Removing NULLs, if there exists any from {labels_} and {size_}") + display.message( + f"Removing NULLs, if there exists any from {labels_} and {size_}" + ) template_ = """ select "{{labels_}}" as labels, "{{size_}}" as size @@ -881,7 +883,7 @@ def _pie(table, column, with_=None, conn=None): query = template.render(table=table, labels_=labels_, size_=size_) else: - print(f"Removing NULLs, if there exists any from {column}") + display.message(f"Removing NULLs, if there exists any from {column}") template_ = """ select "{{column}}" as x, count("{{column}}") as height diff --git a/src/sql/run.py b/src/sql/run.py index e6e76cd34..10de35609 100644 --- a/src/sql/run.py +++ b/src/sql/run.py @@ -529,7 +529,7 @@ def _commit(conn, config, manual_commit): with Session(conn.session) as session: session.commit() except sqlalchemy.exc.OperationalError: - print("The database does not support the COMMIT command") + display.message("The database does not support the COMMIT command") def is_postgres_or_redshift(dialect): diff --git a/src/sql/util.py b/src/sql/util.py index 3df5122cf..ce51eb851 100644 --- a/src/sql/util.py +++ b/src/sql/util.py @@ -4,7 +4,7 @@ import difflib from sql.connection import Connection from sql.store import store, _get_dependents_for_key -from sql import exceptions +from sql import exceptions, display import json SINGLE_QUOTE = "'" @@ -182,7 +182,7 @@ def strip_multiple_chars(string: str, chars: str) -> str: def is_saved_snippet(table: str) -> bool: if table in list(store): - print(f"Plotting using saved snippet : {table}") + display.message(f"Plotting using saved snippet : {table}") return True return False