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 mkdocs documentation #66

Merged
merged 1 commit into from
Dec 2, 2024
Merged

Add mkdocs documentation #66

merged 1 commit into from
Dec 2, 2024

Conversation

johnbradley
Copy link
Collaborator

Simplifies the README and adds a mkdocs-based documentation website. Pulls changes from the wiki. After this change the wiki will not be used. Adds logic to pull in python API.

To build/view the documentation run:

pip install mkdocs mkdocs-material mkdocstrings-python mkdocs-material-extensions
mkdocs serve

Fixes #65

@johnbradley johnbradley marked this pull request as ready for review November 26, 2024 15:40
@thompsonmj
Copy link
Contributor

Can we add the following to pyproject.toml:

[project.optional-dependencies]
docs = [
    "mkdocs",
    "mkdocs-material",
    "mkdocs-material-extensions",
    "mkdocstrings-python"
]

Then for local testing, pip install .[docs] will let you mkdocs serve it.

Copy link
Member

@egrace479 egrace479 left a comment

Choose a reason for hiding this comment

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

This looks great! A few stylistic suggestions and I think a couple pages are missing.

src/bioclip/predict.py Outdated Show resolved Hide resolved
docs/command-line-tutorial.md Outdated Show resolved Hide resolved
docs/python-tutorial.md Outdated Show resolved Hide resolved
docs/python-tutorial.md Outdated Show resolved Hide resolved
mkdocs.yml Show resolved Hide resolved
mkdocs.yml Show resolved Hide resolved
src/bioclip/predict.py Outdated Show resolved Hide resolved
src/bioclip/predict.py Outdated Show resolved Hide resolved
Copy link
Member

@egrace479 egrace479 left a comment

Choose a reason for hiding this comment

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

Last two suggestions and I think it's good!

I'd just add a note on the homepage of the wiki that the docs have moved to the site in case anyone's looking there for now.

docs/apptainer.md Outdated Show resolved Hide resolved
docs/docker.md Outdated Show resolved Hide resolved
@egrace479
Copy link
Member

egrace479 commented Nov 26, 2024

Since this is going to supplant #61, wanted to recall this change suggestion. It probably requires an updated test too, so a bit out-of-scope here, but it's related and don't want it getting lost.

EDIT: I realize this is resolved in #63.

Copy link
Member

@egrace479 egrace479 left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Contributor

@thompsonmj thompsonmj left a comment

Choose a reason for hiding this comment

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

Two inline points.

Also optionally, we could add a link to the PyPI package in the footer of the site by placing:

extra:
  social:
    - icon: simple/pypi
      link: https://pypi.org/project/pybioclip/

into mkdocs.yml.

another option would be for the Docker image with:

    - icon: simple/docker
      link: https://github.com/Imageomics/pybioclip/pkgs/container/pybioclip

To do the same for the Apptainer image, it would need a custom icon because I couldn't find the Apptainer logo in the default sources.

This only looks any good with 2 or more icons down there in my opinion

pyproject.toml Outdated Show resolved Hide resolved
docs/index.md Outdated Show resolved Hide resolved
@johnbradley
Copy link
Collaborator Author

johnbradley commented Nov 27, 2024

Using social for pypi and docker seems incorrect to me. PyPi and docker aren't social media.

Copy link
Contributor

@thompsonmj thompsonmj left a comment

Choose a reason for hiding this comment

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

One optional comment, otherwise looks good!

Copy link
Member

@hlapp hlapp left a comment

Choose a reason for hiding this comment

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

See inline edits and comments.

docs/docker.md Outdated

A docker container for pybioclip is hosted at [ghcr.io](https://github.com/Imageomics/pybioclip/pkgs/container/pybioclip).
This container has CPU support for Mac, Windows, and Linux. GPU(CUDA) support is only for Windows and Linux.
In order to access your images the docker container requires you to [mount a volume](https://docs.docker.com/engine/storage/volumes). To avoid redownloading various bioclip files mounting a volume to hold a `.cache` directory to is recommended. By default the working and home directories for this container are both set to `/home/bcuser`.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
In order to access your images the docker container requires you to [mount a volume](https://docs.docker.com/engine/storage/volumes). To avoid redownloading various bioclip files mounting a volume to hold a `.cache` directory to is recommended. By default the working and home directories for this container are both set to `/home/bcuser`.
In order to access your images the docker container requires you to [mount a volume](https://docs.docker.com/engine/storage/volumes). To avoid redownloading various bioclip files mounting a volume to hold a `.cache` directory is recommended. By default the working and home directories for this container are both set to `/home/bcuser`.

The .cache directory needs to be in the home directory, i.e., /home/bcuser, right? Should we therefore say ~/.cache, or how is this best clarified as instruction?

Copy link
Collaborator Author

@johnbradley johnbradley Dec 2, 2024

Choose a reason for hiding this comment

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

The examples below show OS specific ways of mounting in a directory (eg. -v $(pwd):/home/bcuser).

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The cache directory could be any directory. For example lab members might share a single directory. Users just need to mount a directory to hold .cache.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I'll create an issue for this so we can proceed with this PR.

mkdocs.yml Outdated
- content.code.annotate

copyright: >
The Imageomics Institute is supported by the National Science Foundation under Award No. 2118240 "HDR Institute: Imageomics: A New Frontier of Biological Information Powered by Knowledge-Guided Machine Learning." Any opinions, findings and conclusions or recommendations expressed in this material are those of the author(s) and do not necessarily reflect the views of the National Science Foundation.
Copy link
Member

Choose a reason for hiding this comment

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

This is an acknowledgment statement, not a copyright or license statement. But I suppose this is the only way to place this as a footer or something?

I'd argue that (1) this doesn't have to be a footer on every page, and (2) is perhaps best kept on an acknowledgments page.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is the same content from the imageomics guide footer.
Added here #66 (comment).

I'll move this to an Acknowledgments page so we can see how that looks.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Screenshot 2024-12-02 at 9 51 28 AM

Copy link
Member

Choose a reason for hiding this comment

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

Acknowledgment page looks great 👍

Reduces size of the README and creates a mkdocs documentation
website. Pulls changes from the wiki. After this change the
wiki will not be used.

To install and serve docs:
```
pip install .[docs]
mkdocs serve
```

Fixes #65

Co-authored-by: Elizabeth Campolongo <[email protected]>
Co-authored-by: Matt Thompson <[email protected]>
Co-authored-by: Hilmar Lapp <[email protected]>
@johnbradley johnbradley merged commit f80d1ae into main Dec 2, 2024
1 check passed
@johnbradley johnbradley deleted the cleanup-docs branch December 2, 2024 15:24
This was referenced Dec 3, 2024
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.

Cleanup Documentation
4 participants