Skip to content

Commit 963ac84

Browse files
authored
Merge branch 'master' into facet_grid
2 parents 7b5e6ec + 077fc40 commit 963ac84

File tree

17 files changed

+343
-145
lines changed

17 files changed

+343
-145
lines changed

CHANGELOG.md

Lines changed: 22 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,32 @@
22
All notable changes to this project will be documented in this file.
33
This project adheres to [Semantic Versioning](http://semver.org/).
44

5-
## [2.0.7] - [Unreleased]
5+
## [Unreleased]
6+
### Added
7+
- 'sort' parameter to `FF.create_violin` to control whether violin plots are sorted alphabetically.
8+
9+
## [2.0.8] - 2017-04-21
10+
### Added
11+
- Beta: Added API methods that wrap the API endpoint for managing Dash objects on plot.ly. The API interface is under `plotly.api.v2.dash_apps`
12+
- offline embedded plots are now responsive to window resizing when `output_type == "div"` is set in `plotly.offline.iplot()`.
13+
- Offline embedded plots are now responsive to window resizing when `output_type == "div"` is set in `plotly.offline.iplot()`.
14+
- Offline animations are now supported on Plotly Cloud.
15+
16+
### Updated
17+
- Updated `plotly.min.js` to version 1.26.0 for `plotly.offline`.
18+
- See [the plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md) for additional information regarding the updates.
19+
20+
### Updated
21+
- `plotly.offline.plot` and `plotly.offline.iplot` now accept various [configuration options](https://plot.ly/javascript/configuration-options/) for their arguments.
22+
23+
## [2.0.7] - 2017-04-07
624
### Updated
725
- Updated `plotly.min.js` to version 1.25.0 for `plotly.offline`.
826
- See [the plotly.js CHANGELOG](https://github.com/plotly/plotly.js/blob/master/CHANGELOG.md) for additional information regarding the updates.
927

28+
### Added
29+
- Added check to verify the share key is enabled when secret charts are created.
30+
1031
## [2.0.6] - 2017-03-20
1132
### Added
1233
- Added a new mimetype 'text/vnd.plotly.v1+html' for `iplot` outputs.
@@ -37,8 +58,6 @@ Note: This release's installation was broken. It has been removed from PyPI
3758
See [https://github.com/nteract/nteract/pull/662](https://github.com/nteract/nteract/pull/662)
3859
for the associated PR in nteract.
3960
- As part of the above, plotly output now prints with a [custom mimetype](https://github.com/plotly/plotly.py/blob/f65724f06b894a5db94245ee4889c632b887d8ce/plotly/offline/offline.py#L348) - `application/vnd.plotly.v1+json`
40-
41-
### Added
4261
- `memoize` decorator added to `plotly.utils`
4362

4463
### Changed

CODE_OF_CONDUCT.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [email protected]. All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at [http://contributor-covenant.org/version/1/4][version]
72+
73+
[homepage]: http://contributor-covenant.org
74+
[version]: http://contributor-covenant.org/version/1/4/

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 Plotly, Inc
3+
Copyright (c) 2016-2017 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: 16 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,27 @@
1-
## plotly.py
2-
##### an interactive, browser-based charting library for python
1+
# plotly.py
2+
3+
> An interactive, browser-based graphing library for Python :sparkles:
34
45
Plotly for Python is now entirely open source, free, and self-hosted.
56

67
[![](https://plot.ly/~chriddyp/1825/.png)](https://plot.ly/~chriddyp/1825.embed)
78

89
[![](https://plot.ly/~chriddyp/1780/.png)](https://plot.ly/~chriddyp/1780.embed)
910

10-
### [Documentation](https://plot.ly/python)
11+
## [Documentation](https://plot.ly/python)
12+
13+
Take a look at [the website docs](https://plot.ly/python).
14+
15+
Or, check out the [README.rst](README.rst) for more.
1116

12-
### Contributing
17+
## Contribute
1318

1419
Heck yeah! We've got suggestions! We've got guides!
1520

16-
Checkout [`contributing.md`](https://github.com/plotly/python-api/blob/master/contributing.md).
21+
Check out [`contributing.md`](https://github.com/plotly/python-api/blob/master/contributing.md).
22+
23+
Also, all interactions with Plotly are governed by the [Code of Conduct](CODE_OF_CONDUCT.md). Just saying.
24+
25+
## License
26+
27+
[MIT](LICENSE.txt) © 2016-2017 Plotly, Inc.

README.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ plotly figures, with a one-liner::
7474

7575
py.plot_mpl(fig)
7676

77-
Checkout the `Plotly and mpld3`_ IPython notebook for more infomataion.
77+
Checkout the `Plotly and mpld3`_ IPython notebook for more information.
7878

7979
Introduction to working with out API
8080
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

contributing.md

Lines changed: 31 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,18 @@
1+
# Contributing
2+
13
The bottom line. Follow your Nose, or our Nose. Write-run-love tests :fist:.
24

3-
##Setup
5+
## Code of Conduct
6+
7+
Check out the [Code of Conduct](CODE_OF_CONDUCT.md). Don't tl:dr; it, but the general idea is to be nice.
8+
9+
## Got Questions?
10+
11+
Open an issue! Go to https://github.com/plotly/plotly.py/issues. It's possible that your issue was already addressed. If it wasn't, open it. We also accept PRs; take a look at the steps below for instructions on how to do this.
12+
13+
## Setup
414

5-
###Fork, Clone, Setup Your Version of the Plotly Python API
15+
### Fork, Clone, Setup Your Version of the Plotly Python API
616

717
First, you'll need to *get* our project. This is the appropriate *clone* command (if you're unfamiliar with this process, https://help.github.com/articles/fork-a-repo):
818

@@ -12,7 +22,7 @@ First, you'll need to *get* our project. This is the appropriate *clone* command
1222
git clone https://github.com/plotly/python-api.git
1323
```
1424

15-
###Submodules
25+
### Submodules
1626

1727
Second, this project uses git submodules! They're both helpful and, at times, difficult to work with. The good news is you probably don't need to think about them! Just run the following shell command to make sure that your local repo is wired properly:
1828

@@ -35,7 +45,7 @@ Additionally, there are some project shortcuts that live in the `makefile` file.
3545
make readme
3646
```
3747

38-
###Making a Development Branch
48+
### Making a Development Branch
3949

4050
Third, *don't* work in the `master` branch. As soon as you get your master branch ready, run:
4151

@@ -46,22 +56,22 @@ git checkout -b my-dev-branch
4656

4757
... where you should give your branch a more descriptive name than `my-dev-branch`
4858

49-
###Pull Request When Ready
59+
### Pull Request When Ready
5060

5161
Once you've made your changes (and hopefully written some tests...), make that pull request!
5262

53-
##Suggestions
63+
## Suggestions
5464

55-
###Local Python
56-
Setting up Python versions that *don't* require you to use `sudo` is a good idea. In addition, the core Python on your machine may not be the Python that we've developed in! Here are some nice guides for Mac, Windows, and Linux:
65+
### Local Python
66+
Setting up Python versions that *don't* require you to use `sudo` is a good idea. In addition, the core Python on your machine may not be the Python that we've developed in! Here are some nice guides for Mac, Windows, and Linux:
5767
- http://docs.python-guide.org/en/latest/starting/install/osx/
5868
- http://docs.python-guide.org/en/latest/starting/install/win/
5969
- http://docs.python-guide.org/en/latest/starting/install/linux/
6070

61-
###Virtualenv
71+
### Virtualenv
6272
Virtualenv is a way to create Python environments on your machine that know nothing about one another. This is really helpful for ironing out dependency-problems arising from different versions of packages. Here's a nice guide on how to do this: http://docs.python-guide.org/en/latest/dev/virtualenvs/
6373

64-
###Alter Your PYTHONPATH
74+
### Alter Your PYTHONPATH
6575
The PYTHONPATH variable in your shell tells Python where to look for modules. Since you'll be developing, it'll be a pain to need to *install* Python every time you need to test some functionality (or at least ensure you're running code from the right directory...). You can easily make this change from a shell:
6676

6777
```bash
@@ -70,7 +80,7 @@ export PYTHONPATH="/path/to/local/repo:$PYTHONPATH"
7080

7181
Note, that's non-permanent. When you close the shell, that variable definition disappears. Also, `path/to/local/repo` is *your* specific repository path (e.g., `/Users/andrew/projects/python-api`).
7282

73-
###Why?
83+
### Why?
7484

7585
Now you can run the following code and be guaranteed to have a working development version that you can make changes to on-the-fly, test, and be confident will not break on other's machines!
7686

@@ -80,11 +90,11 @@ pip install -r optional-requirements.txt
8090
export PYTHONPATH="/path/to/local/repo:$PYTHONPATH"
8191
```
8292

83-
##Dependencies
93+
## Dependencies
8494

85-
There's a short list of core dependencies you'll need installed in your Python environment to have any sort of fun with Plotly's Python API (see `requirements.txt`). Additionally, you're likely to have even more fun if you install some other requirements (see `optional-requirements.txt`).
95+
There's a short list of core dependencies you'll need installed in your Python environment to have any sort of fun with Plotly's Python API (see `requirements.txt`). Additionally, you're likely to have even more fun if you install some other requirements (see `optional-requirements.txt`).
8696

87-
###Dependencies and Virtualenv
97+
### Dependencies and Virtualenv
8898

8999
If you decided to follow the suggestion about about the Virtualenv *and* you've run `source bin/activate` within your new virtualenv directory to activate it--you can run the following to install the core dependencies:
90100

@@ -98,14 +108,14 @@ To install the optional dependencies:
98108
pip install -r optional-requirements.txt
99109
```
100110

101-
##Testing
111+
## Testing
102112

103113
We take advantage of two tools to run tests:
104114

105115
* [`tox`](https://tox.readthedocs.io/en/latest/), which is both a virtualenv management and test tool.
106116
* [`nose`](https://nose.readthedocs.org/en/latest/), which is is an extension of Python's unittest
107117

108-
###Running Tests with `nose`
118+
### Running Tests with `nose`
109119

110120
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.
111121

@@ -133,7 +143,7 @@ nosetests -w plotly/tests/test_plotly
133143
nosetests plotly/tests/test_plotly/test_plot.py
134144
```
135145

136-
###Running tests with `tox`
146+
### Running tests with `tox`
137147

138148
Running tests with tox is much more powerful, but requires a bit more setup.
139149

@@ -174,29 +184,28 @@ Note that anything after `--` is substituted in for `{posargs}` in the tox.ini.
174184
tox -- -a '!slow','!matplotlib'
175185
```
176186

177-
###Writing Tests
187+
### Writing Tests
178188

179-
You're *strongly* encouraged to write tests that check your added functionality.
189+
You're *strongly* encouraged to write tests that check your added functionality.
180190

181191
When you write a new test anywhere under the `tests` directory, if your PR gets accepted, that test will run in a virtual machine to ensure that future changes don't break your contributions!
182192

183193
#### Publishing to Pip
184194

185195
You'll need the credentials file `~/.pypirc`. Request access from @theengineear and @chriddyp. Then, from inside the repository:
186196

187-
```
197+
```bash
188198
(plotly.py) $ git checkout master
189199
(plotly.py) $ git stash
190200
(plotly.py) $ git pull origin master
191201
(plotly.py) $ python setup.py sdist upload # upload to pip
192202
```
193203

194204
After it has uploaded, move to another directly and double+triple check that you are able to upgrade ok:
195-
```
205+
```bash
196206
$ pip install plotly --upgrade
197207
```
198208

199209
And ask one of your friends to do it too. Our tests should catch any issues, but you never know.
200210

201-
202211
<3 Team Plotly

plotly/api/v2/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
from __future__ import absolute_import
22

3-
from plotly.api.v2 import (dashboards, files, folders, grids, images, plot_schema,
4-
plots, users)
3+
from plotly.api.v2 import (dash_apps, dashboards, files, folders, grids,
4+
images, plot_schema, plots, users)

plotly/api/v2/dash_apps.py

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
"""
2+
Beta interface to Plotly's /v2/dash-apps endpoints.
3+
"""
4+
from __future__ import absolute_import
5+
6+
from plotly.api.v2.utils import build_url, request
7+
8+
RESOURCE = 'dash-apps'
9+
10+
11+
def create(body):
12+
"""Create a dash app item."""
13+
url = build_url(RESOURCE)
14+
return request('post', url, json=body)
15+
16+
17+
def retrieve(fid):
18+
"""Retrieve a dash app from Plotly."""
19+
url = build_url(RESOURCE, id=fid)
20+
return request('get', url)
21+
22+
23+
def update(fid, content):
24+
"""Completely update the writable."""
25+
url = build_url(RESOURCE, id=fid)
26+
return request('put', url, json=content)

plotly/exceptions.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ def __init__(self, obj, path, notes=()):
122122
format_dict = {'index': path[-1], 'object_name': obj._name}
123123
message = ("Invalid entry found in '{object_name}' at index, '{index}'"
124124
.format(**format_dict))
125-
note = "It's invalid because it does't contain a valid 'type' value."
125+
note = "It's invalid because it doesn't contain a valid 'type' value."
126126
notes = [note] + list(notes)
127127
super(PlotlyDataTypeError, self).__init__(
128128
message=message, path=path, notes=notes

0 commit comments

Comments
 (0)