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

Set up Read The Docs (RTD) Scaffolding and Sketch Docs Website #202

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

jhiemstrawisc
Copy link
Collaborator

This sets up some of the basics the SPRAS team has discussed w.r.t. building an official documentation website. I tried to focus on organization/scaffolding for the docs, and not so much the content (which I'm less qualified to write).

I also spent some time putting together some meta docs to explain to others how to write/build/visualize any documentation changes they may choose to make. My hope is that I can help the group with formatting, structure, and hosting, and others can work on the biology

While the changes in this PR function to generate documentation, this doesn't yet address the actual hosting of any documentation, which is outside the scope of what I can accomplish in a PR because it requires RTD account creation and the generation of github secrets.

Here's a screenshot of the landing page these changes currently produce:
Screenshot 2025-01-30 at 11 52 49

@jhiemstrawisc jhiemstrawisc added the documentation Improvements or additions to documentation label Jan 30, 2025
@jhiemstrawisc
Copy link
Collaborator Author

A few questions I have at this point:

  1. What should we do about the existing doc/ folder, that holds a few markdown files and an image that's linked into the root README? It'll be confusing to have both a doc/ and a docs/ folder, but the contents of doc/ really don't belong in docs/ because they're not built into the website.
  2. Funny enough, we already had a lot of the sphinx and read the docs dependencies baked into our pyproject.toml and environment.yml. I suspect these really aren't dependencies unless you're planning to work on documentation. Does anyone foresee any issues moving these into the "optional" sections of those dependency declarations?

Copy link
Collaborator

@agitter agitter left a comment

Choose a reason for hiding this comment

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

The initially structure looks really great. I understand most of the pieces but not necessarily how every single file fits together.

What should we do about the existing doc/ folder

I believe we can convert all the markdown files there into something that would be part of the SPRAS docs. Would that involve converting to rst?

@@ -24,3 +24,14 @@ repos:
rev: 'v0.0.269'
hooks:
- id: ruff
# Hook to enforce a consistent markdown linewrap policy
Copy link
Collaborator

Choose a reason for hiding this comment

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

I actually dislike line wrapped markdown. The preference comes from our Manubot project for writing collaborative manuscripts with markdown, where we recommend one sentence per line. I would be okay enforcing that with a hook.

[Read The Docs](https://docs.readthedocs.com/platform/stable/), or RTD, is the
documentation hosting platform the SPRAS team has chosen to use for hosting its
official documentation. As a platform, it automatically builds and versions docs
based on the contents of the `docs/` file in this repository by periodically
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
based on the contents of the `docs/` file in this repository by periodically
based on the contents of the `docs/` directory in this repository by periodically

While Read the Docs is the platform that builds and hosts documentation, it is
distinct from the actual tool/package responsible for generating the HTML
content. That tool is [`sphinx`](https://www.sphinx-doc.org/en/master/), a
popular python python package that tries to make documentation easy to write,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
popular python python package that tries to make documentation easy to write,
popular python package that tries to make documentation easy to write,

in general, this website) walks you through the basics of using sphinx to
create documentation. In particular, it helps you figure out how to achieve
the information layouts you may be after, such as certain content appearing in
a ToC.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
a ToC.
a table of contents.

these warnings, so if you see any, try to understand what they mean and how you
can fix them.

Once you have a successful build, the [\_build](_build) directory will contain
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this going to be committed? The text below suggests no, should should we remove the link? We already ignore it.


We welcome contributions to SPRAS! If you would like to contribute, please follow the guidelines below.

Adding New PRMs
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'd like to avoid the PRM algorithm in the docs. We could call these "Algorithms" generically if space is limited or "Network Algorithims" if we have a little more space.

@annaritz what do you think?

SPRAS Python Modules
====================

.. automodule:: spras
Copy link
Collaborator

Choose a reason for hiding this comment

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

We'll have to add these for each new module manually?

All Pairs
=========

Here's a description of the PRM.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can we link this to the auto-generated API documentation for the module?

@@ -0,0 +1,44 @@
Pathway Reconstruction Methods
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is another area where we'll need to update the contribution guide if the list of algorithms needs to be extended manually.

@@ -24,6 +24,6 @@ dependencies:
- mock=4.0
- recommonmark=0.7
- sphinx=6.0
- sphinx-rtd-theme=3.0.1
- pip:
- graphspace_python==1.3.1
Copy link
Collaborator

Choose a reason for hiding this comment

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

I believe the sphinx dependencies came from graphspace. That is currently a required packaged for one of our pathway output file formats, so all of its dependencies may also be required.

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

Successfully merging this pull request may close these issues.

2 participants