Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation framework #23

Open
wants to merge 49 commits into
base: main
Choose a base branch
from
Open

Add documentation framework #23

wants to merge 49 commits into from

Conversation

kabilar
Copy link
Member

@kabilar kabilar commented Nov 21, 2024

  • Create documentation framework with Material for Mkdocs
  • Preview available at https://kabilar.github.io/linc-convert/
  • Update custom word list for spellcheck to ignore
  • Implement custom domain at docs.lincbrain.org/linc-convert
    • Will verify this redirect works after merging
  • Autogenerate API docs using mkdocstrings, mkdocs-gen-files, and mkdocs-literate-nav
    • This was the most time consuming part, and I had to make some sacrifices to get this to work.
      • Creating a hybrid navigation in the mkdocs.yml nav section was not possible so the non-API files are hardcoded in gen_ref_pages.py. Below is an example of the autogenerated navigation by gen_ref_pages.py.
      • Using GitHub Actions to publish upon merging is not implemented. I tried a few options but was not able to get it to work with the autogenerated API docs. This is presumably due to some file path issue on the workers. We can tackle this in the future: Create GitHub Actions to publish documentation upon merge #36. We will just need to run mkdocs gh-deploy locally to push updates for now.

Autogenerated navigation:

* [Welcome](index.md)
* [Contribute](contribute.md)
* [About](about.md)
* API
    * [cli](api/cli.md)
    * [modalities](api/modalities/__init__.md)
        * [df](api/modalities/df/__init__.md)
            * [cli](api/modalities/df/cli.md)
            * [multi_slice](api/modalities/df/multi_slice.md)
            * [single_slice](api/modalities/df/single_slice.md)
        * [lsm](api/modalities/lsm/__init__.md)
            * [cli](api/modalities/lsm/cli.md)
            * [mosaic](api/modalities/lsm/mosaic.md)
        * [psoct](api/modalities/psoct/__init__.md)
            * [\_utils](api/modalities/psoct/_utils.md)
            * [cli](api/modalities/psoct/cli.md)
            * [multi_slice](api/modalities/psoct/multi_slice.md)
            * [single_volume](api/modalities/psoct/single_volume.md)
        * [wk](api/modalities/wk/__init__.md)
            * [cli](api/modalities/wk/cli.md)
            * [webknossos_annotation](api/modalities/wk/webknossos_annotation.md)
    * [utils](api/utils/__init__.md)
        * [j2k](api/utils/j2k.md)
        * [math](api/utils/math.md)
        * [orientation](api/utils/orientation.md)
        * [unit](api/utils/unit.md)
        * [zarr](api/utils/zarr.md)

requirements.txt Outdated
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to rename this, so we know it is only for docs? Also, probably we can add this into pyproject.yaml as a dependency group.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @calvinchai, I moved this file to within the docs/ directory. I am not sure how to get MkDocs to work with the pyproject.yaml file.

@kabilar kabilar changed the title Add documentation framework with Mkdocs Material Add documentation framework Nov 22, 2024
@kabilar kabilar marked this pull request as ready for review January 16, 2025 22:31
@kabilar kabilar requested a review from calvinchai January 16, 2025 22:36
@kabilar
Copy link
Member Author

kabilar commented Jan 16, 2025

Hi @calvinchai @balbasty, I have updated the first comment in this pull request to describe the changes proposed. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants