pyIncore documentation which is built using Python Sphinx package.
Clone the code from pyincore repository git repository.
Install Docker Desktop for your OS and change directory to your local branch pyincore
folder.
-
Build container
docker build -f Dockerfile -t doc/pyincore .
The container's name is pyincore_docs in this example.
-
Run docker
docker run -ti --rm -p 8000:80 doc/pyincore
Optional flag,
--name
sets container's name to doctest under which it appears in Docker Desktop. -
Run html pages in your local browser (you might see the nginx main page first)
http://localhost:8000/doc/pyincore/
-
Install required packages. Currently
sphinx
, a Python package for building documentation andsphinx_rtd_theme
, a theme used in this documentation and other packages. See section 4. for the full list. -
We recommend using virtual environments,
conda
(preferred) orvirtualenv
for Python 3.7+. for managing Python environments.
In case ofconda
, the package management and deployment tool is calledanaconda
. Create the environment from the terminal at the project folder (calledpyincore_docs
here) and activate it:conda create -n pyincore_docs python=3.7 conda activate pyincore_docs
or
virtualenv --python=python3.7 pyincore_docs source venv/bin/activate
-
Install required packages individually if necessary. Use
conda
again or you can also usepip
:conda install sphinx conda install sphinx_rtd_theme
or (global install for all users drop the --user flag)
python3 -m pip install sphinx --user python3 -m pip install sphinx_rtd_theme --user
-
From the terminal at the project folder (pyincore/docs) run:
sphinx-build -b html source build
after that you should be able to run (
clean
deletes content of thebuild
folder) :make clean make html
-
Open
index.html
frombuild/html
directory in a browser.