Skip to content

Commit 4ef4d79

Browse files
authored
Repair the documentation (#1298)
* 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
1 parent 44635f8 commit 4ef4d79

File tree

5 files changed

+43
-6
lines changed

5 files changed

+43
-6
lines changed

.readthedocs.yaml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# .readthedocs.yaml
2+
# Read the Docs configuration file
3+
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
4+
5+
# Required
6+
version: 2
7+
8+
# Set the version of Python and other tools you might need
9+
build:
10+
os: ubuntu-22.04
11+
tools:
12+
python: "3.10"
13+
# You can also specify other tool versions:
14+
# nodejs: "16"
15+
# rust: "1.55"
16+
# golang: "1.17"
17+
18+
# Build documentation in the docs/ directory with Sphinx
19+
sphinx:
20+
configuration: documentation_builder/conf.py
21+
22+
# If using Sphinx, optionally build your docs in additional formats such as PDF
23+
# formats:
24+
# - pdf
25+
26+
# Optionally declare the Python requirements required to build your docs
27+
python:
28+
install:
29+
- requirements: documentation_builder/requirements.txt
30+
- method: pip
31+
path: .

documentation_builder/conf.py

+6-2
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,11 @@
3636
"nbsphinx",
3737
]
3838
# Document Python Code
39-
autoapi_dirs = [SRC_PATH]
39+
autoapi_dirs = [join(SRC_PATH, "cobra")]
40+
autoapi_add_toctree_entry = False
41+
42+
# Enable typehints
43+
autodoc_typehints = "signature"
4044

4145
# Napoleon settings
4246
napoleon_numpy_docstring = True
@@ -46,7 +50,7 @@
4650

4751
# General information about the project.
4852
project = "cobra"
49-
copyright = "2016-2019, The cobrapy core team"
53+
copyright = "2016-2022, The cobrapy core team"
5054

5155
# The version info for the project you're documenting, acts as replacement for
5256
# |version| and |release|, also used in various other places throughout the

documentation_builder/index.rst

+3-3
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@ Documentation for COBRApy
22
=========================
33

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

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

1111
.. toctree::
12-
:numbered:
12+
:numbered: 3
1313
:maxdepth: 2
1414

1515
getting_started
@@ -29,7 +29,7 @@ be viewed at `nbviewer
2929
dfba
3030
pymatbridge
3131
faq
32-
_autogen/modules
32+
API </autoapi/cobra/index.rst>
3333

3434

3535
Indices and tables

documentation_builder/requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Sphinx~=2.2
1+
Sphinx~=5.3
22
sphinxcontrib-napoleon
33
sphinx-autoapi
44
nbsphinx>=0.2.4

release-notes/next-release.md

+2
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44

55
## Fixes
66

7+
Fix automatic building of the documentation.
8+
79
## Other
810

911
## Deprecated features

0 commit comments

Comments
 (0)