Skip to content
Merged
Show file tree
Hide file tree
Changes from all 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
43 changes: 36 additions & 7 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

import os
import sys
import subprocess

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
Expand All @@ -32,18 +33,20 @@
'sphinx.ext.autodoc',
# generate autodoc summaries
'sphinx.ext.autosummary',
# use mathjax for latex formulas
'sphinx.ext.mathjax',
# link to code
'sphinx.ext.viewcode',
# test snippets in the documentation
'sphinx.ext.doctest',
# link to external urls
'sphinx.ext.extlinks',
# link to other projects' docs
'sphinx.ext.intersphinx',
# use mathjax for latex formulas
'sphinx.ext.mathjax',
# support numpy and google style docstrings
'sphinx.ext.napoleon',
# support todo items
'sphinx.ext.todo',
# test snippets in the documentation
'sphinx.ext.doctest',
# link to code
'sphinx.ext.viewcode',
# source parser for jupyter notebook files
'nbsphinx',
# code highlighting in jupyter cells
Expand All @@ -52,6 +55,11 @@
'sphinxcontrib.jquery',
]

autodoc_mock_imports = [
"PEtab",
"BasiCO"
]

# default autodoc options
# list for special-members seems not to be possible before 1.8
autodoc_default_options = {
Expand All @@ -68,7 +76,7 @@
'numpy': ('https://numpy.org/devdocs/', None),
'scipy': ('https://docs.scipy.org/doc/scipy/', None),
'pandas': ('https://pandas.pydata.org/pandas-docs/dev', None),
'petab': ('https://petab.readthedocs.io/en/stable/', None),
'petab': ('https://petab.readthedocs.io/en/latest/', None),
'amici': ('https://amici.readthedocs.io/en/latest/', None),
'sklearn': ('https://scikit-learn.org/stable/', None),
}
Expand Down Expand Up @@ -99,6 +107,27 @@
#
# The short X.Y version.

# Resolve the current branch name
def get_branch():
# Read the Docs sets this automatically ("latest", "stable", branch name...)
rtd_version = os.environ.get("READTHEDOCS_VERSION")
if rtd_version and rtd_version not in ("latest", "stable"):
return rtd_version
try:
return subprocess.check_output(
["git", "rev-parse", "--abbrev-ref", "HEAD"],
text=True
).strip()
except Exception:
return "main"
return "main"

# Set up links that resolve to the branch of the documentation
branch = get_branch()
extlinks = {
"repository": (f"https://github.com/ICB-DCM/pyABC/blob/{branch}/%s", "%s",),
}

import pyabc # noqa: E402

version = pyabc.__version__
Expand Down
17 changes: 4 additions & 13 deletions doc/installation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -77,20 +77,11 @@ home directory with

.. _anacondaCluster:

Installing Anaconda on a Cluster environment
--------------------------------------------

To install `Anaconda <https://anaconda.com/products/distribution>`_, run::

wget https://repo.anaconda.com/archive/Anaconda3-2021.11-Linux-x86_64.sh
bash Anaconda3-2021.11-Linux-x86_64.sh

and follow the installation guide.
Replace the "2021.11" by the most recent version of Anaconda, see
https://repo.anaconda.com/archive.
Installing Miniconda on a Cluster environment
---------------------------------------------

`Miniconda <https://docs.conda.io/en/latest/miniconda.html>`_
provides an alternative, minimal installer for conda, including
provides a minimal installer for conda, including
only conda, Python, and some core and useful packages. Install the latest
version via::

Expand All @@ -102,7 +93,7 @@ version via::
Optional dependencies
---------------------

pyABC has various optional dependencies, see `setup.cfg`.
pyABC has various optional dependencies, see :repository:`pyproject.toml`.

In particular, pyABC has optional interfaces to the :ref:`R <api_external_r>`
and :ref:`Julia <api_external_julia>` languages, see the API documentation
Expand Down
Loading