From 84919d9d08042fe86bdce3d415ced155149ca886 Mon Sep 17 00:00:00 2001 From: SonnyBA Date: Thu, 17 Oct 2024 16:16:30 +0200 Subject: [PATCH] [#13] reuse open-api-workflows workflows (#30) * [#13] reuse open-api-workflows workflows --------- Co-authored-by: Sonny Bakker --- .github/workflows/ci.yml | 166 ++---- .github/workflows/code-quality.yml | 93 +--- .github/workflows/codeql-analysis.yml | 29 +- .../workflows/generate-postman-collection.yml | 27 +- .github/workflows/generate-sdks.yml | 37 +- .github/workflows/lint-oas.yml | 27 +- .github/workflows/oas-check.yml | 20 + bin/compile_dependencies.sh | 10 +- bin/flake8_summary.py | 12 - requirements/ci.in | 2 + requirements/ci.txt | 52 +- requirements/dev.in | 11 - requirements/dev.txt | 484 ++++++------------ requirements/test-tools.in | 4 + src/referentielijsten/api/openapi.yaml | 2 +- 15 files changed, 298 insertions(+), 678 deletions(-) create mode 100644 .github/workflows/oas-check.yml delete mode 100755 bin/flake8_summary.py create mode 100644 requirements/ci.in diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aee0971..f83d565 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,27 +29,18 @@ jobs: - name: Get changed PY files id: changed-py-files - uses: tj-actions/changed-files@v41 + uses: tj-actions/changed-files@v45 with: - files: | - ^src/.+\.py - - - name: Get changed JS files - id: changed-js-files - uses: tj-actions/changed-files@v41 - with: - files: | - ^src/.+\.js + files: src/{,**/}*.py - name: Get changed requirements files id: changed-requirements - uses: tj-actions/changed-files@v41 + uses: tj-actions/changed-files@v45 with: - files: ^requirements/.+\.txt$ + files: requirements/*.txt outputs: changed-py-files: ${{ steps.changed-py-files.outputs.any_changed }} - changed-js-files: ${{ steps.changed-js-files.outputs.any_changed }} changed-requirements: ${{ steps.changed-requirements.outputs.any_changed }} tests: @@ -79,32 +70,20 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - name: Set up backend environment + uses: maykinmedia/setup-django-backend@v1.3 with: python-version: '3.11' - - uses: actions/setup-node@v4 - with: - node-version: '18' - - - name: Install system packages - run: | - sudo apt-get update \ - && sudo apt-get install -y --no-install-recommends - - name: Install dependencies - run: pip install -r requirements/dev.txt codecov - - name: Build frontend - run: | - npm ci - npm run build + setup-node: true - name: Run tests run: | python src/manage.py collectstatic --noinput --link coverage run src/manage.py test src env: - DJANGO_SETTINGS_MODULE: referentielijsten.conf.ci + DJANGO_SETTINGS_MODULE: ${{ env.DJANGO_SETTINGS_MODULE }} SECRET_KEY: dummy - DB_USER: postgres - DB_PASSWORD: '' + DB_USER: ${{ env.DB_USER }} + DB_PASSWORD: ${{ env.DB_PASSWORD }} - name: Publish coverage report uses: codecov/codecov-action@v4.0.1 @@ -117,13 +96,11 @@ jobs: steps: - uses: actions/checkout@v4 - - uses: actions/setup-python@v5 + - name: Set up backend environment + uses: maykinmedia/setup-django-backend@v1.3 with: python-version: '3.11' - cache: 'pip' - cache-dependency-path: 'requirements/*.txt' - - name: Install dependencies - run: pip install -r requirements/ci.txt pytest + - name: Generate environment variable documentation using OAf and check if it was updated run: | bin/generate_envvar_docs.sh @@ -134,102 +111,37 @@ jobs: exit 1 fi env: - DJANGO_SETTINGS_MODULE: referentielijsten.conf.ci + DJANGO_SETTINGS_MODULE: ${{ env.DJANGO_SETTINGS_MODULE }} - docker: - needs: tests - name: Docker image build + store-reusable-workflow-vars: + name: create values which can be passed through a reusable workflow runs-on: ubuntu-latest + outputs: + image-name: ${{ steps.image-name.outputs.image-name }} steps: - - uses: actions/checkout@v4 - - name: Determine tag/commit hash - id: vars - run: | - # Strip git ref prefix from version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - # Strip "v" prefix from tag name (if present at all) - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - # Use Docker `latest` tag convention - [ "$VERSION" == "master" ] && VERSION=latest - echo "tag=${VERSION}" >> $GITHUB_OUTPUT - echo "git_hash=${GITHUB_SHA}" >> $GITHUB_OUTPUT - - name: Build the Docker image - run: | - docker build . \ - --tag $IMAGE_NAME:$RELEASE_VERSION \ - --build-arg COMMIT_HASH=${{ steps.vars.outputs.git_hash }} \ - --build-arg RELEASE=${{ steps.vars.outputs.tag }} \ - env: - RELEASE_VERSION: ${{ steps.vars.outputs.tag }} - - - run: docker image save -o image.tar $IMAGE_NAME:${{ steps.vars.outputs.tag }} - - name: Store image artifact - uses: actions/upload-artifact@v3 - with: - name: docker-image - path: image.tar - retention-days: 1 + - run: echo "image-name=$IMAGE_NAME" >> $GITHUB_OUTPUT + name: 'Store the docker image name' + id: image-name - image_scan: - runs-on: ubuntu-latest - name: Scan docker image + open-api-ci: + uses: maykinmedia/open-api-workflows/.github/workflows/ci.yml@v1 needs: - - docker - - steps: - - name: Download built image - uses: actions/download-artifact@v3 - with: - name: docker-image - - name: Scan image with Trivy - uses: aquasecurity/trivy-action@master - with: - input: /github/workspace/image.tar # from download-artifact - format: 'sarif' - output: 'trivy-results-docker.sarif' - ignore-unfixed: true - - name: Upload results to GH Security tab - uses: github/codeql-action/upload-sarif@v3 - with: - sarif_file: 'trivy-results-docker.sarif' - - publish: + - store-reusable-workflow-vars + with: + main-branch: 'master' + python-version: '3.11' + docker-image-name: ${{ needs.store-reusable-workflow-vars.outputs.image-name }} + + open-api-publish: + uses: maykinmedia/open-api-workflows/.github/workflows/publish.yml@v1 needs: + - store-reusable-workflow-vars + - open-api-ci - tests - - docker - - name: Push Docker image - runs-on: ubuntu-latest - if: github.event_name == 'push' # exclude PRs - - steps: - - uses: actions/checkout@v4 - - name: Download built image - uses: actions/download-artifact@v3 - with: - name: docker-image - - - name: Determine tag/commit hash - id: vars - run: | - # Strip git ref prefix from version - VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,') - - # Strip "v" prefix from tag name (if present at all) - [[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//') - - # Use Docker `latest` tag convention - [ "$VERSION" == "master" ] && VERSION=latest - - echo "tag=${VERSION}" >> $GITHUB_OUTPUT - - - name: Load image - run: | - docker image load -i image.tar - - - name: Log into registry - run: echo "${{ secrets.DOCKER_TOKEN }}" | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin - - - name: Push the Docker image - run: docker push $IMAGE_NAME:${{ steps.vars.outputs.tag }} + with: + docker-image-name: ${{ needs.store-reusable-workflow-vars.outputs.image-name }} + repository-owner: 'maykinmedia' + secrets: + docker-username: ${{ secrets.DOCKER_USERNAME }} + docker-token: ${{ secrets.DOCKER_TOKEN }} diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml index d8065bd..5d81210 100644 --- a/.github/workflows/code-quality.yml +++ b/.github/workflows/code-quality.yml @@ -15,91 +15,12 @@ on: workflow_dispatch: jobs: - isort: - name: Code imports - runs-on: ubuntu-latest + open-api-workflow-code-quality: + uses: maykinmedia/open-api-workflows/.github/workflows/code-quality.yml@v1 + with: + python-version: '3.11' + node-version: '18' - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.11' - cache: 'pip' - cache-dependency-path: 'requirements/*.txt' - - name: Install dependencies - run: pip install -r requirements/ci.txt - - name: Run isort - run: isort --check-only --diff . + postgres-image: 'postgres:15' - black: - name: Code format - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.11' - cache: 'pip' - cache-dependency-path: 'requirements/*.txt' - - name: Install dependencies - run: pip install -r requirements/ci.txt - - name: Run black - run: black --check --diff src docs - - flake8: - name: Code style - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.11' - cache: 'pip' - cache-dependency-path: 'requirements/*.txt' - - name: Install dependencies - run: pip install -r requirements/ci.txt - - name: Run flake8 - run: flake8 src - - migrations: - name: Check for model changes not present in the migrations - runs-on: ubuntu-latest - - services: - postgres: - image: postgis/postgis:12-2.5 - env: - POSTGRES_HOST_AUTH_METHOD: trust - ports: - - 5432:5432 - # Needed because the postgres container does not provide a healthcheck - options: - --health-cmd pg_isready --health-interval 10s --health-timeout 5s --health-retries 5 - - steps: - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 - with: - python-version: '3.11' - cache: 'pip' - cache-dependency-path: 'requirements/*.txt' - - name: Install system packages - run: | - sudo apt-get update \ - && sudo apt-get install -y --no-install-recommends \ - libgdal-dev \ - gdal-bin - - - name: Install dependencies - run: pip install -r requirements/ci.txt - - - name: Check for missing migrations - run: src/manage.py makemigrations --check --dry-run - env: - DJANGO_SETTINGS_MODULE: referentielijsten.conf.ci - SECRET_KEY: dummy - DB_USER: postgres - DB_NAME: postgres - DB_PASSWORD: '' + django-settings-module: 'referentielijsten.conf.ci' diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 7a99d1f..6a96040 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -9,30 +9,5 @@ on: - cron: '0 23 * * 6' jobs: - analyze: - name: Analyze - runs-on: ubuntu-latest - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: ['javascript', 'python'] - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v3 - with: - languages: ${{ matrix.language }} - - name: Autobuild - uses: github/codeql-action/autobuild@v3 - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v3 + open-api-workflow-code-analysis: + uses: maykinmedia/open-api-workflows/.github/workflows/code-analysis.yml@v1 diff --git a/.github/workflows/generate-postman-collection.yml b/.github/workflows/generate-postman-collection.yml index 309e38b..9c38598 100644 --- a/.github/workflows/generate-postman-collection.yml +++ b/.github/workflows/generate-postman-collection.yml @@ -3,30 +3,15 @@ name: generate-postman-collection on: push: paths: - - "src/referentielijsten/api/v*/openapi.yaml" + - "src/referentielijsten/api/openapi.yaml" - ".github/workflows/generate-postman-collection.yml" branches: - '**' workflow_dispatch: jobs: - run: - runs-on: ubuntu-latest - strategy: - matrix: - version: [ 'v1' ] - - name: Run with version ${{ matrix.version }} - - steps: - - uses: actions/checkout@v4 - - name: Use Node.js - uses: actions/setup-node@v4 - with: - node-version: '18' - - name: Install dependencies - run: npm install -g openapi-to-postmanv2 - - name: Create tests folder - run: mkdir -p ./tests/postman - - name: Generate Postman collection - run: openapi2postmanv2 -s ./src/referentielijsten/api/openapi.yaml -o ./tests/postman/collection.json --pretty + open-api-workflow-generate-postman-collection: + uses: maykinmedia/open-api-workflows/.github/workflows/generate-postman-collection.yml@v1 + with: + node-version: '18' + schema-path: 'src/referentielijsten/api/openapi.yaml' diff --git a/.github/workflows/generate-sdks.yml b/.github/workflows/generate-sdks.yml index 55f2908..db7cd4b 100644 --- a/.github/workflows/generate-sdks.yml +++ b/.github/workflows/generate-sdks.yml @@ -3,40 +3,15 @@ name: generate-sdks on: push: paths: - - "src/referentielijsten/api/v*/openapi.yaml" + - "src/referentielijsten/api/openapi.yaml" - ".github/workflows/generate-sdks.yml" branches: - '**' workflow_dispatch: jobs: - run: - runs-on: ubuntu-latest - strategy: - matrix: - version: [ 'v1' ] - - name: Run with version ${{ matrix.version }} - - steps: - - uses: actions/checkout@v4 - - name: Use Node.js - uses: actions/setup-node@v4 - with: - node-version: '18' - - name: Install dependencies - run: npm install -g @openapitools/openapi-generator-cli - - name: Determing oas path - id: vars - run: echo ::set-output name=oas::./src/referentielijsten/api/openapi.yaml - - name: Validate schema - run: openapi-generator-cli validate -i ${{ steps.vars.outputs.oas }} - - name: Generate Java client - run: openapi-generator-cli generate -i ${{ steps.vars.outputs.oas }} --global-property=modelTests=false,apiTests=false,modelDocs=false,apiDocs=false \ - -o ./sdks/java -g java --additional-properties=dateLibrary=java8,java8=true,optionalProjectFile=false,optionalAssemblyInfo=false - - name: Generate .NET client - run: openapi-generator-cli generate -i ${{ steps.vars.outputs.oas }} --global-property=modelTests=false,apiTests=false,modelDocs=false,apiDocs=false \ - -o ./sdks/net -g csharp --additional-properties=optionalProjectFile=false,optionalAssemblyInfo=false - - name: Generate Python client - run: openapi-generator-cli generate -i ${{ steps.vars.outputs.oas }} --global-property=modelTests=false,apiTests=false,modelDocs=false,apiDocs=false \ - -o ./sdks/python -g python --additional-properties=optionalProjectFile=false,optionalAssemblyInfo=false+ + open-api-workflow-generate-sdks: + uses: maykinmedia/open-api-workflows/.github/workflows/generate-sdks.yml@v1 + with: + node-version: '18' + schema-path: 'src/referentielijsten/api/openapi.yaml' diff --git a/.github/workflows/lint-oas.yml b/.github/workflows/lint-oas.yml index 4ef47da..10e4454 100644 --- a/.github/workflows/lint-oas.yml +++ b/.github/workflows/lint-oas.yml @@ -3,28 +3,15 @@ name: lint-oas on: push: paths: - - "src/referentielijsten/api/v*/openapi.yaml" - - .github/workflows/lint-oas.yml + - "src/referentielijsten/api/openapi.yaml" + - ".github/workflows/lint-oas.yml" branches: - '**' workflow_dispatch: jobs: - run: - runs-on: ubuntu-latest - strategy: - matrix: - version: [ 'v1' ] - - name: Run with version ${{ matrix.version }} - - steps: - - uses: actions/checkout@v4 - - name: Use Node.js - uses: actions/setup-node@v4 - with: - node-version: '18' - - name: Install spectral - run: npm install -g @stoplight/spectral@5 - - name: Run OAS linter - run: spectral lint ./src/referentielijsten/api/openapi.yaml + open-api-workflow-lint-oas: + uses: maykinmedia/open-api-workflows/.github/workflows/lint-oas.yml@v1 + with: + node-version: '18' + schema-path: 'src/referentielijsten/api/openapi.yaml' diff --git a/.github/workflows/oas-check.yml b/.github/workflows/oas-check.yml new file mode 100644 index 0000000..6149de0 --- /dev/null +++ b/.github/workflows/oas-check.yml @@ -0,0 +1,20 @@ +name: check-oas + +on: + push: + paths: + - "src/referentielijsten/api/openapi.yaml" + - ".github/workflows/oas-check.yml" + branches: + - '**' + workflow_dispatch: + +jobs: + open-api-workflow-check-oas: + uses: maykinmedia/open-api-workflows/.github/workflows/oas-check.yml@v1 + with: + python-version: '3.11' + + schema-path: 'src/referentielijsten/api/openapi.yaml' + + django-settings-module: 'referentielijsten.conf.ci' diff --git a/bin/compile_dependencies.sh b/bin/compile_dependencies.sh index 4fd8d47..f4319c6 100755 --- a/bin/compile_dependencies.sh +++ b/bin/compile_dependencies.sh @@ -27,20 +27,22 @@ pip-compile \ "$@" \ requirements/base.in -# Dependencies for testing +# Dependencies for ci pip-compile \ --no-emit-index-url \ --allow-unsafe \ --output-file requirements/ci.txt \ "$@" \ requirements/base.txt \ - requirements/test-tools.in + requirements/test-tools.in \ + requirements/ci.in -# Dev depedencies - exact same set as CI + some extra tooling +# Dev depedencies pip-compile \ --no-emit-index-url \ --allow-unsafe \ --output-file requirements/dev.txt \ "$@" \ - requirements/ci.txt \ + requirements/base.txt \ + requirements/test-tools.in \ requirements/dev.in diff --git a/bin/flake8_summary.py b/bin/flake8_summary.py deleted file mode 100755 index 7a05d5d..0000000 --- a/bin/flake8_summary.py +++ /dev/null @@ -1,12 +0,0 @@ -#!/usr/bin/env python -import sys - - -def main(flake8_output: str): - for line in flake8_output.splitlines(): - file, line, column, error = line.split(":", 3) - print(f"| {file} | {line} | {column} | {error.strip()} |") - - -if __name__ == "__main__": - main(sys.argv[1]) diff --git a/requirements/ci.in b/requirements/ci.in new file mode 100644 index 0000000..7637590 --- /dev/null +++ b/requirements/ci.in @@ -0,0 +1,2 @@ +codecov +pytest diff --git a/requirements/ci.txt b/requirements/ci.txt index 9bc7e66..fbf9431 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -4,6 +4,8 @@ # # ./bin/compile_dependencies.sh # +alabaster==0.7.16 + # via sphinx amqp==5.2.0 # via # -r requirements/base.txt @@ -28,6 +30,8 @@ attrs==23.2.0 # glom # jsonschema # referencing +babel==2.16.0 + # via sphinx beautifulsoup4==4.12.3 # via webtest billiard==4.2.0 @@ -90,6 +94,8 @@ click-repl==0.3.0 # via # -r requirements/base.txt # celery +codecov==2.1.13 + # via -r requirements/ci.in commonground-api-common==1.13.2 # via # -r requirements/base.txt @@ -103,7 +109,9 @@ coreschema==0.0.4 # -r requirements/base.txt # coreapi coverage==7.6.0 - # via -r requirements/test-tools.in + # via + # -r requirements/test-tools.in + # codecov cryptography==43.0.0 # via # -r requirements/base.txt @@ -278,6 +286,10 @@ djangorestframework-inclusions==1.2.0 # via # -r requirements/base.txt # open-api-framework +docutils==0.20.1 + # via + # sphinx + # sphinx-rtd-theme drf-nested-routers==0.94.1 # via # -r requirements/base.txt @@ -344,11 +356,15 @@ idna==3.7 # -r requirements/base.txt # requests # yarl +imagesize==1.4.1 + # via sphinx inflection==0.5.1 # via # -r requirements/base.txt # drf-spectacular # drf-yasg +iniconfig==2.0.0 + # via pytest iso-639==0.4.5 # via # -r requirements/base.txt @@ -367,6 +383,7 @@ jinja2==3.1.4 # via # -r requirements/base.txt # coreschema + # sphinx josepy==1.14.0 # via # -r requirements/base.txt @@ -430,6 +447,8 @@ packaging==24.1 # -r requirements/base.txt # black # drf-yasg + # pytest + # sphinx pathspec==0.12.1 # via black phonenumberslite==8.13.42 @@ -438,6 +457,8 @@ phonenumberslite==8.13.42 # django-two-factor-auth platformdirs==4.2.2 # via black +pluggy==1.5.0 + # via pytest prometheus-client==0.20.0 # via # -r requirements/base.txt @@ -458,6 +479,8 @@ pycparser==2.22 # cffi pyflakes==3.2.0 # via flake8 +pygments==2.18.0 + # via sphinx pyjwt==2.8.0 # via # -r requirements/base.txt @@ -475,6 +498,8 @@ pypng==0.20220715.0 # qrcode pyquery==2.0.0 # via -r requirements/test-tools.in +pytest==8.3.3 + # via -r requirements/ci.in python-dateutil==2.9.0.post0 # via # -r requirements/base.txt @@ -520,6 +545,7 @@ requests==2.32.3 # via # -r requirements/base.txt # ape-pie + # codecov # commonground-api-common # coreapi # django-log-outgoing-requests @@ -527,6 +553,7 @@ requests==2.32.3 # mozilla-django-oidc # open-api-framework # requests-mock + # sphinx # zgw-consumers requests-mock==1.12.1 # via -r requirements/test-tools.in @@ -547,8 +574,31 @@ six==1.16.0 # isodate # orderedmultidict # python-dateutil +snowballstemmer==2.2.0 + # via sphinx soupsieve==2.5 # via beautifulsoup4 +sphinx==7.4.7 + # via + # -r requirements/test-tools.in + # sphinx-rtd-theme + # sphinxcontrib-jquery +sphinx-rtd-theme==2.0.0 + # via -r requirements/test-tools.in +sphinxcontrib-applehelp==2.0.0 + # via sphinx +sphinxcontrib-devhelp==2.0.0 + # via sphinx +sphinxcontrib-htmlhelp==2.1.0 + # via sphinx +sphinxcontrib-jquery==4.1 + # via sphinx-rtd-theme +sphinxcontrib-jsmath==1.0.1 + # via sphinx +sphinxcontrib-qthelp==2.0.0 + # via sphinx +sphinxcontrib-serializinghtml==2.0.0 + # via sphinx sqlparse==0.5.1 # via # -r requirements/base.txt diff --git a/requirements/dev.in b/requirements/dev.in index 3a3dbfd..54217aa 100644 --- a/requirements/dev.in +++ b/requirements/dev.in @@ -1,19 +1,8 @@ --c ci.txt - # Helpers pip-tools bump2version gitpython -# Code formatting -black -isort[colors] -# flake8 -> pins importlib-metadata < 4.3 on Python < 3.10, which conflicts with other packages - # Debug tooling django-debug-toolbar django-extensions - -# Documentation -sphinx -sphinx_rtd_theme diff --git a/requirements/dev.txt b/requirements/dev.txt index 5b880ed..f4f9875 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -8,59 +8,45 @@ alabaster==0.7.16 # via sphinx amqp==5.2.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # kombu ape-pie==0.2.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # zgw-consumers asgiref==3.8.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # django # django-axes # django-cors-headers asn1crypto==1.5.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # webauthn attrs==23.2.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # glom # jsonschema # referencing babel==2.15.0 # via sphinx beautifulsoup4==4.12.3 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # webtest + # via webtest billiard==4.2.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # celery black==24.4.2 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # -r requirements/dev.in + # via -r requirements/test-tools.in bleach==6.1.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # open-api-framework boltons==24.0.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # face # glom build==1.2.1 @@ -69,37 +55,32 @@ bump2version==1.0.1 # via -r requirements/dev.in cbor2==5.6.4 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # webauthn celery==5.4.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # flower # notifications-api-common # open-api-framework certifi==2024.7.4 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # elastic-apm # requests # sentry-sdk cffi==1.16.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # cryptography charset-normalizer==3.3.2 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # requests click==8.1.7 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt + # -r requirements/test-tools.in # black # celery # click-didyoumean @@ -108,63 +89,47 @@ click==8.1.7 # pip-tools click-didyoumean==0.3.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # celery click-plugins==1.1.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # celery click-repl==0.3.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # celery -colorama==0.4.6 - # via isort commonground-api-common==1.13.2 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # open-api-framework coreapi==2.3.3 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # commonground-api-common coreschema==0.0.4 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # coreapi coverage==7.6.0 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # via -r requirements/test-tools.in cryptography==43.0.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # django-simple-certmanager # josepy # mozilla-django-oidc # pyopenssl # webauthn cssselect==1.2.0 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # pyquery + # via pyquery diff-match-patch==20230430 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # django-import-export django==4.2.15 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # commonground-api-common # django-admin-index # django-appconf @@ -204,28 +169,23 @@ django==4.2.15 # zgw-consumers django-admin-index==3.1.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # open-api-framework django-appconf==1.0.6 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # django-log-outgoing-requests django-axes==6.5.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # open-api-framework django-cors-headers==4.4.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # open-api-framework django-csp==3.8 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # open-api-framework django-debug-toolbar==4.4.6 # via -r requirements/dev.in @@ -233,89 +193,71 @@ django-extensions==3.2.3 # via -r requirements/dev.in django-filter==24.2 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # commonground-api-common # open-api-framework django-formtools==2.5.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # django-two-factor-auth django-import-export[xlsx]==4.1.1 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # via -r requirements/base.txt django-jsonform==2.22.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # mozilla-django-oidc-db # open-api-framework django-log-outgoing-requests==0.6.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # open-api-framework django-markup==1.8.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # open-api-framework django-ordered-model==3.7.4 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # django-admin-index django-otp==1.5.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # django-two-factor-auth django-phonenumber-field==7.3.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # django-two-factor-auth django-privates==2.0.0.post1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # django-simple-certmanager django-redis==5.4.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # open-api-framework django-relativedelta==2.0.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # zgw-consumers django-rest-framework-condition==0.1.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # commonground-api-common django-sendfile2==0.7.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # django-privates django-setup-configuration==0.3.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # open-api-framework django-simple-certmanager==2.3.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # zgw-consumers django-solo==2.3.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # commonground-api-common # django-log-outgoing-requests # mozilla-django-oidc-db @@ -323,17 +265,13 @@ django-solo==2.3.0 # zgw-consumers django-two-factor-auth[phonenumberslite,webauthn]==1.16.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # maykin-2fa django-webtest==1.9.11 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # via -r requirements/test-tools.in djangorestframework==3.15.2 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # commonground-api-common # djangorestframework-gis # djangorestframework-inclusions @@ -344,19 +282,16 @@ djangorestframework==3.15.2 # open-api-framework djangorestframework-camel-case==1.4.2 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # commonground-api-common # notifications-api-common djangorestframework-gis==1.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # open-api-framework djangorestframework-inclusions==1.2.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # open-api-framework docutils==0.20.1 # via @@ -364,13 +299,11 @@ docutils==0.20.1 # sphinx-rtd-theme drf-nested-routers==0.94.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # commonground-api-common drf-spectacular[sidecar]==0.27.2 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # open-api-framework drf-spectacular-sidecar==2024.7.1 # via @@ -379,60 +312,43 @@ drf-spectacular-sidecar==2024.7.1 # drf-spectacular drf-yasg==1.21.7 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # commonground-api-common ecs-logging==2.2.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # elastic-apm elastic-apm==6.23.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # open-api-framework et-xmlfile==1.1.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # openpyxl face==20.1.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # glom factory-boy==3.3.0 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # via -r requirements/test-tools.in faker==26.0.0 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # factory-boy + # via factory-boy flake8==7.1.0 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # via -r requirements/test-tools.in flower==2.0.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # open-api-framework freezegun==1.5.1 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # via -r requirements/test-tools.in furl==2.1.3 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # ape-pie gemma-zds-client==2.0.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # commonground-api-common # notifications-api-common gitdb==4.0.11 @@ -441,249 +357,185 @@ gitpython==3.1.43 # via -r requirements/dev.in glom==23.5.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # mozilla-django-oidc-db humanize==4.10.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # flower idna==3.7 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # requests # yarl imagesize==1.4.1 # via sphinx inflection==0.5.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # drf-spectacular # drf-yasg iso-639==0.4.5 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # commonground-api-common isodate==0.6.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # commonground-api-common -isort[colors]==5.13.2 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # -r requirements/dev.in +isort==5.13.2 + # via -r requirements/test-tools.in itypes==1.2.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # coreapi jinja2==3.1.4 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # coreschema # sphinx josepy==1.14.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # mozilla-django-oidc jsonschema==4.23.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # drf-spectacular jsonschema-specifications==2023.12.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # jsonschema kombu==5.3.7 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # celery lxml==5.2.2 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # pyquery + # via pyquery markupsafe==2.1.5 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # jinja2 maykin-2fa==1.0.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # open-api-framework mccabe==0.7.0 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # flake8 + # via flake8 mozilla-django-oidc==4.0.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # mozilla-django-oidc-db mozilla-django-oidc-db==0.19.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # open-api-framework multidict==6.0.5 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # yarl + # via yarl mypy-extensions==1.0.0 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # black + # via black notifications-api-common==0.2.2 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # commonground-api-common open-api-framework==0.8.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt openpyxl==3.1.5 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # tablib orderedmultidict==1.0.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # furl oyaml==1.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # commonground-api-common packaging==24.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # black # build # drf-yasg # sphinx pathspec==0.12.1 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # black + # via black phonenumberslite==8.13.42 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # django-two-factor-auth pip-tools==7.4.1 # via -r requirements/dev.in platformdirs==4.2.2 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # black + # via black prometheus-client==0.20.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # flower prompt-toolkit==3.0.47 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # click-repl psycopg2==2.9.9 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # open-api-framework pycodestyle==2.12.0 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # flake8 + # via flake8 pycparser==2.22 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # cffi pyflakes==3.2.0 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # flake8 + # via flake8 pygments==2.18.0 # via sphinx pyjwt==2.8.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # commonground-api-common # gemma-zds-client # zgw-consumers pyopenssl==24.2.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # josepy # webauthn pypng==0.20220715.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # qrcode pyproject-hooks==1.1.0 # via # build # pip-tools pyquery==2.0.0 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # via -r requirements/test-tools.in python-dateutil==2.9.0.post0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # celery # django-relativedelta # faker # freezegun python-decouple==3.8 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # open-api-framework python-dotenv==1.0.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # open-api-framework pytz==2024.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # drf-yasg # flower pyyaml==6.0.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # drf-spectacular # drf-yasg # gemma-zds-client @@ -691,24 +543,20 @@ pyyaml==6.0.1 # vcrpy qrcode==7.4.2 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # django-two-factor-auth redis==5.0.8 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # django-redis referencing==0.35.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # jsonschema # jsonschema-specifications requests==2.32.3 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # ape-pie # commonground-api-common # coreapi @@ -720,24 +568,19 @@ requests==2.32.3 # sphinx # zgw-consumers requests-mock==1.12.1 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # via -r requirements/test-tools.in rpds-py==0.19.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # jsonschema # referencing sentry-sdk==2.13.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # open-api-framework six==1.16.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # bleach # furl # isodate @@ -748,17 +591,14 @@ smmap==5.0.1 snowballstemmer==2.2.0 # via sphinx soupsieve==2.5 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # beautifulsoup4 + # via beautifulsoup4 sphinx==7.4.7 # via - # -r requirements/dev.in + # -r requirements/test-tools.in # sphinx-rtd-theme # sphinxcontrib-jquery sphinx-rtd-theme==2.0.0 - # via -r requirements/dev.in + # via -r requirements/test-tools.in sphinxcontrib-applehelp==2.0.0 # via sphinx sphinxcontrib-devhelp==2.0.0 @@ -775,113 +615,83 @@ sphinxcontrib-serializinghtml==2.0.0 # via sphinx sqlparse==0.5.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # django # django-debug-toolbar tablib[xlsx]==3.5.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # django-import-export tblib==3.0.0 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # via -r requirements/test-tools.in tornado==6.4.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # flower typing-extensions==4.12.2 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # mozilla-django-oidc-db # qrcode # zgw-consumers tzdata==2024.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # celery uritemplate==4.1.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # coreapi # drf-spectacular # drf-yasg urllib3==2.2.2 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # elastic-apm # requests # sentry-sdk uwsgi==2.0.26 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # open-api-framework vcrpy==6.0.1 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # via -r requirements/test-tools.in vine==5.1.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # amqp # celery # kombu waitress==3.0.0 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # webtest + # via webtest wcwidth==0.2.13 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # prompt-toolkit webauthn==2.2.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # django-two-factor-auth webencodings==0.5.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # bleach webob==1.8.8 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # webtest + # via webtest webtest==3.0.0 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # django-webtest + # via django-webtest wheel==0.43.0 # via pip-tools wrapt==1.16.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # elastic-apm # vcrpy yarl==1.9.4 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # vcrpy + # via vcrpy zgw-consumers==0.34.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # notifications-api-common # open-api-framework diff --git a/requirements/test-tools.in b/requirements/test-tools.in index 107de60..d6f6152 100644 --- a/requirements/test-tools.in +++ b/requirements/test-tools.in @@ -15,3 +15,7 @@ flake8 # SPDX header checks click + +# Documentation +sphinx +sphinx_rtd_theme diff --git a/src/referentielijsten/api/openapi.yaml b/src/referentielijsten/api/openapi.yaml index 97b63c6..0986bf6 100644 --- a/src/referentielijsten/api/openapi.yaml +++ b/src/referentielijsten/api/openapi.yaml @@ -10,7 +10,7 @@ info: name: EUPL url: https://github.com/maykinmedia/referentielijsten/blob/master/LICENSE.md paths: - /api/v1/item: + /api/v1/items: get: operationId: getitems description: De operatie waarmee alle items van een tabel wordt opgehaald.