Skip to content

Commit

Permalink
Restructured to a Sphinx domain 'report'.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paebbels committed Jan 9, 2024
1 parent 4085be2 commit 779b679
Show file tree
Hide file tree
Showing 20 changed files with 922 additions and 182 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ report/

# Sphinx
doc/_build/
doc/sphinx-reports/**/*.*
!doc/sphinx-reports/index.rst
doc/sphinx_reports/**/*.*
!doc/sphinx_reports/index.rst

# BuildTheDocs
doc/_theme/**/*.*
Expand Down
5 changes: 5 additions & 0 deletions doc/CodeCov/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.. _CODECOV:

Code Coverage
#############

4 changes: 2 additions & 2 deletions doc/Dependency.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ When installed as ``pyTooling``:
+-----------------------------------------------------------------+-------------+-------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+
| **Package** | **Version** | **License** | **Dependencies** |
+=================================================================+=============+===========================================================================================+========================================================================================================================================================+
| `pyTooling <https://GitHub.com/pyTooling/pyTooling>`__ | ≥5.0.0 | `Apache License, 2.0 <https://GitHub.com/pyTooling/pyTooling/blob/main/LICENSE.txt>`__ | *None* |
+-----------------------------------------------------------------+-------------+------------------------------------------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+
| `pyTooling <https://GitHub.com/pyTooling/pyTooling>`__ | ≥5.0.0 | `Apache License, 2.0 <https://GitHub.com/pyTooling/pyTooling/blob/main/LICENSE.txt>`__ | *None* |
+-----------------------------------------------------------------+-------------+-------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------+

.. TODO:: document the dependency to

Expand Down
5 changes: 5 additions & 0 deletions doc/DocCov/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.. _DOCCOV:

Documentation Coverage
######################

2 changes: 1 addition & 1 deletion doc/DocCoverage.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ Documentation Coverage

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

.. doc-coverage::
.. report:doc-coverage::
:packageid: src
5 changes: 5 additions & 0 deletions doc/Unittest/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
.. _UNITTEST:

Unit Test Summary
#################

4 changes: 2 additions & 2 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,8 @@
"sphinx_copybutton",
"sphinx_autodoc_typehints",
"autoapi.sphinx",
"sphinx_reports",
# User defined extensions
"CoverageReports",
]


Expand Down Expand Up @@ -261,7 +261,7 @@
# ==============================================================================
# DocCov
# ==============================================================================
doccov_packages = {
report_doccov_packages = {
"src": {
"name": "sphinx_reports",
"directory": "../sphinx_reports",
Expand Down
7 changes: 4 additions & 3 deletions doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,9 @@ License
:caption: Details
:hidden:

sphinx-reports

DocCov/index
CodeCov/index
Unittest/index

.. raw:: latex

Expand All @@ -133,7 +134,7 @@ License
:caption: References and Reports
:hidden:

sphinx-reports/sphinx-reports
sphinx_reports/sphinx_reports
Unittest Report ➚ <unittests/index>
Code Coverage Report ➚ <coverage/index>
Doc. Coverage Report <DocCoverage>
Expand Down
2 changes: 1 addition & 1 deletion run.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ if ($install)
{ Write-Host -ForegroundColor Cyan "[ADMIN][UNINSTALL] Uninstalling $PackageName ..."
py -3.12 -m pip uninstall -y $PackageName
Write-Host -ForegroundColor Cyan "[ADMIN][INSTALL] Installing $PackageName from wheel ..."
py -3.12 -m pip install .\dist\$PackageName-6.0.0-py3-none-any.whl
py -3.12 -m pip install .\dist\$PackageName-0.1.0-py3-none-any.whl

Write-Host -ForegroundColor Cyan "[ADMIN][INSTALL] Closing window in 5 seconds ..."
Start-Sleep -Seconds 5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,12 @@
from docstr_coverage.result_collection import FileCount
from pyTooling.Decorators import export, readonly

from sphinx_reports.DataModel import ModuleCoverage, PackageCoverage
from sphinx_reports.Common import ReportExtensionError
from sphinx_reports.DataModel.DocumentationCoverage import ModuleCoverage, PackageCoverage


@export
class DocStrCoverageError(Exception):
class DocStrCoverageError(ReportExtensionError):
# WORKAROUND: for Python <3.11
# Implementing a dummy method for Python versions before
__notes__: List[str]
Expand Down
33 changes: 33 additions & 0 deletions sphinx_reports/Adapter/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# ==================================================================================================================== #
# _ _ _ #
# ___ _ __ | |__ (_)_ __ __ __ _ __ ___ _ __ ___ _ __| |_ ___ #
# / __| '_ \| '_ \| | '_ \\ \/ /____| '__/ _ \ '_ \ / _ \| '__| __/ __| #
# \__ \ |_) | | | | | | | |> <_____| | | __/ |_) | (_) | | | |_\__ \ #
# |___/ .__/|_| |_|_|_| |_/_/\_\ |_| \___| .__/ \___/|_| \__|___/ #
# |_| |_| #
# ==================================================================================================================== #
# Authors: #
# Patrick Lehmann #
# #
# License: #
# ==================================================================================================================== #
# Copyright 2023-2024 Patrick Lehmann - Bötzingen, Germany #
# #
# Licensed under the Apache License, Version 2.0 (the "License"); #
# you may not use this file except in compliance with the License. #
# You may obtain a copy of the License at #
# #
# http://www.apache.org/licenses/LICENSE-2.0 #
# #
# Unless required by applicable law or agreed to in writing, software #
# distributed under the License is distributed on an "AS IS" BASIS, #
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. #
# See the License for the specific language governing permissions and #
# limitations under the License. #
# #
# SPDX-License-Identifier: Apache-2.0 #
# ==================================================================================================================== #
#
"""
**Adapters between report generators and data models.**
"""
Loading

0 comments on commit 779b679

Please sign in to comment.