Skip to content

Commit 374f600

Browse files
author
Jan Schaffranek
committed
Done with sphinx and code testing.
1 parent d650d28 commit 374f600

File tree

16 files changed

+140
-172
lines changed

16 files changed

+140
-172
lines changed

.gitignore

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ instance/
6868
.webassets-cache
6969
# Scrapy stuff:
7070
.scrapy
71-
# Sphinx documentation
72-
documentation/_build/
71+
# Sphinx docs
72+
docs/_build/
7373
# PyBuilder
7474
target/
7575
# Jupyter Notebook
@@ -106,7 +106,7 @@ venv.bak/
106106
.spyproject
107107
# Rope project settings
108108
.ropeproject
109-
# mkdocs documentation
109+
# mkdocs docs
110110
/site
111111
# mypy
112112
.mypy_cache/

GenerateDoc.bat

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
cd docs
2+
call sphinx-apidoc -o source/ ../fastvector/
3+
call make html
4+
cd ..

Makefile

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,24 @@
11
SRC_APP=app
22
SRC_CORE=fastvector
33
SRC_TEST=tests
4-
SRC_DOC=documentation
4+
SRC_DOC=docs
55

66
ifeq ($(OS), Windows_NT)
77
PYTHON=python
88
PIP=pip
99
RM=del /Q
1010
FixPath=$(subst /,\,$1)
11-
BUILD_DOC=sphinx-apidoc -o source/ ./fastvector/ && $(SRC_DOC)\make.bat html
11+
BUILD_DOC=sphinx-apidoc -o ./$(SRC_DOC)/source/ ./fastvector/ && $(SRC_DOC)\make.bat html
1212
else
1313
PYTHON=python3
1414
PIP=pip3
1515
RM=rm -f
1616
FixPath=$1
17-
BUILD_DOC=sphinx-apidoc -o source/ ./fastvector/ && ./$(SRC_DOC)/make.sh
17+
BUILD_DOC=sphinx-apidoc -o ./$(SRC_DOC)/source/ ./fastvector/ && ./$(SRC_DOC)/make.sh
1818
endif
1919

2020
help:
2121
@echo "Some available commands:"
22-
@echo " * run - Run code."
2322
@echo " * test - Run unit tests and test coverage."
2423
@echo " * doc - Document code (pydoc)."
2524
@echo " * clean - Cleanup (e.g. pyc files)."
@@ -33,9 +32,6 @@ help:
3332
@echo " * deps-install - Install dependencies (see requirements.txt)."
3433
@echo " * deps-dev-install - Install dev. dependencies (see requirements-dev.txt)."
3534

36-
run:
37-
@$(PYTHON) $(SRC_APP)/main.py
38-
3935
test:
4036
@pytest --cov=./$(SRC_TEST)/
4137
@codecov

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ This is a template for Python projects. What you get:
2525
├── Makefile
2626
├── requirements.txt
2727
├── requirements-dev.txt
28-
└── documentation
28+
└── docs
2929
│   └── build_docs.bat
3030
│   └── build_docs.sh
3131
├── fastvector

app/main.py

Lines changed: 0 additions & 10 deletions
This file was deleted.
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
call sphinx-apidoc -o source/ ../fastvector/
1+
call sphinx-apidoc -o source/ ../fastvector/
22
call make.bat html
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
sphinx-apidoc -o source/ ../fastvector/
1+
sphinx-apidoc -o source/ ../fastvector/
22
sphinx-build -b html ./source/ ./build/
Lines changed: 35 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,35 @@
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-
13-
if "%1" == "" goto help
14-
15-
%SPHINXBUILD% >NUL 2>NUL
16-
if errorlevel 9009 (
17-
echo.
18-
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19-
echo.installed, then set the SPHINXBUILD environment variable to point
20-
echo.to the full path of the 'sphinx-build' executable. Alternatively you
21-
echo.may add the Sphinx directory to PATH.
22-
echo.
23-
echo.If you don't have Sphinx installed, grab it from
24-
echo.http://sphinx-doc.org/
25-
exit /b 1
26-
)
27-
28-
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29-
goto end
30-
31-
:help
32-
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33-
34-
:end
35-
popd
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+
13+
if "%1" == "" goto help
14+
15+
%SPHINXBUILD% >NUL 2>NUL
16+
if errorlevel 9009 (
17+
echo.
18+
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
19+
echo.installed, then set the SPHINXBUILD environment variable to point
20+
echo.to the full path of the 'sphinx-build' executable. Alternatively you
21+
echo.may add the Sphinx directory to PATH.
22+
echo.
23+
echo.If you don't have Sphinx installed, grab it from
24+
echo.http://sphinx-doc.org/
25+
exit /b 1
26+
)
27+
28+
%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29+
goto end
30+
31+
:help
32+
%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33+
34+
:end
35+
popd

docs/make.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sphinx-build -b html ./docs/source/ ./docs/build/

0 commit comments

Comments
 (0)