Skip to content

Conversation

@gigony
Copy link
Collaborator

@gigony gigony commented Sep 14, 2021

Initial user guide implementation.

Instruction to build docs in dev mode:

# Create Python Virtual environment, skip if you already in such environment.
conda create -n monai python=3.6 pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch -c conda-forge
conda activate monai

# Setup dependent packages
./run setup

# Install jupyter notebook and launch jupyter notebook to update tutorials
pip install jupyter

cd notebooks/tutorials
jupyter notebook .

# Launch another terminal and execute the following commands
# Activate the same Python virtual environment. Skip if you are already in such environment
conda activate monai

# launch documents build system in dev mode
./run gen_docs_dev  # then visit webbrowser to see live docs

# Now you can edit docs by changing files in `notebooks/tutorials/*.ipynb` (in Jupyter notebook) and `docs/source/**/*.md` files.

Reference for Markdown(.md) document

For Diagram, we use sphinxcontrib-mermaid.

  • Mermaid syntax
  • We can use classDiagram to visualize Operator(as a class) with multiple input/output labels(input attributes as fields, output attributes as methods) and connections between operators(as an edge label).

You can use the following statements in Jupyter notebook's markdown cell or in .md files.

The workflow of the application would look like this.

```{mermaid}
%%{init: {"theme": "base", "themeVariables": { "fontSize": "16px"}} }%%

classDiagram
    direction LR

    SobelOperator --|> MedianOperator : image...image
    MedianOperator --|> GaussianOperator : image...image

    class SobelOperator {
        <in>image : DISK
        image(out) IN_MEMORY
    }
    class MedianOperator {
        <in>image : IN_MEMORY
        image(out) IN_MEMORY
    }
    class GaussianOperator {
        <in>image : IN_MEMORY
        image(out) DISK
    }
```

Result:

image

@gigony gigony added documentation Improvements or additions to documentation architectural story Work related to architecture labels Sep 14, 2021
@gigony gigony added this to the v0.1.0 milestone Sep 14, 2021
@gigony gigony self-assigned this Sep 14, 2021
@gigony gigony force-pushed the populate_docs branch 9 times, most recently from f249112 to 461d2a8 Compare September 14, 2021 15:28
Signed-off-by: Gigon Bae <gbae@nvidia.com>
Signed-off-by: Gigon Bae <gbae@nvidia.com>
Signed-off-by: Gigon Bae <gbae@nvidia.com>
@gigony gigony changed the title [WIP] Populate initial user guide docs Populate initial user guide docs Sep 15, 2021
@gigony gigony merged commit 18a05ee into main Sep 15, 2021
@gigony gigony requested a review from jonanswer September 15, 2021 17:37
@MMelQin MMelQin deleted the populate_docs branch November 5, 2025 21:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

architectural story Work related to architecture documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants