-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7 from rgrupesh/sphinx-modified
Sphinx theme modified
- Loading branch information
Showing
18 changed files
with
480 additions
and
1 deletion.
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
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,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) |
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,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 |
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,27 @@ | ||
alabaster==0.7.12 | ||
Babel==2.10.3 | ||
beautifulsoup4==4.11.1 | ||
certifi==2022.6.15 | ||
charset-normalizer==2.1.0 | ||
docutils==0.17.1 | ||
idna==3.3 | ||
imagesize==1.4.1 | ||
Jinja2==3.1.2 | ||
MarkupSafe==2.1.1 | ||
packaging==21.3 | ||
pydata-sphinx-theme==0.9.0 | ||
Pygments==2.12.0 | ||
pyparsing==3.0.9 | ||
pytz==2022.1 | ||
requests==2.28.1 | ||
snowballstemmer==2.2.0 | ||
soupsieve==2.3.2.post1 | ||
Sphinx==4.5.0 | ||
sphinx_design==0.2.0 | ||
sphinxcontrib-applehelp==1.0.2 | ||
sphinxcontrib-devhelp==1.0.2 | ||
sphinxcontrib-htmlhelp==2.0.0 | ||
sphinxcontrib-jsmath==1.0.1 | ||
sphinxcontrib-qthelp==1.0.3 | ||
sphinxcontrib-serializinghtml==1.1.5 | ||
urllib3==1.26.11 |
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,4 @@ | ||
# Building Documentation | ||
|
||
- Make changes in api.py | ||
- To build, run `make html` or `make clean html`. To check, run `open build/html/index.html` |
Binary file not shown.
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,3 @@ | ||
:root { | ||
--pst-font-size-base: 15px; | ||
} |
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,49 @@ | ||
def roots(a, b, c, verbose=False): | ||
""" | ||
Return the two roots in the quadratic equation:: | ||
a*x**2 + b*x + c = 0 | ||
or written with math typesetting | ||
.. math:: ax^2 + bx + c = 0 | ||
The returned roots are real or complex numbers, | ||
depending on the values of the arguments `a`, `b`, | ||
and `c`. | ||
Parameters | ||
---------- | ||
a: int, real, complex | ||
coefficient of the quadratic term | ||
b: int, real, complex | ||
coefficient of the linear term | ||
c: int, real, complex | ||
coefficient of the constant term | ||
verbose: bool, optional | ||
prints the quantity ``b**2 - 4*a*c`` and if the | ||
roots are real or complex | ||
Returns | ||
------- | ||
root1, root2: real, complex | ||
the roots of the quadratic polynomial. | ||
See Also | ||
-------- | ||
:class:`Quadratic`: which is a class for quadratic polynomials | ||
that also has a :func:`Quadratic.roots` method for computing | ||
the roots of a quadratic polynomial. There is also a class | ||
:class:`~linear.Linear` in the module :mod:`linear` | ||
(i.e., :class:`linear.Linear`). | ||
References | ||
---------- | ||
Any textbook on mathematics or | ||
`link <http://en.wikipedia.org/wiki/Quadratic_equation>`_. | ||
""" | ||
|
||
return root1, root2 |
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,7 @@ | ||
API Reference | ||
================ | ||
|
||
.. automodule:: api | ||
|
||
.. autofunction:: roots | ||
|
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,56 @@ | ||
# 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 | ||
|
||
project = 'PolyPhy' | ||
copyright = '2022, PolyPhy' | ||
author = 'PolyPhy' | ||
|
||
import os | ||
import sys | ||
sys.path.insert(0, os.path.abspath('.')) | ||
# -- General configuration --------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration | ||
|
||
extensions = [ 'sphinx_design', | ||
'sphinx.ext.autodoc', | ||
'sphinx.ext.napoleon'] | ||
|
||
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 = 'pydata_sphinx_theme' | ||
html_static_path = ['_static'] | ||
html_css_files = [ | ||
'custom.css' | ||
] | ||
|
||
html_theme_options = { | ||
"icon_links": [ | ||
{ | ||
"name": "GitHub", | ||
"url": "https://github.com/PolyPhyHub", | ||
"icon": "fab fa-github-square", | ||
}, | ||
{ | ||
"name": "Slack", | ||
"url": "https://join.slack.com/t/polyphy/shared_invite/zt-1dn8qqkw2-wzf42hlKcCQb2snqArb2YQ", | ||
"icon": "fab fa-slack", | ||
}, | ||
{ | ||
"name": "Twitter", | ||
"url": "https://twitter.com", | ||
"icon": "fab fa-twitter", | ||
} | ||
] | ||
} | ||
|
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,53 @@ | ||
|
||
Docstring Standard for programmers | ||
##################################### | ||
|
||
Class:: | ||
|
||
class foo(array): | ||
|
||
""" | ||
Short/extended class description | ||
|
||
Attributes | ||
----------- | ||
attributes_name : type | ||
[attributes description] | ||
|
||
Methods | ||
--------- | ||
method_name(method_parameters) | ||
[method_description] | ||
""" | ||
|
||
Method:: | ||
|
||
def foo(var1, var2, *args, only_seldom_used_keyword=0, **kwargs): | ||
""" | ||
Summarize the function in one line. | ||
Several sentences providing an extended description. | ||
Parameters | ||
---------------------- | ||
var1 : array_like | ||
[description] | ||
var2 : int | ||
[description] | ||
*args : iterable | ||
[description]. | ||
|
||
Returns | ||
------- | ||
out : type | ||
[description] | ||
|
||
|
||
See Also | ||
----------- | ||
[list] | ||
|
||
References | ||
------------ | ||
[list] | ||
""" |
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,21 @@ | ||
*************** | ||
Contribution | ||
*************** | ||
|
||
|
||
.. toctree:: | ||
:maxdepth: 2 | ||
|
||
pull_request | ||
opening_issue | ||
docstring_standard | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
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,14 @@ | ||
Opening an issue | ||
################## | ||
|
||
* Navigate to the main page of PolyPhy on GitHub. | ||
|
||
* Click Issues. | ||
|
||
* Click New issue. | ||
|
||
* Select the template according to the issue(if available) or open a blank issue. | ||
|
||
* Type a title and description for your issue. | ||
|
||
* When you're finished, click Submit a new issue. |
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,72 @@ | ||
|
||
Making a PR | ||
############## | ||
|
||
To submit pull requests, just head over to the PolyPhy repository on GitHub and click the “fork” button. After that, you need to clone the repository you forked using your favourite git client or git CLI. | ||
|
||
Creating a Fork | ||
****************** | ||
|
||
Clone your fork to your local machine:: | ||
|
||
git clone git@github.com:USERNAME/FORKED-PROJECT.git | ||
|
||
Keeping Your Fork Up to Date | ||
******************************** | ||
|
||
Add 'upstream' repo to list of remotes:: | ||
|
||
git remote add upstream https://github.com/polyphy/polyphy.git | ||
|
||
Verify the new remote named 'upstream':: | ||
git remote -v | ||
|
||
Fetch from upstream remote:: | ||
|
||
git fetch upstream | ||
|
||
View all branches, including those from upstream:: | ||
|
||
git branch -va | ||
|
||
Checkout your master branch and merge upstream:: | ||
|
||
git checkout master | ||
git merge upstream/master | ||
|
||
Creating a Branch | ||
********************** | ||
|
||
Checkout the master branch - you want your new branch to come from master:: | ||
|
||
git checkout master | ||
|
||
Create a new branch named newfeature or its own simple informative name:: | ||
|
||
git branch newfeature | ||
|
||
Switch to your new branch:: | ||
|
||
git checkout newfeature | ||
|
||
Now, you can make desired changes. | ||
|
||
Submitting a Pull Request | ||
****************************** | ||
|
||
Fetch upstream master and merge with your repo's master branch:: | ||
|
||
git fetch upstream | ||
git checkout master | ||
git merge upstream/master | ||
|
||
If there were any new commits, rebase your development branch:: | ||
|
||
git checkout newfeature | ||
git rebase master | ||
|
||
If required squash some of your smaller commits down into a small number of larger more cohesive commits. | ||
|
||
After you have committed and pushed all your changes to GitHub, go to the page of your fork, select your development branch, and click on pull request. Make sure to follow the pull request(PR) template. | ||
|
Oops, something went wrong.