Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
55906d2
Update usage.md
mg-andrews Jun 17, 2025
deb9807
Sphinx Documentation Site Updates
mg-andrews Jul 18, 2025
1ff5a17
Updates before site deployment
mg-andrews Jul 21, 2025
0e94326
Updates to sphinx.yml
mg-andrews Jul 24, 2025
3f4d0cb
Updates to sphinx.yml
mg-andrews Jul 24, 2025
2e83abc
Restructure docs dir
mg-andrews Jul 24, 2025
0cfbdc4
Adding files to source/static
mg-andrews Jul 24, 2025
c17d28e
Coping static file to docs dir
mg-andrews Jul 24, 2025
ba3612a
Updating yml and adding images
mg-andrews Jul 25, 2025
d57be32
File Structuring for Docu Site
mg-andrews Jul 25, 2025
ee1a7ca
Updates to sphinx.yml
mg-andrews Jul 25, 2025
6b4c776
Update sphinx.yml
mg-andrews Jul 25, 2025
2018371
Update sphinx.yml
mg-andrews Jul 25, 2025
1849d5c
Update sphinx.yml
mg-andrews Jul 25, 2025
2f8518f
Update sphinx.yml
mg-andrews Jul 25, 2025
4b135e2
Updates to conf.py
mg-andrews Jul 28, 2025
986c0bb
Update sphinx.yml
jjacobson95 Jul 28, 2025
0da6bf1
Update sphinx.yml
mg-andrews Jul 28, 2025
ea97fb3
Update sphinx.yml
mg-andrews Jul 28, 2025
96be217
Merge branch 'gh-pages' of https://github.com/PNNL-CompBio/coderdata …
mg-andrews Jul 28, 2025
e689803
Update sphinx.yml
mg-andrews Jul 28, 2025
71e7b5e
Update conf.py
mg-andrews Jul 28, 2025
cd04dcf
Update sphinx.yml
mg-andrews Jul 28, 2025
76599c3
Update to sphinx.yml
mg-andrews Jul 29, 2025
8057dcd
Cleaning file structure
mg-andrews Jul 31, 2025
cfbc77e
Update conf.py
mg-andrews Jul 31, 2025
2aba3e0
Updates to documentation
mg-andrews Aug 7, 2025
b29b940
Updates to documenation
mg-andrews Aug 8, 2025
7aa9246
Update sphinx.yml
mg-andrews Aug 8, 2025
b92a931
adding to dataset
alexandriai168 Aug 22, 2025
cdbeba6
added modalities to all datasets
alexandriai168 Sep 2, 2025
ed05e3e
added all refs to dataset.yml
alexandriai168 Sep 2, 2025
7280848
got rid of duplicate entries
alexandriai168 Sep 2, 2025
76ba6cf
accidentally omitted some datasets
alexandriai168 Sep 2, 2025
4d34aa9
correction
alexandriai168 Sep 2, 2025
dd8a196
adding all ds
alexandriai168 Sep 2, 2025
2cc39ec
making functions for calc sample drug omics pairs
alexandriai168 Sep 4, 2025
d7a54a7
finished curve fitting metrics stats
alexandriai168 Sep 8, 2025
548aab4
Merge branch 'documentation-staging' of https://github.com/PNNL-CompB…
alexandriai168 Sep 9, 2025
e14562b
adding dataset documentation metrics and adding to rst file
alexandriai168 Sep 16, 2025
ba1ecbc
Merge branch 'main' of https://github.com/PNNL-CompBio/coderdata into…
alexandriai168 Sep 16, 2025
779d4fd
new changes to datasets included rst and static files assocated with …
alexandriai168 Sep 29, 2025
29f1d78
adding built docs for dataset documentation
alexandriai168 Sep 30, 2025
dc53076
Merge branch 'documentation-staging' into dataset_documentation
alexandriai168 Sep 30, 2025
90801f1
Merge pull request #466 from PNNL-CompBio/dataset_documentation
sgosline Oct 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions .github/workflows/sphinx.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
name: Sphinx-docs

on:
push:
branches:
- main
- documentation-staging
workflow_dispatch:

jobs:
pages:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Install Pandoc
uses: pandoc/actions/setup@v1
with:
version: 3.5

- name: Install dependencies
run: pip install -r docs/requirements.txt

- name: Build HTML
run: python -m sphinx.cmd.build -M html docs/source docs/build

- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: html-docs
path: docs/build/html/

# - name: Deploy
# uses: sphinx-notes/pages@v3
# with:
# publish: true

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.DOCSITE_TOKEN }}
publish_branch: gh-pages
publish_dir: docs/build/html
20 changes: 20 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
406 changes: 236 additions & 170 deletions coderdata/dataset.yml

Large diffs are not rendered by default.

File renamed without changes.
Empty file added docs/.nojekyll
Empty file.
20 changes: 20 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#

# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build

# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

.PHONY: help Makefile

# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
141 changes: 141 additions & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,141 @@

# Documentation Site Using Sphinx

This document includes:
- [The Sphinx local directory structure](#local-directory-structure)
- [Sphinx commands](#sphinx-commands)
- [Guide to updating the documentation site](#updating-the-documentation-site)
- [Helpful sphinx features](#helpful-sphinx-features)
- [Site Deployment](#deploying-the-documentation-site-using-github-actions)


## Local Directory Structure

![Directory Structure](local_struct.jpg?raw=true)

## Sphinx Commands

### Dependencies

Included in `coderdata/docs/requirements.txt`. Example installations that enable various sphinx extensions.

- sphinx
- myst-parser - adds support for markdown files
- sphinx-design - provides extra design functions (i.e buttons and grids)
- nbsphinx - enables rendering of .ipynb files
- sphinx_tabs - adds tabbed content components

### Build

To build the Sphinx documentation locally, navigate to the `docs/` directory and run the `sphinx-build` command. This command processes the content files from the `docs/source/` directory and generates the rendered HTML output in the `docs/build/` directory.

```sh
$ cd ../coderdata/docs

$ python -m sphinx.cmd.build -M html <SOURCEDIR/> <OUTPUTDIR/>

$ python -m sphinx.cmd.build -M html source/ build/
```
To view the rendered site open `coderdata/docs/build/html/index.html`.

### Quickstart

To create a basic sphinx set-up in a local repository use sphinx quickstart command.

```sh
$ cd ../repo/docs
$ python -m sphinx.cmd.quickstart
```
Questions will follow this command and when it prompts if you'd like to separate the source and build directories select yes.

## Updating the Documentation Site

The `conf.py` file is the central configuration file for Sphinx and it determines the behavior and appearance of the generated documentation. Specifically it configures extensions, defines metadata, controls output settings, and customizes sphinx behavior. The `index.rst` file is the starting page for the Sphinx documentation build process. It acts as the root file, linking all other pages and defining the document hierarchy. All other .md and .rst files are added and internally referenced within the index page and/or within the sidebar.

### Pages
**Note:** All updates will be made in the `documentation-staging` branch.\
To update pages navigate to `docs/source/`, all .rst and .md files live here. Here is a reference of the main pages used for the documentation site. The tutorial page consists if the docsite_tutorial.ipynb converted to an html. The notebook lives in `docs/source/_notebooks/` and is converted to an html during the build process based on code within `conf.py`.

| Page | File Name | Content |
| -----------------| ----------------------------------------------------------------------- | ------------------------------ |
| Home Page | index.rst | Introduction and Install |
| Usage | usage.md | API and CLI |
| API Reference | APIreference.rst | Autogenerated documentation from docstrings|
| Datasets | datasets_included.rst | Datasets overview |
| Tutorial | docsite_tutorial.ipynb | Deep Learning Tutorial |
| Contributing | contribution_guide.rst *includes contribution.md and add_code_guide.md* | Contribution Guide |

**Note:**
- When adding pages, reStructuredText files are the most sphinx friendly and allow for use of helpful directives. However, Markdown files can be used and will render properly when the myst-parser extension is used.
- New pages must be added to the `.. toctree::` in the `index.rst` to be recognized by Sphinx.
- Currently the API reference does not include documentation for `plot_2D_respones_metric`, `format`, `split_train_test_validate`, and `split_train_other`. It seems that the most updated `coderdata` directory currently does not include docstrings for these functions.

### Tutorial

The tutorial is sourced in `source/_notebooks/` and when built pushed to `_notebooks/` in `gh-pages` branch. It uses nbsphinx extension to convert from .ipynb to an html and is referenced in the `index.rst` and the `my_custom_sidebar.html`. The dependencies for this should only be needed in your local environment and not in the `requirements.txt`.

### Images and Graphics

To add any new images they will live in `docs/source/_static/` and when built are pushed to `_images` in `gh-pages` branch. The coderdata_header.jpg was made using [canva](https://www.canva.com/) and coderdata_1.jpg was made using biorender.

### Site Theme and Design

The original sphinx theme used is 'sphinxdoc', however, to change certain aspects I created `custom.css` to override the sphinxdoc theme. To update the custom theme navigate to `docs/source/_static/custom.css`. Changes to the sidebar can be made in `docs/source/_templates/my_custom_sidebar.html`. Any other custom templates will be added to `docs/source/_templates/`.

**Note:** The sphinxdoc theme is auto-generated during the build command into `docs/build/html/_static/sphinxdoc.css`. It is regenerated everytime sphinx build runs so changes must be made in custom.css.


## Helpful Sphinx Features

### Site Links

- [sphinx-doc.org](https://www.sphinx-doc.org/en/master/index.html)
- [sphinx.org/sample-sites](https://sphinx-themes.org/sample-sites/default-sphinxdoc/)
- [sphinx.org/directives](https://www.sphinx-doc.org/en/master/usage/restructuredtext/basics.html#rst-directives)


### Directives and Examples Used in CoderData Documentation

- .. automodule::
This is used to generate documentation from the package. It is used in API reference.

```sh
.. automodule:: <pkg>.module
:members: <function>
:undoc-members:
:show-inheritance:
```

- .. include::
To include content from another file. Example shows how to render a markdown file when using the include call.

```sh
.. include:: guide.md
:parser: myst_parser.sphinx_
```

- .. image::

```sh
.. image:: _static/image.png
:align: center
:scale: 100%
```
## Deploying the Documentation Site Using Github Actions

### Directory Structure for Deployment with Relevant Branches

![Directory Structure](deploy_struct.jpg?raw=true)

### Site Deployment

- We added `sphinx.yml` to the `.github/workflows/` directory in the `documentation-staging` branch.

- Then in `documentation-staging` we included all the source directory files that are needed to build the documentation. (These are all the same files that are needed to build the documentation locally, the only addition is `requirements.txt`).
**Note:** If you have been building the documentation locally and then are moving to commit to the staging branch there is no need to include any files from `docs/build/` directory.

- Once a push is made from `documentation-staging` the workflow is triggered.

- The built html files are then deployed to the root of the `gh-pages` branch. The included files in the branch are shown in the graphic above.

**Note:** When updates to the python files in `coderdata` directory occur in `main`, those changes must be transfered to the `documentation-staging` branch in order for Sphinx to see the updated docstrings with the functions and correctly autogenerate the documentation for the API reference page.
Binary file removed docs/Rplots.pdf
Binary file not shown.
11 changes: 0 additions & 11 deletions docs/_config.yml

This file was deleted.

4 changes: 0 additions & 4 deletions docs/_data/beataml_table.csv

This file was deleted.

5 changes: 0 additions & 5 deletions docs/_data/broad_sanger_table.csv

This file was deleted.

5 changes: 0 additions & 5 deletions docs/_data/cptac_table.csv

This file was deleted.

2 changes: 0 additions & 2 deletions docs/_data/figshare_latest.yml

This file was deleted.

4 changes: 0 additions & 4 deletions docs/_data/hcmi_table.csv

This file was deleted.

5 changes: 0 additions & 5 deletions docs/_data/mpnst_table.csv

This file was deleted.

41 changes: 0 additions & 41 deletions docs/_data/stats.yml

This file was deleted.

73 changes: 0 additions & 73 deletions docs/_layouts/default.html

This file was deleted.

Loading