Skip to content

Commit 4c93de3

Browse files
authored
Add documentation template (keon#314)
* add docs template * add logo * create documentation template
1 parent 1220a74 commit 4c93de3

30 files changed

+409
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,5 @@ __pycache__/
1111
# Python egg metadata, regenerated from source files by setuptools.
1212
/*.egg-info
1313
/*.egg
14+
# docs
15+
build/

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
<p align="center"><img width="40%" src="docs/source/_static/algorithms_logo.png" /></p>
2+
13
English | [简体中文](README_CN.md) | [Deutsch](README_GE.md) | [日本語](README_JP.md) | [한국어](README_KR.md)
24

35
[![Open Source Helpers](https://www.codetriage.com/keon/algorithms/badges/users.svg)](https://www.codetriage.com/keon/algorithms)

algorithms/__init__.py

Whitespace-only changes.

docs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line.
5+
SPHINXOPTS =
6+
SPHINXBUILD = sphinx-build
7+
SPHINXPROJ = algorithms
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

docs/make.bat

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
@ECHO OFF
2+
3+
pushd %~dp0
4+
5+
REM Command file for Sphinx documentation
6+
7+
if "%SPHINXBUILD%" == "" (
8+
set SPHINXBUILD=sphinx-build
9+
)
10+
set SOURCEDIR=source
11+
set BUILDDIR=build
12+
set SPHINXPROJ=algorithms
13+
14+
if "%1" == "" goto help
15+
16+
%SPHINXBUILD% >NUL 2>NUL
17+
if errorlevel 9009 (
18+
echo.
19+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
20+
echo.installed, then set the SPHINXBUILD environment variable to point
21+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
22+
echo.may add the Sphinx directory to PATH.
23+
echo.
24+
echo.If you don't have Sphinx installed, grab it from
25+
echo.http://sphinx-doc.org/
26+
exit /b 1
27+
)
28+
29+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
30+
goto end
31+
32+
:help
33+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS%
34+
35+
:end
36+
popd

docs/requirements.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# Progress bars on iterators
2+
tqdm
3+
sphinx_rtd_theme
4+
5+
# Downloading data and other files
6+
requests
7+
8+
# Required for tests only:
9+
10+
# Style-checking for PEP8
11+
flake8
12+
13+
# Run unit tests
14+
pytest
15+
16+
# Lets pytest find our code by automatically modifying PYTHONPATH
17+
pytest-pythonpath
18+
19+
# Coverage statistics
20+
pytest-cov
21+
codecov
11.6 KB
Loading

docs/source/arrays.rst

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
.. role:: hidden
2+
:class: hidden-section
3+
4+
algorithms.arrays
5+
=================
6+
7+
.. automodule:: algorithms.arrays
8+
.. currentmodule:: algorithms.arrays
9+
10+
longest_non_repeat
11+
------------------
12+
13+
:hidden:`longest_non_repeat_v1`
14+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
15+
16+
.. autofunction:: longest_non_repeat_v1

docs/source/backtrack.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.. role:: hidden
2+
:class: hidden-section
3+
4+
algorithms.backtrack
5+
====================

docs/source/bfs.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
.. role:: hidden
2+
:class: hidden-section
3+
4+
algorithms.bfs
5+
=================

0 commit comments

Comments
 (0)