Skip to content

Commit 3304cbd

Browse files
Merge pull request #2315 from plotly/chartstudio-ly-com
try to fix tests by changing plotly urls
2 parents def8d81 + 302f7d8 commit 3304cbd

File tree

14 files changed

+55
-55
lines changed

14 files changed

+55
-55
lines changed

packages/python/chart-studio/chart_studio/exceptions.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ def __str__(self):
3737
"column to Plotly before you can assign it to '{reference}'.\n"
3838
"To upload, try `plotly.plotly.grid_objs.upload` or "
3939
"`plotly.plotly.grid_objs.append_column`.\n"
40-
"Questions? chris@plot.ly"
40+
"Questions? chris@plotly.com"
4141
)
4242

4343
NON_UNIQUE_COLUMN_MESSAGE = (
@@ -65,7 +65,7 @@ def __init__(self):
6565
">>> import plotly.tools as tls\n"
6666
">>> tls.set_credentials_file(username='username', "
6767
"api_key='api-key')\n\n"
68-
"For more help, see https://plot.ly/python.\n"
68+
"For more help, see https://plotly.com/python.\n"
6969
)
7070
super(PlotlyLocalCredentialsError, self).__init__(message)
7171

packages/python/chart-studio/chart_studio/files.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
"stream_ids": [],
1919
},
2020
CONFIG_FILE: {
21-
"plotly_domain": "https://plot.ly",
22-
"plotly_streaming_domain": "stream.plot.ly",
23-
"plotly_api_domain": "https://api.plot.ly",
21+
"plotly_domain": "https://plotly.com",
22+
"plotly_streaming_domain": "stream.plotly.com",
23+
"plotly_api_domain": "https://api.plotly.com",
2424
"plotly_ssl_verification": True,
2525
"plotly_proxy_authorization": False,
2626
"world_readable": True,

packages/python/chart-studio/chart_studio/plotly/plotly.py

+14-14
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ def get_figure(file_owner_or_url, file_id=None, raw=False):
448448
pass a valid plotly url as the first argument.
449449
450450
Examples:
451-
fig = get_figure('https://plot.ly/~chris/1638')
451+
fig = get_figure('https://plotly.com/~chris/1638')
452452
fig = get_figure('chris', 1638)
453453
454454
Note, if you're using a file_owner string as the first argument, you MUST
@@ -574,7 +574,7 @@ class Stream:
574574
Every viewer of the graph sees the same data at the same time.
575575
576576
View examples and tutorials here:
577-
https://plot.ly/python/streaming/
577+
https://plotly.com/python/streaming/
578578
579579
Stream example:
580580
# Initialize a streaming graph
@@ -602,7 +602,7 @@ def __init__(self, stream_id):
602602
603603
For more help, see: `help(plotly.plotly.Stream)`
604604
or see examples and tutorials here:
605-
https://plot.ly/python/streaming/
605+
https://plotly.com/python/streaming/
606606
607607
"""
608608
self.stream_id = stream_id
@@ -664,7 +664,7 @@ def open(self):
664664
665665
For more help, see: `help(plotly.plotly.Stream)`
666666
or see examples and tutorials here:
667-
https://plot.ly/python/streaming/
667+
https://plotly.com/python/streaming/
668668
669669
"""
670670
streaming_specs = self.get_streaming_specs()
@@ -746,7 +746,7 @@ def close(self):
746746
747747
For more help, see: `help(plotly.plotly.Stream)`
748748
or see examples and tutorials here:
749-
https://plot.ly/python/streaming/
749+
https://plotly.com/python/streaming/
750750
751751
"""
752752
try:
@@ -771,7 +771,7 @@ def get(figure_or_data, format="png", width=None, height=None, scale=None):
771771
- figure_or_data: The figure dict-like or data list-like object that
772772
describes a plotly figure.
773773
Same argument used in `py.plot`, `py.iplot`,
774-
see https://plot.ly/python for examples
774+
see https://plotly.com/python for examples
775775
- format: 'png', 'svg', 'jpeg', 'pdf', 'emf'
776776
- width: output width
777777
- height: output height
@@ -798,7 +798,7 @@ def get(figure_or_data, format="png", width=None, height=None, scale=None):
798798
"package currently only supports png, svg, jpeg, and pdf. "
799799
"Learn more about image exporting, and the currently "
800800
"supported file types here: "
801-
"https://plot.ly/python/static-image-export/"
801+
"https://plotly.com/python/static-image-export/"
802802
)
803803
if scale is not None:
804804
try:
@@ -839,7 +839,7 @@ def ishow(cls, figure_or_data, format="png", width=None, height=None, scale=None
839839
- figure_or_data: The figure dict-like or data list-like object that
840840
describes a plotly figure.
841841
Same argument used in `py.plot`, `py.iplot`,
842-
see https://plot.ly/python for examples
842+
see https://plotly.com/python for examples
843843
- format: 'png', 'svg', 'jpeg', 'pdf'
844844
- width: output width
845845
- height: output height
@@ -883,7 +883,7 @@ def save_as(
883883
- figure_or_data: The figure dict-like or data list-like object that
884884
describes a plotly figure.
885885
Same argument used in `py.plot`, `py.iplot`,
886-
see https://plot.ly/python for examples
886+
see https://plotly.com/python for examples
887887
- filename: The filepath to save the image to
888888
- format: 'png', 'svg', 'jpeg', 'pdf', 'emf'
889889
- width: output width
@@ -1135,7 +1135,7 @@ def append_columns(cls, columns, grid=None, grid_url=None):
11351135
from plotly.grid_objs import Grid, Column
11361136
import plotly.plotly as py
11371137
1138-
grid_url = 'https://plot.ly/~chris/3143'
1138+
grid_url = 'https://plotly.com/~chris/3143'
11391139
column_1 = Column([1, 2, 3], 'time')
11401140
py.grid_ops.append_columns([column_1], grid_url=grid_url)
11411141
```
@@ -1204,7 +1204,7 @@ def append_rows(cls, rows, grid=None, grid_url=None):
12041204
from plotly.grid_objs import Grid
12051205
import plotly.plotly as py
12061206
1207-
grid_url = 'https://plot.ly/~chris/3143'
1207+
grid_url = 'https://plotly.com/~chris/3143'
12081208
12091209
row = [1, 5]
12101210
py.grid_ops.append_rows([row], grid=grid_url)
@@ -1276,7 +1276,7 @@ def delete(cls, grid=None, grid_url=None):
12761276
```
12771277
import plotly.plotly as py
12781278
1279-
grid_url = 'https://plot.ly/~chris/3'
1279+
grid_url = 'https://plotly.com/~chris/3'
12801280
py.grid_ops.delete(grid_url=grid_url)
12811281
```
12821282
@@ -1334,7 +1334,7 @@ def upload(cls, meta, grid=None, grid_url=None):
13341334
```
13351335
import plotly.plotly as py
13361336
1337-
grid_url = 'https://plot.ly/~chris/3143'
1337+
grid_url = 'https://plotly.com/~chris/3143'
13381338
13391339
meta = {'experment': 'GaAs'}
13401340
@@ -1371,7 +1371,7 @@ def parse_grid_id_args(grid, grid_url):
13711371
"grid: a plotly.graph_objs.Grid object that has already\n"
13721372
" been uploaded to Plotly.\n\n"
13731373
"grid_url: the url where the grid can be accessed on\n"
1374-
" Plotly, e.g. 'https://plot.ly/~chris/3043'\n\n"
1374+
" Plotly, e.g. 'https://plotly.com/~chris/3043'\n\n"
13751375
)
13761376
elif len(supplied_arg_names) > 1:
13771377
raise exceptions.InputError(

packages/python/chart-studio/chart_studio/presentation_objs/presentation_objs.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -939,7 +939,7 @@ class Presentation(dict):
939939
Default = True.
940940
941941
For examples see the documentation:\n
942-
https://plot.ly/python/presentations-api/
942+
https://plotly.com/python/presentations-api/
943943
"""
944944

945945
def __init__(self, markdown_string=None, style="moods", imgStretch=True):

packages/python/chart-studio/chart_studio/tests/test_core/test_tools/test_file_tools.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ def test_reset_config_file(self):
8080

8181
tools.reset_config_file()
8282
config = tools.get_config_file()
83-
self.assertEqual(config["plotly_domain"], "https://plot.ly")
84-
self.assertEqual(config["plotly_streaming_domain"], "stream.plot.ly")
83+
self.assertEqual(config["plotly_domain"], "https://plotly.com")
84+
self.assertEqual(config["plotly_streaming_domain"], "stream.plotly.com")
8585

8686
def test_get_credentials_file(self):
8787

packages/python/chart-studio/chart_studio/tests/test_core/test_tools/test_get_embed.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@
99

1010

1111
def test_get_valid_embed():
12-
url = "https://plot.ly/~PlotBot/82/"
12+
url = "https://plotly.com/~PlotBot/82/"
1313
tls.get_embed(url)
1414

1515

1616
def test_get_invalid_embed():
17-
url = "https://plot.ly/~PlotBot/a/"
17+
url = "https://plotly.com/~PlotBot/a/"
1818
with pytest.raises(PlotlyError):
1919
tls.get_embed(url)
2020

@@ -25,7 +25,7 @@ def test_get_embed_url_with_share_key(self):
2525
# Check the embed url for url with share_key included
2626

2727
get_embed_return = tls.get_embed(
28-
"https://plot.ly/~neda/6572" + "?share_key=AH4MyPlyDyDWYA2cM2kj2m"
28+
"https://plotly.com/~neda/6572" + "?share_key=AH4MyPlyDyDWYA2cM2kj2m"
2929
)
3030
expected_get_embed = (
3131
'<iframe id="igraph" scrolling="no" '
@@ -37,7 +37,7 @@ def test_get_embed_url_with_share_key(self):
3737
'width="{iframe_width}">'
3838
"</iframe>"
3939
).format(
40-
plotly_rest_url="https://" + "plot.ly",
40+
plotly_rest_url="https://" + "plotly.com",
4141
file_owner="neda",
4242
file_id="6572",
4343
share_key="AH4MyPlyDyDWYA2" + "cM2kj2m",

packages/python/chart-studio/chart_studio/tests/test_optional/test_matplotlylib/test_plot_mpl.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
@pytest.mark.matplotlib
2424
class PlotMPLTest(TestCase):
2525
def setUp(self):
26-
py.sign_in("PlotlyImageTest", "786r5mecv0", plotly_domain="https://plot.ly")
26+
py.sign_in("PlotlyImageTest", "786r5mecv0", plotly_domain="https://plotly.com")
2727

2828
def test_update_type_error(self):
2929
fig, ax = plt.subplots()
@@ -45,7 +45,7 @@ def test_update(self):
4545
title = "new title"
4646
update = {"layout": {"title": title}}
4747
url = py.plot_mpl(fig, update=update, filename="nosetests", auto_open=False)
48-
un = url.replace("https://plot.ly/~", "").split("/")[0]
49-
fid = url.replace("https://plot.ly/~", "").split("/")[1]
48+
un = url.replace("https://plotly.com/~", "").split("/")[0]
49+
fid = url.replace("https://plotly.com/~", "").split("/")[1]
5050
pfig = py.get_figure(un, fid)
5151
assert pfig["layout"]["title"]["text"] == title

packages/python/chart-studio/chart_studio/tests/test_plot_ly/test_get_figure/test_get_figure.py

+6-6
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,22 @@ def test_get_figure(self):
4747
def test_get_figure_with_url(self):
4848
un = "PlotlyImageTest"
4949
ak = "786r5mecv0"
50-
url = "https://plot.ly/~PlotlyImageTest/13183/"
50+
url = "https://plotly.com/~PlotlyImageTest/13183/"
5151
py.sign_in(un, ak)
5252
py.get_figure(url)
5353

5454
def test_get_figure_invalid_1(self):
5555
un = "PlotlyImageTest"
5656
ak = "786r5mecv0"
57-
url = "https://plot.ly/~PlotlyImageTest/a/"
57+
url = "https://plotly.com/~PlotlyImageTest/a/"
5858
py.sign_in(un, ak)
5959
with self.assertRaises(exceptions.PlotlyError):
6060
py.get_figure(url)
6161

6262
def test_get_figure_invalid_2(self):
6363
un = "PlotlyImageTest"
6464
ak = "786r5mecv0"
65-
url = "https://plot.ly/~PlotlyImageTest/-1/"
65+
url = "https://plotly.com/~PlotlyImageTest/-1/"
6666
py.sign_in(un, ak)
6767
with self.assertRaises(exceptions.PlotlyError):
6868
py.get_figure(url)
@@ -71,15 +71,15 @@ def test_get_figure_invalid_2(self):
7171
def test_get_figure_invalid_3(self):
7272
un = "PlotlyImageTest"
7373
ak = "786r5mecv0"
74-
url = "https://plot.ly/~PlotlyImageTest/2/"
74+
url = "https://plotly.com/~PlotlyImageTest/2/"
7575
py.sign_in(un, ak)
7676
with self.assertRaises(ValueError):
7777
py.get_figure(url)
7878

7979
def test_get_figure_does_not_exist(self):
8080
un = "PlotlyImageTest"
8181
ak = "786r5mecv0"
82-
url = "https://plot.ly/~PlotlyImageTest/1000000000/"
82+
url = "https://plotly.com/~PlotlyImageTest/1000000000/"
8383
py.sign_in(un, ak)
8484
with self.assertRaises(_plotly_utils.exceptions.PlotlyError):
8585
py.get_figure(url)
@@ -97,6 +97,6 @@ class TestBytesVStrings(PlotlyTestCase):
9797
def test_proper_escaping(self):
9898
un = "PlotlyImageTest"
9999
ak = "786r5mecv0"
100-
url = "https://plot.ly/~PlotlyImageTest/13185/"
100+
url = "https://plotly.com/~PlotlyImageTest/13185/"
101101
py.sign_in(un, ak)
102102
py.get_figure(url)

packages/python/chart-studio/chart_studio/tests/test_plot_ly/test_get_requests/test_get_requests.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"plotly-platform": "pythonz",
2121
}
2222

23-
server = "https://plot.ly"
23+
server = "https://plotly.com"
2424

2525

2626
class GetRequestsTest(PlotlyTestCase):

packages/python/chart-studio/chart_studio/tests/test_plot_ly/test_grid/test_grid.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class GridTest(PlotlyTestCase):
3434
_grid_id = "chris:3043"
3535
_grid = Grid([])
3636
_grid.id = _grid_id
37-
_grid_url = "https://plot.ly/~chris/3043/my-grid"
37+
_grid_url = "https://plotly.com/~chris/3043/my-grid"
3838

3939
def setUp(self):
4040
super(GridTest, self).setUp()

packages/python/chart-studio/chart_studio/tests/test_plot_ly/test_meta/test_meta.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,6 @@ def test_upload_meta_with_grid(self):
5454
+ "https://github.com/plotly/python-api/issues/263"
5555
)
5656
def test_metadata_to_nonexistent_grid(self):
57-
non_exist_meta_url = "https://local.plot.ly/~GridTest/999999999"
57+
non_exist_meta_url = "https://local.plotly.com/~GridTest/999999999"
5858
with self.assertRaises(PlotlyRequestError):
5959
py.meta_ops.upload(self._meta, grid_url=non_exist_meta_url)

packages/python/chart-studio/chart_studio/tests/test_plot_ly/test_spectacle_presentation/test_spectacle_presentation.py

+9-9
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ def test_invalid_code_language(self):
6161
)
6262

6363
def test_expected_pres(self):
64-
markdown_string = "# title\n---\ntransition: zoom, fade, fade\n# Colors\nColors are everywhere around us.\nPlotly(https://plot.ly/~AdamKulidjian/3564/)\nImage(https://raw.githubusercontent.com/jackparmer/gradient-backgrounds/master/moods1.png)\n```python\nx=1\n```\n---\nPlotly(https://plot.ly/~AdamKulidjian/3564/)\nPlotly(https://plot.ly/~AdamKulidjian/3564/)\nPlotly(https://plot.ly/~AdamKulidjian/3564/)\nPlotly(https://plot.ly/~AdamKulidjian/3564/)\nPlotly(https://plot.ly/~AdamKulidjian/3564/)\nPlotly(https://plot.ly/~AdamKulidjian/3564/)\nPlotly(https://plot.ly/~AdamKulidjian/3564/)\n---\n"
64+
markdown_string = "# title\n---\ntransition: zoom, fade, fade\n# Colors\nColors are everywhere around us.\nPlotly(https://plotly.com/~AdamKulidjian/3564/)\nImage(https://raw.githubusercontent.com/jackparmer/gradient-backgrounds/master/moods1.png)\n```python\nx=1\n```\n---\nPlotly(https://plotly.com/~AdamKulidjian/3564/)\nPlotly(https://plotly.com/~AdamKulidjian/3564/)\nPlotly(https://plotly.com/~AdamKulidjian/3564/)\nPlotly(https://plotly.com/~AdamKulidjian/3564/)\nPlotly(https://plotly.com/~AdamKulidjian/3564/)\nPlotly(https://plotly.com/~AdamKulidjian/3564/)\nPlotly(https://plotly.com/~AdamKulidjian/3564/)\n---\n"
6565

6666
my_pres = pres.Presentation(markdown_string, style="moods", imgStretch=True)
6767

@@ -255,7 +255,7 @@ def test_expected_pres(self):
255255
"props": {
256256
"frameBorder": 0,
257257
"scrolling": "no",
258-
"src": "https://plot.ly/~AdamKulidjian/3564/.embed?link=false",
258+
"src": "https://plotly.com/~AdamKulidjian/3564/.embed?link=false",
259259
"style": {
260260
"height": 280.0,
261261
"left": 0.0,
@@ -322,7 +322,7 @@ def test_expected_pres(self):
322322
"props": {
323323
"frameBorder": 0,
324324
"scrolling": "no",
325-
"src": "https://plot.ly/~AdamKulidjian/3564/.embed?link=false",
325+
"src": "https://plotly.com/~AdamKulidjian/3564/.embed?link=false",
326326
"style": {
327327
"height": 96.57142857142857,
328328
"left": 400.0,
@@ -339,7 +339,7 @@ def test_expected_pres(self):
339339
"props": {
340340
"frameBorder": 0,
341341
"scrolling": "no",
342-
"src": "https://plot.ly/~AdamKulidjian/3564/.embed?link=false",
342+
"src": "https://plotly.com/~AdamKulidjian/3564/.embed?link=false",
343343
"style": {
344344
"height": 96.57142857142857,
345345
"left": 400.0,
@@ -356,7 +356,7 @@ def test_expected_pres(self):
356356
"props": {
357357
"frameBorder": 0,
358358
"scrolling": "no",
359-
"src": "https://plot.ly/~AdamKulidjian/3564/.embed?link=false",
359+
"src": "https://plotly.com/~AdamKulidjian/3564/.embed?link=false",
360360
"style": {
361361
"height": 96.57142857142857,
362362
"left": 400.0,
@@ -373,7 +373,7 @@ def test_expected_pres(self):
373373
"props": {
374374
"frameBorder": 0,
375375
"scrolling": "no",
376-
"src": "https://plot.ly/~AdamKulidjian/3564/.embed?link=false",
376+
"src": "https://plotly.com/~AdamKulidjian/3564/.embed?link=false",
377377
"style": {
378378
"height": 96.57142857142857,
379379
"left": 400.0,
@@ -390,7 +390,7 @@ def test_expected_pres(self):
390390
"props": {
391391
"frameBorder": 0,
392392
"scrolling": "no",
393-
"src": "https://plot.ly/~AdamKulidjian/3564/.embed?link=false",
393+
"src": "https://plotly.com/~AdamKulidjian/3564/.embed?link=false",
394394
"style": {
395395
"height": 96.57142857142857,
396396
"left": 400.0,
@@ -407,7 +407,7 @@ def test_expected_pres(self):
407407
"props": {
408408
"frameBorder": 0,
409409
"scrolling": "no",
410-
"src": "https://plot.ly/~AdamKulidjian/3564/.embed?link=false",
410+
"src": "https://plotly.com/~AdamKulidjian/3564/.embed?link=false",
411411
"style": {
412412
"height": 96.57142857142857,
413413
"left": 400.0,
@@ -424,7 +424,7 @@ def test_expected_pres(self):
424424
"props": {
425425
"frameBorder": 0,
426426
"scrolling": "no",
427-
"src": "https://plot.ly/~AdamKulidjian/3564/.embed?link=false",
427+
"src": "https://plotly.com/~AdamKulidjian/3564/.embed?link=false",
428428
"style": {
429429
"height": 96.57142857142857,
430430
"left": 400.0,

0 commit comments

Comments
 (0)