From addbb7149c520cdd63be3fdb46434e56af9c721e Mon Sep 17 00:00:00 2001 From: Giuseppe De Marco Date: Tue, 2 Jan 2024 10:38:41 +0100 Subject: [PATCH] gh-pages --- .github/workflows/gh-pages.yml | 49 ++++++++++++++++++++++++++++++++++ README.md | 24 +++++------------ pyeudiw/jwt/__init__.py | 1 - 3 files changed, 56 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/gh-pages.yml diff --git a/.github/workflows/gh-pages.yml b/.github/workflows/gh-pages.yml new file mode 100644 index 00000000..4fc4d75f --- /dev/null +++ b/.github/workflows/gh-pages.yml @@ -0,0 +1,49 @@ +# This is a basic workflow to help you get started with Actions + +name: gh-pages + +on: + release: + types: + - created + - edited + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: actions/checkout@v2 + + - uses: actions/setup-python@v2 + with: + python-version: "3.8" # Version range or exact version of a Python version to use, using SemVer's version range syntax + architecture: "x64" # optional x64 or x86. Defaults to x64 if not specified + + - name: Install deps + run: |- + python -m pip install sphinx sphinx_rtd_theme + + - name: Build branch + run: |- + cd docs + sphinx-apidoc -o ./source ../pyeudiw ../pyeudiw/tests + make html + + - name: Deploy to GitHub Pages + if: success() + uses: crazy-max/ghaction-github-pages@v2 + with: + target_branch: gh-pages + build_dir: docs/_build/html + keep_history: false + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/README.md b/README.md index 36e69b5c..4cdfb827 100644 --- a/README.md +++ b/README.md @@ -54,22 +54,12 @@ Install using github: Optionally for generate the documentation you need to install the following packages: `pip install sphinx sphinx_rtd_theme` -## Usage -TBD. Here a section that points to the documentation of each single package and some common example about their usage for some specific tasks. +## Documentation -| Name | Description | -| :--- | --- | -| __jwk__ | link to the API documentation [](). | -| __jwt__ | link to the API documentation [](). | -| __tools.qrcode__ | QRCodes creation. | -| __oauth2.dpop__ | link to the API documentation [](). | -| __federation__ | link to the API documentation [](). | -| __trust__ | link to the API documentation [](). | -| __satosa.backend__ | link to the API documentation [](). | -| __openid4vp__ | link to the API documentation [](). | -| __presentation_exchange__ | link to the API documentation [](). | -| __sd_jwt__ | link to the API documentation [](). | +The API documentation is available in the githubpages, [here](https://italia.github.io/eudi-wallet-it-python/). + +In the [docs/](docs) folder there are some common example for some specific tasks. ## Example project @@ -93,11 +83,11 @@ backend to enable the OpenID4VP protocol. Please read this [README](README.SATOSA.md) any details about how to configure SaToSa with the OpenID4VP Relying Party backend. -## Setup Documentation -For generate the documentaation enter in the terminal the following commands: +## Build the Documentation +For generate the documentaation enter in the terminal the following commands. The last argument is the exclude path (unit tests excluded). ```` cd docs -sphinx-apidoc -o ./source ../pyeudiw +sphinx-apidoc -o ./source ../pyeudiw ../pyeudiw/tests make html ```` diff --git a/pyeudiw/jwt/__init__.py b/pyeudiw/jwt/__init__.py index 1c685974..80fe1b6b 100644 --- a/pyeudiw/jwt/__init__.py +++ b/pyeudiw/jwt/__init__.py @@ -188,7 +188,6 @@ def sign( _payload = plain_dict else: _payload = "" - _signer = JWSec(_payload, alg=self.alg, **kwargs) return _signer.sign_compact([_key], protected=protected, **kwargs)