From f356c8a7534ed00bf3e9ff58337b2bae5d4f2805 Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Fri, 7 Feb 2025 14:58:11 -0600 Subject: [PATCH 01/43] Unpin test requirements and use the same requirements for all python versions --- .circleci/config.yml | 8 +++---- test_requirements/requirements_core.txt | 3 +++ test_requirements/requirements_optional.txt | 26 +++++++++++++++++++++ 3 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 test_requirements/requirements_core.txt create mode 100644 test_requirements/requirements_optional.txt diff --git a/.circleci/config.yml b/.circleci/config.yml index 4e82a4b66d..525e8195ec 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -19,7 +19,7 @@ commands: python -m venv venv . venv/bin/activate pip install -e . - pip install -r ./test_requirements/requirements_<>_core.txt + pip install -r ./test_requirements/requirements_core.txt - run: name: Test core command: | @@ -42,7 +42,7 @@ commands: python -m venv venv . venv/bin/activate pip install -e . - pip install -r ./test_requirements/requirements_<>_optional.txt + pip install -r ./test_requirements/requirements_optional.txt cd js npm ci npm run build @@ -99,7 +99,7 @@ commands: command: | python -m venv venv . venv/bin/activate - pip install -r ./test_requirements/requirements_<>_optional.txt + pip install -r ./test_requirements/requirements_optional.txt - run: name: Install plotly-geo command: | @@ -310,7 +310,7 @@ jobs: python -m venv venv . venv/bin/activate pip install -e . - pip install -r ./test_requirements/requirements_311_core.txt black inflect + pip install -r ./test_requirements/requirements_core.txt black inflect pip install jupyterlab - run: name: Update plotly.js to dev diff --git a/test_requirements/requirements_core.txt b/test_requirements/requirements_core.txt new file mode 100644 index 0000000000..bfcb0446a0 --- /dev/null +++ b/test_requirements/requirements_core.txt @@ -0,0 +1,3 @@ +requests +pytest +narwhals diff --git a/test_requirements/requirements_optional.txt b/test_requirements/requirements_optional.txt new file mode 100644 index 0000000000..f7925c1b4a --- /dev/null +++ b/test_requirements/requirements_optional.txt @@ -0,0 +1,26 @@ +requests +pandas +numpy +xarray +statsmodels +Pillow +pytest +pytz +ipython[all] +ipykernel +jupyter +scipy +Shapely +geopandas +pyshp +matplotlib +scikit-image +psutil +kaleido +orjson +polars[timezone] +pyarrow +narwhals +anywidget +jupyter-console +plotly-geo From 27c0e9d843a75c7c6444d4323c6ea8f14d054c0b Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Fri, 7 Feb 2025 14:59:54 -0600 Subject: [PATCH 02/43] Remove extra requirements files --- test_requirements/requirements_310_core.txt | 3 --- .../requirements_310_optional.txt | 24 ----------------- test_requirements/requirements_311_core.txt | 3 --- .../requirements_311_optional.txt | 25 ------------------ test_requirements/requirements_312_core.txt | 3 --- .../requirements_312_optional.txt | 26 ------------------- test_requirements/requirements_38_core.txt | 3 --- .../requirements_38_optional.txt | 24 ----------------- test_requirements/requirements_39_core.txt | 3 --- .../requirements_39_optional.txt | 25 ------------------ 10 files changed, 139 deletions(-) delete mode 100644 test_requirements/requirements_310_core.txt delete mode 100644 test_requirements/requirements_310_optional.txt delete mode 100644 test_requirements/requirements_311_core.txt delete mode 100644 test_requirements/requirements_311_optional.txt delete mode 100644 test_requirements/requirements_312_core.txt delete mode 100644 test_requirements/requirements_312_optional.txt delete mode 100644 test_requirements/requirements_38_core.txt delete mode 100644 test_requirements/requirements_38_optional.txt delete mode 100644 test_requirements/requirements_39_core.txt delete mode 100644 test_requirements/requirements_39_optional.txt diff --git a/test_requirements/requirements_310_core.txt b/test_requirements/requirements_310_core.txt deleted file mode 100644 index a9e44d7480..0000000000 --- a/test_requirements/requirements_310_core.txt +++ /dev/null @@ -1,3 +0,0 @@ -requests==2.25.1 -pytest==7.4.4 -narwhals>=1.15.1 diff --git a/test_requirements/requirements_310_optional.txt b/test_requirements/requirements_310_optional.txt deleted file mode 100644 index f61fef5a5d..0000000000 --- a/test_requirements/requirements_310_optional.txt +++ /dev/null @@ -1,24 +0,0 @@ -requests==2.25.1 -pandas==1.5.3 -numpy==1.23.0 -xarray==0.17.0 -statsmodels==0.14.1 -Pillow==10.2.0 -pytest==7.4.4 -pytz==2023.3.post1 -ipython[all]==7.22.0 -ipykernel==5.5.3 -jupyter==1.0.0 -scipy==1.11.4 -Shapely==2.0.2 -geopandas==0.14.4 -pyshp==2.1.3 -matplotlib==3.8.0 -scikit-image==0.22.0 -psutil==5.7.0 -kaleido -orjson==3.8.12 -polars[timezone] -pyarrow -narwhals>=1.15.1 -anywidget==0.9.13 diff --git a/test_requirements/requirements_311_core.txt b/test_requirements/requirements_311_core.txt deleted file mode 100644 index 1800038868..0000000000 --- a/test_requirements/requirements_311_core.txt +++ /dev/null @@ -1,3 +0,0 @@ -requests==2.25.1 -pytest==7.4.4 -narwhals>=1.15.1 \ No newline at end of file diff --git a/test_requirements/requirements_311_optional.txt b/test_requirements/requirements_311_optional.txt deleted file mode 100644 index 505636afaa..0000000000 --- a/test_requirements/requirements_311_optional.txt +++ /dev/null @@ -1,25 +0,0 @@ -requests==2.25.1 -pandas==1.5.3 -numpy==1.23.2 -xarray==0.17.0 -statsmodels==0.14.1 -Pillow==10.2.0 -pytest==7.4.4 -pytz==2023.3.post1 -ipython[all]==7.22.0 -ipykernel==5.5.3 -jupyter==1.0.0 -scipy==1.11.4 -Shapely==2.0.2 -geopandas==0.14.4 -pyshp==2.1.3 -matplotlib==3.8.0 -scikit-image==0.22.0 -psutil==5.7.0 -orjson==3.8.12 -narwhals>=1.15.1 -anywidget==0.9.13 -polars[timezone] -pyarrow -kaleido -plotly-geo diff --git a/test_requirements/requirements_312_core.txt b/test_requirements/requirements_312_core.txt deleted file mode 100644 index a9e44d7480..0000000000 --- a/test_requirements/requirements_312_core.txt +++ /dev/null @@ -1,3 +0,0 @@ -requests==2.25.1 -pytest==7.4.4 -narwhals>=1.15.1 diff --git a/test_requirements/requirements_312_optional.txt b/test_requirements/requirements_312_optional.txt deleted file mode 100644 index 0e85492bb8..0000000000 --- a/test_requirements/requirements_312_optional.txt +++ /dev/null @@ -1,26 +0,0 @@ -requests==2.31.0 -pandas -numpy -xarray==2023.12.0 -statsmodels -Pillow==10.2.0 -pytest==7.4.4 -pytz==2023.3.post1 -ipython[all] -ipykernel -jupyter -scipy==1.11.4 -Shapely==2.0.2 -geopandas==0.14.4 -pyshp==2.3.1 -matplotlib==3.8.2 -scikit-image==0.22.0 -psutil==5.9.7 -kaleido -orjson==3.9.10 -polars[timezone] -pyarrow -narwhals>=1.15.1 -anywidget==0.9.13 -jupyter-console==6.4.4 -plotly-geo diff --git a/test_requirements/requirements_38_core.txt b/test_requirements/requirements_38_core.txt deleted file mode 100644 index 9bfcbffa2f..0000000000 --- a/test_requirements/requirements_38_core.txt +++ /dev/null @@ -1,3 +0,0 @@ -requests==2.25.1 -pytest==8.1.1 -narwhals>=1.15.1 diff --git a/test_requirements/requirements_38_optional.txt b/test_requirements/requirements_38_optional.txt deleted file mode 100644 index f62c6ad656..0000000000 --- a/test_requirements/requirements_38_optional.txt +++ /dev/null @@ -1,24 +0,0 @@ -requests==2.25.1 -pandas==1.2.4 -numpy==1.20.2 -xarray==0.17.0 -statsmodels -Pillow==8.2.0 -pytest==8.1.1 -pytz==2021.1 -ipython[all]==7.22.0 -ipykernel==5.5.3 -jupyter==1.0.0 -scipy==1.6.2 -Shapely==2.0.2 -geopandas==0.13.2 -fiona<=1.9.6 -pyshp==2.1.3 -matplotlib==3.7.3 -scikit-image==0.18.1 -psutil==5.7.0 -kaleido -polars[timezone] -pyarrow -narwhals>=1.15.1 -anywidget==0.9.13 diff --git a/test_requirements/requirements_39_core.txt b/test_requirements/requirements_39_core.txt deleted file mode 100644 index 0d36eb9460..0000000000 --- a/test_requirements/requirements_39_core.txt +++ /dev/null @@ -1,3 +0,0 @@ -requests==2.25.1 -pytest==6.2.3 -narwhals>=1.15.1 diff --git a/test_requirements/requirements_39_optional.txt b/test_requirements/requirements_39_optional.txt deleted file mode 100644 index 1a767fe492..0000000000 --- a/test_requirements/requirements_39_optional.txt +++ /dev/null @@ -1,25 +0,0 @@ -requests==2.25.1 -pandas==1.2.4 -numpy==1.21.6 -xarray==0.17.0 -statsmodels -Pillow==8.2.0 -pytest==6.2.3 -pytz==2021.1 -ipython[all]==7.22.0 -ipykernel==5.5.3 -jupyter==1.0.0 -scipy==1.6.2 -Shapely==2.0.2 -geopandas==0.13.2 -fiona<=1.9.6 -pyshp==2.1.3 -matplotlib==3.8.0 -scikit-image==0.18.1 -psutil==5.7.0 -kaleido -orjson==3.8.12 -polars[timezone] -pyarrow -narwhals>=1.15.1 -anywidget==0.9.13 From fab49c74a297346cdbe9456d0354b525c50c4b5c Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Fri, 7 Feb 2025 15:20:27 -0600 Subject: [PATCH 03/43] remove plotly-geo install and orca tests from circleci config --- .circleci/config.yml | 49 --------------------- test_requirements/requirements_optional.txt | 2 +- 2 files changed, 1 insertion(+), 50 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 525e8195ec..06c63b39eb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -46,11 +46,6 @@ commands: cd js npm ci npm run build - - run: - name: Install plotly-geo - command: | - . venv/bin/activate - pip install plotly-geo - run: name: Test core command: | @@ -85,42 +80,6 @@ commands: command: | . venv/bin/activate python -m pytest -x test_init/test_lazy_imports.py - test_orca: - parameters: - py: - default: "310" - type: string - steps: - - checkout - - browser-tools/install-chrome - - browser-tools/install-chromedriver - - run: - name: Install dependencies - command: | - python -m venv venv - . venv/bin/activate - pip install -r ./test_requirements/requirements_optional.txt - - run: - name: Install plotly-geo - command: | - . venv/bin/activate - pip install plotly-geo - - run: - name: Install orca - command: | - npm install electron@1.8.4 - npm install orca - sudo apt-get update - sudo apt-get install -y poppler-utils libxtst6 xvfb libgtk2.0-0 libgconf-2-4 libnss3 libasound2 rename - echo 'export PATH="/home/circleci/project/node_modules/.bin:$PATH"' >> $BASH_ENV - - run: - name: Test orca - command: | - . venv/bin/activate - pytest tests/test_orca - no_output_timeout: 20m - - store_artifacts: - path: tests/test_orca/images/linux/failed jobs: check-code-formatting: @@ -417,14 +376,6 @@ jobs: cd ../doc fi cd .. - - run: - name: Install orca - command: | - npm install electron@1.8.4 - npm install orca - sudo apt-get update - sudo apt-get install -y poppler-utils libxtst6 xvfb libgtk2.0-0 libgconf-2-4 libnss3 libasound2 rename - echo 'export PATH="/home/circleci/project/node_modules/.bin:$PATH"' >> $BASH_ENV - save_cache: paths: diff --git a/test_requirements/requirements_optional.txt b/test_requirements/requirements_optional.txt index f7925c1b4a..fd51dcb7ed 100644 --- a/test_requirements/requirements_optional.txt +++ b/test_requirements/requirements_optional.txt @@ -22,5 +22,5 @@ polars[timezone] pyarrow narwhals anywidget -jupyter-console plotly-geo +vaex;python_version<="3.11" \ No newline at end of file From 397b1ef9822a8f6a37c29e6c8d8e21da26f888c9 Mon Sep 17 00:00:00 2001 From: Emily Kellison-Linn <4672118+emilykl@users.noreply.github.com> Date: Fri, 7 Feb 2025 16:45:36 -0500 Subject: [PATCH 04/43] pin fiona version for python<=3.8 --- test_requirements/requirements_optional.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/test_requirements/requirements_optional.txt b/test_requirements/requirements_optional.txt index fd51dcb7ed..9229d1af70 100644 --- a/test_requirements/requirements_optional.txt +++ b/test_requirements/requirements_optional.txt @@ -1,6 +1,7 @@ requests pandas numpy +fiona<=1.9.6;python_version<="3.8" xarray statsmodels Pillow From 24fe0eebb1d7c4bb782d07520bc62e1ea18d7853 Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Mon, 10 Feb 2025 17:03:43 -0600 Subject: [PATCH 05/43] Only install vaex for python<=3.9 --- test_requirements/requirements_optional.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_requirements/requirements_optional.txt b/test_requirements/requirements_optional.txt index 9229d1af70..70d46d3964 100644 --- a/test_requirements/requirements_optional.txt +++ b/test_requirements/requirements_optional.txt @@ -24,4 +24,4 @@ pyarrow narwhals anywidget plotly-geo -vaex;python_version<="3.11" \ No newline at end of file +vaex;python_version<="3.9" \ No newline at end of file From c2af57ba49d3f0e0a206a54bd6b6f90e8e5727cc Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Mon, 10 Feb 2025 17:08:54 -0600 Subject: [PATCH 06/43] Prevent running vaex tests if vaex isn't installed --- tests/test_optional/test_px/test_px_input.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/tests/test_optional/test_px/test_px_input.py b/tests/test_optional/test_px/test_px_input.py index edb3bfdd2e..68421ff248 100644 --- a/tests/test_optional/test_px/test_px_input.py +++ b/tests/test_optional/test_px/test_px_input.py @@ -14,8 +14,7 @@ import warnings -# FIXME: don't test with vaex if vaex isn't installed -if (optional_imports.get_module("vaex") is None) and (sys.version_info >= (3, 12)): +if (optional_imports.get_module("vaex") is None): TEST_LIBS = ["polars"] else: TEST_LIBS = ["vaex", "polars"] From 7855fa6ab75f26dfec26f505bf89abb00daa23ea Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Mon, 10 Feb 2025 17:21:56 -0600 Subject: [PATCH 07/43] Code formatting --- tests/test_optional/test_px/test_px_input.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_optional/test_px/test_px_input.py b/tests/test_optional/test_px/test_px_input.py index 68421ff248..efa9feca35 100644 --- a/tests/test_optional/test_px/test_px_input.py +++ b/tests/test_optional/test_px/test_px_input.py @@ -14,7 +14,7 @@ import warnings -if (optional_imports.get_module("vaex") is None): +if optional_imports.get_module("vaex") is None: TEST_LIBS = ["polars"] else: TEST_LIBS = ["vaex", "polars"] From 508135fe6c1f659771ba787d24983c934ddee139 Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Tue, 11 Feb 2025 12:13:41 -0600 Subject: [PATCH 08/43] Update tests/test_optional/test_px/test_px_input.py Co-authored-by: Emily KL <4672118+emilykl@users.noreply.github.com> --- tests/test_optional/test_px/test_px_input.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_optional/test_px/test_px_input.py b/tests/test_optional/test_px/test_px_input.py index efa9feca35..78b0bc3f76 100644 --- a/tests/test_optional/test_px/test_px_input.py +++ b/tests/test_optional/test_px/test_px_input.py @@ -14,7 +14,7 @@ import warnings -if optional_imports.get_module("vaex") is None: +if optional_imports.get_module("vaex") is None and sys.version_info > (3, 9): TEST_LIBS = ["polars"] else: TEST_LIBS = ["vaex", "polars"] From 7ca72958003595409580d7a19a18df43953b39e7 Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Tue, 11 Feb 2025 12:21:22 -0600 Subject: [PATCH 09/43] try only running vaex with python 3.9 --- test_requirements/requirements_optional.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_requirements/requirements_optional.txt b/test_requirements/requirements_optional.txt index 70d46d3964..edc7e1bfc6 100644 --- a/test_requirements/requirements_optional.txt +++ b/test_requirements/requirements_optional.txt @@ -24,4 +24,4 @@ pyarrow narwhals anywidget plotly-geo -vaex;python_version<="3.9" \ No newline at end of file +vaex;python_version=="3.9" \ No newline at end of file From d282c4939a6090cbab6e24e341919deff6d05bda Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Tue, 11 Feb 2025 12:30:15 -0600 Subject: [PATCH 10/43] Set vaex tests to run on only python 3.9 --- tests/test_optional/test_px/test_px_input.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_optional/test_px/test_px_input.py b/tests/test_optional/test_px/test_px_input.py index 78b0bc3f76..6ba7b0c3f8 100644 --- a/tests/test_optional/test_px/test_px_input.py +++ b/tests/test_optional/test_px/test_px_input.py @@ -14,7 +14,7 @@ import warnings -if optional_imports.get_module("vaex") is None and sys.version_info > (3, 9): +if optional_imports.get_module("vaex") is None and sys.version_info == (3, 9): TEST_LIBS = ["polars"] else: TEST_LIBS = ["vaex", "polars"] From ef4abb8fdceaf60af14956d66136a12b108819af Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Tue, 11 Feb 2025 13:52:27 -0600 Subject: [PATCH 11/43] Only run vaex tests if vaex is installed --- tests/test_optional/test_px/test_px_input.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_optional/test_px/test_px_input.py b/tests/test_optional/test_px/test_px_input.py index 6ba7b0c3f8..486331d565 100644 --- a/tests/test_optional/test_px/test_px_input.py +++ b/tests/test_optional/test_px/test_px_input.py @@ -14,7 +14,7 @@ import warnings -if optional_imports.get_module("vaex") is None and sys.version_info == (3, 9): +if optional_imports.get_module("vaex"): TEST_LIBS = ["polars"] else: TEST_LIBS = ["vaex", "polars"] From fe3740e1c33115e159d490407e9a66d9f196a3ad Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Tue, 11 Feb 2025 14:46:43 -0600 Subject: [PATCH 12/43] Fix handling of vaex not being present --- tests/test_optional/test_px/test_px_input.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_optional/test_px/test_px_input.py b/tests/test_optional/test_px/test_px_input.py index 486331d565..efa9feca35 100644 --- a/tests/test_optional/test_px/test_px_input.py +++ b/tests/test_optional/test_px/test_px_input.py @@ -14,7 +14,7 @@ import warnings -if optional_imports.get_module("vaex"): +if optional_imports.get_module("vaex") is None: TEST_LIBS = ["polars"] else: TEST_LIBS = ["vaex", "polars"] From 719292e2b50991b5bad8ead5f132d3df60d1cdaa Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Tue, 11 Feb 2025 15:48:15 -0600 Subject: [PATCH 13/43] remove extraneous import of ipython display --- plotly/tools.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/plotly/tools.py b/plotly/tools.py index cbfff43b9e..4a4a6e136d 100644 --- a/plotly/tools.py +++ b/plotly/tools.py @@ -61,9 +61,6 @@ def warning_on_one_line(message, category, filename, lineno, file=None, line=Non warnings.formatwarning = warning_on_one_line -ipython_core_display = optional_imports.get_module("IPython.core.display") -sage_salvus = optional_imports.get_module("sage_salvus") - ### mpl-related tools ### def mpl_to_plotly(fig, resize=False, strip_style=False, verbose=False): From cae9d77ade9df502d278b08a3b6c49dd513c77c2 Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Wed, 12 Feb 2025 11:51:26 -0600 Subject: [PATCH 14/43] remove unnecessary py parameter and add numpy_installed parameter --- .circleci/config.yml | 82 ++++++------------- .../requirements_312_no_numpy_optional.txt | 24 ------ .../requirements_312_np2_optional.txt | 25 ------ .../requirements_39_pandas_2_optional.txt | 26 ------ 4 files changed, 25 insertions(+), 132 deletions(-) delete mode 100644 test_requirements/requirements_312_no_numpy_optional.txt delete mode 100644 test_requirements/requirements_312_np2_optional.txt delete mode 100644 test_requirements/requirements_39_pandas_2_optional.txt diff --git a/.circleci/config.yml b/.circleci/config.yml index b25de7c288..bc8f98c54b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,10 +5,6 @@ orbs: commands: test_core: - parameters: - py: - default: "310" - type: string steps: - checkout - browser-tools/install-chrome @@ -29,9 +25,9 @@ commands: test_optional: parameters: - py: - default: "310" - type: string + numpy_installed: + default: true + type: boolean steps: - checkout - browser-tools/install-chrome @@ -47,6 +43,16 @@ commands: cd js npm ci npm run build + - when: + condition: + equal: ["<< parameters.numpy_installed >>", false] + steps: + - run: + name: Uninstall numpy + command: | + source .venv/bin/activate + uv pip uninstall numpy + - run: name: Test core command: | @@ -106,105 +112,70 @@ jobs: docker: - image: cimg/python:3.8-browsers steps: - - test_core: - py: "38" + - test_core python_39_core: docker: - image: cimg/python:3.9-browsers steps: - - test_core: - py: "39" + - test_core python_310_core: docker: - image: cimg/python:3.10-browsers steps: - - test_core: - py: "310" + - test_core python_311_core: docker: - image: cimg/python:3.11-browsers steps: - - test_core: - py: "311" + - test_core python_312_core: docker: - image: cimg/python:3.12-browsers steps: - - test_core: - py: "312" + - test_core # Optional - python_38_optional: docker: - image: cimg/python:3.8-browsers steps: - - test_optional: - py: "38" + - test_optional python_39_optional: docker: - image: cimg/python:3.9-browsers steps: - - test_optional: - py: "39" + - test_optional python_310_optional: docker: - image: cimg/python:3.10-browsers steps: - - test_optional: - py: "310" + - test_optional python_311_optional: docker: - image: cimg/python:3.11-browsers steps: - - test_optional: - py: "311" + - test_optional python_312_optional: docker: - image: cimg/python:3.12-browsers steps: - - test_optional: - py: "312" - - # Pandas - - python_39_pandas_2_optional: - docker: - - image: cimg/python:3.9-browsers - steps: - - test_optional: - py: "39_pandas_2" + - test_optional # No numpy python_312_no_numpy: docker: - image: cimg/python:3.12-browsers steps: - - run: - name: Check that numpy is not installed - command: | - if pip list | grep numpy > /dev/null 2>&1 - then exit 1 - else exit 0 - fi - test_optional: - py: "312_no_numpy" - - python_312_np2: - docker: - - image: cimg/python:3.12-browsers - steps: - - test_optional: - py: "312_np2" - + numpy_installed: false # Percy python_39_percy: @@ -229,8 +200,7 @@ jobs: python -m venv venv . venv/bin/activate pip install -e . - pip install plotly-geo - pip install -r test_requirements/requirements_39_pandas_2_optional.txt + pip install -r test_requirements/requirements_optional.txt - run: name: Build html figures (Pandas 2) @@ -477,8 +447,6 @@ workflows: - python_310_optional - python_311_optional - python_312_optional - - python_39_pandas_2_optional - python_39_percy - python_312_no_numpy - - python_312_np2 - build-doc diff --git a/test_requirements/requirements_312_no_numpy_optional.txt b/test_requirements/requirements_312_no_numpy_optional.txt deleted file mode 100644 index 9786aea5f6..0000000000 --- a/test_requirements/requirements_312_no_numpy_optional.txt +++ /dev/null @@ -1,24 +0,0 @@ -requests==2.31.0 -pandas -xarray==2023.12.0 -statsmodels -Pillow==10.2.0 -pytest==7.4.4 -pytz==2023.3.post1 -ipython[all] -ipykernel -jupyter -scipy==1.11.4 -Shapely==2.0.2 -geopandas==0.14.4 -pyshp==2.3.1 -matplotlib==3.8.2 -scikit-image==0.22.0 -psutil==5.9.7 -kaleido -orjson==3.9.10 -polars[timezone] -pyarrow -narwhals>=1.15.1 -anywidget==0.9.13 -jupyter-console==6.4.4 diff --git a/test_requirements/requirements_312_np2_optional.txt b/test_requirements/requirements_312_np2_optional.txt deleted file mode 100644 index 1e02e3a836..0000000000 --- a/test_requirements/requirements_312_np2_optional.txt +++ /dev/null @@ -1,25 +0,0 @@ -requests==2.31.0 -pandas -numpy>2 -xarray==2024.10.0 -statsmodels -Pillow==10.2.0 -pytest==7.4.4 -pytz==2023.3.post1 -ipython[all] -ipywidgets -ipykernel -jupyter -scipy==1.14.1 -Shapely==2.0.2 -geopandas==0.14.4 -pyshp==2.3.1 -matplotlib==3.9.2 -scikit-image==0.24.0 -psutil==5.9.7 -kaleido -orjson==3.9.10 -polars[timezone] -pyarrow -narwhals>=1.15.1 -anywidget==0.9.13 diff --git a/test_requirements/requirements_39_pandas_2_optional.txt b/test_requirements/requirements_39_pandas_2_optional.txt deleted file mode 100644 index 214bb545c0..0000000000 --- a/test_requirements/requirements_39_pandas_2_optional.txt +++ /dev/null @@ -1,26 +0,0 @@ -requests==2.25.1 -pandas==2.2.3 -numpy==1.22.4 -xarray==0.17.0 -statsmodels -Pillow==8.2.0 -pytest==6.2.3 -pytz==2021.1 -ipython[all]==7.22.0 -ipykernel==5.5.3 -jupyter==1.0.0 -scipy==1.6.2 -Shapely==2.0.2 -geopandas==0.14.4 -pyshp==2.1.3 -matplotlib==3.8.0 -scikit-image==0.18.1 -psutil==5.7.0 -kaleido -vaex -pydantic<=1.10.11 # for vaex, see https://github.com/vaexio/vaex/issues/2384 -polars[timezone] -pyarrow -narwhals>=1.15.1 -polars -anywidget==0.9.13 From bcdc22435f6c507156c398e7cc90b40134a6676c Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Wed, 12 Feb 2025 15:42:08 -0600 Subject: [PATCH 15/43] Update conditional in circleci config --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bc8f98c54b..3f5b6d491f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -45,7 +45,7 @@ commands: npm run build - when: condition: - equal: ["<< parameters.numpy_installed >>", false] + not: << parameters.numpy_installed >> steps: - run: name: Uninstall numpy From c493669ff80b6a2a8fbba9d7ba579f4b82f6e12c Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Wed, 12 Feb 2025 18:42:31 -0600 Subject: [PATCH 16/43] Fix syntax of conditional --- .circleci/config.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3f5b6d491f..3fed95ac6c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -47,9 +47,7 @@ commands: condition: not: << parameters.numpy_installed >> steps: - - run: - name: Uninstall numpy - command: | + - run: | source .venv/bin/activate uv pip uninstall numpy From 1367fa4a9bd6b7af24ba1ac8285b53afc081bd54 Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Wed, 12 Feb 2025 18:47:57 -0600 Subject: [PATCH 17/43] Fix conditional --- .circleci/config.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 3fed95ac6c..b19008d6b5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -44,12 +44,12 @@ commands: npm ci npm run build - when: - condition: - not: << parameters.numpy_installed >> + condition: + not: << parameters.numpy_installed >> steps: - - run: | - source .venv/bin/activate - uv pip uninstall numpy + - run: | + source .venv/bin/activate + uv pip uninstall numpy - run: name: Test core From 709571009b42cf4ba8f6ffa1d8b202e89b9e742c Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Wed, 12 Feb 2025 19:07:24 -0600 Subject: [PATCH 18/43] Parameterize jobs --- .circleci/config.yml | 126 +++++++++++++++---------------------------- 1 file changed, 44 insertions(+), 82 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b19008d6b5..638c23d896 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,6 +3,16 @@ version: 2.1 orbs: browser-tools: circleci/browser-tools@1.4.8 +executors: + docker-container: + parameters: + version: + description: "python version" + default: "310" + type: string + docker: + - image: cimg/python:<>-browsers + commands: test_core: steps: @@ -43,13 +53,6 @@ commands: cd js npm ci npm run build - - when: - condition: - not: << parameters.numpy_installed >> - steps: - - run: | - source .venv/bin/activate - uv pip uninstall numpy - run: name: Test core @@ -105,76 +108,28 @@ jobs: . venv/bin/activate black --check . --exclude venv - # Core - python_38_core: - docker: - - image: cimg/python:3.8-browsers - steps: - - test_core - - python_39_core: - docker: - - image: cimg/python:3.9-browsers - steps: - - test_core - - python_310_core: - docker: - - image: cimg/python:3.10-browsers - steps: - - test_core - - python_311_core: - docker: - - image: cimg/python:3.11-browsers - steps: - - test_core - - python_312_core: - docker: - - image: cimg/python:3.12-browsers + test_core: + parameters: + version: + default: "310" + type: string + executor: + name: docker-container + version: <> steps: - test_core - # Optional - python_38_optional: - docker: - - image: cimg/python:3.8-browsers - steps: - - test_optional - - python_39_optional: - docker: - - image: cimg/python:3.9-browsers - steps: - - test_optional - - python_310_optional: - docker: - - image: cimg/python:3.10-browsers - steps: - - test_optional - - python_311_optional: - docker: - - image: cimg/python:3.11-browsers - steps: - - test_optional - - python_312_optional: - docker: - - image: cimg/python:3.12-browsers + test_optional: + parameters: + version: + default: "310" + type: string + executor: + name: docker-container + version: <> steps: - test_optional - # No numpy - python_312_no_numpy: - docker: - - image: cimg/python:3.12-browsers - steps: - - test_optional: - numpy_installed: false - # Percy python_39_percy: docker: @@ -435,16 +390,23 @@ workflows: build: jobs: - - python_38_core - - python_39_core - - python_310_core - - python_311_core - - python_312_core - - python_38_optional - - python_39_optional - - python_310_optional - - python_311_optional - - python_312_optional + - test_core: + matrix: + parameters: + version: + - "38" + - "39" + - "310" + - "311" + - "312" + - test_optional: + matrix: + parameters: + version: + - "38" + - "39" + - "310" + - "311" + - "312" - python_39_percy - - python_312_no_numpy - build-doc From acc61b43c34a6120a8daafef8867757e15bc6b77 Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Wed, 12 Feb 2025 19:09:21 -0600 Subject: [PATCH 19/43] Fix python versions --- .circleci/config.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 638c23d896..f6df453989 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,7 +8,7 @@ executors: parameters: version: description: "python version" - default: "310" + default: "3.10" type: string docker: - image: cimg/python:<>-browsers @@ -111,7 +111,7 @@ jobs: test_core: parameters: version: - default: "310" + default: "3.10" type: string executor: name: docker-container @@ -122,7 +122,7 @@ jobs: test_optional: parameters: version: - default: "310" + default: "3.10" type: string executor: name: docker-container @@ -394,19 +394,19 @@ workflows: matrix: parameters: version: - - "38" - - "39" - - "310" - - "311" - - "312" + - "3.8" + - "3.9" + - "3.10" + - "3.11" + - "3.12" - test_optional: matrix: parameters: version: - - "38" - - "39" - - "310" - - "311" - - "312" + - "3.8" + - "3.9" + - "3.10" + - "3.11" + - "3.12" - python_39_percy - build-doc From 8c3bb2e85c7ce2d8055d75af1e0a3d2dd127c067 Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Wed, 12 Feb 2025 19:13:21 -0600 Subject: [PATCH 20/43] Fix indentation --- .circleci/config.yml | 40 ++++++++++++++++++++-------------------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f6df453989..e1ea9a7a34 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -108,7 +108,7 @@ jobs: . venv/bin/activate black --check . --exclude venv - test_core: + test_core_job: parameters: version: default: "3.10" @@ -119,7 +119,7 @@ jobs: steps: - test_core - test_optional: + test_optional_job: parameters: version: default: "3.10" @@ -390,23 +390,23 @@ workflows: build: jobs: - - test_core: - matrix: - parameters: - version: - - "3.8" - - "3.9" - - "3.10" - - "3.11" - - "3.12" - - test_optional: - matrix: - parameters: - version: - - "3.8" - - "3.9" - - "3.10" - - "3.11" - - "3.12" + - test_core_job: + matrix: + parameters: + version: + - "3.8" + - "3.9" + - "3.10" + - "3.11" + - "3.12" + - test_optional_job: + matrix: + parameters: + version: + - "3.8" + - "3.9" + - "3.10" + - "3.11" + - "3.12" - python_39_percy - build-doc From 707bf68aaf8e0a913862f20e3ac0445ee72d43ec Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Wed, 12 Feb 2025 19:17:26 -0600 Subject: [PATCH 21/43] Rename job for readability of CI output --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e1ea9a7a34..1bd495e446 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -108,7 +108,7 @@ jobs: . venv/bin/activate black --check . --exclude venv - test_core_job: + test_core_py: parameters: version: default: "3.10" @@ -119,7 +119,7 @@ jobs: steps: - test_core - test_optional_job: + test_optional_py: parameters: version: default: "3.10" @@ -390,7 +390,7 @@ workflows: build: jobs: - - test_core_job: + - test_core_py: matrix: parameters: version: @@ -399,7 +399,7 @@ workflows: - "3.10" - "3.11" - "3.12" - - test_optional_job: + - test_optional_py: matrix: parameters: version: From 777e376559d580e203b85c666e9b652fb43e434d Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Wed, 12 Feb 2025 19:23:25 -0600 Subject: [PATCH 22/43] Switch to uv for other tests --- .circleci/config.yml | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1bd495e446..456bc6ce3c 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -92,7 +92,7 @@ commands: jobs: check-code-formatting: docker: - - image: cimg/python:3.7 + - image: cimg/python:3.11 steps: - checkout @@ -101,7 +101,7 @@ jobs: command: | python -m venv venv . venv/bin/activate - pip install black==22.3.0 + pip install black - run: name: Check formatting with black command: | @@ -150,24 +150,25 @@ jobs: - run: name: Install requirements command: | - python -m venv venv - . venv/bin/activate - pip install -e . - pip install -r test_requirements/requirements_optional.txt + curl -LsSf https://astral.sh/uv/install.sh | sh + uv venv + source .venv/bin/activate + uv pip install -e . + uv pip install -r test_requirements/requirements_optional.txt - run: name: Build html figures (Pandas 2) command: | - . venv/bin/activate + source .venv/bin/activate python tests/percy/plotly-express.py - run: name: Build html figures (Pandas 1) and compare command: | - . venv/bin/activate + source .venv/bin/activate mkdir tests/percy/pandas2 mv tests/percy/*.html tests/percy/pandas2/ # 1.1 is the earliest minor with Py3.9 wheels - pip install "pandas==1.1.5" + uv pip install "pandas==1.1.5" python tests/percy/plotly-express.py python tests/percy/compare-pandas.py rm -rf tests/percy/pandas2 @@ -190,20 +191,20 @@ jobs: - run: name: Install dependencies command: | - python -m venv venv - . venv/bin/activate - pip install -e . - pip install -r ./test_requirements/requirements_core.txt black inflect - pip install jupyterlab + curl -LsSf https://astral.sh/uv/install.sh | sh + uv venv + source .venv/bin/activate + uv pip install -e . + uv pip install -r ./test_requirements/requirements_core.txt black inflect jupyterlab - run: name: Update plotly.js to dev command: | - . venv/bin/activate + source .venv/bin/activate python commands.py updateplotlyjsdev - run: name: Test core command: | - . venv/bin/activate + source .venv/bin/activate locale pytest -k 'not nodev' tests/test_core no_output_timeout: 20m @@ -218,8 +219,8 @@ jobs: - run: name: Build source distribution packages command: | - . venv/bin/activate - pip install build + source .venv/bin/activate + uv pip install build python -m build --sdist --wheel -o dist when: always - store_artifacts: From f7801641550cf53d8b2921da33e8be335e6da0fc Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Wed, 12 Feb 2025 19:31:38 -0600 Subject: [PATCH 23/43] Revert to pip for pandas downgrade --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 456bc6ce3c..f3a2a04a1b 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -168,7 +168,7 @@ jobs: mkdir tests/percy/pandas2 mv tests/percy/*.html tests/percy/pandas2/ # 1.1 is the earliest minor with Py3.9 wheels - uv pip install "pandas==1.1.5" + pip install "pandas==1.1.5" python tests/percy/plotly-express.py python tests/percy/compare-pandas.py rm -rf tests/percy/pandas2 From f140060aa7320171b67e0e489ad4683148574a4a Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Wed, 12 Feb 2025 19:37:11 -0600 Subject: [PATCH 24/43] Address review --- test_requirements/requirements_optional.txt | 2 +- tests/test_optional/test_px/test_px_input.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test_requirements/requirements_optional.txt b/test_requirements/requirements_optional.txt index edc7e1bfc6..70d46d3964 100644 --- a/test_requirements/requirements_optional.txt +++ b/test_requirements/requirements_optional.txt @@ -24,4 +24,4 @@ pyarrow narwhals anywidget plotly-geo -vaex;python_version=="3.9" \ No newline at end of file +vaex;python_version<="3.9" \ No newline at end of file diff --git a/tests/test_optional/test_px/test_px_input.py b/tests/test_optional/test_px/test_px_input.py index efa9feca35..78b0bc3f76 100644 --- a/tests/test_optional/test_px/test_px_input.py +++ b/tests/test_optional/test_px/test_px_input.py @@ -14,7 +14,7 @@ import warnings -if optional_imports.get_module("vaex") is None: +if optional_imports.get_module("vaex") is None and sys.version_info > (3, 9): TEST_LIBS = ["polars"] else: TEST_LIBS = ["vaex", "polars"] From c9215f0ef8b7aed9cad36b349251dac5aeeed4e3 Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Wed, 12 Feb 2025 19:40:56 -0600 Subject: [PATCH 25/43] Revert changes to black version --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f3a2a04a1b..91e10db3a9 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -92,7 +92,7 @@ commands: jobs: check-code-formatting: docker: - - image: cimg/python:3.11 + - image: cimg/python:3.7 steps: - checkout @@ -101,7 +101,7 @@ jobs: command: | python -m venv venv . venv/bin/activate - pip install black + pip install black==22.3.0 - run: name: Check formatting with black command: | From 4664d1549d6b588421bb42ff11b7ea02df60aa66 Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Wed, 12 Feb 2025 19:51:58 -0600 Subject: [PATCH 26/43] Add pandas version as parameter --- .circleci/config.yml | 46 +++++++++++++++++++++++++++----------------- 1 file changed, 28 insertions(+), 18 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 91e10db3a9..75b833cd03 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,12 +6,12 @@ orbs: executors: docker-container: parameters: - version: + python_version: description: "python version" default: "3.10" type: string docker: - - image: cimg/python:<>-browsers + - image: cimg/python:<>-browsers commands: test_core: @@ -38,6 +38,8 @@ commands: numpy_installed: default: true type: boolean + pandas_version: + type: string steps: - checkout - browser-tools/install-chrome @@ -53,6 +55,15 @@ commands: cd js npm ci npm run build + + - when: + condition: <> + steps: + - run: + name: Install pandas + command: | + source .venv/bin/activate + uv pip install pandas==<> - run: name: Test core @@ -110,25 +121,29 @@ jobs: test_core_py: parameters: - version: + python_version: default: "3.10" type: string executor: name: docker-container - version: <> + python_version: <> steps: - test_core test_optional_py: parameters: - version: + python_version: default: "3.10" type: string + pandas_version: + default: "2" + type: string executor: name: docker-container - version: <> + python_version: <> steps: - - test_optional + - test_optional: + pandas_version: <> # Percy python_39_percy: @@ -208,14 +223,6 @@ jobs: locale pytest -k 'not nodev' tests/test_core no_output_timeout: 20m - - run: - name: Commit - command: | - git config --global user.email "you@example.com" - git config --global user.name "Your Name" - git add -A - git commit -m "Codegen" - when: always - run: name: Build source distribution packages command: | @@ -280,7 +287,7 @@ jobs: - browser-tools/install-chromedriver - run: - name: install dependencies + name: Install dependencies command: | cd doc curl -LsSf https://astral.sh/uv/install.sh | sh @@ -394,7 +401,7 @@ workflows: - test_core_py: matrix: parameters: - version: + python_version: - "3.8" - "3.9" - "3.10" @@ -403,11 +410,14 @@ workflows: - test_optional_py: matrix: parameters: - version: + python_version: - "3.8" - "3.9" - "3.10" - "3.11" - "3.12" + - test_optional_py: + python_version: "3.9" + pandas_version: "1.1" - python_39_percy - build-doc From d9c9c5e2044d68dd0c67ded33b94dc618df9a622 Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Wed, 12 Feb 2025 19:53:53 -0600 Subject: [PATCH 27/43] Use pip for downgrade --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 75b833cd03..efef80ed74 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -63,7 +63,7 @@ commands: name: Install pandas command: | source .venv/bin/activate - uv pip install pandas==<> + pip install pandas==<> - run: name: Test core @@ -417,6 +417,7 @@ workflows: - "3.11" - "3.12" - test_optional_py: + name: "Test optional with pandas 1.1" python_version: "3.9" pandas_version: "1.1" - python_39_percy From 36c0437f6aebbe93b40facda581f6217e218fa91 Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Wed, 12 Feb 2025 19:54:52 -0600 Subject: [PATCH 28/43] Use easier to read name for jobs --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index efef80ed74..2539dc6247 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -416,6 +416,7 @@ workflows: - "3.10" - "3.11" - "3.12" + name: "Test optional with python << parameters.python_version >>" - test_optional_py: name: "Test optional with pandas 1.1" python_version: "3.9" From 29f984b3eb3ad404ef479fcf6693b27016580c27 Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Wed, 12 Feb 2025 19:56:46 -0600 Subject: [PATCH 29/43] Try different pandas version --- .circleci/config.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2539dc6247..41c3971d21 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -418,8 +418,8 @@ workflows: - "3.12" name: "Test optional with python << parameters.python_version >>" - test_optional_py: - name: "Test optional with pandas 1.1" + name: "Test optional with pandas 1.2.4" python_version: "3.9" - pandas_version: "1.1" + pandas_version: "1.2.4" - python_39_percy - build-doc From 2a637241b669255cab7574b2a1e1b33fa972e300 Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Wed, 12 Feb 2025 19:59:33 -0600 Subject: [PATCH 30/43] Remove numpy config --- .circleci/config.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 41c3971d21..9c0864a6f5 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -35,9 +35,6 @@ commands: test_optional: parameters: - numpy_installed: - default: true - type: boolean pandas_version: type: string steps: From 954db319cfe9cac1dd0a36f4413fe9dc0c54dcc6 Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Tue, 18 Feb 2025 15:16:55 -0600 Subject: [PATCH 31/43] Prevent pandas install step if default --- .circleci/config.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 9c0864a6f5..6d94b7ccab 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -54,7 +54,11 @@ commands: npm run build - when: - condition: <> + condition: + not: + equal: + - <> + - "" steps: - run: name: Install pandas @@ -133,7 +137,7 @@ jobs: default: "3.10" type: string pandas_version: - default: "2" + default: "" type: string executor: name: docker-container From 60d8682a96b640268a5e5a7d38202c08fdd85879 Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Tue, 18 Feb 2025 16:31:47 -0600 Subject: [PATCH 32/43] Remove narwhals from dependencies Narwhals is already bundled with plotly.py, so users shouldn't have to install it themselves --- test_requirements/requirements_optional.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/test_requirements/requirements_optional.txt b/test_requirements/requirements_optional.txt index 70d46d3964..8ccdb19b25 100644 --- a/test_requirements/requirements_optional.txt +++ b/test_requirements/requirements_optional.txt @@ -21,7 +21,6 @@ kaleido orjson polars[timezone] pyarrow -narwhals anywidget plotly-geo vaex;python_version<="3.9" \ No newline at end of file From 5e90e7dcc84cdc57b3a927772dd1df54f8a2bd58 Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Wed, 19 Feb 2025 18:20:33 -0600 Subject: [PATCH 33/43] Remove narwhals from core requirements --- test_requirements/requirements_core.txt | 1 - 1 file changed, 1 deletion(-) diff --git a/test_requirements/requirements_core.txt b/test_requirements/requirements_core.txt index bfcb0446a0..2001f3e256 100644 --- a/test_requirements/requirements_core.txt +++ b/test_requirements/requirements_core.txt @@ -1,3 +1,2 @@ requests pytest -narwhals From cab519c275d0ef1f66eeb851b1f0b11d3f874561 Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Wed, 26 Feb 2025 16:34:09 -0600 Subject: [PATCH 34/43] Update .circleci/config.yml Co-authored-by: Emily KL <4672118+emilykl@users.noreply.github.com> --- .circleci/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6d94b7ccab..cd5d1b5174 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -417,7 +417,6 @@ workflows: - "3.10" - "3.11" - "3.12" - name: "Test optional with python << parameters.python_version >>" - test_optional_py: name: "Test optional with pandas 1.2.4" python_version: "3.9" From c29f6a4e47c8fe640d35e441c1f7daba2fb33fb1 Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Wed, 26 Feb 2025 16:38:47 -0600 Subject: [PATCH 35/43] Add check for pandas version to confirm correct install --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index cd5d1b5174..d8e0ca9b5a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -76,6 +76,7 @@ commands: name: Test optional command: | source .venv/bin/activate + uv pip list | grep pandas python -m pytest tests/test_optional no_output_timeout: 40m - run: From e54f99c025f0540ce3bcc4b612d4882c3b979b43 Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Wed, 26 Feb 2025 16:41:57 -0600 Subject: [PATCH 36/43] Use uv for pip --- .circleci/config.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d8e0ca9b5a..ebbe44d2e4 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -64,7 +64,8 @@ commands: name: Install pandas command: | source .venv/bin/activate - pip install pandas==<> + uv pip install pip + python -m pip install pandas==<> - run: name: Test core From 2750aa0c5a9a6ef2285277dd395b1a9b3d9719f4 Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Thu, 6 Mar 2025 14:26:36 -0600 Subject: [PATCH 37/43] Add numpy version pin --- .circleci/config.yml | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ebbe44d2e4..b1941b2d89 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -37,6 +37,8 @@ commands: parameters: pandas_version: type: string + numpy_version: + type: string steps: - checkout - browser-tools/install-chrome @@ -65,7 +67,7 @@ commands: command: | source .venv/bin/activate uv pip install pip - python -m pip install pandas==<> + python -m pip install pandas==<> numpy==<> - run: name: Test core @@ -73,11 +75,16 @@ commands: source .venv/bin/activate python -m pytest tests/test_core no_output_timeout: 20m + - run: + name: List installed packages and python version + command: | + source .venv/bin/activate + uv pip list + python --version - run: name: Test optional command: | source .venv/bin/activate - uv pip list | grep pandas python -m pytest tests/test_optional no_output_timeout: 40m - run: @@ -141,12 +148,16 @@ jobs: pandas_version: default: "" type: string + numpy_version: + default: "" + type: string executor: name: docker-container python_version: <> steps: - test_optional: pandas_version: <> + numpy_version: <> # Percy python_39_percy: @@ -423,5 +434,6 @@ workflows: name: "Test optional with pandas 1.2.4" python_version: "3.9" pandas_version: "1.2.4" + numpy_version: "1.26.4" - python_39_percy - build-doc From 53dc043e473973ae5abe5741d627331ed79dc5a2 Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Thu, 6 Mar 2025 14:37:05 -0600 Subject: [PATCH 38/43] Switch to use uv in core tests as well --- .circleci/config.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index b1941b2d89..534763185d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,14 +22,21 @@ commands: - run: name: Install dependencies command: | - python -m venv venv - . venv/bin/activate - pip install -e . - pip install -r ./test_requirements/requirements_core.txt + curl -LsSf https://astral.sh/uv/install.sh | sh + uv venv + source .venv/bin/activate + uv pip install . + uv pip install -r ./test_requirements/requirements_core.txt + - run: + name: List installed packages and python version + command: | + source .venv/bin/activate + uv pip list + python --version - run: name: Test core command: | - . venv/bin/activate + source .venv/bin/activate python -m pytest tests/test_core no_output_timeout: 20m From f5c2bec9416deeefca57a404c7d054db8a98eb2c Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Thu, 6 Mar 2025 16:46:41 -0600 Subject: [PATCH 39/43] Use uv for percy tests --- .circleci/config.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 534763185d..4876e42512 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -204,10 +204,17 @@ jobs: mkdir tests/percy/pandas2 mv tests/percy/*.html tests/percy/pandas2/ # 1.1 is the earliest minor with Py3.9 wheels - pip install "pandas==1.1.5" + uv pip install pip + python -m pip install pandas==1.1.5 numpy==1.19.5 python tests/percy/plotly-express.py python tests/percy/compare-pandas.py rm -rf tests/percy/pandas2 + - run: + name: List installed packages and python version + command: | + source .venv/bin/activate + uv pip list + python --version - run: name: Run percy snapshots command: | From d3de0b109d84fde22ba05fa7968ff13a66fe32ad Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Thu, 6 Mar 2025 16:48:30 -0600 Subject: [PATCH 40/43] Use later version of numpy for scipy compatibility --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 4876e42512..2ef901e1e0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -205,7 +205,7 @@ jobs: mv tests/percy/*.html tests/percy/pandas2/ # 1.1 is the earliest minor with Py3.9 wheels uv pip install pip - python -m pip install pandas==1.1.5 numpy==1.19.5 + python -m pip install pandas==1.1.5 numpy==1.22.4 python tests/percy/plotly-express.py python tests/percy/compare-pandas.py rm -rf tests/percy/pandas2 From b89f7934e8d709dde8c8fe189a7afec2809ca9b8 Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Thu, 6 Mar 2025 16:56:59 -0600 Subject: [PATCH 41/43] Use version of numpy from before switch to uv --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2ef901e1e0..5413063cc1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -205,7 +205,7 @@ jobs: mv tests/percy/*.html tests/percy/pandas2/ # 1.1 is the earliest minor with Py3.9 wheels uv pip install pip - python -m pip install pandas==1.1.5 numpy==1.22.4 + python -m pip install pandas==1.1.5 numpy==2.0.2 python tests/percy/plotly-express.py python tests/percy/compare-pandas.py rm -rf tests/percy/pandas2 From 0a74d1b0d62c33095d3b0a5afff6d0c32f555f10 Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Thu, 6 Mar 2025 16:59:42 -0600 Subject: [PATCH 42/43] Use different version of numpy --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 5413063cc1..6a5724567e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -205,7 +205,7 @@ jobs: mv tests/percy/*.html tests/percy/pandas2/ # 1.1 is the earliest minor with Py3.9 wheels uv pip install pip - python -m pip install pandas==1.1.5 numpy==2.0.2 + python -m pip install pandas==1.1.5 numpy==1.26.4 python tests/percy/plotly-express.py python tests/percy/compare-pandas.py rm -rf tests/percy/pandas2 From 801dde1e7cd7b2b40c23588cbc6895fcb4bf8cff Mon Sep 17 00:00:00 2001 From: Martha Cryan Date: Thu, 6 Mar 2025 17:02:35 -0600 Subject: [PATCH 43/43] Update name of test for consistency with other CI jobs --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6a5724567e..50157d7beb 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -445,7 +445,7 @@ workflows: - "3.11" - "3.12" - test_optional_py: - name: "Test optional with pandas 1.2.4" + name: "test_optional_py-3.9_pandas-1.2.4" python_version: "3.9" pandas_version: "1.2.4" numpy_version: "1.26.4"