-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Christopher JF Cameron
authored and
Christopher JF Cameron
committed
Jun 20, 2023
1 parent
c4bd940
commit 46d148b
Showing
19 changed files
with
857 additions
and
291 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# .readthedocs.yaml | ||
# Read the Docs configuration file | ||
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details | ||
|
||
# Required | ||
version: 2 | ||
|
||
# Set the version of Python and other tools you might need | ||
build: | ||
os: ubuntu-22.04 | ||
tools: | ||
python: "mambaforge-4.10" | ||
|
||
conda: | ||
environment: docs/environment.yml | ||
|
||
# Build documentation in the docs/ directory with Sphinx | ||
sphinx: | ||
configuration: docs/conf.py |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# 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 | ||
|
||
import os | ||
import subprocess | ||
import sys | ||
|
||
sys.path.insert(0, os.path.abspath('.')) | ||
|
||
|
||
def convert_readme_to_rest(): | ||
""" | ||
Converts GitHub README (MarkDown) to Sphinx reST format | ||
""" | ||
# myst-parser doesn't include titles in toctree nor properly handles images | ||
# steps: | ||
# 1) converts from MarkDown to reST | ||
# 2) remove redundant REPIC header | ||
subprocess.run(["""pandoc ../README.md -f gfm -t rst -s -o readme.rst"""], | ||
shell=True) | ||
# ; perl -i -p0e 's/REPIC\n=====\n\n//se' readme.rst | ||
# update local REPIC schematic image | ||
# steps: | ||
# 1) cp imgs/ to sphinx_docs/ | ||
# 2) update overview img reference in readme.rst | ||
# 3) update icon img reference in readme.rst | ||
subprocess.run(["""cp -R ../imgs .; | ||
echo ".. image:: imgs/repic_overview.png | ||
:width: 90% | ||
:alt: REPIC schematic | ||
:align: center | ||
|" > tmp.txt; | ||
perl -i -p0e 's/\.\. raw:: html\n\n <p align=(.|\n)*\.png">\n <\/p>\n/`cat tmp.txt`/se' readme.rst; | ||
echo ".. image:: imgs/repic_icon.png | ||
:width: 25% | ||
:alt: REPIC icon" > tmp.txt; | ||
perl -i -p0e 's/\.\. raw:: html\n\n <img width=.*\.png">\n/`cat tmp.txt`/se' readme.rst; | ||
rm tmp.txt"""], | ||
shell=True) | ||
|
||
|
||
convert_readme_to_rest() | ||
|
||
# -- Project information ----------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information | ||
|
||
project = 'REPIC' | ||
copyright = '2023, Christopher JF Cameron' | ||
author = 'Christopher JF Cameron' | ||
release = '0.0.0' | ||
|
||
# -- General configuration --------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration | ||
|
||
extensions = [ | ||
'autoapi.extension', | ||
'sphinx.ext.napoleon' | ||
] | ||
autoapi_dirs = ['../repic'] | ||
autoapi_type = "python" | ||
|
||
templates_path = ['_templates'] | ||
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store'] | ||
|
||
|
||
# -- Options for HTML output ------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output | ||
|
||
html_theme = 'sphinx_rtd_theme' | ||
html_theme_options = { | ||
'collapse_navigation': False, | ||
} | ||
html_static_path = ['_static'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
name: repic | ||
channels: | ||
- bioconda | ||
- conda-forge | ||
- defaults | ||
dependencies: | ||
- python=3.8 | ||
- repic | ||
- pandoc | ||
- sphinx==6.2.1 | ||
- sphinx_rtd_theme | ||
- sphinx-autoapi | ||
- pip: | ||
- readthedocs-sphinx-search | ||
prefix: /Users/ccameron/miniconda3/envs/repic |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
Welcome to REPIC's documentation! | ||
================================= | ||
|
||
REliable PIcking by Consensus (REPIC) identifies cryogenic electron microscopy | ||
(cryo-EM) particles common to multiple picked particle sets using graph theory | ||
and integer linear programming. | ||
|
||
.. toctree:: | ||
:maxdepth: 3 | ||
:caption: Contents: | ||
|
||
readme.rst | ||
autoapi/index.rst |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
#!/usr/bin/env python3 | ||
__version__ = "0.0.0" | ||
__version__ = "0.1.0" |
Oops, something went wrong.