Skip to content

Commit

Permalink
Updated main requirements.
Browse files Browse the repository at this point in the history
  • Loading branch information
Paebbels committed Jan 9, 2024
1 parent 68e528b commit 4085be2
Show file tree
Hide file tree
Showing 5 changed files with 135 additions and 95 deletions.
186 changes: 102 additions & 84 deletions .github/workflows/Pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,134 +3,152 @@ name: Pipeline
on:
push:
workflow_dispatch:
schedule:
- cron: '0 0 * * 5'

jobs:
Params:
uses: pyTooling/Actions/.github/workflows/Parameters.yml@dev
UnitTestingParams:
uses: pyTooling/Actions/.github/workflows/Parameters.yml@cov
with:
name: sphinx_reports
system_list: "ubuntu"
name: sphinx-eports
# python_version_list: "3.8 3.9 3.10 3.11 3.12 pypy-3.8 pypy-3.9 pypy-3.10"
# disable_list: "windows:pypy-3.8 windows:pypy-3.9 windows:pypy-3.10"

UnitTesting:
uses: pyTooling/Actions/.github/workflows/UnitTesting.yml@dev
uses: pyTooling/Actions/.github/workflows/UnitTesting.yml@cov
needs:
- Params
- UnitTestingParams
with:
jobs: ${{ needs.Params.outputs.python_jobs }}
artifact: ${{ fromJson(needs.Params.outputs.artifact_names).unittesting_xml }}
jobs: ${{ needs.UnitTestingParams.outputs.python_jobs }}
requirements: "-r tests/unit/requirements.txt"
pacboy: "msys/git"
unittest_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}
coverage_sqlite_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}

Coverage:
uses: pyTooling/Actions/.github/workflows/CoverageCollection.yml@dev
needs:
- Params
with:
python_version: ${{ needs.Params.outputs.python_version }}
artifact: ${{ fromJson(needs.Params.outputs.artifact_names).codecoverage_html }}
secrets:
codacy_token: ${{ secrets.CODACY_PROJECT_TOKEN }}
# Coverage:
# uses: pyTooling/Actions/.github/workflows/CoverageCollection.yml@cov
# needs:
# - UnitTestingParams
# with:
# python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
# artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }}
# secrets:
# codacy_token: ${{ secrets.CODACY_PROJECT_TOKEN }}

StaticTypeCheck:
uses: pyTooling/Actions/.github/workflows/StaticTypeCheck.yml@dev
uses: pyTooling/Actions/.github/workflows/StaticTypeCheck.yml@cov
needs:
- Params
- UnitTestingParams
with:
python_version: ${{ needs.Params.outputs.python_version }}
python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
commands: |
mypy --html-report htmlmypy -p sphinx-reports
mypy --html-report htmlmypy -p sphinx_reports
html_report: 'htmlmypy'
html_artifact: ${{ fromJson(needs.Params.outputs.artifact_names).statictyping_html }}
html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }}

PublishTestResults:
uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@dev
PublishCoverageResults:
uses: pyTooling/Actions/.github/workflows/PublishCoverageResults.yml@cov
needs:
- UnitTestingParams
- UnitTesting

Package:
uses: pyTooling/Actions/.github/workflows/Package.yml@dev
needs:
- Params
- Coverage
with:
python_version: ${{ needs.Params.outputs.python_version }}
artifact: ${{ fromJson(needs.Params.outputs.artifact_names).package_all }}

AppTesting:
uses: pyTooling/Actions/.github/workflows/ApplicationTesting.yml@dev
needs:
- Params
- Package
# - Coverage
with:
jobs: ${{ needs.Params.outputs.python_jobs }}
wheel: ${{ fromJson(needs.Params.outputs.artifact_names).package_all }}
artifact: ${{ fromJson(needs.Params.outputs.artifact_names).apptesting_xml }}
# coverage_sqlite_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}
# coverage_xml_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_xml }}
# coverage_json_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }}
coverage_html_artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }}
secrets:
codacy_token: ${{ secrets.CODACY_PROJECT_TOKEN }}

Release:
uses: pyTooling/Actions/.github/workflows/Release.yml@dev
if: startsWith(github.ref, 'refs/tags')
PublishTestResults:
uses: pyTooling/Actions/.github/workflows/PublishTestResults.yml@cov
needs:
- Coverage
- AppTesting
- StaticTypeCheck
- UnitTesting

PublishOnPyPI:
uses: pyTooling/Actions/.github/workflows/PublishOnPyPI.yml@dev
if: startsWith(github.ref, 'refs/tags')
Package:
uses: pyTooling/Actions/.github/workflows/Package.yml@cov
needs:
- Params
- Release
- Package
- UnitTestingParams
- UnitTesting
# - Coverage
with:
python_version: ${{ needs.Params.outputs.python_version }}
requirements: -r dist/requirements.txt
artifact: ${{ fromJson(needs.Params.outputs.artifact_names).package_all }}
secrets:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }}

# VerifyDocs:
# uses: pyTooling/Actions/.github/workflows/VerifyDocs.yml@dev
# uses: pyTooling/Actions/.github/workflows/VerifyDocs.yml@cov
# needs:
# - Params
# - UnitTestingParams
# with:
# python_version: ${{ needs.Params.outputs.python_version }}
# python_version: ${{ needs.UnitTestingParams.outputs.python_version }}

BuildTheDocs:
uses: pyTooling/Actions/.github/workflows/BuildTheDocs.yml@dev
uses: pyTooling/Actions/.github/workflows/BuildTheDocs.yml@cov
needs:
- Params
- UnitTestingParams
# - VerifyDocs
with:
artifact: ${{ fromJson(needs.Params.outputs.artifact_names).documentation_html }}
artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_html }}

PublishToGitHubPages:
uses: pyTooling/Actions/.github/workflows/PublishToGitHubPages.yml@dev
uses: pyTooling/Actions/.github/workflows/PublishToGitHubPages.yml@cov
needs:
- Params
- UnitTestingParams
- BuildTheDocs
- Coverage
# - Coverage
- PublishCoverageResults
- StaticTypeCheck
with:
doc: ${{ fromJson(needs.Params.outputs.artifact_names).documentation_html }}
coverage: ${{ fromJson(needs.Params.outputs.artifact_names).codecoverage_html }}
typing: ${{ fromJson(needs.Params.outputs.artifact_names).statictyping_html }}
doc: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_html }}
coverage: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }}
typing: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }}

ReleasePage:
uses: pyTooling/Actions/.github/workflows/Release.yml@cov
if: startsWith(github.ref, 'refs/tags')
needs:
- UnitTesting
# - Coverage
# - StaticTypeCheck
- Package
- PublishToGitHubPages

PublishOnPyPI:
uses: pyTooling/Actions/.github/workflows/PublishOnPyPI.yml@cov
if: startsWith(github.ref, 'refs/tags')
needs:
- UnitTestingParams
- ReleasePage
with:
python_version: ${{ needs.UnitTestingParams.outputs.python_version }}
requirements: -r dist/requirements.txt
artifact: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }}
secrets:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}

ArtifactCleanUp:
uses: pyTooling/Actions/.github/workflows/ArtifactCleanUp.yml@dev
uses: pyTooling/Actions/.github/workflows/ArtifactCleanUp.yml@cov
needs:
- Params
- UnitTestingParams
- UnitTesting
- AppTesting
- Coverage
# - Coverage
- StaticTypeCheck
- BuildTheDocs
# - BuildTheDocs
- PublishToGitHubPages
- PublishCoverageResults
- PublishTestResults
with:
package: ${{ fromJson(needs.Params.outputs.artifact_names).package_all }}
package: ${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).package_all }}
remaining: |
${{ fromJson(needs.Params.outputs.artifact_names).unittesting_xml }}-*
${{ fromJson(needs.Params.outputs.artifact_names).apptesting_xml }}
${{ fromJson(needs.Params.outputs.artifact_names).codecoverage_html }}
${{ fromJson(needs.Params.outputs.artifact_names).statictyping_html }}
${{ fromJson(needs.Params.outputs.artifact_names).documentation_html }}
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}-*
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_html }}-*
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}-*
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_xml }}-*
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }}-*
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }}-*
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_xml }}
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).unittesting_html }}
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_sqlite }}
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_xml }}
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_json }}
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).codecoverage_html }}
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).statictyping_html }}
${{ fromJson(needs.UnitTestingParams.outputs.artifact_names).documentation_html }}
39 changes: 28 additions & 11 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,21 +1,23 @@
[build-system]
requires = [
"pyTooling >= 5.0.0",
"setuptools >= 68.0.0",
"wheel >= 0.40.0"
"setuptools >= 68.0.0",
"wheel >= 0.40.0",
"pyTooling >= 5.0.0"
]
build-backend = "setuptools.build_meta"

[tool.black]
line-length = 120

[tool.mypy]
files = ["sphinx_reports"]
python_version = "3.12"
namespace_packages = true

#ignore_missing_imports = true
strict = true
pretty = true
show_error_context = true

show_error_codes = true
namespace_packages = true
html_report = "report/typing"

[tool.pytest.ini_options]
Expand All @@ -28,12 +30,24 @@ filterwarnings = [
"error::PendingDeprecationWarning"
]

[tool.interrogate]
color = true
verbose = 1 # possible values: 0 (minimal output), 1 (-v), 2 (-vv)
fail-under = 80
generate-badge = "."
badge-format = "png"
ignore-setters = true

[tool.coverage.run]
branch = true
relative_files = true
omit = [
"*site-packages*",
"setup.py",
"tests/*"
"tests/benchmark/*",
"tests/performance/*",
"tests/platform/*",
"tests/unit/*"
]

[tool.coverage.report]
Expand All @@ -47,9 +61,12 @@ omit = [
"tests/*"
]

[tool.coverage.html]
directory = "report/coverage/html"
title="Code Coverage of pyTooling"

[tool.coverage.xml]
output = "report/coverage/coverage.xml"

[tool.coverage.json]
output = "report/coverage/coverage.json"

[tool.coverage.html]
directory = "report/coverage/html"
title="Code Coverage of sphinx-reports"
3 changes: 3 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
pyTooling ~= 5.0

sphinx >= 6.0, < 8.0
docstr_coverage >= 2.3.0
1 change: 1 addition & 0 deletions sphinx_reports/CoverageReports.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@
from sphinx.application import Sphinx
from sphinx.directives import ObjectDescription

from sphinx_reports import __version__
from sphinx_reports.DataModel import PackageCoverage
from sphinx_reports.DocStrCoverage import Analyzer

Expand Down
1 change: 1 addition & 0 deletions tests/unit/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
-r ../requirements.txt

0 comments on commit 4085be2

Please sign in to comment.