Skip to content

Commit

Permalink
Repair the documentation (#1298)
Browse files Browse the repository at this point in the history
* update deps fro docs

* add yaml

* missing dep

* add more reqs

* maybe like this?

* some more adjustments

* some more adjustments

* some more adjustments

* include API in TOC

* include API in TOC

* include API in TOC

* TOC fixes

* try this

* try this

* looking good now

* remove unneded dep
  • Loading branch information
cdiener committed Nov 10, 2022
1 parent 44635f8 commit 4ef4d79
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 6 deletions.
31 changes: 31 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Set the version of Python and other tools you might need
build:
os: ubuntu-22.04
tools:
python: "3.10"
# You can also specify other tool versions:
# nodejs: "16"
# rust: "1.55"
# golang: "1.17"

# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: documentation_builder/conf.py

# If using Sphinx, optionally build your docs in additional formats such as PDF
# formats:
# - pdf

# Optionally declare the Python requirements required to build your docs
python:
install:
- requirements: documentation_builder/requirements.txt
- method: pip
path: .
8 changes: 6 additions & 2 deletions documentation_builder/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,11 @@
"nbsphinx",
]
# Document Python Code
autoapi_dirs = [SRC_PATH]
autoapi_dirs = [join(SRC_PATH, "cobra")]
autoapi_add_toctree_entry = False

# Enable typehints
autodoc_typehints = "signature"

# Napoleon settings
napoleon_numpy_docstring = True
Expand All @@ -46,7 +50,7 @@

# General information about the project.
project = "cobra"
copyright = "2016-2019, The cobrapy core team"
copyright = "2016-2022, The cobrapy core team"

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
Expand Down
6 changes: 3 additions & 3 deletions documentation_builder/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ Documentation for COBRApy
=========================

For installation instructions, please see `INSTALL.rst
<https://github.com/opencobra/cobrapy/blob/stable/INSTALL.rst>`_.
<https://github.com/opencobra/cobrapy/blob/devel/INSTALL.rst>`_.

Many of the examples below are viewable as IPython notebooks, which can
be viewed at `nbviewer
<http://nbviewer.ipython.org/github/opencobra/cobrapy/tree/stable/documentation_builder/>`_.

.. toctree::
:numbered:
:numbered: 3
:maxdepth: 2

getting_started
Expand All @@ -29,7 +29,7 @@ be viewed at `nbviewer
dfba
pymatbridge
faq
_autogen/modules
API </autoapi/cobra/index.rst>


Indices and tables
Expand Down
2 changes: 1 addition & 1 deletion documentation_builder/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Sphinx~=2.2
Sphinx~=5.3
sphinxcontrib-napoleon
sphinx-autoapi
nbsphinx>=0.2.4
Expand Down
2 changes: 2 additions & 0 deletions release-notes/next-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

## Fixes

Fix automatic building of the documentation.

## Other

## Deprecated features
Expand Down

0 comments on commit 4ef4d79

Please sign in to comment.