Documentation improvements.

This commit is contained in:
Patrick Lehmann
2022-10-29 23:32:32 +02:00
parent ebdc386c6e
commit 1ab3b1a1e9
5 changed files with 60 additions and 27 deletions

View File

@@ -17,11 +17,15 @@ jobs:
with: with:
doc: Documentation doc: Documentation
# ArtifactCleanUp: ArtifactCleanUp:
# uses: pyTooling/Actions/.github/workflows/ArtifactCleanUp.yml@r0 name: 🗑️ Artifact Cleanup
# needs: needs:
# - BuildTheDocs - BuildTheDocs
# - PublishToGitHubPages - PublishToGitHubPages
# with: runs-on: ubuntu-latest
# remaining: |
# Documentation steps:
- name: 🗑️ Delete artifacts
uses: geekyeggo/delete-artifact@v1
with:
name: Documentation

View File

@@ -35,7 +35,7 @@ Complex Example
The following instantiation example creates 3 jobs from the same template, but with differing input parameters. The The following instantiation example creates 3 jobs from the same template, but with differing input parameters. The
first job `UnitTestingParams` might be used to create a job matrix of unit tests. It creates the cross of default first job `UnitTestingParams` might be used to create a job matrix of unit tests. It creates the cross of default
systems (Windows, Ubuntu, MacOS, MinGW64) and the given list of Python versions including some mypy versions. In systems (Windows, Ubuntu, MacOS, MinGW64) and the given list of Python versions including some mypy versions. In
addition a list of excludes (marked as :deletetion:`deletion`) and includes (marked as :additions:`additions`) is handed addition a list of excludes (marked as :deletion:`deletions`) and includes (marked as :addition:`additions`) is handed
over resulting in the following combinations: over resulting in the following combinations:
+---------+-------------+-------------+-------------+--------------+-------------------------+---------+----------+------------------------------+------------------------------+ +---------+-------------+-------------+-------------+--------------+-------------------------+---------+----------+------------------------------+------------------------------+

View File

@@ -1,7 +1,22 @@
PublishOnPyPI PublishOnPyPI
############# #############
Publish a source (``*.tar.gz``) and wheel (``*.whl``) packages to `PyPI <https://pypi.org/>`__. Publish a source (``*.tar.gz``) package and/or wheel (``*.whl``) packages to `PyPI <https://pypi.org/>`__.
**Behavior:**
1. Download package artifact
2. Publish source package(s) (``*.tar.gz``)
3. Publish wheel package(s) (``*.whl``)
4. Delete the artifact
**Preconditions:**
A PyPI account was created and the package name is either not occupied or the user has access rights for that package.
**Requirements:**
Setup a secret (e.g. ``PYPI_TOKEN``) in GitHub to handover the PyPI token to the job.
Instantiation Instantiation
************* *************
@@ -9,6 +24,9 @@ Instantiation
Simple Example Simple Example
============== ==============
The following example demonstrates how to publish the artifact named ``Package`` to PyPI on every pipeline run triggered
by a Git tag. A secret is forwarded from GitHub secrets to a job secret.
.. code-block:: yaml .. code-block:: yaml
jobs: jobs:
@@ -25,10 +43,18 @@ Simple Example
Complex Example Complex Example
=============== ===============
In this more complex example, the job depends on a parameter creation (``Params``) and packaging job (``Package``). The
used Python version is overwritten by a parameter calculated in the ``Params`` jobs. Also the artifact name is managed
by that job. Finally, the list of requirements is overwritten to load a list of requirements from ``dist/requirements.txt``.
.. code-block:: yaml .. code-block:: yaml
jobs: jobs:
# ... Params:
# ...
Package:
# ...
PublishOnPyPI: PublishOnPyPI:
uses: pyTooling/Actions/.github/workflows/PublishOnPyPI.yml@r0 uses: pyTooling/Actions/.github/workflows/PublishOnPyPI.yml@r0
@@ -43,8 +69,8 @@ Complex Example
secrets: secrets:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
Template Parameters Parameters
******************* **********
python_version python_version
============== ==============
@@ -73,8 +99,8 @@ PYPI_TOKEN
The token to access the package at PyPI for uploading new data. The token to access the package at PyPI for uploading new data.
Template Results Results
**************** *******
*None* *None*

View File

@@ -1,31 +1,33 @@
StaticTypeCheck StaticTypeCheck
############### ###############
collect static type check result with `mypy`, and collect static type check result with mypy, and optionally upload results as an HTML report.
optionally upload results as an HTML report.
Example `commands`:
1. Regular package Example ``commands``:
1. Regular package
.. code-block:: yaml
```yml
commands: mypy --html-report htmlmypy -p ToolName commands: mypy --html-report htmlmypy -p ToolName
```
2. Parent namespace package
```yml 2. Parent namespace package
.. code-block:: yaml
commands: | commands: |
touch Parent/__init__.py touch Parent/__init__.py
mypy --html-report htmlmypy -p ToolName mypy --html-report htmlmypy -p ToolName
```
3. Child namespace package 3. Child namespace package
.. code-block:: yaml
```yml
commands: | commands: |
cd Parent cd Parent
mypy --html-report ../htmlmypy -p ToolName mypy --html-report ../htmlmypy -p ToolName
```
Instantiation Instantiation
************* *************

View File

@@ -105,6 +105,7 @@ License
Action/index Action/index
Action/Releaser Action/Releaser
Action/With-post-step
.. raw:: latex .. raw:: latex