Skip to content

Commit 44c7c43

Browse files
authored
Merge pull request #1 from plotly/updates-for-new-repo
Updates for new repo
2 parents 29addf0 + 3ff8317 commit 44c7c43

File tree

11 files changed

+108
-17
lines changed

11 files changed

+108
-17
lines changed

.github/workflows/config.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Run unit tests (Python 3.8)
2+
on: [ push ]
3+
4+
jobs:
5+
python_38_chart_studio:
6+
runs-on: ubuntu-latest
7+
8+
steps:
9+
- uses: actions/checkout@v4
10+
- name: Set up Python
11+
uses: actions/setup-python@v5
12+
with:
13+
python-version: '3.8'
14+
- name: Install dependencies
15+
run: |
16+
python -m venv venv
17+
. venv/bin/activate
18+
pip install --upgrade pip wheel
19+
pip install -r ./test_requirements/requirements_38.txt
20+
- name: Run unit tests
21+
run: |
22+
. venv/bin/activate
23+
pytest -x chart_studio/tests/
24+
timeout-minutes: 20
25+

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
__pycache__

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
The MIT License (MIT)
22

3-
Copyright (c) 2016-2019 Plotly, Inc
3+
Copyright (c) 2016-2025 Plotly, Inc
44

55
Permission is hereby granted, free of charge, to any person obtaining a copy
66
of this software and associated documentation files (the "Software"), to deal

README.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,8 @@
11
# chart-studio
2-
This package contains utilities for interfacing with Plotly's Chart Studio service (both Chart Studio cloud and Chart Studio On-Prem). Prior to plotly.py version 4, This functionality was included in the `plotly` package under the `plotly.plotly` module. As part of plotly.py version 4, the Chart Studio functionality was removed from the `plotly` package and released in this `chart-studio` package.
2+
The chart-studio Python package contains utilities for interfacing with Plotly's Chart Studio service (both Chart Studio cloud and Chart Studio On-Prem).
3+
4+
Prior to plotly.py version 4, these Chart Studio utilities were included in the `plotly` package under the `plotly.plotly` module. As part of plotly.py version 4, the Chart Studio functionality was removed from the `plotly` package and released in this `chart-studio` package.
5+
6+
This repository contains _only_ the chart-studio Python package; code for the Chart Studio service itself is located elsewhere.
7+
8+
_Note: chart-studio was previously housed in the [Plotly.py](https://github.com/plotly/plotly.py) repository [until early 2025](https://github.com/plotly/plotly.py/pull/4972). This repository retains the Git history for all chart-studio files, dating back to [mid-2019](https://github.com/plotly/plotly.py/pull/1604) when the Plotly.py directory structure was changed. If you want to follow the history of these files back further in time, start [here](https://github.com/plotly/plotly.py/commits/59e36cf850bdb2384ddaf40ac37ad79f691c610c/chart-studio-package/README.md?browsing_rename_history=true&new_path=packages/python/chart-studio/README.md&original_branch=master)._

chart_studio/tests/test_optional/test_matplotlylib/test_plot_mpl.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,10 @@ def test_update(self):
4444
ax.plot([1, 2, 3])
4545
title = "new title"
4646
update = {"layout": {"title": title}}
47-
url = py.plot_mpl(fig, update=update, filename="nosetests", auto_open=False)
47+
# Note: Changed filename from "nosetests" to "nosetests2" because the
48+
# previous filename was resulting in a recurring error --
49+
# `chart_studio.exceptions.PlotlyRequestError: Sorry, a file named 'nosetests_grid' already exists`
50+
url = py.plot_mpl(fig, update=update, filename="nosetests2", auto_open=False)
4851
un = url.replace("https://plotly.com/~", "").split("/")[0]
4952
fid = url.replace("https://plotly.com/~", "").split("/")[1]
5053
pfig = py.get_figure(un, fid)

chart_studio/tests/test_optional/test_utils/test_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
from datetime import datetime as dt
77
import numpy as np
88

9-
np_list = np.array([1, 2, 3, np.NaN, np.NAN, np.Inf, dt(2014, 1, 5)])
9+
np_list = np.array([1, 2, 3, np.nan, np.nan, np.inf, dt(2014, 1, 5)])
1010
numeric_list = [1, 2, 3]
1111
mixed_list = [
1212
1,

chart_studio/tests/test_plot_ly/test_get_figure/test_get_figure.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,4 +94,9 @@ def test_proper_escaping(self):
9494
ak = "786r5mecv0"
9595
url = "https://plotly.com/~PlotlyImageTest/13185/"
9696
py.sign_in(un, ak)
97-
py.get_figure(url)
97+
# Note: raw=True added because the specified chart contains
98+
# the property 'titlefont' which is no longer supported in
99+
# plotly.py 6.0.0, so an error is raised when trying to create
100+
# the chart object. raw=True just returns the raw JSON without
101+
# trying to create the chart object.
102+
py.get_figure(url, raw=True)

release.md

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
## Release process - `chart-studio` package
2+
3+
The `chart-studio` package contains the utilities for interacting with
4+
Chart Studio (both Cloud or On-Prem).
5+
6+
### Update version
7+
8+
Update the version of the `chart-studio` package in
9+
`setup.py`.
10+
11+
This version is not intended to match the version of plotly.py.
12+
13+
### Update CHANGELOG
14+
15+
Add a new entry to the CHANGELOG at `CHANGELOG.md` and commit the changes.
16+
17+
### Tag Release
18+
19+
Create a new tag for the release
20+
21+
```bash
22+
(plotly_dev) $ git checkout main
23+
(plotly_dev) $ git stash
24+
(plotly_dev) $ git pull origin main
25+
(plotly_dev) $ git tag vX.Y.Z
26+
(plotly_dev) $ git push origin vX.Y.Z
27+
```
28+
29+
### Publishing to PYPI
30+
31+
Publish the final version to PyPI
32+
33+
```bash
34+
(plotly_dev) $ python setup.py sdist bdist_wheel
35+
(plotly_dev) $ twine upload dist/chart_studio-X.Y.Z.tar.gz
36+
(plotly_dev) $ twine upload dist/chart_studio-X.Y.Z-py3-none-any.whl
37+
```
38+
39+
### Publish to plotly anaconda channel
40+
41+
From `packages/python/plotly-geo`, build the conda package
42+
```bash
43+
(plotly_dev) $ conda build recipe/
44+
```
45+
46+
Then upload to the plotly anaconda channel as described above.

setup.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def readme():
1616
maintainer="Jon Mease",
1717
maintainer_email="[email protected]",
1818
url="https://plot.ly/python/",
19-
project_urls={"Github": "https://github.com/plotly/plotly.py"},
19+
project_urls={"Github": "https://github.com/plotly/chart-studio"},
2020
description="Utilities for interfacing with plotly's Chart Studio",
2121
long_description=readme(),
2222
long_description_content_type="text/markdown",
@@ -28,6 +28,11 @@ def readme():
2828
"Programming Language :: Python :: 3.5",
2929
"Programming Language :: Python :: 3.6",
3030
"Programming Language :: Python :: 3.7",
31+
"Programming Language :: Python :: 3.8",
32+
"Programming Language :: Python :: 3.9",
33+
"Programming Language :: Python :: 3.10",
34+
"Programming Language :: Python :: 3.11",
35+
"Programming Language :: Python :: 3.12",
3136
"Topic :: Scientific/Engineering :: Visualization",
3237
],
3338
license="MIT",

test_requirements/requirements_37.txt

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)