forked from ipython/traitlets
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ipython#302 from willingc/doc-update
Refresh sphinx docs
- Loading branch information
Showing
6 changed files
with
92 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# Documenting traitlets | ||
|
||
[Documentation for `traitlets`](https://traitlets.readthedocs.io/en/latest/) | ||
is hosted on ReadTheDocs. | ||
|
||
## Build Documentation locally | ||
|
||
1. Change directory to documentation root: | ||
|
||
$ cd docs | ||
|
||
2. Create environment | ||
|
||
- [**conda**] Create conda env (and install relevant dependencies): | ||
|
||
$ conda env create -f environment.yml | ||
|
||
- [**pip**] Create virtual environment (and install relevant dependencies): | ||
|
||
$ virtualenv traitlets_docs -p python3 | ||
$ pip install -r requirements.txt | ||
|
||
|
||
3. Activate the newly built environment `traitlets_docs` | ||
|
||
- [**conda**] Activate conda env: | ||
|
||
$ source activate traitlets_docs | ||
|
||
- [**pip**] The virtualenv should have been automatically activated. If | ||
not: | ||
|
||
$ source activate | ||
|
||
4. Build documentation using Makefile for Linux and OS X: | ||
|
||
$ make html | ||
|
||
or on Windows: | ||
|
||
$ make.bat html | ||
|
||
5. Display the documentation locally by navigating to | ||
``build/html/index.html`` in your browser: | ||
|
||
Or alternatively you may run a local server to display | ||
the docs. In Python 3: | ||
|
||
$ python -m http.server 8000 | ||
|
||
In your browser, go to `http://localhost:8000`. | ||
|
||
## Developing Documentation | ||
|
||
### Helpful files and directories | ||
|
||
* `source/conf.py` - Sphinx build configuration file | ||
* `source` directory - source for documentation | ||
* `source/index.rst` - Main landing page of the Sphinx documentation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
name: traitlets | ||
channels: | ||
- conda-forge | ||
- conda | ||
dependencies: | ||
- python=3 | ||
- ipython-genutils | ||
- sphinx | ||
- sphinx_rtd_theme |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
ipython_genutils | ||
ipython-genutils | ||
Sphinx | ||
sphinx-rtd-theme | ||
-e ../. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
conda: | ||
file: docs/environment.yml | ||
python: | ||
version: 3 | ||
setup_py_install: true | ||
pip install: true | ||
formats: | ||
- epub | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters