Skip to content

Commit 0727538

Browse files
authored
Reconcile environment for development and docs building (#717)
1 parent 58aad80 commit 0727538

File tree

4 files changed

+8
-124
lines changed

4 files changed

+8
-124
lines changed

doc/dev_start_guide.rst

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -168,15 +168,9 @@ create a virtual environment in the project directory:
168168

169169
.. code-block:: bash
170170
171-
conda env create -n pytensor-dev -f environment.yml
171+
conda env create -f environment.yml
172172
conda activate pytensor-dev
173173
174-
Afterward, you can install the development dependencies:
175-
176-
.. code-block:: bash
177-
178-
pip install -r requirements.txt
179-
180174
Next, ``pre-commit`` needs to be configured so that the linting and code quality
181175
checks are performed before each commit:
182176

@@ -202,20 +196,20 @@ see the `NumPy development guide <https://numpy.org/doc/stable/dev/>`_.
202196
Contributing to the documentation
203197
---------------------------------
204198

205-
To contribute to the documentation, first follow the instructions in the previous section. Afterward, you can install the documentation dependencies in the virtual environment you created:
206-
199+
The documentation build dependencies have also been included in the virtual environment you created. You can also create a separate virtual environment just for the documentation using the `environment.yml` file located inside the `doc` folder.
207200

208201
.. code-block:: bash
209202
210-
pip install -r requirements-rtd.txt
203+
conda env create -f doc/environment.yml
204+
conda activate pytensor-docs
211205
212206
213207
You can now build the documentation from the root of the project with:
214208

215209

216210
.. code-block:: bash
217211
218-
python doc/scripts/docgen.py
212+
python -m sphinx -b html ./doc ./html
219213
220214
221215
Afterward, you can go to `html/index.html` and navigate the changes in a browser. One way to do this is to go to the `html` directory and run:
@@ -226,7 +220,7 @@ Afterward, you can go to `html/index.html` and navigate the changes in a browser
226220
python -m http.server
227221
228222
**Do not commit the `html` directory. The documentation is built automatically.**
229-
223+
For more documentation customizations such as different formats e.g., PDF, refer to the `Sphinx documentation <https://www.sphinx-doc.org/en/master/usage/builders/index.html>`_.
230224

231225
Other tools that might help
232226
===========================

doc/environment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ dependencies:
1212
- sphinx>=5.1.0,<6
1313
- mock
1414
- pillow
15+
- pymc-sphinx-theme
1516
- pip
1617
- pip:
17-
- git+https://github.com/pymc-devs/pymc-sphinx-theme
1818
- -e ..

doc/scripts/docgen.py

Lines changed: 0 additions & 111 deletions
This file was deleted.

environment.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ dependencies:
3737
- pygments
3838
- pydot
3939
- ipython
40+
- pymc-sphinx-theme
4041
# code style
4142
- ruff
4243
# developer tools

0 commit comments

Comments
 (0)