From ae6f532e525725784e1d38ac0a2e544a0778ac86 Mon Sep 17 00:00:00 2001 From: Patrick Lehmann Date: Sat, 13 Sep 2025 22:27:52 +0200 Subject: [PATCH] Improved landing page. --- doc/JobTemplate/AllInOne/CompletePipeline.rst | 17 +--- doc/JobTemplate/AllInOne/_Behavior.rst | 16 ++++ doc/index.rst | 95 +++++++++++++++++++ pyproject.toml | 2 +- 4 files changed, 113 insertions(+), 17 deletions(-) create mode 100644 doc/JobTemplate/AllInOne/_Behavior.rst diff --git a/doc/JobTemplate/AllInOne/CompletePipeline.rst b/doc/JobTemplate/AllInOne/CompletePipeline.rst index 71a110a..d68e933 100644 --- a/doc/JobTemplate/AllInOne/CompletePipeline.rst +++ b/doc/JobTemplate/AllInOne/CompletePipeline.rst @@ -74,22 +74,7 @@ It can be used for simple Python packages as well as namespace packages. .. topic:: Behavior - 1. Infer information from ``${{ github.ref }}`` variable. - 2. Extract Python project settings from :file:`pyproject.toml`. - 3. Compute job matrix based on system, Python version, environment, ... for job variants. - 4. Run unit tests using pytest and collect code coverage. - 5. Run platform tests using pytest and collect code coverage. - 6. Run application tests using pytest. - 7. Package code as wheel. - 8. Check documentation coverage using docstr_coverage and interrogate. - 9. Verify type annotation using static typing analysis using mypy. - 10. Merge unit test results and code coverage results. - 11. Generate HTML and LaTeX documentations using Sphinx. - 12. Translate LaTeX documentation to PDF using MikTeX. - 13. Publish unit test and code coverage results to cloud services. - 14. Publish documentation to GitHub Pages. - 15. Publish wheel to PyPI. - 16. Create a GitHub release page and upload release assets. + .. include:: _Behavior.rst .. topic:: Pipeline Graph diff --git a/doc/JobTemplate/AllInOne/_Behavior.rst b/doc/JobTemplate/AllInOne/_Behavior.rst new file mode 100644 index 0000000..36aa577 --- /dev/null +++ b/doc/JobTemplate/AllInOne/_Behavior.rst @@ -0,0 +1,16 @@ +1. Infer information from ``${{ github.ref }}`` variable. +2. Extract Python project settings from :file:`pyproject.toml`. +3. Compute job matrix based on system, Python version, environment, ... for job variants. +4. Run unit tests using pytest and collect code coverage. +5. Run platform tests using pytest and collect code coverage. +6. Run application tests using pytest. +7. Package code as wheel. +8. Check documentation coverage using docstr_coverage and interrogate. +9. Verify type annotation using static typing analysis using mypy. +10. Merge unit test results and code coverage results. +11. Generate HTML and LaTeX documentations using Sphinx. +12. Translate LaTeX documentation to PDF using MikTeX. +13. Publish unit test and code coverage results to cloud services. +14. Publish documentation to GitHub Pages. +15. Publish wheel to PyPI. +16. Create a GitHub release page and upload release assets. diff --git a/doc/index.rst b/doc/index.rst index 3158631..383e491 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -65,12 +65,48 @@ Example Pipelines * Set the ``name`` input of job ``Parameters``. * Specify the ``commands`` input of job ``StaticTypeCheck``. + .. rubric:: Behavior + + .. include:: JobTemplate/AllInOne/_Behavior.rst + .. grid-item:: :columns: 6 .. tab-set:: + .. tab-item:: Directory Structure + + .. code-block:: + + / + .github/ + workflows/ + Pipeline.yml + dist/ + requirements.txt + docs/ + conf.py + index.rst + requirements.txt + myPackage/ + ModuleA.py + __init__.py + py.typed + tests/ + unit/ + TestA.py + requirements.txt + requirements.txt + .editorconfig + .gitignore + LICENSE.md + pyproject.toml + README.md + requirements.txt + setup.py + .. tab-item:: Simple Package + :selected: .. code-block:: yaml @@ -123,6 +159,65 @@ Example Pipelines CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} CODACY_TOKEN: ${{ secrets.CODACY_TOKEN }} + .. tab-item:: :file:`pyproject.toml` + + .. code-block:: toml + + [build-system] + requires = ["setuptools >= 80.0", "wheel ~= 0.45", "pyTooling ~= 8.5"] + build-backend = "setuptools.build_meta" + + [tool.mypy] + packages = ["myPackage"] + python_version = "3.13" + strict = true + pretty = true + show_error_context = true + show_error_codes = true + namespace_packages = true + html_report = "report/typing" + + [tool.pytest] + junit_xml = "report/unit/UnittestReportSummary.xml" + + [tool.pyedaa-reports] + junit_xml = "report/unit/unittest.xml" + + [tool.pytest.ini_options] + addopts = "--tb=native" + python_files = "*" + python_functions = "test_*" + filterwarnings = ["error::DeprecationWarning", "error::PendingDeprecationWarning"] + junit_logging = "all" + + [tool.interrogate] + color = true + verbose = 1 # possible values: 0 (minimal output), 1 (-v), 2 (-vv) + fail-under = 59 + ignore-setters = true + + [tool.coverage.run] + branch = true + relative_files = true + omit = ["*site-packages*", "setup.py", "tests/unit/*"] + + [tool.coverage.report] + skip_covered = false + skip_empty = true + exclude_lines = ["pragma: no cover", "raise NotImplementedError"] + omit = ["tests/*"] + + [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 myPackage" + + .. image:: _static/pyTooling-Actions-SimplePackage.png diff --git a/pyproject.toml b/pyproject.toml index cab028c..fa426fd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -77,4 +77,4 @@ output = "report/coverage/coverage.json" [tool.coverage.html] directory = "report/coverage/html" -title="Code Coverage of pyDummy" +title="Code Coverage of myPackage"