Skip to content

Commit

Permalink
Merge branch 'master' into merge-recent-docs-changes
Browse files Browse the repository at this point in the history
  • Loading branch information
LiamConnors committed Jan 14, 2025
2 parents 861b421 + 1fc6bdd commit 529c89d
Show file tree
Hide file tree
Showing 798 changed files with 13,649 additions and 54,767 deletions.
40 changes: 24 additions & 16 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ commands:
. venv/bin/activate
pip install --upgrade pip wheel
pip install -r ./test_requirements/requirements_<<parameters.py>>_optional.txt
cd js
npm ci
npm run build
- run:
name: Install plotly-geo
command: |
Expand Down Expand Up @@ -249,13 +252,13 @@ jobs:
- test_optional:
py: "312_no_numpy"

# Orca
python_38_orca:
python_312_np2:
docker:
- image: cimg/python:3.8-browsers
- image: cimg/python:3.12-browsers
steps:
- test_orca:
py: "38"
- test_optional:
py: "312_np2"


# Percy
python_39_percy:
Expand Down Expand Up @@ -347,9 +350,9 @@ jobs:
. venv/bin/activate
pip install --upgrade pip wheel
pip install -r ./test_requirements/requirements_38_core.txt black inflect
pip install jupyterlab~=3.0
pip install jupyterlab
- run:
name: Update jupyterlab-plotly version
name: Update jupyter widget plotly.js version
command: |
cd packages/python/plotly
. venv/bin/activate
Expand Down Expand Up @@ -403,7 +406,7 @@ jobs:
conda config --remove channels defaults
conda config --add channels conda-forge
conda create -n env --yes python=3.9 conda-build=3.28.4 conda-verify
conda install -n env -c conda-forge jupyterlab=3 nodejs=16
conda install -n env -c conda-forge jupyterlab nodejs=16
conda init bash
mkdir output
Expand All @@ -412,9 +415,9 @@ jobs:
command: |
eval "$(conda shell.bash hook)"
conda activate env
cd packages/javascript/jupyterlab-plotly
cd packages/python/plotly/js
npm ci
npm run build:prod
npm run build
git status
- run:
Expand All @@ -438,13 +441,13 @@ jobs:
git status
- run:
name: NPM Pack
name: Build Widget javascript bundle
command: |
eval "$(conda shell.bash hook)"
conda activate env
cd packages/javascript/jupyterlab-plotly
npm pack
mv jupyterlab-plotly*.tgz ../../../output
cd packages/python/plotly/js
npm ci
npm run build
- run:
name: Zip output
Expand Down Expand Up @@ -491,7 +494,12 @@ jobs:
pip install -r requirements.txt
if [ "${CIRCLE_BRANCH}" != "doc-prod" ]; then
pip uninstall -y plotly
pip install -e ../packages/python/plotly
cd ../packages/python/plotly
pip install -e .
cd js
npm ci
npm run build
cd ../../../../doc
fi
cd ..
- run:
Expand Down Expand Up @@ -613,7 +621,7 @@ workflows:
- python_311_optional
- python_312_optional
- python_39_pandas_2_optional
- python_38_orca
- python_39_percy
- python_312_no_numpy
- python_312_np2
- build-doc
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ build
dist
plotly.egg-info/

# macOS utility file
**/.DS_Store

plotly/tests/test_orca/images/*/failed
plotly/tests/test_orca/images/*/tmp
/plotly-package/plotly/tests/test_core/test_offline/plotly.min.js
Expand All @@ -59,6 +62,7 @@ doc/check-or-enforce-order.py
packages/javascript/jupyterlab-plotly/lib/
packages/python/plotly/jupyterlab_plotly/labextension/
packages/python/plotly/jupyterlab_plotly/nbextension/index.js*
packages/python/plotly/plotly/package_data/widgetbundle.js

test/percy/*.html
test/percy/pandas2/*.html
36 changes: 35 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,45 @@
All notable changes to this project will be documented in this file.
This project adheres to [Semantic Versioning](http://semver.org/).

## [6.0.0rc0] - 2024-11-27

### Added
- Add `plotly[express]` extra for easily installing Plotly Express dependencies [[#4644](https://github.com/plotly/plotly.py/pull/4644)]
- Add `subtitle` attribute to all Plotly Express traces [[#4830](https://github.com/plotly/plotly.py/pull/4830)].

### Removed
- Drop deprecated `pointcloud` and `heatmapgl` traces from the API [[#4815](https://github.com/plotly/plotly.py/pull/4815)]
- Drop `tenacity` dependency [[#4831](https://github.com/plotly/plotly.py/pull/4831)]
- Drop support for Jupyter Notebook version 6 and earlier [[#4822](https://github.com/plotly/plotly.py/pull/4822)]. The minimum supported version is now 7.0.0.

### Updated
- Deprecate Mapbox-based traces.[[#4900](https://github.com/plotly/plotly.py/pull/4900)]. See the [MapLibre Migration](https://plotly.com/python/mapbox-to-maplibre/) page for details on migrating from Mapbox to Maplibre.
- Update plotly.py to use base64 encoding of typed arrays e.g. numpy in plotly JSON to keep precision intact and improve performance [[#4470](https://github.com/plotly/plotly.py/pull/4470)].
- Make plotly-express dataframe agnostic via Narwhals [[#4790](https://github.com/plotly/plotly.py/pull/4790)].
- Update `go.FigureWidget` to use `anywidget` [[#4823](https://github.com/plotly/plotly.py/pull/4823)]
- Use modern [native ES6 import](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules) to load plotly.js bundle instead of requirejs which is [no longer under active development](https://github.com/requirejs/r.js/compare/2.3.6...2.3.7) [[#4736](https://github.com/plotly/plotly.py/pull/4763)]
- Update Plotly.js from version 2.34.2 to version 3.0.0-rc1 See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#300-rc1----2024-11-27) for more information. These changes are reflected in the auto-generated `plotly.graph_objects` module. Notable changes include:
- Make offsetgroup work with barmode "stacked" and "relative" for bar traces [[#7009](https://github.com/plotly/plotly.js/pull/7009)]
- Drop support for deprecated attributes `titlefont`, `titleposition`, `titleside`, and `titleoffset` [[#7212](https://github.com/plotly/plotly.js/pull/7212)].
- Drop deprecated pointcloud and heatmapgl traces and gl2d subplots [[#7213](https://github.com/plotly/plotly.js/pull/7213)]
- Drop support for deprecated `bardir` attribute (use `orientation` instead) [[#7214](https://github.com/plotly/plotly.js/pull/7214)]
- Drop support for deprecated `annotation.ref` attribute (use `annotation.xref` and `annotation.yref` instead) [[#7215](https://github.com/plotly/plotly.js/pull/7215)]
- Drop support for deprecated error bar `opacity` attribute (use alpha channel of error bar `color` attribute instead) [[#7214](https://github.com/plotly/plotly.js/pull/7216)]
- Drop support for deprecated attribute `gl3d.cameraposition` (use `gl3d.camera` instead) [[#7217](https://github.com/plotly/plotly.js/pull/7217)]
- Drop deprecated `plot3dPixelRatio` from config [[#7231](https://github.com/plotly/plotly.js/pull/7231)]
- Drop deprecated `zauto`, `zmin` and `zmax` from the surface trace [[#7234](https://github.com/plotly/plotly.js/pull/7234)]
- Drop deprecated `autotick` attributes from cartesian axes [[#7236](https://github.com/plotly/plotly.js/pull/7236)]
- Drop `transforms` from the API [[#7240](https://github.com/plotly/plotly.js/pull/7240), [#7254](https://github.com/plotly/plotly.js/pull/7254)]

### Fixed
- Fix a bug in JupyterLab >= 4 and Jupyter Notebook >= 7 that caused LaTeX to not render in plotly charts [[#4763](https://github.com/plotly/plotly.py/pull/4763)].
- Fix `go.FigureWidget.show` to return `FigureWidget` instead of displaying `Figure` [[#4869](https://github.com/plotly/plotly.py/pull/4869)]

## [5.24.1] - 2024-09-12

### Updated

- Updated Plotly.js from version 2.35.0 to version 2.35.2. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#2352----2024-09-10) for more information.
- Updated Plotly.js from version 2.35.0 to version 3.0.0-rc.0. See the [plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md#2352----2024-11-11) for more information.

## [5.24.0] - 2024-08-29

Expand Down
15 changes: 15 additions & 0 deletions CITATION.cff
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
cff-version: 1.2.0
message: "If you use this software, please cite it as below."
authors:
- family-names: "Kruchten"
given-names: "Nicolas"
orcid: https://orcid.org/0000-0002-8416-789X
- family-names: "Seier"
given-names: "Andrew"
- family-names: "Parmer"
given-names: "Chris"
title: "An interactive, open-source, and browser-based graphing library for Python"
version: 5.24.1
doi: 10.5281/zenodo.14503524
date-released: 2024-09-12
url: "https://github.com/plotly/plotly.py"
4 changes: 2 additions & 2 deletions LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)
MIT License

Copyright (c) 2016-2018 Plotly, Inc
Copyright (c) 2016-2024 Plotly Technologies Inc.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
79 changes: 10 additions & 69 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,9 @@
</a>
</div>


## Quickstart

`pip install plotly==5.24.1`

Inside [Jupyter](https://jupyter.org/install) (installable with `pip install "jupyterlab>=3" "ipywidgets>=7.6"`):
`pip install plotly==6.0.0rc0`

```python
import plotly.express as px
Expand All @@ -52,7 +49,6 @@ fig.show()

See the [Python documentation](https://plotly.com/python/) for more examples.


## Overview

[plotly.py](https://plotly.com/python/) is an interactive, open-source, and browser-based graphing library for Python :sparkles:
Expand All @@ -74,63 +70,37 @@ Built on top of [plotly.js](https://github.com/plotly/plotly.js), `plotly.py` is
- [Contributing to plotly](https://github.com/plotly/plotly.py/blob/master/contributing.md)
- [Changelog](https://github.com/plotly/plotly.py/blob/master/CHANGELOG.md)
- [Code of Conduct](https://github.com/plotly/plotly.py/blob/master/CODE_OF_CONDUCT.md)
- [Version 4 Migration Guide](https://plotly.com/python/v4-migration/)
- [New! Announcing Dash 1.0](https://medium.com/plotly/welcoming-dash-1-0-0-f3af4b84bae)
- [Community forum](https://community.plotly.com)

---

## Installation

plotly.py may be installed using pip...
plotly.py may be installed using pip

```
pip install plotly==5.24.1
pip install plotly==6.0.0rc0
```

or conda.

```
conda install -c plotly plotly=5.24.1
```

### JupyterLab Support

For use in [JupyterLab](https://jupyterlab.readthedocs.io/en/stable/), install the `jupyterlab` and `ipywidgets`
packages using `pip`:

```
pip install "jupyterlab>=3" "ipywidgets>=7.6"
```

or `conda`:

```
conda install "jupyterlab>=3" "ipywidgets>=7.6"
```

The instructions above apply to JupyterLab 3.x. **For JupyterLab 2 or earlier**, run the following commands to install the required JupyterLab extensions (note that this will require [`node`](https://nodejs.org/) to be installed):

```
# JupyterLab 2.x renderer support
jupyter labextension install jupyterlab-plotly@5.24.1 @jupyter-widgets/jupyterlab-manager
conda install -c plotly plotly=6.0.0rc0
```

Please check out our [Troubleshooting guide](https://plotly.com/python/troubleshooting/) if you run into any problems with JupyterLab.
### Jupyter Widget Support

### Jupyter Notebook Support

For use in the Jupyter Notebook, install the `notebook` and `ipywidgets`
For use as a Jupyter widget, install `jupyter` and `anywidget`
packages using `pip`:

```
pip install "notebook>=5.3" "ipywidgets>=7.5"
pip install jupyter anywidget
```

or `conda`:

```
conda install "notebook>=5.3" "ipywidgets>=7.5"
conda install jupyter anywidget
```

### Static Image Export
Expand All @@ -143,41 +113,18 @@ command line utility (legacy as of `plotly` version 4.9).
#### Kaleido

The [`kaleido`](https://github.com/plotly/Kaleido) package has no dependencies and can be installed
using pip...
using pip

```
pip install -U kaleido
```

or conda.
or conda

```
conda install -c conda-forge python-kaleido
```

#### Orca

While Kaleido is now the recommended image export approach because it is easier to install
and more widely compatible, [static image export](https://plotly.com/python/static-image-export/)
can also be supported
by the legacy [orca](https://github.com/plotly/orca) command line utility and the
[`psutil`](https://github.com/giampaolo/psutil) Python package.

These dependencies can both be installed using conda:

```
conda install -c plotly plotly-orca==1.3.1 psutil
```

Or, `psutil` can be installed using pip...

```
pip install psutil
```

and orca can be installed according to the instructions in the [orca README](https://github.com/plotly/orca).


### Extended Geo Support

Some plotly.py features rely on fairly large geographic shape files. The county
Expand All @@ -194,12 +141,6 @@ or conda
conda install -c plotly plotly-geo=1.0.0
```

## Migration

If you're migrating from plotly.py v3 to v4, please check out the [Version 4 migration guide](https://plotly.com/python/v4-migration/)

If you're migrating from plotly.py v2 to v3, please check out the [Version 3 migration guide](https://github.com/plotly/plotly.py/blob/master/migration-guide.md)

## Copyright and Licenses

Code and documentation copyright 2019 Plotly, Inc.
Expand Down
Loading

0 comments on commit 529c89d

Please sign in to comment.