From dc5912d5f2718d64cf80f467fd0d0a07b2a9f02d Mon Sep 17 00:00:00 2001 From: Huong Nguyen <32060364+Huongg@users.noreply.github.com> Date: Wed, 20 Nov 2024 13:19:45 +0000 Subject: [PATCH 1/2] Feature/update lite banner (#2196) * update content for lite banner Signed-off-by: Huong Nguyen * use new logo and copy Signed-off-by: Huong Nguyen * updat release note Signed-off-by: Huong Nguyen * update cy test Signed-off-by: Huong Nguyen * update final copy Signed-off-by: Huong Nguyen --------- Signed-off-by: Huong Nguyen Co-authored-by: Huong Nguyen --- RELEASE.md | 1 + cypress/tests/ui/flowchart/banners.cy.js | 4 ++-- .../flowchart-wrapper/flowchart-wrapper.js | 4 ++-- src/components/icons/info-banner.js | 12 ++++++++++++ src/config.js | 4 ++-- 5 files changed, 19 insertions(+), 6 deletions(-) create mode 100644 src/components/icons/info-banner.js diff --git a/RELEASE.md b/RELEASE.md index a1dd9159f..48e1dba5e 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -25,6 +25,7 @@ Please follow the established format: - Refactor `node-list-tree` component. (#2193) - Fix 404 error when accessing the experiment tracking page on the demo site (#2179) - Add check for port availability before starting Kedro Viz to prevent unintended browser redirects when the port is already in use (#2176) +- Update kedro-viz lite banner icon and message. (#2196) - Include Kedro Viz version in telemetry.. (#2194) diff --git a/cypress/tests/ui/flowchart/banners.cy.js b/cypress/tests/ui/flowchart/banners.cy.js index bdeb20bb4..b7a66b4f5 100644 --- a/cypress/tests/ui/flowchart/banners.cy.js +++ b/cypress/tests/ui/flowchart/banners.cy.js @@ -17,8 +17,8 @@ describe('Banners in Kedro-Viz', () => { // Assert after action cy.get('[data-test="flowchart-wrapper--lite-banner"]').should('exist'); - cy.get('.banner-message-body').should('contains.text', 'please install the missing Kedro project dependencies') - cy.get('.banner-message-title').should('contains.text', 'Missing dependencies') + cy.get('.banner-message-body').should('contains.text', 'Some features might be disabled in --lite mode due to missing dependencies') + cy.get('.banner-message-title').should('contains.text', 'Lite mode enabled') // Test Learn more link cy.get(".banner a") diff --git a/src/components/flowchart-wrapper/flowchart-wrapper.js b/src/components/flowchart-wrapper/flowchart-wrapper.js index 73fec5327..f6f5bfc16 100644 --- a/src/components/flowchart-wrapper/flowchart-wrapper.js +++ b/src/components/flowchart-wrapper/flowchart-wrapper.js @@ -19,7 +19,7 @@ import ExportModal from '../export-modal'; import FlowChart from '../flowchart'; import PipelineWarning from '../pipeline-warning'; import LoadingIcon from '../icons/loading'; -import AlertIcon from '../icons/alert'; +import InfoBannerIcon from '../icons/info-banner'; import MetaData from '../metadata'; import MetadataModal from '../metadata-modal'; import ShareableUrlMetadata from '../shareable-url-modal/shareable-url-metadata'; @@ -342,7 +342,7 @@ export const FlowChartWrapper = ({ {displayMetadataPanel && } {showBanner(BANNER_KEYS.LITE) && ( } + icon={} message={{ title: BANNER_METADATA.liteModeWarning.title, body: BANNER_METADATA.liteModeWarning.body, diff --git a/src/components/icons/info-banner.js b/src/components/icons/info-banner.js new file mode 100644 index 000000000..d0eb20b2d --- /dev/null +++ b/src/components/icons/info-banner.js @@ -0,0 +1,12 @@ +import React from 'react'; + +const InfoBannerIcon = ({ className }) => ( + + + +); + +export default InfoBannerIcon; diff --git a/src/config.js b/src/config.js index daa602385..492eb466e 100644 --- a/src/config.js +++ b/src/config.js @@ -214,8 +214,8 @@ export const NODE_TYPES = { export const BANNER_METADATA = { liteModeWarning: { - title: 'Missing dependencies', - body: 'For the best experience with full functionality, please install the missing Kedro project dependencies.', + title: 'Lite mode enabled', + body: 'Some features might be disabled in --lite mode due to missing dependencies. You can find more information about lite mode in our docs.', docsLink: 'https://docs.kedro.org/projects/kedro-viz/en/latest/kedro-viz_visualisation.html#visualise-a-kedro-project-without-installing-project-dependencies', }, From 40dd06ab8c6f7493177b7d894286476b917b793d Mon Sep 17 00:00:00 2001 From: Ravi Kumar Pilla Date: Wed, 20 Nov 2024 08:00:21 -0600 Subject: [PATCH 2/2] Add official support for python 3.13 (#2191) Adds support for python 3.13. --- .github/workflows/all-checks.yml | 6 +++--- .github/workflows/build-backend.yml | 6 +++--- .github/workflows/docs-only-checks.yml | 2 +- RELEASE.md | 2 +- demo-project/src/demo_project/requirements.in | 2 +- demo-project/src/docker_requirements.txt | 2 +- package/features/steps/lower_requirements.txt | 15 ++++++++++----- package/kedro_viz/__init__.py | 2 +- package/tests/test_import.py | 4 ++-- 9 files changed, 23 insertions(+), 18 deletions(-) diff --git a/.github/workflows/all-checks.yml b/.github/workflows/all-checks.yml index 694097a9e..d1c09d8a5 100644 --- a/.github/workflows/all-checks.yml +++ b/.github/workflows/all-checks.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: os: [ windows-latest, ubuntu-latest ] - python-version: [ "3.9", "3.10", "3.11", "3.12" ] + python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ] uses: ./.github/workflows/e2e-tests.yml with: os: ${{ matrix.os }} @@ -24,7 +24,7 @@ jobs: strategy: matrix: os: [ windows-latest, ubuntu-latest ] - python-version: [ "3.9", "3.10", "3.11", "3.12" ] + python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ] uses: ./.github/workflows/unit-tests.yml with: os: ${{ matrix.os }} @@ -34,7 +34,7 @@ jobs: strategy: matrix: os: [ ubuntu-latest ] - python-version: [ "3.9", "3.10", "3.11", "3.12" ] + python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ] uses: ./.github/workflows/lint.yml with: os: ${{ matrix.os }} diff --git a/.github/workflows/build-backend.yml b/.github/workflows/build-backend.yml index 970d574c4..327fadce2 100644 --- a/.github/workflows/build-backend.yml +++ b/.github/workflows/build-backend.yml @@ -17,7 +17,7 @@ jobs: strategy: matrix: os: [ windows-latest, ubuntu-latest ] - python-version: [ "3.9", "3.10", "3.11", "3.12" ] + python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ] uses: ./.github/workflows/e2e-tests.yml with: os: ${{ matrix.os }} @@ -27,7 +27,7 @@ jobs: strategy: matrix: os: [ windows-latest, ubuntu-latest ] - python-version: [ "3.9", "3.10", "3.11", "3.12" ] + python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ] uses: ./.github/workflows/unit-tests.yml with: os: ${{ matrix.os }} @@ -37,7 +37,7 @@ jobs: strategy: matrix: os: [ ubuntu-latest ] - python-version: [ "3.9", "3.10", "3.11", "3.12" ] + python-version: [ "3.9", "3.10", "3.11", "3.12", "3.13" ] uses: ./.github/workflows/lint.yml with: os: ${{ matrix.os }} diff --git a/.github/workflows/docs-only-checks.yml b/.github/workflows/docs-only-checks.yml index 361df04c3..552074614 100644 --- a/.github/workflows/docs-only-checks.yml +++ b/.github/workflows/docs-only-checks.yml @@ -19,7 +19,7 @@ jobs: strategy: matrix: os: [ ubuntu-latest ] - python-version: ["3.9", "3.10", "3.11", "3.12" ] + python-version: ["3.9", "3.10", "3.11", "3.12", "3.13" ] uses: ./.github/workflows/lint.yml with: os: ${{ matrix.os }} diff --git a/RELEASE.md b/RELEASE.md index 48e1dba5e..24a279483 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -10,7 +10,7 @@ Please follow the established format: ## Major features and improvements -- Add support for Python 3.12 +- Add support for Python 3.12, 3.13 (#2190, #2191) - Update Kedro-Viz telemetry for opt-out model (#2022) - Introduce `behaviour` prop object with `reFocus` prop (#2161) diff --git a/demo-project/src/demo_project/requirements.in b/demo-project/src/demo_project/requirements.in index 3d6956618..7f7bf5d3b 100644 --- a/demo-project/src/demo_project/requirements.in +++ b/demo-project/src/demo_project/requirements.in @@ -10,7 +10,7 @@ pytest-mock>=1.7.1, <2.0 pytest~=6.2 scikit-learn~=1.0 wheel>=0.35, <0.37 -pillow~=9.0 +pillow>=9.0 matplotlib==3.5.0 pre-commit~=1.17 ruff==0.7.0 diff --git a/demo-project/src/docker_requirements.txt b/demo-project/src/docker_requirements.txt index 5f220c35c..0aa7eccbe 100644 --- a/demo-project/src/docker_requirements.txt +++ b/demo-project/src/docker_requirements.txt @@ -1,5 +1,5 @@ kedro>=0.18.0 kedro-datasets[pandas.CSVDataset,pandas.ExcelDataset, pandas.ParquetDataset, plotly.PlotlyDataset, matplotlib.MatplotlibWriter]>=2.1.0 scikit-learn~=1.0 -pillow~=9.0 +pillow>=9.0 seaborn>=0.13.0 diff --git a/package/features/steps/lower_requirements.txt b/package/features/steps/lower_requirements.txt index ff9bce834..cbdaa4aea 100644 --- a/package/features/steps/lower_requirements.txt +++ b/package/features/steps/lower_requirements.txt @@ -9,13 +9,18 @@ plotly==4.8 packaging==23.0 pandas==1.3; python_version < '3.10' pandas==1.5; python_version >= '3.10' and python_version < '3.12' -pandas==2.1.1; python_version >= '3.12' +pandas==2.1.1; python_version >= '3.12' and python_version < '3.13' +pandas==2.2.3; python_version >= '3.13' sqlalchemy==1.4 -strawberry-graphql==0.192.0 -networkx==2.5 -orjson==3.9 +strawberry-graphql==0.192.0; python_version < '3.13' +strawberry-graphql==0.240.1; python_version >= '3.13' +networkx==2.5; python_version < '3.13' +networkx==2.7; python_version >= '3.13' +orjson==3.9; python_version < '3.13' +orjson==3.10.10; python_version >= '3.13' secure==0.3.0 # numpy 2.0 breaks with old versions of pandas and this # could be removed when the lowest version supported is updated -numpy==1.26.4 +numpy==1.26.4; python_version < '3.13' +numpy==2.1.0; python_version >= '3.13' pathspec==0.12.1 diff --git a/package/kedro_viz/__init__.py b/package/kedro_viz/__init__.py index d19e2fb8e..8774c01d3 100644 --- a/package/kedro_viz/__init__.py +++ b/package/kedro_viz/__init__.py @@ -10,7 +10,7 @@ class KedroVizPythonVersionWarning(UserWarning): """Custom class for warnings about incompatibilities with Python versions.""" -if sys.version_info >= (3, 13): +if sys.version_info >= (3, 14): warnings.warn( """Please be advised that Kedro Viz is not yet fully compatible with the Python version you are currently using.""", diff --git a/package/tests/test_import.py b/package/tests/test_import.py index 2198ccdcc..8b646a0b8 100644 --- a/package/tests/test_import.py +++ b/package/tests/test_import.py @@ -4,8 +4,8 @@ def test_import_kedro_viz_with_no_official_support_emits_warning(mocker): - """Test importing kedro Viz with python>=3.13 and controlled warnings should work""" - mocker.patch("kedro_viz.sys.version_info", (3, 13)) + """Test importing kedro Viz with python>=3.14 and controlled warnings should work""" + mocker.patch("kedro_viz.sys.version_info", (3, 14)) # We use the parent class to avoid issues with `exec_module` with pytest.warns(UserWarning) as record: