You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Summary:
- Added a check to the custom role to ensure sphx-gallery outputs are not affected.
- Removed template tutorial custom card from index.rst
- Don't generate tutorials/index.html - because sphinx autogenerates a page with all tutorials that is hard to format.
- Added sys.path so we can use autodoc in .md files.
Reviewed By: mergennachin
Differential Revision: D49878715
1. If you don't have it already, start a conda environment:
46
+
47
+
```{note}
48
+
The below command generates a completely new environment and resets
49
+
any existing dependencies. If you have an environment already, skip
50
+
the `conda create` command.
51
+
```
52
+
53
+
```bash
54
+
conda create -yn executorch python=3.10.0
55
+
conda activate executorch
56
+
```
57
+
58
+
1. Install dependencies:
44
59
45
60
```bash
46
-
virtualenv venv
47
-
source venv/bin/activate
61
+
pip3 install -r ./.ci/docker/requirements-ci.txt
48
62
```
49
63
50
-
1.Install dependancies:
64
+
1.Run:
51
65
52
66
```bash
53
-
pip3 install -r ../.ci/docker/requirements-ci.txt
67
+
bash install_requirements.sh
54
68
```
55
69
70
+
1. Go to the `docs/` directory.
71
+
56
72
1. Build the documentation set:
57
73
58
74
```
@@ -132,15 +148,15 @@ Python and C++ documentation in the form of HTML pages.
132
148
133
149
### Python APIs
134
150
135
-
We generate Python API documentation through Sphinx, bootstrapping [Pytorch's
151
+
We generate Python API documentation through Sphinx, bootstrapping [PyTorch's
136
152
Sphinx theme](https://github.com/pytorch/pytorch_sphinx_theme) for
137
-
a cohesive look with the existing Pytorch API documentation.
153
+
a cohesive look with the existing PyTorch API documentation.
138
154
139
155
The setup for Python documentation lies within `source_py/`. To set up Sphinx, a
140
156
`conf.py` configuration file is required. We can specify ways to generate
141
157
documentation here. Specifically, the most important/relevant parts are:
142
158
143
-
* Make sure to add a path to the directory above the directory you're trying to generate documentation for. For example, since we want to generate documenation for the `executorch/` directory. This tells Sphinx where to find the code to generate docs for.
159
+
* Make sure to add a path to the directory above the directory you're trying to generate documentation for. For example, since we want to generate documentation for the `executorch/` directory. This tells Sphinx where to find the code to generate docs for.
144
160
145
161
*`extensions` contains extension modules. For auto-generating APIs, make sure to include `sphinx.ext.autodoc`.
146
162
*`autodoc_mock_imports` is where you put imports that Sphinx is unable to access. Sphinx runs your code in order to autogenerate the docs, so for any libraries that it unable to access due to it being outside of the directory, or containing c++ bindings, we need to specify it in the `autodoc_mock_imports` list. You can see what modules Sphinx is confused by when you run into importing errors when generating docs.
@@ -170,7 +186,7 @@ landing page under `index.rst`. A sample of this structure can be found in
170
186
A diagram of how the files work together:
171
187

172
188
173
-
To view your changes on the executorch website, you can follow the same steps
189
+
To view your changes on the ExecuTorch website, you can follow the same steps
0 commit comments