diff --git a/doc/JobTemplate/Documentation/PublishToGitHubPages.rst b/doc/JobTemplate/Documentation/PublishToGitHubPages.rst index 50dd8cc..3bb8e1b 100644 --- a/doc/JobTemplate/Documentation/PublishToGitHubPages.rst +++ b/doc/JobTemplate/Documentation/PublishToGitHubPages.rst @@ -3,7 +3,7 @@ PublishToGitHubPages #################### -This job publishes HTML content from artifacts of other jobs to GitHub Pages. +This job template publishes HTML content from artifacts of other jobs to GitHub Pages. .. topic:: Features diff --git a/doc/JobTemplate/Quality/StaticTypeCheck.rst b/doc/JobTemplate/Quality/StaticTypeCheck.rst index e640bd3..ab2fe7e 100644 --- a/doc/JobTemplate/Quality/StaticTypeCheck.rst +++ b/doc/JobTemplate/Quality/StaticTypeCheck.rst @@ -3,12 +3,12 @@ StaticTypeCheck ############### -This job runs a static type check using mypy and collects the results. These results can be converted to a HTML report -and then uploaded as an artifact. +This job template runs a static type check using `mypy `__ and collects the results. These +results can be converted to a HTML report and uploaded as an artifact. .. topic:: Features - * tbd + * Run static type check using mypy. .. topic:: Behavior @@ -40,41 +40,67 @@ and then uploaded as an artifact. Instantiation ************* -Simple Example -============== +.. grid:: 2 -.. code-block:: yaml + .. grid-item:: + :columns: 6 - jobs: - StaticTypeCheck: - uses: pyTooling/Actions/.github/workflows/StaticTypeCheck.yml@r5 - with: - commands: | - touch pyTooling/__init__.py - mypy --html-report htmlmypy -p pyTooling - report: 'htmlmypy' - artifact: TypeChecking + .. card:: Simple Example -Complex Example -=============== + This example runs mypy for the Python package ``myPackage``. It renders a report into the job's log. In + addition is generates a report in HTML format into the directory ``htmlmypy``. -.. code-block:: yaml + .. code-block:: yaml - jobs: - StaticTypeCheck: - uses: pyTooling/Actions/.github/workflows/StaticTypeCheck.yml@r5 - needs: - - Params - with: - python_version: ${{ needs.Params.outputs.python_version }} - commands: | - touch pyTooling/__init__.py - mypy --html-report htmlmypy -p pyTooling - report: 'htmlmypy' - artifact: ${{ fromJson(needs.Params.outputs.artifact_names).statictyping_html }} + jobs: + StaticTypeCheck: + uses: pyTooling/Actions/.github/workflows/StaticTypeCheck.yml@r5 + with: + commands: | + mypy --html-report htmlmypy -p myPackage + report: 'htmlmypy' + artifact: TypeChecking + + .. grid-item:: + :columns: 6 + + .. card:: Complex Example + + .. code-block:: yaml + + jobs: + StaticTypeCheck: + uses: pyTooling/Actions/.github/workflows/StaticTypeCheck.yml@r5 + needs: + - Params + with: + python_version: ${{ needs.Params.outputs.python_version }} + commands: | + touch myFramework/__init__.py + mypy --html-report htmlmypy -p myFramework.Extension + report: 'htmlmypy' + artifact: ${{ fromJson(needs.Params.outputs.artifact_names).statictyping_html }} + +.. card:: Complex Example + + .. code-block:: yaml + + jobs: + StaticTypeCheck: + uses: pyTooling/Actions/.github/workflows/StaticTypeCheck.yml@r5 + needs: + - ConfigParams + - Params + with: + python_version: ${{ needs.Params.outputs.python_version }} + commands: | + ${{ needs.ConfigParams.outputs.mypy_prepare_command }} + mypy --html-report htmlmypy -p ${{ needs.ConfigParams.outputs.package_fullname }} + report: 'htmlmypy' + artifact: ${{ fromJson(needs.Params.outputs.artifact_names).statictyping_html }} Commands -======== +******** Example ``commands``: diff --git a/pyproject.toml b/pyproject.toml index eb223ab..cab028c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,8 +10,8 @@ build-backend = "setuptools.build_meta" line-length = 120 [tool.mypy] -files = ["pyDummy"] -python_version = "3.12" +packages = ["myPackage", "myFramework"] +python_version = "3.13" #ignore_missing_imports = true strict = true pretty = true diff --git a/tests/requirements.txt b/tests/requirements.txt index 455d3be..000aea4 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -5,7 +5,7 @@ Coverage ~= 7.10 # Test Runner pytest ~= 8.4 -pytest-cov ~= 6.3 +pytest-cov ~= 7.0 # Static Type Checking mypy ~= 1.17