Skip to content

Commit fc3e97a

Browse files
committed
update mentions of ipython notebooks to jupyter
1 parent 033cf7f commit fc3e97a

File tree

1 file changed

+42
-43
lines changed

1 file changed

+42
-43
lines changed

_posts/python/README.md

Lines changed: 42 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,30 @@
11
# Contribute to Plotly's [Python Documentation](https://plot.ly/python/)
2-
## Initial Steps:
3-
1. Clone the repo and then check out the source-design-merge branch:
2+
## Initial Steps
3+
1. Clone the repo and then check out the `source-design-merge` branch:
44

55
```
66
$ git clone git@github.com:plotly/documentation.git
77
$ git fetch origin
88
$ git checkout source-design-merge
99
```
1010

11-
2. Check Ruby version `$ ruby --version`. We recommend using `version 2.3.3` or the same ruby version as gh-pages: https://pages.github.com/versions/. Note [RVM](https://rvm.io/rvm/install) is helpful for installing and managing ruby versions.
11+
2. Check your ruby version with `$ ruby --version`. We recommend using `version 2.3.3` or the same ruby version as GitHub Pages: https://pages.github.com/versions/. Note that [RVM](https://rvm.io/rvm/install) is helpful for installing and managing ruby versions.
1212

13-
3. Install bundler and a couple dependencies from the gemfile:
13+
3. Install bundler and a couple of dependencies from the Gemfile:
1414

1515
```
1616
$ gem install bundler
1717
$ bundle install
1818
1919
```
20-
<b>IMPORTANT</b> -If not using bundler and the gemfile, [install the same jekyll version that GitHub Pages is using](https://pages.github.com/versions/).
20+
<b>IMPORTANT</b> If not using bundler and the Gemfile, install the same jekyll version [as used by GitHub Pages](https://pages.github.com/versions/).
2121

22-
## Create Python Documentation:
23-
Our python tutorials are written in [ipython notebooks](http://ipython.org/notebook.html) (.ipynb file)
24-
##### In `documentation/_posts/python`
22+
## Create Python Documentation
23+
Our python tutorials are written as [jupyter notebooks](https://jupyter.readthedocs.io/en/latest/running.html) (`.ipynb` files).
24+
##### In `documentation/_posts/python/`
2525
1. Create a folder titled with the chart type or topic you're adding to the documentation (i.e. `table`)
26-
2. `cd` into the folder you created and run `ipython notebook`
27-
- From the <b>New</b> dropdown create a new notebook and title it based on the type of chart you're adding to the documentation.
26+
2. `cd` into the folder you created and run `jupyter notebook`
27+
- Using the <b>New</b> dropdown, create a new notebook and title it based on the type of chart you're adding to the documentation.
2828
3. Base your tutorial structure off of one of our existing tutorials (i.e. `documentation/_posts/python/table/table.ipynb`)
2929
4. The first cell should be a markdown cell with the following text:
3030

@@ -35,7 +35,7 @@ Our python tutorials are written in [ipython notebooks](http://ipython.org/noteb
3535
<br>We also have a quick-reference [cheatsheet](https://images.plot.ly/plotly-documentation/images/python_cheat_sheet.pdf) (new!) to help you get started!
3636
```
3737
38-
5. **IF** you're adding a doc about a new feature, the second and third cells will display a version check. This is to ensure the reader has updated to the necessary version. This is especially applicable to FigureFactory docs. You can refer to the python api [CHANGELOG](https://github.com/plotly/plotly.py/blob/master/CHANGELOG.md) to check the appropriate version #. Example of a version check:
38+
5. **If** you're adding a doc about a new feature, the second and third cells should display a version check. This is to ensure the reader has updated to the necessary version. This is especially applicable to FigureFactory docs. You can refer to the python API [CHANGELOG](https://github.com/plotly/plotly.py/blob/master/CHANGELOG.md) to check the appropriate version. Example of a version check:
3939
- markdown cell:
4040
```
4141
#### Version Check
@@ -49,10 +49,10 @@ Our python tutorials are written in [ipython notebooks](http://ipython.org/noteb
4949
```
5050
5151
6. Best Practices:
52-
- <b>Now we have an awesome navigation bar on the left side of our tutorial pages.</b> The navigation bar displays the headers you add to your notebook so add a header for each example and try to make headers as informative and concise as possible. Furthermore, capitalize all headers (except for `code`). Ex: `#### Basic Line Chart`
53-
- Order examples from basic -> advanced.
52+
- <b>Now we have an awesome navigation bar on the left side of our tutorial pages.</b> The navigation bar displays the headers you add to your notebook, so add a header for each example and make headers as informative and concise as possible. Furthermore, capitalize all headers (except for `code`), e.g. `#### Basic Line Chart`.
53+
- Order examples from basic to advanced.
5454
- Run examples with user: `PythonPlotBot`
55-
- Keep import order consistent and import plotly packages first, then a space, then additional packages. For example:
55+
- Keep import order consistent and import plotly packages first, then skip a line, and import additional packages. For example:
5656
5757
```
5858
import plotly.plotly as py
@@ -62,24 +62,23 @@ Our python tutorials are written in [ipython notebooks](http://ipython.org/noteb
6262
import numpy as np
6363
```
6464
65-
- Try and write all of the code for a given example in a *single* ipython notebook cell. This makes it easier for users to use the `copy to clipboard` button that appears on the codeblocks and easily/quickly reproduce each example.
66-
- If you're using "real" data, upload the datafile to https://github.com/plotly/datasets then import data rather than pasting a large chunk of data in the tutorial. (Using random data is okay for some examples too :) )
65+
- Try and write all of the code for a given example in a *single* jupyter notebook cell. This makes it easier for users to use the `copy to clipboard` button that appears on the codeblocks and easily/quickly reproduce each example.
66+
- If you're using "real" data, upload the datafile to https://github.com/plotly/datasets then import it rather than pasting a large chunk of data in the tutorial. Using random data is okay for some examples too :)
6767
68-
7. The last content cell of your notebook should be a markdown cell with:
68+
7. The last cell of your notebook should be a markdown cell containing:
6969
7070
```
7171
#### Reference
7272
See https://plot.ly/python/reference/##heatmap for more information and chart attribute options!
7373
```
7474
7575
where `https://plot.ly/python/reference/##heatmap` is replaced with the pertinent link(s) to our python [reference
76-
page](https://plot.ly/python/reference/)!
76+
page](https://plot.ly/python/reference/)
77+
and/or a help call:
78+
`help(FF.create_table)` (the latter applies to documentation on FigureFactory functions).
7779
78-
and/or provide a help call:
79-
`help(FF.create_table)` (*This applies to documentation on FigureFactory functions)
80-
81-
8. Convert your .ipynb to a .html file by adding the following code snippet as the last cell of your notebook.
82-
- Replace `your-tutorial-chart` with the type of chart you're creating in the tutorial.)
80+
8. Convert your .ipynb file to an .html file by adding the following code snippet as the last cell of your notebook (publisher cell):
81+
- Replace `your-tutorial-chart` with the type of chart you're creating in the tutorial;
8382
- Please be diligent about adding this information completely and in the order as it appears here (this is really helpful if future edits are necessary :D )
8483
8584
```
@@ -98,40 +97,40 @@ Our python tutorials are written in [ipython notebooks](http://ipython.org/noteb
9897
language='python',
9998
# page_type='example_index', // note this is only if you want the tutorial to appear on the main page: plot.ly/python
10099
display_as='chart_type', order=2, ipynb='~notebook_demo/1',
101-
uses_plotly_offline=False*)
100+
uses_plotly_offline=False)
102101
```
103-
- always include a trailing slash in the permalink (i.e. python/your-tutorial-chart/)
102+
- always include a trailing slash in the permalink (i.e. `python/your-tutorial-chart/`)
104103
- `display_as` sets in which section your tutorial is displayed
105104
- 'basic' = https://plot.ly/python/#basic-charts
106105
- 'statistical' = https://plot.ly/python/#statistical-charts
107106
- 'scientific' = https://plot.ly/python/#scientific-charts
108107
- 'financial' = https://plot.ly/python/#financial-charts
109108
- 'maps' = https://plot.ly/python/#maps
110109
- '3d_charts' = https://plot.ly/python/#3d-charts
111-
- See additional options [HERE](https://github.com/plotly/documentation/blob/source-design-merge/_includes/documentation_eg.html#L1)
112-
- `order` defines the order in which the tutorials appear on plot.ly/python. Please take a look at https://plot.ly/python/ and order your tutorial next to similar chart types. <b>Note</b> `order` can be a float.
113-
- `uses_plotly_offline` is an optional argument, include as `True` if you're creating an offline doc.
110+
- See additional options [here](https://github.com/plotly/documentation/blob/source-design-merge/_includes/documentation_eg.html#L1)
111+
- `order` defines the order in which the tutorials appear online. Please take a look at https://plot.ly/python/ and order your tutorial next to similar chart types. <b>Note</b> that `order` can be a float.
112+
- `uses_plotly_offline` is an optional argument, set to `True` if you're creating an offline doc.
114113
115-
9. Now we can upload/download jupyter (ipython) notebooks to Plotly!!!!
116-
- There is a button in our side navigation bar of the python docs so users can click the button and see the notebook hosted on plot.ly where they can download it and run it to follow along with the documentation.
114+
9. Now we can upload/download jupyter (ipython) notebooks to Plotly!!!
115+
- There is a button in the side navigation bar of the python docs that users can click to see the notebook, download it, and run it to follow along with the documentation.
117116
- Use the bubble chart doc: https://plot.ly/python/bubble-charts/ as an example.
118-
- Here are step by step instructions of how to enable the `Download THIS Notebook` button:
117+
- Here are step-by-step instructions on how to enable the `Download THIS Notebook` button:
119118
1. Copy the notebook from the folder. For example from the [bubble folder](https://github.com/plotly/documentation/tree/source-design-merge/_posts/python/bubble), copy `bubble.ipynb`.
120-
2. Run `ipython notebook` or `jupyter notebook` and remove the publisher cell from your copy. (The publisher cell is the last cell that we add to our doc notebooks to convert the `.ipynb` to `html`. We do not need to upload this. _Do not remove this cell from the .ipynb in the doc repo_). Save.
119+
2. Run `jupyter notebook` and remove the publisher cell from your copy. (The publisher cell is the last cell that we add to our doc notebooks to convert them from `.ipynb` to `html`. We do not need to upload this. _Do not remove this cell from the .ipynb in the doc repo_.) Save.
121120
3. Upload the copy to the `notebook_demo` Plotly account.
122-
4. View the notebook: the link is: https://plot.ly/~notebook_demo/1/new-to-plotly-plotlys-python-library-i/ Grab the username + file id # from the link: `~notebook_demo/1` and add it to the publisher cell in the original .ipynb file in the doc repo. See example publisher cell below.
121+
4. View the notebook: the link is: https://plot.ly/~notebook_demo/1/new-to-plotly-plotlys-python-library-i/ Grab the username + file id # from the link: `~notebook_demo/1` and add it to the publisher cell in the original `.ipynb` file in the doc repo. See example publisher cell above.
123122
124-
10. Add Thumbnail Images
125-
- Thumbnail images should named `your-tutorial-chart.jpg` and be *EXACTLY* 160px X 160px
126-
- Thumbnail images should be clear and interesting. You do not need to capture the ENTIRE chart, but rather focus on the most interesting part of the chart.
123+
10. Add thumbnail images:
124+
- Thumbnail images should be named `your-tutorial-chart.jpg` and be **exactly** 160px X 160px.
125+
- Thumbnail images should be clear and interesting. You do not need to capture the entire chart, but rather focus on the most interesting part of the chart.
127126
- Use images.plot.ly for adding new images.
128127
- Log-in here: https://661924842005.signin.aws.amazon.com/console
129128
- Username: Plotly_Editors
130129
- From the <b>Amazon Web Services Console</b> select <b>S3 (Scalable Storage in the Cloud)</b> then select <b>plotly-tutorials</b> -> <b>plotly-documentation</b> -> <b>thumbnail</b>
131-
- Now from <b>All Buckets /plotly-tutorials/plotly-documentation/thumbnail</b> select the <b>Actions</b> dropdown and <b>upload</b> your .jpg file
130+
- Now from <b>All Buckets /plotly-tutorials/plotly-documentation/thumbnail</b> select the <b>Actions</b> dropdown and <b>upload</b> your .jpg file.
132131
133-
##### In the terminal in `documentation`
134-
9. Make a PR
132+
##### Back in the terminal in `documentation/`
133+
11. Submit a PR
135134
136135
- Ready for your changes to be reviewed? Make a pull request against the `source-design-merge` branch!
137136
Create a feature branch and use `git status` to list changed files.
@@ -148,14 +147,14 @@ Our python tutorials are written in [ipython notebooks](http://ipython.org/noteb
148147
```
149148
- Visit the [documentation repo](https://github.com/plotly/documentation) and open a pull request against the `source-design-merge` branch. You can then tag **@cldougl** and **@bcdunbar** for a review.
150149
151-
10. To proof your work follow these steps: https://github.com/plotly/documentation/blob/source/Contributing.md#rendering-the-pages-locally
150+
12. To proof your work follow these steps: https://github.com/plotly/documentation/blob/source/Contributing.md#rendering-the-pages-locally
152151
153152
##### At https://plot.ly/python
154-
11. Your changes haven't been deployed yet so they won't be online. That said, <b>PLEASE</b> visit https://plot.ly/python/your-tutorial and make sure everything looks correct once they have been deployed by either **@cldougl** or **@bcdunbar**.
153+
13. Your changes haven't been deployed yet so they won't be online. That said, <b>PLEASE</b> visit https://plot.ly/python/your-tutorial and make sure everything looks correct once they have been deployed by either **@cldougl** or **@bcdunbar**.
155154
156155
- Some common problems that you should check for:
157-
- Make sure all plots appear! (*you may want to sign out of your Plotly account to ensure you didn't accidentally embed private plots)
158-
- There are no empty notebook cells
156+
- Make sure all plots appear! (You may want to sign out of your Plotly account to ensure you didn't accidentally embed private plots.)
157+
- There are no empty notebook cells.
159158
- The thumbnail image appears on: https://plot.ly/python/
160159
161160
## Search

0 commit comments

Comments
 (0)