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

[WIP] Docs describing the Genotype Call XArray #78

Closed
wants to merge 7 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
27 changes: 27 additions & 0 deletions Contribute-Docs.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
Contributions towards documentations and examples are always welcome!

Documentation is built using [Sphinx.](https://www.sphinx-doc.org/en/master/). If you've ever seen any docs over at [readthedocs](https://readthedocs.org/) then you've likely seen some examples of sphinx out in the wild.

## Build the Documentation

These instructions require that you have docker installed. The best way to do that is to follow the installation instructions at [Get Docker](https://docs.docker.com/get-docker/). The upside to this is that you don't need to clobber any existing conda environments in order to build your docs.

You don't need to have any particular understanding of docker to run these commands. We are treating the docker image as a shell.

```
docker build -t sphinx-sgkit -f docs/Dockerfile .
cd docs
docker run --rm -i -v "$(pwd):/docs" sphinx-sgkit make clean html
```

## Serve the Documentation

Now that we've run built the docs let's view them in their native html state.

```
# You can use any port you'd like instead of 8080
docker run -p 8080:80 -v "$(pwd)/_build/html:/usr/share/nginx/html:ro" nginx
```

Now open up localhost:8080 in your browser and you'll see the docs just as they appear on the docs website.

19 changes: 19 additions & 0 deletions docs/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
FROM continuumio/miniconda3

RUN apt-get update \
&& apt-get install --no-install-recommends -y \
graphviz \
imagemagick \
make \
git \
&& apt-get autoremove \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*

WORKDIR /docs
ADD requirements-dev.txt /docs/

RUN conda install -y -c conda-forge scikit-allel sphinx nbsphinx pip pandoc && \
pip3 install -r requirements-dev.txt && \
pip3 install git+https://github.com/pystatgen/sgkit@96203d471531e7e2416d4dd9b48ca11d660a1bcc

12 changes: 12 additions & 0 deletions docs/examples.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Examples
========

Understanding the Xarray Genotype Call Dataset
**********************************************

.. toctree::
:maxdepth: 1

examples/understanding-genotype-call-xarray-dataset/Genotype-Call-Dataset-From-VCF
examples/understanding-genotype-call-xarray-dataset/Genotype-Call-Dataset-From-SGKit-Zarr
examples/understanding-genotype-call-xarray-dataset/Genotype-Call-Dataset-Minimal-Numpy-Example
1,153 changes: 1,153 additions & 0 deletions docs/examples/notebooks/Genotype-Call-Dataset-From-SGKit-Zarr.ipynb

Large diffs are not rendered by default.

Loading