Skip to content
This repository has been archived by the owner on Mar 21, 2024. It is now read-only.

Commit

Permalink
ENH: Switch recommonmark to MyST-parser (#787)
Browse files Browse the repository at this point in the history
* 📝 Create basic for ML API

* 📝 Add ML/configs base doc files

* 📝 Finish ML/configs API

* 📝 Update augmentations

* 📝 Add ML/dataset API docs

* 📝 Add rst skeleton for ML/models

* 📝 Fix docstring missing newlines

* Remove script

* 📝 Finish ML/models API docs

* 📝 Start ML/SSL API. Fix some formatting issues

* 📝 Correct whitespace issues in `:param`

* 📝 Fix whitespace errors on `:return` statements

* 📝 Fix :return: statements

* 📝 Finish ML/SSL API

* 📝 Add ML/utils API docs

* 📝 Add visualizer docs, fix `:raise` indents

* 📝 Fix more issues with the `:raises:` formatting

* ♻️ Restructuring folders

* 📝 Limit API `toctree` depth

* 📝 Add primary InnerEye/ML files API to docs

* 📝 Fix and add `InnerEye/ML/*.py` docs

* ⚰️ Remove weird `settings.json` change

* 📌 Switch recommonmark to MyST-parser

* 📌 Add myst-parser to `environment.yml`, lock env
  • Loading branch information
peterhessey committed Aug 18, 2022
1 parent e6b2406 commit 8ffab94
Show file tree
Hide file tree
Showing 7 changed files with 56 additions and 61 deletions.
45 changes: 25 additions & 20 deletions TestSubmodule/environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ dependencies:
- pytorch-mutex=1.0=cuda
- readline=8.1.2=h7f8727e_1
- setuptools=61.2.0=py38h06a4308_0
- sqlite=3.39.0=h5082296_0
- sqlite=3.39.2=h5082296_0
- tk=8.6.12=h1ccaba5_0
- torchvision=0.11.1=py38_cu113
- typing_extensions=4.1.1=pyh06a4308_0
- typing_extensions=4.3.0=py38h06a4308_0
- wheel=0.37.1=pyhd3eb1b0_0
- x264=1!157.20191217=h7b6447c_0
- xz=5.2.5=h7f8727e_1
Expand All @@ -76,12 +76,12 @@ dependencies:
- async-timeout==4.0.2
- attrs==22.1.0
- azure-common==1.1.28
- azure-core==1.24.2
- azure-core==1.25.0
- azure-graphrbac==0.61.1
- azure-identity==1.7.0
- azure-mgmt-authorization==0.61.0
- azure-mgmt-containerregistry==10.0.0
- azure-mgmt-core==1.3.1
- azure-mgmt-core==1.3.2
- azure-mgmt-datafactory==1.1.0
- azure-mgmt-keyvault==9.3.0
- azure-mgmt-resource==12.1.0
Expand Down Expand Up @@ -118,24 +118,24 @@ dependencies:
- commonmark==0.9.1
- conda-merge==0.1.5
- contextlib2==21.6.0
- coverage==6.4.2
- coverage==6.4.3
- cryptography==3.3.2
- cycler==0.11.0
- databricks-cli==0.17.0
- databricks-cli==0.17.1
- dataclasses-json==0.5.2
- debugpy==1.6.2
- debugpy==1.6.3
- defusedxml==0.7.1
- deprecated==1.2.13
- distro==1.7.0
- docker==4.3.1
- docutils==0.17.1
- docutils==0.18.1
- dotnetcore2==2.1.23
- entrypoints==0.4
- execnet==1.9.0
- fastjsonschema==2.16.1
- fastmri==0.2.0
- flake8==3.8.3
- flask==2.2.0
- flask==2.2.2
- frozenlist==1.3.1
- fsspec==2022.7.1
- furo==2022.6.21
Expand All @@ -152,7 +152,7 @@ dependencies:
- h5py==2.10.0
- hi-ml==0.2.2
- hi-ml-azure==0.2.2
- humanize==4.2.3
- humanize==4.3.0
- idna==3.3
- imageio==2.15.0
- imagesize==1.4.1
Expand Down Expand Up @@ -181,27 +181,32 @@ dependencies:
- kiwisolver==1.4.4
- lightning-bolts==0.4.0
- llvmlite==0.34.0
- lxml==4.9.1
- mako==1.2.1
- markdown==3.4.1
- markdown-it-py==2.1.0
- markupsafe==2.1.1
- marshmallow==3.17.0
- marshmallow-enum==1.5.1
- matplotlib==3.3.0
- mccabe==0.6.1
- mdit-py-plugins==0.3.0
- mdurl==0.1.2
- mistune==0.8.4
- mlflow==1.23.1
- mlflow-skinny==1.27.0
- mlflow-skinny==1.28.0
- monai==0.6.0
- more-itertools==8.13.0
- more-itertools==8.14.0
- msal==1.18.0
- msal-extensions==0.3.1
- msrest==0.7.1
- msrestazure==0.6.4
- multidict==6.0.2
- mypy==0.910
- mypy-extensions==0.4.3
- myst-parser==0.18.0
- nbclient==0.6.6
- nbconvert==6.5.0
- nbconvert==6.5.3
- nbformat==5.4.0
- ndg-httpsclient==0.5.1
- nest-asyncio==1.5.5
Expand Down Expand Up @@ -250,12 +255,12 @@ dependencies:
- pytest-xdist==1.34.0
- python-dateutil==2.8.2
- pytorch-lightning==1.5.5
- pytz==2022.1
- pytz==2022.2.1
- pywavelets==1.3.0
- pyyaml==6.0
- pyzmq==23.2.0
- pyzmq==23.2.1
- qtconsole==5.3.1
- qtpy==2.1.0
- qtpy==2.2.0
- querystring-parser==1.2.4
- requests==2.28.1
- requests-oauthlib==1.3.1
Expand All @@ -269,7 +274,7 @@ dependencies:
- scikit-learn==0.23.2
- scipy==1.5.2
- seaborn==0.10.1
- secretstorage==3.3.2
- secretstorage==3.3.3
- send2trash==1.8.0
- simpleitk==1.2.4
- six==1.15.0
Expand All @@ -285,7 +290,7 @@ dependencies:
- sphinxcontrib-jsmath==1.0.1
- sphinxcontrib-qthelp==1.0.3
- sphinxcontrib-serializinghtml==1.1.5
- sqlalchemy==1.4.39
- sqlalchemy==1.4.40
- sqlparse==0.4.2
- stopit==1.1.2
- stringcase==1.2.0
Expand All @@ -297,7 +302,7 @@ dependencies:
- terminado==0.15.0
- textwrap3==0.9.2
- threadpoolctl==3.1.0
- tifffile==2022.7.31
- tifffile==2022.8.12
- tinycss2==1.1.1
- toml==0.10.2
- tomli==2.0.1
Expand All @@ -310,7 +315,7 @@ dependencies:
- urllib3==1.26.7
- webencodings==0.5.1
- websocket-client==1.3.3
- werkzeug==2.2.1
- werkzeug==2.2.2
- widgetsnbextension==3.6.1
- wrapt==1.14.1
- yacs==0.1.8
Expand Down
14 changes: 4 additions & 10 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,6 @@
# Building docs for InnerEye-DeepLearning

1. First, make sure you have all the packages necessary for InnerEye.
2. Install pip dependencies from docs/requirements.txt:

```shell
pip install -r requirements.txt
```

1. Run `make html` from the `docs` folder. This will create html files under docs/build/html.
1. From the `docs/build/html` folder, run `python -m http.server 8080` to host the docs locally.
1. From your browser, navigate to `http:https://localhost:8080` to view the documentation.
1. First, make sure you have set up your conda environment as described in the [Quick Setup Guide](../README.md#quick-setup).
2. Run `make html` from the `docs` folder. This will create html files under docs/build/html.
3. From the `docs/build/html` folder, run `python -m http.server 8080` to host the docs locally.
4. From your browser, navigate to `http:https://localhost:8080` to view the documentation.
2 changes: 0 additions & 2 deletions docs/requirements.txt

This file was deleted.

9 changes: 1 addition & 8 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@
fixed_paths.add_submodules_to_path()


# -- Imports -----------------------------------------------------------------
from recommonmark.parser import CommonMarkParser

# -- Project information -----------------------------------------------------

project = 'InnerEye-DeepLearning'
Expand All @@ -46,7 +43,7 @@
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx_rtd_theme',
'recommonmark',
'myst_parser',
'sphinx.ext.viewcode',
]

Expand All @@ -71,10 +68,6 @@
# so a file named "default.css" will overwrite the builtin "default.css".
# html_static_path = ['_static']

source_parsers = {
'.md': CommonMarkParser,
}

source_suffix = {
'.rst': 'restructuredtext',
'.md': 'markdown',
Expand Down
1 change: 0 additions & 1 deletion docs/source/md/hippocampus_model.md
Original file line number Diff line number Diff line change
Expand Up @@ -117,4 +117,3 @@ Dice Score for Left and Right hippocampus respectively on a held-out test set of
| hippocampus_L | 252 | 0.918 | 0.022 | 0.819 | 0.953 | 2.206 | 0.812 | 1.206 | 6.964 | 0.168 | 0.054 | 0.096 | 0.399 |
| hippocampus_R | 252 | 0.918 | 0.024 | 0.816 | 0.954 | 2.185 | 0.706 | 1.206 | 4.966 | 0.168 | 0.055 | 0.094 | 0.433 |
| | | | | | | | | | | | | | |
---
45 changes: 25 additions & 20 deletions environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ dependencies:
- pytorch-mutex=1.0=cuda
- readline=8.1.2=h7f8727e_1
- setuptools=61.2.0=py38h06a4308_0
- sqlite=3.39.0=h5082296_0
- sqlite=3.39.2=h5082296_0
- tk=8.6.12=h1ccaba5_0
- torchvision=0.11.1=py38_cu113
- typing_extensions=4.1.1=pyh06a4308_0
- typing_extensions=4.3.0=py38h06a4308_0
- wheel=0.37.1=pyhd3eb1b0_0
- x264=1!157.20191217=h7b6447c_0
- xz=5.2.5=h7f8727e_1
Expand All @@ -76,12 +76,12 @@ dependencies:
- async-timeout==4.0.2
- attrs==22.1.0
- azure-common==1.1.28
- azure-core==1.24.2
- azure-core==1.25.0
- azure-graphrbac==0.61.1
- azure-identity==1.7.0
- azure-mgmt-authorization==0.61.0
- azure-mgmt-containerregistry==10.0.0
- azure-mgmt-core==1.3.1
- azure-mgmt-core==1.3.2
- azure-mgmt-datafactory==1.1.0
- azure-mgmt-keyvault==9.3.0
- azure-mgmt-resource==12.1.0
Expand Down Expand Up @@ -118,24 +118,24 @@ dependencies:
- commonmark==0.9.1
- conda-merge==0.1.5
- contextlib2==21.6.0
- coverage==6.4.2
- coverage==6.4.3
- cryptography==3.3.2
- cycler==0.11.0
- databricks-cli==0.17.0
- databricks-cli==0.17.1
- dataclasses-json==0.5.2
- debugpy==1.6.2
- debugpy==1.6.3
- defusedxml==0.7.1
- deprecated==1.2.13
- distro==1.7.0
- docker==4.3.1
- docutils==0.17.1
- docutils==0.18.1
- dotnetcore2==2.1.23
- entrypoints==0.4
- execnet==1.9.0
- fastjsonschema==2.16.1
- fastmri==0.2.0
- flake8==3.8.3
- flask==2.2.0
- flask==2.2.2
- frozenlist==1.3.1
- fsspec==2022.7.1
- furo==2022.6.21
Expand All @@ -152,7 +152,7 @@ dependencies:
- h5py==2.10.0
- hi-ml==0.2.2
- hi-ml-azure==0.2.2
- humanize==4.2.3
- humanize==4.3.0
- idna==3.3
- imageio==2.15.0
- imagesize==1.4.1
Expand Down Expand Up @@ -181,27 +181,32 @@ dependencies:
- kiwisolver==1.4.4
- lightning-bolts==0.4.0
- llvmlite==0.34.0
- lxml==4.9.1
- mako==1.2.1
- markdown==3.4.1
- markdown-it-py==2.1.0
- markupsafe==2.1.1
- marshmallow==3.17.0
- marshmallow-enum==1.5.1
- matplotlib==3.3.0
- mccabe==0.6.1
- mdit-py-plugins==0.3.0
- mdurl==0.1.2
- mistune==0.8.4
- mlflow==1.23.1
- mlflow-skinny==1.27.0
- mlflow-skinny==1.28.0
- monai==0.6.0
- more-itertools==8.13.0
- more-itertools==8.14.0
- msal==1.18.0
- msal-extensions==0.3.1
- msrest==0.7.1
- msrestazure==0.6.4
- multidict==6.0.2
- mypy==0.910
- mypy-extensions==0.4.3
- myst-parser==0.18.0
- nbclient==0.6.6
- nbconvert==6.5.0
- nbconvert==6.5.3
- nbformat==5.4.0
- ndg-httpsclient==0.5.1
- nest-asyncio==1.5.5
Expand Down Expand Up @@ -250,12 +255,12 @@ dependencies:
- pytest-xdist==1.34.0
- python-dateutil==2.8.2
- pytorch-lightning==1.5.5
- pytz==2022.1
- pytz==2022.2.1
- pywavelets==1.3.0
- pyyaml==6.0
- pyzmq==23.2.0
- pyzmq==23.2.1
- qtconsole==5.3.1
- qtpy==2.1.0
- qtpy==2.2.0
- querystring-parser==1.2.4
- requests==2.28.1
- requests-oauthlib==1.3.1
Expand All @@ -269,7 +274,7 @@ dependencies:
- scikit-learn==0.23.2
- scipy==1.5.2
- seaborn==0.10.1
- secretstorage==3.3.2
- secretstorage==3.3.3
- send2trash==1.8.0
- simpleitk==1.2.4
- six==1.15.0
Expand All @@ -285,7 +290,7 @@ dependencies:
- sphinxcontrib-jsmath==1.0.1
- sphinxcontrib-qthelp==1.0.3
- sphinxcontrib-serializinghtml==1.1.5
- sqlalchemy==1.4.39
- sqlalchemy==1.4.40
- sqlparse==0.4.2
- stopit==1.1.2
- stringcase==1.2.0
Expand All @@ -297,7 +302,7 @@ dependencies:
- terminado==0.15.0
- textwrap3==0.9.2
- threadpoolctl==3.1.0
- tifffile==2022.7.31
- tifffile==2022.8.12
- tinycss2==1.1.1
- toml==0.10.2
- tomli==2.0.1
Expand All @@ -310,7 +315,7 @@ dependencies:
- urllib3==1.26.7
- webencodings==0.5.1
- websocket-client==1.3.3
- werkzeug==2.2.1
- werkzeug==2.2.2
- widgetsnbextension==3.6.1
- wrapt==1.14.1
- yacs==0.1.8
Expand Down
1 change: 1 addition & 0 deletions primary_deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ dependencies:
- monai==0.6.0
- mypy-extensions==0.4.3
- mypy==0.910
- myst-parser==0.18.0
- numba==0.51.2
- numba==0.51.2
- numpy==1.19.1
Expand Down

0 comments on commit 8ffab94

Please sign in to comment.