Skip to content

Commit

Permalink
docs: use myst parser
Browse files Browse the repository at this point in the history
  • Loading branch information
jolars committed Dec 13, 2023
1 parent adfa475 commit 0288739
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 52 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ docs:

.PHONY: autodoc
autodoc:
sphinx-autobuild docs/source docs/build
sphinx-autobuild docs/source docs/build --watch sortedl1

.PHONY: update-libslope
update-libslope:
Expand Down
16 changes: 16 additions & 0 deletions docs/source/api.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# API Documentation

```{eval-rst}
.. currentmodule:: sortedl1
```

## Estimators

```{eval-rst}
.. currentmodule:: sortedl1
.. autosummary::
:toctree: generated/
Slope
```
3 changes: 1 addition & 2 deletions docs/source/api.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,4 @@ Estimators
.. autosummary::
:toctree: generated/

Slope

Slope
3 changes: 3 additions & 0 deletions docs/source/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```{include} ../../CHANGELOG.md
```
4 changes: 0 additions & 4 deletions docs/source/changelog.rst

This file was deleted.

21 changes: 4 additions & 17 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.autosummary",
"sphinx.ext.autodoc",
"sphinx.ext.doctest",
"sphinx.ext.intersphinx",
"sphinx.ext.napoleon",
Expand All @@ -43,26 +43,13 @@
html_static_path = ["_static"]
html_logo = "_static/slope-horizontal.svg"

# -- Options for napoleon extension ------------------------------------------
napoleon_google_docstring = True
napoleon_numpy_docstring = True
napoleon_include_init_with_doc = False
napoleon_include_private_with_doc = False
napoleon_include_special_with_doc = True
napoleon_use_admonition_for_examples = False
napoleon_use_admonition_for_notes = False
napoleon_use_admonition_for_references = False
napoleon_use_ivar = False
napoleon_use_param = True
napoleon_use_rtype = True
napoleon_preprocess_types = False
napoleon_type_aliases = None
napoleon_attr_annotations = True

# - Intersphinx
intersphinx_mapping = {
# 'numpy': ('https://docs.scipy.org/doc/numpy/', None),
# 'scipy': ('https://docs.scipy.org/doc/scipy/reference', None),
# 'matplotlib': ('https://matplotlib.org/', None),
"sklearn": ("http://scikit-learn.org/stable", None),
}

# Myst
myst_enable_extensions = ["colon_fence", "deflist", "fieldlist"]
12 changes: 12 additions & 0 deletions docs/source/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# sortedl1

Some **bla**!

```{toctree}
:maxdepth: 2
:hidden:
:caption: Contents
api
changelog
```
16 changes: 0 additions & 16 deletions docs/source/index.rst

This file was deleted.

7 changes: 7 additions & 0 deletions docs/source/modules.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
sortedl1
========

.. toctree::
:maxdepth: 4

sortedl1
20 changes: 8 additions & 12 deletions docs/source/sortedl1.rst
Original file line number Diff line number Diff line change
@@ -1,23 +1,19 @@
##################
sortedl1 package
##################
sortedl1 package
================

************
Submodules
************
Submodules
----------

****************************
sortedl1.estimators module
****************************
sortedl1.estimators module
--------------------------

.. automodule:: sortedl1.estimators
:members:
:undoc-members:
:show-inheritance:

*****************
Module contents
*****************
Module contents
---------------

.. automodule:: sortedl1
:members:
Expand Down

0 comments on commit 0288739

Please sign in to comment.