Skip to content

Commit

Permalink
Added basic documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paebbels committed Jan 8, 2024
1 parent 6247900 commit 458f91d
Show file tree
Hide file tree
Showing 23 changed files with 1,772 additions and 0 deletions.
9 changes: 9 additions & 0 deletions .btd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
input: doc
output: _build
requirements: requirements.txt
target: gh-pages
formats: [ html ]
images:
base: btdi/sphinx:pytooling
latex: btdi/latex
theme: https://codeload.GitHub.com/buildthedocs/sphinx.theme/tar.gz/v1
2 changes: 2 additions & 0 deletions dist/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
wheel>=0.38.1
twine >= 4.0.2
179 changes: 179 additions & 0 deletions doc/Dependency.rst

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions doc/DocCoverage.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Documentation Coverage
######################

Documentation coverage generated by `docstr-coverage <https://github.com/HunterMcGushion/docstr_coverage>`__.

.. doc-coverage::
:packageid: src
19 changes: 19 additions & 0 deletions doc/Glossary.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Glossary
########

.. glossary::

Branch Coverage
tbd

Code Coverage
tbd

Documentation Coverage
tbd

Python doc-string
tbd

Statement Coverage
tbd
202 changes: 202 additions & 0 deletions doc/Installation.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,202 @@
.. _INSTALL:

Installation/Updates
####################

.. _INSTALL/pip:

Using PIP to Install from PyPI
******************************

The following instruction are using PIP (Package Installer for Python) as a package manager and PyPI (Python Package
Index) as a source of Python packages.

Installing a Wheel Package from PyPI using PIP
==============================================

Users of pyTooling can select if the want to install a basic variant of pyTooling. See :ref:`DEP` for more
details.

.. tab-set::

.. tab-item:: Linux/MacOS
:sync: Linux

.. code-block:: bash
# Basic sphinx-reports package
pip3 install sphinx_reports
.. tab-item:: Windows
:sync: Windows

.. code-block:: powershell
# Basic sphinx-reports package
pip install sphinx_reports
Developers can install further dependencies for documentation generation (``doc``) or running unit tests (``test``) or
just all (``all``) dependencies.

.. tab-set::

.. tab-item:: Linux/MacOS
:sync: Linux

.. tab-set::

.. tab-item:: With Documentation Dependencies
:sync: Doc

.. code-block:: bash
# Install with dependencies to generate documentation
pip3 install sphinx_reports[doc]
.. tab-item:: With Unit Testing Dependencies
:sync: Unit

.. code-block:: bash
# Install with dependencies to run unit tests
pip3 install sphinx_reports[test]
.. tab-item:: All Developer Dependencies
:sync: All

.. code-block:: bash
# Install with all developer dependencies
pip install sphinx_reports[all]
.. tab-item:: Windows
:sync: Windows

.. tab-set::

.. tab-item:: With Documentation Dependencies
:sync: Doc

.. code-block:: powershell
# Install with dependencies to generate documentation
pip install sphinx_reports[doc]
.. tab-item:: With Unit Testing Dependencies
:sync: Unit

.. code-block:: powershell
# Install with dependencies to run unit tests
pip install sphinx_reports[test]
.. tab-item:: All Developer Dependencies
:sync: All

.. code-block:: powershell
# Install with all developer dependencies
pip install sphinx_reports[all]
Updating from PyPI using PIP
============================

.. tab-set::

.. tab-item:: Linux/MacOS
:sync: Linux

.. code-block:: bash
pip install -U sphinx_reports
.. tab-item:: Windows
:sync: Windows

.. code-block:: powershell
pip3 install -U sphinx_reports
Uninstallation using PIP
========================

.. tab-set::

.. tab-item:: Linux/MacOS
:sync: Linux

.. code-block:: bash
pip uninstall sphinx_reports
.. tab-item:: Windows
:sync: Windows

.. code-block:: powershell
pip3 uninstall sphinx_reports
.. _INSTALL/setup:

Using ``setup.py`` (legacy)
***************************

See sections above on how to use PIP.

Installation using ``setup.py``
===============================

.. code-block:: bash
setup.py install
.. _INSTALL/building:

Local Packaging and Installation via PIP
****************************************

For development and bug fixing it might be handy to create a local wheel package and also install it locally on the
development machine. The following instructions will create a local wheel package (``*.whl``) and then use PIP to
install it. As a user might have a sphinx-reports installation from PyPI, it's recommended to uninstall any previous
sphinx-reports packages. (This step is also needed if installing an updated local wheel file with same version number. PIP
will not detect a new version and thus not overwrite/reinstall the updated package contents.)

Ensure :ref:`packaging requirements <DEP/packaging>` are installed.

.. tab-set::

.. tab-item:: Linux/MacOS
:sync: Linux

.. code-block:: bash
cd <sphinx-reports>
# Package the code in a wheel (*.whl)
python -m build --wheel
# Uninstall the old package
python -m pip uninstall -y sphinx_reports
# Install from wheel
python -m pip install ./dist/sphinx_reports-4.1.0-py3-none-any.whl
.. tab-item:: Windows
:sync: Windows

.. code-block:: powershell
cd <sphinx-reports>
# Package the code in a wheel (*.whl)
py -m build --wheel
# Uninstall the old package
py -m pip uninstall -y sphinx_reports
# Install from wheel
py -m pip install .\dist\sphinx_reports-4.1.0-py3-none-any.whl
20 changes: 20 additions & 0 deletions doc/Makefile
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 = .
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)
4 changes: 4 additions & 0 deletions doc/TODO.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
TODOs
#####

.. todolist::
125 changes: 125 additions & 0 deletions doc/_static/css/override.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
/* theme overrides */
.rst-content h1,
.rst-content h2 {
margin-top: 24px;
margin-bottom: 6px;
text-decoration: underline;
}

.rst-content h3,
.rst-content h4,
.rst-content h5,
.rst-content h6 {
margin-top: 12px;
margin-bottom: 6px;
}

.rst-content p {
margin-bottom: 6px
}

/* general overrides */
html {
font-size: 15px;
}

footer {
font-size: 95%;
text-align: center
}

footer p {
margin-bottom: 0px /* 12px */;
font-size: 95%
}

section > p,
.section p,
.simple li {
text-align: justify
}

/* wyrm overrides */
.wy-menu-vertical header,
.wy-menu-vertical p.caption {
color: #9b9b9b /* #55a5d9 */;
padding: 0 0.809em /* 0 1.618em */;
margin: 6px 0 0 0 /* 12px 0 0 */;
border-top: 1px solid #9b9b9b;
}

.wy-side-nav-search {
margin-bottom: 0 /* .809em */;
background-color: #333333 /* #2980b9 */;
/* BTD: */
/*color: #fcfcfc*/
}

.wy-side-nav-search input[type=text] {
border-radius: 0px /* 50px */;
}

.wy-side-nav-search .wy-dropdown > a, .wy-side-nav-search > a {
/* BTD: */
/*color: #fcfcfc;*/
margin-bottom: 0.404em /* .809em */;
}

.wy-side-nav-search > div.version {
margin: 0 0 6px 0;
/* BTD: */
/*margin-top: -.4045em;*/
}

.wy-nav .wy-menu-vertical a:hover {
background-color: #333333 /* #2980b9 */;
}

.wy-nav-content {
max-width: 1600px /* 800px */ ;
}

.wy-nav-top {
background: #333333 /* #2980b9 */;
}

/* Sphinx Design */
.sd-tab-set {
margin: 0
}

.sd-tab-set > label {
padding-top: .5em;
padding-right: 1em;
padding-bottom: .5em;
padding-left: 1em
}

.sd-container-fluid {
padding-left: 0;
padding-right: 0;
}

.rst-content table.docutils:not(.field-list) tr:nth-child(2n-1) td {
background-color: unset;
}

.doccov-below100 {
background: rgba(0, 200, 82, .4);
}
.doccov-below90 {
background: rgba(0, 200, 82, .2);
}
.doccov-below80 {
background: rgba(255, 145, 0, .2);
}
.doccov-below50 {
background: rgba(255, 82, 82, .2);
}
.doccov-below30 {
background: rgba(101, 31, 255, .2);
}

.doccov-summary-row {
font-weight: bold;
}
Binary file added doc/_static/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added doc/_static/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 458f91d

Please sign in to comment.