Skip to content

Commit

Permalink
basic sphinx docs
Browse files Browse the repository at this point in the history
  • Loading branch information
KatyBrown committed Mar 28, 2024
1 parent f6e8036 commit b071940
Show file tree
Hide file tree
Showing 11 changed files with 136 additions and 0 deletions.
20 changes: 20 additions & 0 deletions man/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 = .
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)
57 changes: 57 additions & 0 deletions man/conf.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Configuration file for the Sphinx documentation builder.
#
# This file only contains a selection of the most common options. For a full
# list see the documentation:
# https://www.sphinx-doc.org/en/master/usage/configuration.html

# -- Path setup --------------------------------------------------------------

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
# import os
import sys
sys.path.insert(0, "../plot_phylo")


# -- Project information -----------------------------------------------------

project = 'plot_phylo'
copyright = '2024 Katy Brown, Duncan Cross'
author = 'Katy Brown, Duncan Cross'

# The full version, including alpha/beta/rc tags
release = '0.1.6'


# -- General configuration ---------------------------------------------------

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['recommonmark', 'sphinx_markdown_tables', 'sphinx.ext.autodoc']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']

root_doc = 'contents'

# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
import sphinx_rtd_theme
html_theme = "sphinx_rtd_theme"
html_theme_path = [sphinx_rtd_theme.get_html_theme_path()]

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
12 changes: 12 additions & 0 deletions man/contents.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
plot_phylo
==========

.. toctree::
:maxdepth: 3

pages/introduction.md
pages/installation.md
pages/quickstart.md
pages/parameters.md
pages/functions.rst
pages/detailed.md
1 change: 1 addition & 0 deletions man/pages/detailed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Detailed Example
File renamed without changes
7 changes: 7 additions & 0 deletions man/pages/functions.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Functions
======================

.. automodule:: plot_phylo
:members:
:undoc-members:
:show-inheritance:
18 changes: 18 additions & 0 deletions man/pages/installation.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
## Installation

**Requirements**

* python >= 3.6
* matplotlib >= 2.1.1
* ete3 >= 3.1.0

## Installation
The module can be installed using pip

`pip install plot_phylo`

You can also download the latest release [here](https://github.com/KatyBrown/plot_phylo/releases/latest)

Or clone the GitHub repository directly.

`git clone [email protected]:KatyBrown/plot_phylo.git`
18 changes: 18 additions & 0 deletions man/pages/introduction.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Introduction

This module allows the user to plot a phylogenetic tree on an existing matplotlib axis.

This means that:
* Phylogenies can be incorporated into existing plots.
* Annotations can be added using standard matplotlib functionality.
* Plots can be output in png, pdf, svg or tiff formats.
* Automatically generated and updated figures can include phylogenies

1. [Installation](installation.md)
2. [Quick Start](quickstart.md)
3. [Incorporating Matplotlib Parameters](matplotlib.md)
4. [Parameters](parameters.md)
5. [Functions](functions.md)
6. [Detailed Example](detailed.md)

![Illustration](examples/layered.png "Illustration")
1 change: 1 addition & 0 deletions man/pages/matplotlib.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Incorporating Matplotlib Parameters
1 change: 1 addition & 0 deletions man/pages/parameters.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Parameters
1 change: 1 addition & 0 deletions man/pages/quickstart.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# Quick Start

0 comments on commit b071940

Please sign in to comment.