From 143acb04f615d138d21fc4527e98d8d5eb707c60 Mon Sep 17 00:00:00 2001 From: Nathan Date: Wed, 19 Jun 2024 15:16:03 -0400 Subject: [PATCH 01/18] Add better warning for no pandas --- packages/python/plotly/plotly/express/__init__.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/packages/python/plotly/plotly/express/__init__.py b/packages/python/plotly/plotly/express/__init__.py index 4dd37f64fc3..b308cdb2af5 100644 --- a/packages/python/plotly/plotly/express/__init__.py +++ b/packages/python/plotly/plotly/express/__init__.py @@ -2,13 +2,24 @@ `plotly.express` is a terse, consistent, high-level wrapper around `plotly.graph_objects` for rapid data exploration and figure generation. Learn more at https://plotly.com/python/plotly-express/ """ + from plotly import optional_imports pd = optional_imports.get_module("pandas") if pd is None: raise ImportError( """\ -Plotly express requires pandas to be installed.""" +Plotly Express requires pandas to be installed. You can install pandas using pip with: + +$ pip install pandas + +Or install Plotly Express and its dependencies directly with: + +$ pip install plotly.express + +You can also use Plotly Graph Objects to create a large number of charts without installing +pandas. See examples here: https://plotly.com/python/graph-objects/ +""" ) from ._imshow import imshow From 9423aa1cc1fc9ce7a7b0d0a7e2593dda8600402d Mon Sep 17 00:00:00 2001 From: Nathan Date: Wed, 19 Jun 2024 16:13:20 -0400 Subject: [PATCH 02/18] Specify plotly.express dependencies --- contributing.md | 12 +++++----- packages/python/plotly/requirements.txt | 9 ------- ...onal-requirements.txt => requires-dev.txt} | 2 +- packages/python/plotly/requires-express.txt | 1 + packages/python/plotly/requires-install.txt | 2 ++ packages/python/plotly/setup.py | 24 ++++++++++++------- 6 files changed, 26 insertions(+), 24 deletions(-) delete mode 100644 packages/python/plotly/requirements.txt rename packages/python/plotly/{optional-requirements.txt => requires-dev.txt} (94%) create mode 100644 packages/python/plotly/requires-express.txt create mode 100644 packages/python/plotly/requires-install.txt diff --git a/contributing.md b/contributing.md index 15c8560bc52..79fa1e61265 100644 --- a/contributing.md +++ b/contributing.md @@ -140,17 +140,17 @@ We will support Python 3.12 and higher versions soon. ### Install requirements - (Non-Windows) ```bash -(plotly_dev) $ pip install -r packages/python/plotly/requirements.txt -(plotly_dev) $ pip install -r packages/python/plotly/optional-requirements.txt +(plotly_dev) $ pip install -r packages/python/plotly/requires-install.txt +(plotly_dev) $ pip install -r packages/python/plotly/requires-dev.txt ``` ### Install requirements - (Windows + Conda) Because Windows requires Visual Studio libraries to compile some of the optional dependencies, follow these steps to complete installation and avoid gdal-config errors. ```bash -(plotly_dev) $ pip install -r packages/python/plotly/requirements.txt +(plotly_dev) $ pip install -r packages/python/plotly/requires-install.txt (plotly_dev) $ conda install fiona -(plotly_dev) $ pip install -r packages/python/plotly/optional-requirements.txt +(plotly_dev) $ pip install -r packages/python/plotly/requires-dev.txt ``` ### Editable install of plotly packages @@ -173,7 +173,7 @@ documentation on _development mode_. This repo uses the [Black](https://black.readthedocs.io/en/stable/) code formatter, and the [pre-commit](https://pre-commit.com/) library to manage a git commit hook to run Black prior to each commit. Both pre-commit and black are included in the -`packages/python/plotly/optional-requirements.txt` file, so you should have them +`packages/python/plotly/requires-dev.txt` file, so you should have them installed already if you've been following along. To enable the Black formatting git hook, run the following from within your virtual @@ -261,7 +261,7 @@ We take advantage of two tools to run tests: ### Running Tests with `pytest` -Since our tests cover *all* the functionality, to prevent tons of errors from showing up and having to parse through a messy output, you'll need to install `optional-requirements.txt` as explained above. +Since our tests cover *all* the functionality, to prevent tons of errors from showing up and having to parse through a messy output, you'll need to install `requires-dev.txt` as explained above. After you've done that, go ahead and run the test suite! diff --git a/packages/python/plotly/requirements.txt b/packages/python/plotly/requirements.txt deleted file mode 100644 index 2d763d4dae4..00000000000 --- a/packages/python/plotly/requirements.txt +++ /dev/null @@ -1,9 +0,0 @@ -### Dependencies for Core Plotly Functionality ### -### ### -### To install, run: ### -### $ pip install -r requirements.txt ### -### ### -################################################### - -## retrying requests ## -tenacity>=6.2.0 diff --git a/packages/python/plotly/optional-requirements.txt b/packages/python/plotly/requires-dev.txt similarity index 94% rename from packages/python/plotly/optional-requirements.txt rename to packages/python/plotly/requires-dev.txt index ba3c0549121..094ee686bd5 100644 --- a/packages/python/plotly/optional-requirements.txt +++ b/packages/python/plotly/requires-dev.txt @@ -1,7 +1,7 @@ ### Optional Dependencies for Additional Plotly Functionality ### ### ### ### To install, run: ### -### $ pip install -r optional-requirements.txt ### +### $ pip install -r requires-dev.txt ### ### ### ################################################################### diff --git a/packages/python/plotly/requires-express.txt b/packages/python/plotly/requires-express.txt new file mode 100644 index 00000000000..03b438c0413 --- /dev/null +++ b/packages/python/plotly/requires-express.txt @@ -0,0 +1 @@ +pandas>=2.2.0 # Minimum pin to ensure compatibility with all versions of numpy \ No newline at end of file diff --git a/packages/python/plotly/requires-install.txt b/packages/python/plotly/requires-install.txt new file mode 100644 index 00000000000..c99f744df55 --- /dev/null +++ b/packages/python/plotly/requires-install.txt @@ -0,0 +1,2 @@ +tenacity>=6.2.0 +packaging \ No newline at end of file diff --git a/packages/python/plotly/setup.py b/packages/python/plotly/setup.py index 1122ebb4cbc..e5b510c44c9 100644 --- a/packages/python/plotly/setup.py +++ b/packages/python/plotly/setup.py @@ -65,6 +65,7 @@ else: skip_npm = False + # Load plotly.js version from js/package.json def plotly_js_version(): path = os.path.join( @@ -273,9 +274,7 @@ def overwrite_plotlyjs_version_file(plotlyjs_version): # DO NOT EDIT # This file is generated by the updatebundle setup.py command __plotlyjs_version__ = "{plotlyjs_version}" -""".format( - plotlyjs_version=plotlyjs_version - ) +""".format(plotlyjs_version=plotlyjs_version) ) @@ -289,9 +288,7 @@ def overwrite_plotlywidget_version_file(version): # # It is edited by hand prior to official releases __frontend_version__ = "{version}" -""".format( - version=version - ) +""".format(version=version) ) @@ -303,7 +300,6 @@ def request_json(url): def get_latest_publish_build_info(repo, branch): - url = ( r"https://circleci.com/api/v1.1/project/github/" r"{repo}/tree/{branch}?limit=100&filter=completed" @@ -537,6 +533,14 @@ def run(self): ] versioneer_cmds = versioneer.get_cmdclass() + + +def read_req_file(req_type): + with open(f"requires-{req_type}.txt", encoding="utf-8") as fp: + requires = (line.strip() for line in fp) + return [req for req in requires if req and not req.startswith("#")] + + setup( name="plotly", version=versioneer.get_version(), @@ -603,7 +607,11 @@ def run(self): data_files=[ ("etc/jupyter/nbconfig/notebook.d", ["jupyterlab-plotly.json"]), ], - install_requires=["tenacity>=6.2.0", "packaging"], + install_requires=read_req_file("install"), + extras_require={ + "express": read_req_file("express"), + "dev": read_req_file("dev"), + }, zip_safe=False, cmdclass=dict( build_py=js_prerelease(versioneer_cmds["build_py"]), From abc41f5cbe99300887ab1f33edf369ee4c2e8237 Mon Sep 17 00:00:00 2001 From: Nathan Date: Wed, 19 Jun 2024 16:13:58 -0400 Subject: [PATCH 03/18] Update install recommendations to always use main project --- packages/python/plotly/plotly/express/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/python/plotly/plotly/express/__init__.py b/packages/python/plotly/plotly/express/__init__.py index b308cdb2af5..f49c5f5f3e6 100644 --- a/packages/python/plotly/plotly/express/__init__.py +++ b/packages/python/plotly/plotly/express/__init__.py @@ -15,7 +15,7 @@ Or install Plotly Express and its dependencies directly with: -$ pip install plotly.express +$ pip install "plotly[express]" You can also use Plotly Graph Objects to create a large number of charts without installing pandas. See examples here: https://plotly.com/python/graph-objects/ From 21eef7a725d94b9ba344fc4e117eb13489cc32ea Mon Sep 17 00:00:00 2001 From: Nathan Date: Wed, 19 Jun 2024 16:42:33 -0400 Subject: [PATCH 04/18] Add looser pin for python<=3.8 --- packages/python/plotly/requires-express.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/python/plotly/requires-express.txt b/packages/python/plotly/requires-express.txt index 03b438c0413..ebdb4638734 100644 --- a/packages/python/plotly/requires-express.txt +++ b/packages/python/plotly/requires-express.txt @@ -1 +1,2 @@ -pandas>=2.2.0 # Minimum pin to ensure compatibility with all versions of numpy \ No newline at end of file +pandas; python_version <= '3.8' # Loose requirement for older Python as older numpy is not supported +pandas>=2.2.0; python_version > '3.0' # Minimum pin to ensure compatibility with all versions of numpy From e2bcd8b4fe44503dc16f8d6bc19fce7bd686005e Mon Sep 17 00:00:00 2001 From: Nathan Date: Wed, 19 Jun 2024 17:31:38 -0400 Subject: [PATCH 05/18] Use [pandas] rather than [express] --- packages/python/plotly/plotly/express/__init__.py | 2 +- .../python/plotly/{requires-express.txt => requires-pandas.txt} | 0 packages/python/plotly/setup.py | 2 +- 3 files changed, 2 insertions(+), 2 deletions(-) rename packages/python/plotly/{requires-express.txt => requires-pandas.txt} (100%) diff --git a/packages/python/plotly/plotly/express/__init__.py b/packages/python/plotly/plotly/express/__init__.py index f49c5f5f3e6..115bdc93e32 100644 --- a/packages/python/plotly/plotly/express/__init__.py +++ b/packages/python/plotly/plotly/express/__init__.py @@ -15,7 +15,7 @@ Or install Plotly Express and its dependencies directly with: -$ pip install "plotly[express]" +$ pip install "plotly[pandas]" You can also use Plotly Graph Objects to create a large number of charts without installing pandas. See examples here: https://plotly.com/python/graph-objects/ diff --git a/packages/python/plotly/requires-express.txt b/packages/python/plotly/requires-pandas.txt similarity index 100% rename from packages/python/plotly/requires-express.txt rename to packages/python/plotly/requires-pandas.txt diff --git a/packages/python/plotly/setup.py b/packages/python/plotly/setup.py index e5b510c44c9..cef305b23d7 100644 --- a/packages/python/plotly/setup.py +++ b/packages/python/plotly/setup.py @@ -609,7 +609,7 @@ def read_req_file(req_type): ], install_requires=read_req_file("install"), extras_require={ - "express": read_req_file("express"), + "pandas": read_req_file("pandas"), "dev": read_req_file("dev"), }, zip_safe=False, From 33c446c6a39781f8c6c5e3d80b597fdd83e1ad0a Mon Sep 17 00:00:00 2001 From: Nathan Drezner <38958867+ndrezn@users.noreply.github.com> Date: Thu, 20 Jun 2024 07:08:51 -0400 Subject: [PATCH 06/18] Update requires-pandas.txt Co-authored-by: Alex Johnson --- packages/python/plotly/requires-pandas.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/python/plotly/requires-pandas.txt b/packages/python/plotly/requires-pandas.txt index ebdb4638734..1a72c7df8d1 100644 --- a/packages/python/plotly/requires-pandas.txt +++ b/packages/python/plotly/requires-pandas.txt @@ -1,2 +1,2 @@ pandas; python_version <= '3.8' # Loose requirement for older Python as older numpy is not supported -pandas>=2.2.0; python_version > '3.0' # Minimum pin to ensure compatibility with all versions of numpy +pandas>=2.2.0; python_version > '3.8' # Minimum pin to ensure compatibility with all versions of numpy From e7e5377fceef5f1bfc6b3909c7c620aac3a76991 Mon Sep 17 00:00:00 2001 From: Nathan Date: Wed, 26 Jun 2024 13:37:19 -0400 Subject: [PATCH 07/18] Better python version specification --- packages/python/plotly/requires-pandas.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/python/plotly/requires-pandas.txt b/packages/python/plotly/requires-pandas.txt index 1a72c7df8d1..76c7e5244a8 100644 --- a/packages/python/plotly/requires-pandas.txt +++ b/packages/python/plotly/requires-pandas.txt @@ -1,2 +1,2 @@ -pandas; python_version <= '3.8' # Loose requirement for older Python as older numpy is not supported -pandas>=2.2.0; python_version > '3.8' # Minimum pin to ensure compatibility with all versions of numpy +pandas; python_version < '3.9' # Loose requirement for older Python as older numpy is not supported +pandas>=2.2.0; python_version >= '3.9' # Minimum pin to ensure compatibility with all versions of numpy From 285f270c95a7ac21212dd3e82edd7ac77c456664 Mon Sep 17 00:00:00 2001 From: Nathan Date: Fri, 18 Oct 2024 13:24:03 -0400 Subject: [PATCH 08/18] Fix formatting --- packages/python/plotly/setup.py | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/packages/python/plotly/setup.py b/packages/python/plotly/setup.py index cef305b23d7..909682088d0 100644 --- a/packages/python/plotly/setup.py +++ b/packages/python/plotly/setup.py @@ -274,7 +274,9 @@ def overwrite_plotlyjs_version_file(plotlyjs_version): # DO NOT EDIT # This file is generated by the updatebundle setup.py command __plotlyjs_version__ = "{plotlyjs_version}" -""".format(plotlyjs_version=plotlyjs_version) +""".format( + plotlyjs_version=plotlyjs_version + ) ) @@ -288,7 +290,9 @@ def overwrite_plotlywidget_version_file(version): # # It is edited by hand prior to official releases __frontend_version__ = "{version}" -""".format(version=version) +""".format( + version=version + ) ) From f3775909d66009531fc433fde64ca7188c4bf149 Mon Sep 17 00:00:00 2001 From: Nathan Date: Fri, 18 Oct 2024 13:25:57 -0400 Subject: [PATCH 09/18] Include new requirements files --- packages/python/plotly/MANIFEST.in | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/python/plotly/MANIFEST.in b/packages/python/plotly/MANIFEST.in index f96b9956005..536797ef8a9 100644 --- a/packages/python/plotly/MANIFEST.in +++ b/packages/python/plotly/MANIFEST.in @@ -3,3 +3,6 @@ include README.md include jupyterlab-plotly.json include versioneer.py include plotly/_version.py +include requires-install.txt +include requires-dev.txt +include requires-pandas.txt \ No newline at end of file From 1c4c3c9cd9c3d87415ecd5965c68fe119f7007c3 Mon Sep 17 00:00:00 2001 From: Emily Kellison-Linn <4672118+emilykl@users.noreply.github.com> Date: Wed, 20 Nov 2024 19:46:43 -0500 Subject: [PATCH 10/18] rename requires-dev to requires-optional --- contributing.md | 8 ++++---- packages/python/plotly/MANIFEST.in | 2 +- .../plotly/{requires-dev.txt => requires-optional.txt} | 8 ++++++++ packages/python/plotly/setup.py | 1 - 4 files changed, 13 insertions(+), 6 deletions(-) rename packages/python/plotly/{requires-dev.txt => requires-optional.txt} (67%) diff --git a/contributing.md b/contributing.md index 244ee2130b9..a89ea2fed8f 100644 --- a/contributing.md +++ b/contributing.md @@ -139,7 +139,7 @@ We will support Python 3.12 and higher versions soon. ### Install requirements - (Non-Windows) ```bash (plotly_dev) $ pip install -r packages/python/plotly/requires-install.txt -(plotly_dev) $ pip install -r packages/python/plotly/requires-dev.txt +(plotly_dev) $ pip install -r packages/python/plotly/requires-optional.txt ``` ### Install requirements - (Windows + Conda) Because Windows requires Visual Studio libraries to compile some of the optional dependencies, follow these steps to @@ -148,7 +148,7 @@ complete installation and avoid gdal-config errors. ```bash (plotly_dev) $ pip install -r packages/python/plotly/requires-install.txt (plotly_dev) $ conda install fiona -(plotly_dev) $ pip install -r packages/python/plotly/requires-dev.txt +(plotly_dev) $ pip install -r packages/python/plotly/requires-optional.txt ``` ### Editable install of plotly packages @@ -178,7 +178,7 @@ documentation on _development mode_. This repo uses the [Black](https://black.readthedocs.io/en/stable/) code formatter, and the [pre-commit](https://pre-commit.com/) library to manage a git commit hook to run Black prior to each commit. Both pre-commit and black are included in the -`packages/python/plotly/requires-dev.txt` file, so you should have them +`packages/python/plotly/requires-optional.txt` file, so you should have them installed already if you've been following along. To enable the Black formatting git hook, run the following from within your virtual @@ -266,7 +266,7 @@ We take advantage of two tools to run tests: ### Running Tests with `pytest` -Since our tests cover *all* the functionality, to prevent tons of errors from showing up and having to parse through a messy output, you'll need to install `requires-dev.txt` as explained above. +Since our tests cover *all* the functionality, to prevent tons of errors from showing up and having to parse through a messy output, you'll need to install `requires-optional.txt` as explained above. After you've done that, go ahead and run the test suite! diff --git a/packages/python/plotly/MANIFEST.in b/packages/python/plotly/MANIFEST.in index 9a906fc582c..46a8b1b0201 100644 --- a/packages/python/plotly/MANIFEST.in +++ b/packages/python/plotly/MANIFEST.in @@ -3,6 +3,6 @@ include README.md include versioneer.py include plotly/_version.py include requires-install.txt -include requires-dev.txt +include requires-optional.txt include requires-express.txt include plotly/package_data/widgetbundle.js diff --git a/packages/python/plotly/requires-dev.txt b/packages/python/plotly/requires-optional.txt similarity index 67% rename from packages/python/plotly/requires-dev.txt rename to packages/python/plotly/requires-optional.txt index 5d6a94e13b3..35e720d9003 100644 --- a/packages/python/plotly/requires-dev.txt +++ b/packages/python/plotly/requires-optional.txt @@ -1,5 +1,13 @@ ### Optional Dependencies for Additional Plotly Functionality ### ### ### +### This file lists packages which are not strictly required ### +### by Plotly.py, but which are needed to use some of the ### +### library's functionality. See headings below for more ### +### See headings below for more detail. ### +### ### +### Packages used in the development process are also listed ### +### here. ### +### ### ### To install, run: ### ### $ pip install -r requires-dev.txt ### ### ### diff --git a/packages/python/plotly/setup.py b/packages/python/plotly/setup.py index e52fbe5437d..1b8b6a2159a 100644 --- a/packages/python/plotly/setup.py +++ b/packages/python/plotly/setup.py @@ -562,7 +562,6 @@ def read_req_file(req_type): install_requires=read_req_file("install"), extras_require={ "express": read_req_file("express"), - "dev": read_req_file("dev"), }, zip_safe=False, cmdclass=dict( From 9818daf01c9218bfd51d6f02597f1c7ca5e4540b Mon Sep 17 00:00:00 2001 From: Emily Kellison-Linn <4672118+emilykl@users.noreply.github.com> Date: Thu, 21 Nov 2024 17:50:46 -0500 Subject: [PATCH 11/18] update filename --- packages/python/plotly/requires-optional.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/python/plotly/requires-optional.txt b/packages/python/plotly/requires-optional.txt index 35e720d9003..c5f16793f4e 100644 --- a/packages/python/plotly/requires-optional.txt +++ b/packages/python/plotly/requires-optional.txt @@ -9,7 +9,7 @@ ### here. ### ### ### ### To install, run: ### -### $ pip install -r requires-dev.txt ### +### $ pip install -r requires-optional.txt ### ### ### ################################################################### From 6454bf5903054d672ef1591e58da7d53f91f0bae Mon Sep 17 00:00:00 2001 From: Emily Kellison-Linn <4672118+emilykl@users.noreply.github.com> Date: Thu, 21 Nov 2024 18:07:06 -0500 Subject: [PATCH 12/18] very light cleanup (formatting; remove packages which are also in requires-install.txt) --- packages/python/plotly/requires-optional.txt | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/packages/python/plotly/requires-optional.txt b/packages/python/plotly/requires-optional.txt index c5f16793f4e..ba233c41144 100644 --- a/packages/python/plotly/requires-optional.txt +++ b/packages/python/plotly/requires-optional.txt @@ -13,17 +13,16 @@ ### ### ################################################################### -## numpy (technically, this is covered by matplotlib's deps) ## +## numpy (required by Plotly Express) ## numpy -## matplotlylib dependencies - moving away from 1.3.1 ## +## matplotlylib dependencies ## # matplotlib==2.2.2 ## testing dependencies ## coverage==4.3.1 mock==2.0.0 pytest==8.1.1 -backports.tempfile==1.0 xarray pytz @@ -35,7 +34,6 @@ psutil pre-commit black==22.3.0 - ## codegen dependencies ## inflect @@ -45,11 +43,10 @@ colorcet ## ipython ## ipython -## pandas deps for some matplotlib functionality ## +## pandas (for some matplotlib functionality) ## pandas -narwhals>=1.13.3 -## scipy deps for some FigureFactory functions ## +## scipy deps (for some FigureFactory functions) ## scipy ## jupyter ## @@ -57,10 +54,10 @@ jupyter jupyterlab ipykernel -## deps for _county_choropleth.py figure factory +## deps for _county_choropleth.py figure factory ## pyshp geopandas shapely -## image uri conversion +## image uri conversion ## pillow From 493952adc0eb155bfe737a22151ff54119367ffd Mon Sep 17 00:00:00 2001 From: Emily Kellison-Linn <4672118+emilykl@users.noreply.github.com> Date: Thu, 21 Nov 2024 18:18:53 -0500 Subject: [PATCH 13/18] clean up jupyter requirements (thanks @marthacryan) --- packages/python/plotly/requires-optional.txt | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/packages/python/plotly/requires-optional.txt b/packages/python/plotly/requires-optional.txt index ba233c41144..cc104591d7e 100644 --- a/packages/python/plotly/requires-optional.txt +++ b/packages/python/plotly/requires-optional.txt @@ -30,7 +30,7 @@ pytz requests psutil -## code formatting +## code formatting ## pre-commit black==22.3.0 @@ -40,9 +40,6 @@ inflect ## template generation ## colorcet -## ipython ## -ipython - ## pandas (for some matplotlib functionality) ## pandas @@ -51,8 +48,7 @@ scipy ## jupyter ## jupyter -jupyterlab -ipykernel +anywidget ## deps for _county_choropleth.py figure factory ## pyshp From 6074eeaf3ac0aacce7b21eb770a3d7e254b15e4c Mon Sep 17 00:00:00 2001 From: Emily Kellison-Linn <4672118+emilykl@users.noreply.github.com> Date: Thu, 21 Nov 2024 18:29:52 -0500 Subject: [PATCH 14/18] remove unneccessary step --- contributing.md | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/contributing.md b/contributing.md index a89ea2fed8f..ccdd22ed498 100644 --- a/contributing.md +++ b/contributing.md @@ -136,17 +136,15 @@ We will support Python 3.12 and higher versions soon. [conda-env]: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-with-commands [virtualenv]: http://docs.python-guide.org/en/latest/dev/virtualenvs/ -### Install requirements - (Non-Windows) +### Install development requirements (Non-Windows) ```bash -(plotly_dev) $ pip install -r packages/python/plotly/requires-install.txt (plotly_dev) $ pip install -r packages/python/plotly/requires-optional.txt ``` -### Install requirements - (Windows + Conda) +### Install development requirements (Windows + Conda) Because Windows requires Visual Studio libraries to compile some of the optional dependencies, follow these steps to complete installation and avoid gdal-config errors. ```bash -(plotly_dev) $ pip install -r packages/python/plotly/requires-install.txt (plotly_dev) $ conda install fiona (plotly_dev) $ pip install -r packages/python/plotly/requires-optional.txt ``` From 340372a06223924df8b04ddf9ef116b06c2115a9 Mon Sep 17 00:00:00 2001 From: Emily Kellison-Linn <4672118+emilykl@users.noreply.github.com> Date: Thu, 21 Nov 2024 18:30:45 -0500 Subject: [PATCH 15/18] remove requires-optional from MANIFEST --- packages/python/plotly/MANIFEST.in | 1 - 1 file changed, 1 deletion(-) diff --git a/packages/python/plotly/MANIFEST.in b/packages/python/plotly/MANIFEST.in index 46a8b1b0201..b890876fc2c 100644 --- a/packages/python/plotly/MANIFEST.in +++ b/packages/python/plotly/MANIFEST.in @@ -3,6 +3,5 @@ include README.md include versioneer.py include plotly/_version.py include requires-install.txt -include requires-optional.txt include requires-express.txt include plotly/package_data/widgetbundle.js From b49da0e21710e56a9cc09b385f6d766aef7758ca Mon Sep 17 00:00:00 2001 From: Emily Kellison-Linn <4672118+emilykl@users.noreply.github.com> Date: Fri, 22 Nov 2024 11:39:05 -0500 Subject: [PATCH 16/18] formatting --- packages/python/plotly/requires-optional.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/python/plotly/requires-optional.txt b/packages/python/plotly/requires-optional.txt index cc104591d7e..b36d45c31fa 100644 --- a/packages/python/plotly/requires-optional.txt +++ b/packages/python/plotly/requires-optional.txt @@ -43,14 +43,14 @@ colorcet ## pandas (for some matplotlib functionality) ## pandas -## scipy deps (for some FigureFactory functions) ## +## scipy deps (for some Figure Factory functions) ## scipy ## jupyter ## jupyter anywidget -## deps for _county_choropleth.py figure factory ## +## deps for _county_choropleth.py (Figure Factory) ## pyshp geopandas shapely From b8c5faa2ef33008d43313ba9dfd052178d709a2c Mon Sep 17 00:00:00 2001 From: Emily Kellison-Linn <4672118+emilykl@users.noreply.github.com> Date: Fri, 22 Nov 2024 12:06:41 -0500 Subject: [PATCH 17/18] update changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 862eacfc32b..8679e2b7f31 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,7 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Updated plotly.py to use base64 encoding of arrays in plotly JSON to improve performance. - Add `subtitle` attribute to all Plotly Express traces - Make plotly-express dataframe agnostic via Narwhals [#4790](https://github.com/plotly/plotly.py/pull/4790) +- Add `plotly[express]` extra for easily installing Plotly Express dependencies [#4644](https://github.com/plotly/plotly.py/pull/4644) ## [5.24.1] - 2024-09-12 From c541ce1f1fd80925b28ba1a607546ee361cbe164 Mon Sep 17 00:00:00 2001 From: Emily Kellison-Linn <4672118+emilykl@users.noreply.github.com> Date: Fri, 22 Nov 2024 12:07:20 -0500 Subject: [PATCH 18/18] update changelog --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8679e2b7f31..c0572988ba2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,9 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +### Added +- Add `plotly[express]` extra for easily installing Plotly Express dependencies [#4644](https://github.com/plotly/plotly.py/pull/4644) + ### Removed - Drop deprecated `pointcloud` and `heatmapgl` traces from the API - Drop `tenacity` dependency [#4831](https://github.com/plotly/plotly.js/pull/4831) @@ -11,7 +14,6 @@ This project adheres to [Semantic Versioning](http://semver.org/). - Updated plotly.py to use base64 encoding of arrays in plotly JSON to improve performance. - Add `subtitle` attribute to all Plotly Express traces - Make plotly-express dataframe agnostic via Narwhals [#4790](https://github.com/plotly/plotly.py/pull/4790) -- Add `plotly[express]` extra for easily installing Plotly Express dependencies [#4644](https://github.com/plotly/plotly.py/pull/4644) ## [5.24.1] - 2024-09-12