Skip to content

Commit 55e8288

Browse files
author
Tianhao Wu
committed
add readme
1 parent 0355fbd commit 55e8288

File tree

2 files changed

+37
-2
lines changed

2 files changed

+37
-2
lines changed

README.md

+33-2
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,33 @@
1-
# tutorials
2-
PyPose tutorials.
1+
# PyPose tutorials
2+
3+
# 1. Contributing to Documentation
4+
5+
## 1.1 Build docs locally
6+
7+
1. Sphinx docs come with a makefile build system. To preview, build PyPose locally and
8+
9+
```bash
10+
pip install -r requirements.txt
11+
make html
12+
```
13+
14+
2. Then open the generated HTML page: `_build/html/index.html`.
15+
16+
3. To clean and rebuild the doc:
17+
```
18+
make clean
19+
```
20+
21+
22+
## 1.2 Writing documentation
23+
24+
We use sphinx-gallery's [notebook styled examples](https://sphinx-gallery.github.io/stable/tutorials/index.html) to create the tutorials. Syntax is very simple. In essence, you write a slightly well formatted python file and it shows up as documentation page.
25+
26+
Here's how to create a new tutorial or recipe:
27+
1. Create a notebook styled python file. If you want it executed while inserted into documentation, save the file with suffix `tutorial` so that file name is `your_tutorial.py`.
28+
2. Put it in one of the beginner_source, intermediate_source, advanced_source based on the level. If it is a recipe, add to recipes_source.
29+
3. For Tutorials (except if it is a prototype feature), include it in the TOC tree at index.rst
30+
4. Create a pull request.
31+
32+
In case you prefer to write your tutorial in jupyter, you can use [this script](https://gist.github.com/chsasank/7218ca16f8d022e02a9c0deb94a310fe) to convert the notebook to python file. After conversion and addition to the project, please make sure the sections headings etc are in logical order.
33+

requirements.txt

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
sphinx
2+
sphinx-gallery
3+
sphinx_rtd_theme
4+
torch

0 commit comments

Comments
 (0)