Skip to content

Commit

Permalink
Merge branch 'main' of github.com:calico/baskerville into ism
Browse files Browse the repository at this point in the history
davek44 committed Dec 19, 2023
2 parents ca640ba + 3a8f204 commit 3e0a7d4
Showing 13 changed files with 364 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Baskerville Docs

on:
workflow_dispatch:
inputs:
python-version:
default: "3.10"
required: false
type: string

defaults:
run:
shell: bash

permissions:
contents: write
jobs:
docs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v3

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
# You can test your matrix by printing the current Python version
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Install dependencies
run: |
cd ${{ github.workspace }}/src/docs
pip install -r requirements.txt
- name: Sphinx build
run: |
cd ${{ github.workspace }}/src/docs/source
rm -f *.rst make.bat
cd ${{ github.workspace }}/src
sphinx-apidoc -F -a -o docs/source baskerville
cd ${{ github.workspace }}/src/docs
make html
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
publish_branch: gh-pages
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ${{ github.workspace }}/src/docs/build/html
force_orphan: true
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -10,6 +10,12 @@ Baskerville provides researchers with tools to:

---

### Documentations

Documentation page: https://calico.github.io/baskerville/index.html

---

### Installation

`git clone git@github.com:calico/baskerville.git`
Empty file.
Empty file.
20 changes: 20 additions & 0 deletions src/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)
Empty file added src/docs/build/.placeholder
Empty file.
35 changes: 35 additions & 0 deletions src/docs/make.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
@ECHO OFF

pushd %~dp0

REM Command file for Sphinx documentation

if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build

%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.https://www.sphinx-doc.org/
exit /b 1
)

if "%1" == "" goto help

%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
goto end

:help
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%

:end
popd
23 changes: 23 additions & 0 deletions src/docs/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
h5py~=3.7.0
intervaltree~=3.1.0
joblib~=1.1.1
matplotlib~=3.7.1
google-cloud-storage~=2.0.0
natsort~=7.1.1
networkx~=2.8.4
numpy
pandas~=1.5.3
pybigwig~=0.3.18
pysam~=0.21.0
pybedtools~=0.9.0
qnorm~=0.8.1
seaborn~=0.12.2
scikit-learn~=1.2.2
scipy~=1.9.1
sphinx
sphinx_rtd_theme
sphinxcontrib-apidoc
statsmodels~=0.13.5
tensorflow==2.13.0
tabulate~=0.8.10
tqdm~=4.65.0
19 changes: 19 additions & 0 deletions src/docs/source/baskerville.helpers.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
baskerville.helpers Subpackages of helpers for the Baskerville package.
==============================================================================

Submodules
----------

baskerville.helpers.gcs_utils module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: baskerville.helpers.gcs_utils
:members:
:undoc-members:
:show-inheritance:

baskerville.helpers.utils module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: baskerville.helpers.utils
:members:
:undoc-members:
:show-inheritance:
98 changes: 98 additions & 0 deletions src/docs/source/baskerville.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,98 @@
baskerville package
===================


Subpackages
-----------

.. toctree::
:maxdepth: 4

baskerville.helpers
baskerville.scripts

Submodules
----------

baskerville.bed module
~~~~~~~~~~~~~~~~~~~~~~

.. automodule:: baskerville.bed
:members:
:undoc-members:
:show-inheritance:

baskerville.blocks module
~~~~~~~~~~~~~~~~~~~~~~~~~

.. automodule:: baskerville.blocks
:members:
:undoc-members:
:show-inheritance:

baskerville.dataset module
~~~~~~~~~~~~~~~~~~~~~~~~~~

.. automodule:: baskerville.dataset
:members:
:undoc-members:
:show-inheritance:

baskerville.dna module
~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: baskerville.dna
:members:
:undoc-members:
:show-inheritance:


baskerville.gene module
~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: baskerville.gene
:members:
:undoc-members:
:show-inheritance:

baskerville.layers module
~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: baskerville.layers
:members:
:undoc-members:
:show-inheritance:

baskerville.metrics module
~~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: baskerville.metrics
:members:
:undoc-members:
:show-inheritance:

baskerville.seqnn module
~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: baskerville.seqnn
:members:
:undoc-members:
:show-inheritance:

baskerville.snps module
~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: baskerville.snps
:members:
:undoc-members:
:show-inheritance:

baskerville.trainer module
~~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: baskerville.trainer
:members:
:undoc-members:
:show-inheritance:

baskerville.vcf module
~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: baskerville.vcf
:members:
:undoc-members:
:show-inheritance:


53 changes: 53 additions & 0 deletions src/docs/source/baskerville.scripts.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
baskerville.scripts Subpackages of scripts for the Baskerville project.
=============================================================

"""
This package contains scripts for the Baskerville project
that are not part of the main codebase.

"""
Submodules
==========

baskerville.scripts.hound_eval_spec module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: baskerville.scripts.hound_eval_spec
:members:
:undoc-members:
:show-inheritance:

baskerville.scripts.hound_eval module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: baskerville.scripts.hound_eval
:members:
:undoc-members:
:show-inheritance:

baskerville.scripts.hound_predbed module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: baskerville.scripts.hound_predbed
:members:
:undoc-members:
:show-inheritance:


baskerville.scripts.hound_snp module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: baskerville.scripts.hound_snp
:members:
:undoc-members:
:show-inheritance:

baskerville.scripts.hound_snp_slurm module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: baskerville.scripts.hound_snp_slurm
:members:
:undoc-members:
:show-inheritance:

baskerville.scripts.hound_train module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: baskerville.scripts.hound_train
:members:
:undoc-members:
:show-inheritance:
43 changes: 43 additions & 0 deletions src/docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
# Configuration file for the Sphinx documentation builder.
#
# For the full list of built-in configuration values, see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Project information -----------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
import os
import sys

# This root should be where docs folder is visible.
sys.path.insert(0, os.path.abspath("../.."))
sys.path.insert(0, os.path.abspath("../../baskerville"))
sys.path.insert(0, os.path.abspath("../../baskerville/scripts"))
sys.path.insert(0, os.path.abspath("../../bashkerville/helpers"))

sys.setrecursionlimit(1500)

project = "baskerville"
copyright = "2023, David Kelly"
author = "David Kelly"
release = "0.0.1"

# -- General configuration ---------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration

extensions = [
"sphinx.ext.autodoc",
"sphinx.ext.viewcode",
"sphinx.ext.napoleon",
"sphinx.ext.githubpages",
"sphinxcontrib.apidoc",
]

templates_path = ["_templates"]
exclude_patterns = []


# -- Options for HTML output -------------------------------------------------
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output

html_theme = "sphinx_rtd_theme"
html_static_path = ["_static"]
16 changes: 16 additions & 0 deletions src/docs/source/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
Welcome to baskerville's documentation!
=======================================

.. toctree::
:maxdepth: 4
:caption: Contents:

baskerville


Indices and tables
==================

* :ref:`genindex`
* :ref:`modindex`
* :ref:`search`

0 comments on commit 3e0a7d4

Please sign in to comment.