Skip to content

Commit d4bb4aa

Browse files
authored
Merge pull request #125 from AllenCellModeling/fix/docs-replace-m2r2
use myst_parser instead of m2r2
2 parents 223d4be + 632605a commit d4bb4aa

File tree

6 files changed

+40
-7
lines changed

6 files changed

+40
-7
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Docs
2+
3+
on: [pull_request]
4+
5+
jobs:
6+
docs:
7+
runs-on: ubuntu-latest
8+
steps:
9+
- uses: actions/checkout@v4
10+
with:
11+
submodules: true
12+
- name: Setup Python
13+
uses: actions/setup-python@v5
14+
with:
15+
python-version: "3.10"
16+
- name: Install Dependencies
17+
run: |
18+
pip install --upgrade pip setuptools
19+
pip install .[dev]
20+
- name: Generate Docs
21+
env:
22+
BUILD_DOCS: true
23+
run: |
24+
mkdir cmake_build_debug
25+
cd cmake_build_debug
26+
cmake ..
27+
cmake --build . --target docs
28+
shell: bash

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,3 +121,4 @@ dummy_test.py
121121
*.ipynb
122122
.DS_Store
123123
cmake-build-debug/
124+
cmake_build_debug/

docs/conf.py.in

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@
1818
# relative to the documentation root, use os.path.abspath to make it
1919
# absolute, like shown here.
2020
#
21+
from datetime import datetime
2122
import os
2223
import sys
2324

@@ -40,12 +41,13 @@ extensions = [
4041
"sphinx.ext.autodoc",
4142
"sphinx.ext.viewcode",
4243
"sphinx.ext.mathjax",
43-
"m2r2",
44+
"myst_parser",
4445
]
4546

4647
# Control napoleon
4748
napoleon_google_docstring = False
48-
napolean_include_init_with_doc = True
49+
napoleon_numpy_docstring = True
50+
napoleon_include_init_with_doc = True
4951
napoleon_use_ivar = True
5052
napoleon_use_param = False
5153

@@ -60,7 +62,7 @@ templates_path = ["_templates"]
6062
#
6163
source_suffix = {
6264
".rst": "restructuredtext",
63-
".txt": "markdown",
65+
# ".txt": "markdown",
6466
".md": "markdown",
6567
}
6668

@@ -69,7 +71,7 @@ master_doc = "index"
6971

7072
# General information about the project.
7173
project = u"aicspylibczi"
72-
copyright = u'2019, Allen Institute for Cell Science'
74+
project_copyright = f'2019-{datetime.now().year}, Allen Institute for Cell Science'
7375
author = u"Allen Institute for Cell Science"
7476

7577
# The version info for the project you"re documenting, acts as replacement

docs/contributing.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
1-
.. mdinclude:: ../CONTRIBUTING.md
1+
.. include:: ../CONTRIBUTING.md
2+
:parser: myst_parser.docutils_

docs/index.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@ Welcome to aicspylibczi's documentation!
3333
Package modules <modules>
3434
contributing
3535

36-
.. mdinclude:: ../README.md
36+
.. include:: ../README.md
37+
:parser: myst_parser.docutils_
3738

3839

3940
Indices and tables

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"coverage>=5.0a4",
3030
"flake8>=3.7.7",
3131
"ipython>=7.5.0",
32-
"m2r2>=0.2.7",
32+
"myst-parser>=4.0.0",
3333
"pytest>=4.3.0",
3434
"pytest-cov==2.6.1",
3535
"pytest-raises>=0.10",

0 commit comments

Comments
 (0)