Skip to content

Reconcile environment for development and docs building #717

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 14 commits into from
Apr 21, 2024
Merged
Show file tree
Hide file tree
Changes from 11 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
14 changes: 4 additions & 10 deletions doc/dev_start_guide.rst
Original file line number Diff line number Diff line change
Expand Up @@ -168,15 +168,9 @@ create a virtual environment in the project directory:

.. code-block:: bash

conda env create -n pytensor-dev -f environment.yml
conda env create -f environment.yml
conda activate pytensor-dev

Afterward, you can install the development dependencies:

.. code-block:: bash

pip install -r requirements.txt

Next, ``pre-commit`` needs to be configured so that the linting and code quality
checks are performed before each commit:

Expand All @@ -202,12 +196,12 @@ see the `NumPy development guide <https://numpy.org/doc/stable/dev/>`_.
Contributing to the documentation
---------------------------------

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:

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.

.. code-block:: bash

pip install -r requirements-rtd.txt
conda env create -f doc/environment.yml
conda activate pytensor-docs


You can now build the documentation from the root of the project with:
Expand Down
3 changes: 3 additions & 0 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ dependencies:
- pygments
- pydot
- ipython
- pip
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It can be installed from conda forge too, no need to include pip and install from github

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I search on conda libraries website I did not find the theme. In the GitHub workflow I also see that it is published on PyPI only, so I follows that environment.yml in the doc folder 😅. Can you give me the conda package website like this one: https://anaconda.org/conda-forge/pydata-sphinx-theme?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The one in the doc folder should also be updated then. Link: https://anaconda.org/conda-forge/pymc-sphinx-theme

- pip:
- git+https://github.com/pymc-devs/pymc-sphinx-theme
# code style
- ruff
# developer tools
Expand Down