Skip to content

Commit

Permalink
Merge branch 'develop' into fix_tests
Browse files Browse the repository at this point in the history
  • Loading branch information
dweindl committed Dec 16, 2023
2 parents 096a838 + 72fc8c3 commit 51d80b5
Show file tree
Hide file tree
Showing 18 changed files with 507 additions and 209 deletions.
27 changes: 27 additions & 0 deletions .readthedocs.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# .readthedocs.yml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details

# Required
version: 2

# Build documentation in the docs/ directory with Sphinx
sphinx:
builder: html
configuration: doc/conf.py
fail_on_warning: True

python:
install:
- method: pip
path: .
extra_requirements:
- doc

build:
os: "ubuntu-22.04"
apt_packages:
- libatlas-base-dev
- swig
tools:
python: "3.11"
180 changes: 124 additions & 56 deletions README.md

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions doc/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
_build
generated
20 changes: 20 additions & 0 deletions doc/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = .
BUILDDIR = _build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
20 changes: 20 additions & 0 deletions doc/api.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
petab-select Python API
=======================

.. rubric:: Modules

.. autosummary::
:toctree: generated

petab_select
petab_select.candidate_space
petab_select.constants
petab_select.criteria
petab_select.handlers
petab_select.misc
petab_select.model
petab_select.model_space
petab_select.model_subspace
petab_select.petab
petab_select.problem
petab_select.ui
55 changes: 55 additions & 0 deletions doc/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information

project = 'petab-select'
copyright = '2023, The PEtab Select developers'
author = 'The PEtab Select developers'

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
"readthedocs_ext.readthedocs",
"sphinx.ext.napoleon",
"sphinx.ext.autodoc",
"sphinx.ext.intersphinx",
"sphinx.ext.autosummary",
"sphinx.ext.viewcode",
"sphinx.ext.mathjax",
"nbsphinx",
"IPython.sphinxext.ipython_console_highlighting",
"recommonmark",
"sphinx_autodoc_typehints",
]

templates_path = ['_templates']
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']


intersphinx_mapping = {
"petab": (
"https://petab.readthedocs.io/projects/libpetab-python/en/latest/",
None,
),
"pandas": ("https://pandas.pydata.org/docs/", None),
"numpy": ("https://numpy.org/devdocs/", None),
"python": ("https://docs.python.org/3", None),
}

autosummary_generate = True
autodoc_default_options = {
"special-members": "__init__",
"inherited-members": True,
}


# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = 'sphinx_rtd_theme'
# html_static_path = ['_static']
11 changes: 11 additions & 0 deletions doc/examples.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Examples
========

Various example notebooks.

.. toctree::
:maxdepth: 1

examples/example_cli_famos.ipynb
examples/workflow_cli.ipynb
examples/workflow_python.ipynb
22 changes: 22 additions & 0 deletions doc/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
.. petab-select documentation master file, created by
sphinx-quickstart on Mon Oct 23 09:01:31 2023.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
Welcome to petab-select's documentation!
========================================

.. toctree::
:maxdepth: 2
:caption: Contents:

examples
api


Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`
35 changes: 35 additions & 0 deletions doc/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=.
set BUILDDIR=_build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
Loading

0 comments on commit 51d80b5

Please sign in to comment.