Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
lint:
if: github.actor != 'renovate[bot]'
name: Lint source code
runs-on: ubuntu-24.04
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4
Expand All @@ -40,7 +40,7 @@ jobs:
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.13'
python-version: '3.11'

- uses: actions/cache@v4
name: Cache pip dependencies
Expand Down Expand Up @@ -85,15 +85,15 @@ jobs:

validate-docs:
name: Validate Docs
runs-on: ubuntu-24.04
runs-on: ubuntu-22.04

steps:
- uses: actions/checkout@v4

- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: '3.13'
python-version: '3.11'

- name: Cache pip dependencies
id: cache
Expand Down
12 changes: 6 additions & 6 deletions src/ydata_profiling/utils/information.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
References and information regarding ydata-profiling and ydata-sdk
"""
import importlib.util
import os

_displayed_banner = False
SUPPRESS_BANNER = bool(os.getenv("YDATA_SUPPRESS_BANNER", ""))

link = "https://ydata.ai/register"
title = "Upgrade to ydata-sdk"
Expand All @@ -15,10 +17,8 @@ def in_jupyter_notebook() -> bool:
if importlib.util.find_spec("IPython") is not None:
from IPython import get_ipython

isiPython = not get_ipython() is None
else:
isiPython = False
return isiPython
return get_ipython() is not None
return False


class DisplayInfo:
Expand Down Expand Up @@ -61,8 +61,8 @@ def display_message(self) -> None:

def display_banner() -> None:
global _displayed_banner
banner_info = DisplayInfo(title=title, info_text=info_text)

if not _displayed_banner:
if not _displayed_banner and not SUPPRESS_BANNER:
banner_info = DisplayInfo(title=title, info_text=info_text)
banner_info.display_message()
_displayed_banner = True