Skip to content

Update contribution guidelines #1884

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 5 commits into from
Dec 10, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
31 changes: 24 additions & 7 deletions contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,38 +24,53 @@ First, you'll need to *get* our project. This is the appropriate *clone* command

```bash
git clone https://github.com/your_github_username/plotly.py.git
cd plotly.py
```

### Create a virtual environment for plotly development
TODO: Use virtualenv or conda, activate it

http://docs.python-guide.org/en/latest/dev/virtualenvs/
You can use either [conda][conda-env] or [virtualenv][virtualenv] to create a virtual environment for plotly development, e.g.

```bash
conda create -n plotly-dev python
conda activate plotly-dev
```

[conda-env]: https://docs.conda.io/projects/conda/en/latest/user-guide/tasks/manage-environments.html#creating-an-environment-with-commands
[virtualenv]: http://docs.python-guide.org/en/latest/dev/virtualenvs/

### Install requirements
$ pip install -r requirements.txt
$ pip install -r optional-requirements.txt

$ pip install -r packages/python/plotly/requirements.txt
$ pip install -r packages/python/plotly/optional-requirements.txt

### Editable install of plotly packages

$ pip install -e packages/python/plotly/
$ pip install -e packages/python/chart-studio/
$ pip install -e packages/python/plotly-geo/

### ipywidgets development install

Run the following commands in your virtual environment to use the
development version of `FigureWidget`,

$ jupyter nbextension enable --py widgetsnbextension
$ jupyter nbextension install --py --symlink --sys-prefix plotlywidget
$ jupyter nbextension enable --py --sys-prefix plotlywidget


To make plotly plots show up in JupyterLab, you also need to [install the plotly jupyterlab extensions][plotly-jl].

[plotly-jl]: https://plot.ly/python/getting-started/#jupyterlab-support-python-35

### Setup Submodules

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:

**DO THIS (run this command in your new `plotly.py` directory)**

```bash
python update_submodules.py
python setup_submodules.py
```

That's going to initialize the submodules we use in this project, update them so that they're synced to the proper commit, and copy files to the appropriate locations in your local repo.
Expand Down Expand Up @@ -520,4 +535,6 @@ From `packages/python/plotly-geo`, build the conda packge
Then upload to the plotly anaconda channel as described above

## Contributing to the Figure Factories
If you are interested in contributing to the ever-growing Plotly figure factory library in Python, check out the [documentation](https://github.com/plotly/plotly.py/blob/master/plotly/figure_factory/README.md) to learn how.
If you are interested in contributing to the ever-growing Plotly figure factory library in Python, check out the [documentation][ff-home] to learn how.

[ff-home]: packages/python/plotly/plotly/figure_factory/README.md