From 51e54217a7f9d1dceb4d0afe0236c6f634c7f9fe Mon Sep 17 00:00:00 2001 From: Sonny Bakker Date: Fri, 6 Sep 2024 16:39:31 +0200 Subject: [PATCH 01/12] [#13] reuse open-api-workflows workflows --- .github/workflows/ci.yml | 137 ++++-------------- .github/workflows/code-analysis.yml | 21 +++ .github/workflows/code-style.yml | 57 -------- .github/workflows/codeql.yml | 123 +++------------- .../workflows/generate-postman-collection.yml | 22 +-- .github/workflows/generate-sdks.yml | 32 +--- .github/workflows/lint-oas.yml | 20 +-- bin/check_schema.sh | 30 ++++ bin/generate_postman_collection.sh | 22 +++ bin/generate_sdks.sh | 42 ++++++ bin/lint_oas_files.sh | 16 ++ 11 files changed, 186 insertions(+), 336 deletions(-) create mode 100644 .github/workflows/code-analysis.yml delete mode 100644 .github/workflows/code-style.yml create mode 100755 bin/check_schema.sh create mode 100755 bin/generate_postman_collection.sh create mode 100755 bin/generate_sdks.sh create mode 100755 bin/lint_oas_files.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1e71f372..bec89fb8 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,7 +15,6 @@ env: DJANGO_SETTINGS_MODULE: openklant.conf.ci DB_PASSWORD: '' DB_USER: postgres - # ALLOWED_HOSTS: openklant.nl jobs: # determine changed files to decide if certain jobs can be skipped or not @@ -28,25 +27,21 @@ jobs: with: fetch-depth: 2 - - name: Changed files - id: app-files + - name: Get changed PY files + id: changed-py-files uses: tj-actions/changed-files@v45 with: files: | - src/**/*.py - requirements/*.txt - - - name: Display changed files - if: steps.app-files.outputs.any_changed == 'true' - env: - ALL_CHANGED_FILES: ${{ steps.app-files.outputs.all_changed_files }} - run: | - for file in ${ALL_CHANGED_FILES}; do - echo "$file was changed" - done + ^src/.+\.py + - name: Get changed requirements files + id: changed-requirements + uses: tj-actions/changed-files@v45 + with: + files: ^requirements/.+\.txt$ outputs: - changed-files: ${{ steps.app-files.outputs.any_changed }} + changed-py-files: ${{ steps.changed-py-files.outputs.any_changed }} + changed-requirements: ${{ steps.changed-requirements.outputs.any_changed }} tests: name: Tests (PG ${{ matrix.postgres }}) @@ -91,10 +86,7 @@ jobs: python src/manage.py collectstatic --noinput --link coverage run src/manage.py test src env: - DJANGO_SETTINGS_MODULE: openklant.conf.ci SECRET_KEY: dummy - DB_USER: postgres - DB_PASSWORD: '' - name: Publish coverage report uses: codecov/codecov-action@v3 @@ -121,101 +113,26 @@ jobs: echo "Please update the environment documentation by running \`bin/generate_envvar_docs.sh\`" exit 1 fi - env: - DJANGO_SETTINGS_MODULE: openklant.conf.ci - docker: - needs: tests - name: Build Docker image + 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 }} + sphinx-ssl-conf: ${{ steps.sphinx-ssl-conf.outputs.sphinx-ssl-conf }} 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:${{ steps.vars.outputs.tag }} \ - --build-arg COMMIT_HASH=${{ steps.vars.outputs.git_hash }} \ - --build-arg RELEASE=${{ 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 - - # image_scan: - # runs-on: ubuntu-latest - # name: Scan docker image - # 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: + - run: echo "image-name=$IMAGE_NAME" >> $GITHUB_OUTPUT + name: 'Store the docker image name' + id: image-name + + open-api-ci: + uses: maykinmedia/open-api-workflows/.github/workflows/ci.yml@initial-setup needs: + - store-reusable-workflow-vars - 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: + main-branch: 'master' + python-version: '3.11' + docker-image-name: ${{ needs.store-reusable-workflow-vars.outputs.image-name }} + repository-owner: 'maykinmedia' diff --git a/.github/workflows/code-analysis.yml b/.github/workflows/code-analysis.yml new file mode 100644 index 00000000..abf40966 --- /dev/null +++ b/.github/workflows/code-analysis.yml @@ -0,0 +1,21 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +name: "CodeQL" + +on: + push: + branches: + - main + pull_request: + # The branches below must be a subset of the branches above + branches: + - main + schedule: + - cron: '0 23 * * 6' + +jobs: + open-api-workflow-code-analysis: + uses: maykinmedia/open-api-workflows/.github/workflows/code-analysis.yml@initial-setup diff --git a/.github/workflows/code-style.yml b/.github/workflows/code-style.yml deleted file mode 100644 index 68e7bf79..00000000 --- a/.github/workflows/code-style.yml +++ /dev/null @@ -1,57 +0,0 @@ -name: code style - -# Run this workflow every time a new commit pushed to your repository -on: - push: - branches: - - main - paths: - - '**.py' - pull_request: - paths: - - '**.py' - workflow_dispatch: - -jobs: - isort: - name: Code imports - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: '3.11' - - name: Install dependencies - run: pip install -r requirements/ci.txt - - name: Run isort - run: isort --check-only --diff . - - black: - name: Code format - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 - with: - python-version: '3.11' - - 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@v2 - - uses: actions/setup-python@v2 - with: - python-version: '3.11' - - name: Install dependencies - run: pip install -r requirements/ci.txt - - name: Run flake8 - run: flake8 src - diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 7bfda6e8..9fabd9e0 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -7,107 +7,28 @@ name: Code quality checks on: push: - branches: [ "master" ] + branches: + - master + paths: + - '**.py' + - '**.yml' pull_request: - # The branches below must be a subset of the branches above - branches: [ "master" ] - schedule: - - cron: '32 10 * * 4' + paths: + - '**.py' + - '**.yml' + workflow_dispatch: jobs: - analyze: - name: Analyze - # Runner size impacts CodeQL analysis time. To learn more, please see: - # - https://gh.io/recommended-hardware-resources-for-running-codeql - # - https://gh.io/supported-runners-and-hardware-resources - # - https://gh.io/using-larger-runners - # Consider using larger runners for possible analysis time improvements. - runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }} - timeout-minutes: ${{ (matrix.language == 'swift' && 120) || 360 }} - permissions: - actions: read - contents: read - security-events: write - - strategy: - fail-fast: false - matrix: - language: [ 'javascript-typescript', 'python' ] - # CodeQL supports [ 'c-cpp', 'csharp', 'go', 'java-kotlin', 'javascript-typescript', 'python', 'ruby', 'swift' ] - # Use only 'java-kotlin' to analyze code written in Java, Kotlin or both - # Use only 'javascript-typescript' to analyze code written in JavaScript, TypeScript or both - # Learn more about CodeQL language support at https://aka.ms/codeql-docs/language-support - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - # Initializes the CodeQL tools for scanning. - - name: Initialize CodeQL - uses: github/codeql-action/init@v2 - with: - languages: ${{ matrix.language }} - # If you wish to specify custom queries, you can do so here or in a config file. - # By default, queries listed here will override any specified in a config file. - # Prefix the list here with "+" to use these queries and those in the config file. - - # For more details on CodeQL's query packs, refer to: https://docs.github.com/en/code-security/code-scanning/automatically-scanning-your-code-for-vulnerabilities-and-errors/configuring-code-scanning#using-queries-in-ql-packs - # queries: security-extended,security-and-quality - - - # Autobuild attempts to build any compiled languages (C/C++, C#, Go, Java, or Swift). - # If this step fails, then you should remove it and run the build manually (see below) - - name: Autobuild - uses: github/codeql-action/autobuild@v2 - - # ℹī¸ Command-line programs to run using the OS shell. - # 📚 See https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idstepsrun - - # If the Autobuild fails above, remove it and uncomment the following three lines. - # modify them (or add more) to build your code if your project, please refer to the EXAMPLE below for guidance. - - # - run: | - # echo "Run, Build Application using script" - # ./location_of_script_within_repo/buildscript.sh - - - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v2 - with: - category: "/language:${{matrix.language}}" - - oas-up-to-date: - name: Check for unexepected OAS changes - runs-on: ubuntu-latest - strategy: - matrix: - component: ['contactgegevens', 'klantinteracties'] - steps: - - uses: actions/checkout@v4 - - uses: actions/setup-python@v4 - with: - python-version: '3.11' - cache: 'pip' - cache-dependency-path: 'requirements/*.txt' - - uses: actions/setup-node@v4 - with: - node-version: '18' - - - name: Install dependencies - run: pip install -r requirements/ci.txt - - - name: Generate OAS files - run: ./bin/generate_schema_for_component.sh ${{ matrix.component }} openapi-${{ matrix.component }}.yaml - env: - DJANGO_SETTINGS_MODULE: openklant.conf.ci - - - name: Check for OAS changes - run: | - diff openapi-${{ matrix.component }}.yaml src/openklant/components/${{ matrix.component }}/openapi.yaml - - name: Write failure markdown - if: ${{ failure() }} - run: | - echo 'Run the following command locally and commit the changes' >> $GITHUB_STEP_SUMMARY - echo '' >> $GITHUB_STEP_SUMMARY - echo '```bash' >> $GITHUB_STEP_SUMMARY - echo './bin/generate_schema_for_component.sh ${{ matrix.component }}' >> $GITHUB_STEP_SUMMARY - echo '```' >> $GITHUB_STEP_SUMMARY + open-api-workflow-code-quality: + uses: maykinmedia/open-api-workflows/.github/workflows/code-quality.yml@initial-setup + with: + python-version: '3.11' + node-version: '18' + postgres-version: 'latest' + + isort-src-pattern: 'src' + black-src-pattern: 'src docs' + flake8-src-pattern: 'src' + + django-settings-module: 'openklant.conf.ci' + django-secret-key: dummy diff --git a/.github/workflows/generate-postman-collection.yml b/.github/workflows/generate-postman-collection.yml index eae48a2b..62e5245e 100644 --- a/.github/workflows/generate-postman-collection.yml +++ b/.github/workflows/generate-postman-collection.yml @@ -10,23 +10,5 @@ on: workflow_dispatch: jobs: - run: - runs-on: ubuntu-latest - strategy: - matrix: - component: ['contactgegevens', 'klantinteracties'] - - name: Run with component ${{ matrix.component }} - - 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/openklant/components/${{ matrix.component }}/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@initial-setup diff --git a/.github/workflows/generate-sdks.yml b/.github/workflows/generate-sdks.yml index 6006710f..1e250a16 100644 --- a/.github/workflows/generate-sdks.yml +++ b/.github/workflows/generate-sdks.yml @@ -10,33 +10,5 @@ on: workflow_dispatch: jobs: - run: - runs-on: ubuntu-latest - strategy: - matrix: - component: ['contactgegevens', 'klantinteracties'] - - name: Run with component ${{ matrix.component }} - - 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: Determining oas path - id: vars - run: echo ::set-output name=oas::./src/openklant/components/${{ matrix.component }}/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@initial-setup diff --git a/.github/workflows/lint-oas.yml b/.github/workflows/lint-oas.yml index ad3f13fd..bbdfe20e 100644 --- a/.github/workflows/lint-oas.yml +++ b/.github/workflows/lint-oas.yml @@ -10,21 +10,5 @@ on: workflow_dispatch: jobs: - run: - runs-on: ubuntu-latest - strategy: - matrix: - component: ['contactgegevens', 'klantinteracties'] - - name: Run with component ${{ matrix.component }} - - 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/openklant/components/${{ matrix.component }}/openapi.yaml + open-api-workflow-lint-oas: + uses: maykinmedia/open-api-workflows/.github/workflows/lint-oas.yml@initial-setup diff --git a/bin/check_schema.sh b/bin/check_schema.sh new file mode 100755 index 00000000..cf94efd7 --- /dev/null +++ b/bin/check_schema.sh @@ -0,0 +1,30 @@ +#!/bin/bash + +# Run this script from the root of the repository + +set -e + +COMPONENTS=( + contactgegevens + klantinteracties +) + +if [[ -z "$VIRTUAL_ENV" ]] && [[ ! -v GITHUB_ACTIONS ]]; then + echo "You need to activate your virtual env before running this script" + exit 1 +fi + +for component in "${COMPONENTS[@]}"; +do + ./bin/generate_schema_for_component.sh "$component" "openapi-$component.yaml" + + echo "Checking src/openklant/components/$component/openapi.yaml ..." + + diff "openapi-$component.yaml" "src/openklant/components/$component/openapi.yaml" + + if (( $? > 0 )); then + echo "src/openklant/components/$component/openapi.yaml needs to be updated!" + else + echo "src/openklant/components/$component/openapi.yaml is up-to-date." + fi +done diff --git a/bin/generate_postman_collection.sh b/bin/generate_postman_collection.sh new file mode 100755 index 00000000..835ba9f0 --- /dev/null +++ b/bin/generate_postman_collection.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +# Run this script from the root of the repository + +set -e + +COMPONENTS=( + contactgegevens + klantinteracties +) + +OUTPUT_PATH="./tests/postman/collection.json" + +for component in "${COMPONENTS[@]}"; +do + echo "Converting src/openklant/components/$component/openapi.yaml into $OUTPUT_PATH ..." + + openapi2postmanv2 \ + --spec "./src/openklant/components/$component/openapi.yaml" \ + --output $OUTPUT_PATH \ + --pretty +done diff --git a/bin/generate_sdks.sh b/bin/generate_sdks.sh new file mode 100755 index 00000000..45bc4686 --- /dev/null +++ b/bin/generate_sdks.sh @@ -0,0 +1,42 @@ +#!/bin/bash + +# Run this script from the root of the repository + +set -e + +COMPONENTS=( + contactgegevens + klantinteracties +) + +OUTPUT_DIR="./sdks" + + +for component in "${COMPONENTS[@]}"; +do + COMPONENT_PATH="./src/openklant/components/${component}/openapi.yaml" + + echo "Validating OAS for $COMPONENT_PATH" + openapi-generator-cli validate -i "${COMPONENT_PATH}" + + echo "Generating Java SDK for $component ..." + openapi-generator-cli generate -i "$COMPONENT_PATH" \ + --global-property=modelTests=false,apiTests=false,modelDocs=false,apiDocs=false \ + -o "$OUTPUT_DIR/java" \ + -g java \ + --additional-properties=dateLibrary=java8,java8=true,optionalProjectFile=false,optionalAssemblyInfo=false + + echo "Generating .NET SDK for $component ..." + openapi-generator-cli generate -i "$COMPONENT_PATH" \ + --global-property=modelTests=false,apiTests=false,modelDocs=false,apiDocs=false \ + -o "$OUTPUT_DIR/net" \ + -g csharp \ + --additional-properties=optionalProjectFile=false,optionalAssemblyInfo=false + + echo "Generating Python SDK for $component ..." + openapi-generator-cli generate -i "$COMPONENT_PATH" \ + --global-property=modelTests=false,apiTests=false,modelDocs=false,apiDocs=false \ + -o "$OUTPUT_DIR/python" \ + -g python \ + --additional-properties=optionalProjectFile=false,optionalAssemblyInfo=false+ +done diff --git a/bin/lint_oas_files.sh b/bin/lint_oas_files.sh new file mode 100755 index 00000000..8e4ba07d --- /dev/null +++ b/bin/lint_oas_files.sh @@ -0,0 +1,16 @@ +#!/bin/bash + +# Run this script from the root of the repository + +set -e + +COMPONENTS=( + contactgegevens + klantinteracties +) + +for component in "${COMPONENTS[@]}"; +do + echo "Linting src/openklant/components/$component/openapi.yaml ..." + spectral lint "src/openklant/components/$component/openapi.yaml" +done From fc4bd9fb4dbbbeef638aabc67110ca7fad1de4f0 Mon Sep 17 00:00:00 2001 From: Sonny Bakker Date: Mon, 16 Sep 2024 11:59:26 +0200 Subject: [PATCH 02/12] [#13] use requirements layout similiar to other open-api projects --- requirements/ci.in | 1 + requirements/ci.txt | 129 +-------- requirements/dev.in | 6 - requirements/dev.txt | 561 ++++++++++-------------------------- requirements/docs.in | 8 - requirements/production.txt | 352 +++++++++++++++++++++- requirements/test-tools.in | 9 +- 7 files changed, 530 insertions(+), 536 deletions(-) create mode 100644 requirements/ci.in delete mode 100644 requirements/docs.in diff --git a/requirements/ci.in b/requirements/ci.in new file mode 100644 index 00000000..15f1c729 --- /dev/null +++ b/requirements/ci.in @@ -0,0 +1 @@ +codecov diff --git a/requirements/ci.txt b/requirements/ci.txt index 62cdf472..da4f2fbd 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -8,31 +8,26 @@ alabaster==0.7.16 # via sphinx amqp==5.2.0 # via - # -c requirements/base.txt # -r requirements/base.txt # kombu ape-pie==0.2.0 # via - # -c requirements/base.txt # -r requirements/base.txt # zgw-consumers asgiref==3.8.1 # via - # -c requirements/base.txt # -r requirements/base.txt # django # django-axes # django-cors-headers asn1crypto==1.5.1 # via - # -c requirements/base.txt # -r requirements/base.txt # webauthn astroid==3.2.4 # via pylint attrs==23.2.0 # via - # -c requirements/base.txt # -r requirements/base.txt # glom # jsonschema @@ -43,54 +38,45 @@ beautifulsoup4==4.12.3 # via webtest billiard==4.2.0 # via - # -c requirements/base.txt # -r requirements/base.txt # celery black==24.4.2 # via -r requirements/test-tools.in bleach==6.1.0 # via - # -c requirements/base.txt # -r requirements/base.txt # open-api-framework boltons==24.0.0 # via - # -c requirements/base.txt # -r requirements/base.txt # face # glom cbor2==5.6.4 # via - # -c requirements/base.txt # -r requirements/base.txt # webauthn celery==5.4.0 # via - # -c requirements/base.txt # -r requirements/base.txt # flower # notifications-api-common # open-api-framework certifi==2024.7.4 # via - # -c requirements/base.txt # -r requirements/base.txt # elastic-apm # requests # sentry-sdk cffi==1.16.0 # via - # -c requirements/base.txt # -r requirements/base.txt # cryptography charset-normalizer==3.3.2 # via - # -c requirements/base.txt # -r requirements/base.txt # requests click==8.1.7 # via - # -c requirements/base.txt # -r requirements/base.txt # black # celery @@ -99,41 +85,39 @@ click==8.1.7 # click-repl click-didyoumean==0.3.1 # via - # -c requirements/base.txt # -r requirements/base.txt # celery click-plugins==1.1.1 # via - # -c requirements/base.txt # -r requirements/base.txt # celery click-repl==0.3.0 # via - # -c requirements/base.txt # -r requirements/base.txt # celery +codecov==2.1.13 + # via -r requirements/ci.in + commonground-api-common==1.13.3 # via - # -c requirements/base.txt # -r requirements/base.txt # open-api-framework commonmark==0.9.1 # via recommonmark coreapi==2.3.3 # via - # -c requirements/base.txt # -r requirements/base.txt # commonground-api-common coreschema==0.0.4 # via - # -c requirements/base.txt # -r requirements/base.txt # coreapi coverage==4.5.4 - # via -r requirements/test-tools.in + # via + # -r requirements/test-tools.in + # codecov cryptography==43.0.0 # via - # -c requirements/base.txt # -r requirements/base.txt # django-simple-certmanager # josepy @@ -146,7 +130,6 @@ dill==0.3.8 # via pylint django==4.2.15 # via - # -c requirements/base.txt # -r requirements/base.txt # commonground-api-common # django-admin-index @@ -184,109 +167,88 @@ django==4.2.15 # zgw-consumers django-admin-index==3.1.1 # via - # -c requirements/base.txt # -r requirements/base.txt # open-api-framework django-appconf==1.0.6 # via - # -c requirements/base.txt # -r requirements/base.txt # django-log-outgoing-requests django-axes==6.5.1 # via - # -c requirements/base.txt # -r requirements/base.txt # open-api-framework django-cors-headers==4.4.0 # via - # -c requirements/base.txt # -r requirements/base.txt # open-api-framework django-csp==3.8 # via - # -c requirements/base.txt # -r requirements/base.txt # open-api-framework django-filter==24.2 # via - # -c requirements/base.txt # -r requirements/base.txt # commonground-api-common # open-api-framework django-formtools==2.5.1 # via - # -c requirements/base.txt # -r requirements/base.txt # django-two-factor-auth django-jsonform==2.22.0 # via - # -c requirements/base.txt # -r requirements/base.txt # mozilla-django-oidc-db # open-api-framework django-log-outgoing-requests==0.6.1 # via - # -c requirements/base.txt # -r requirements/base.txt # open-api-framework django-markup==1.8.1 # via - # -c requirements/base.txt # -r requirements/base.txt # open-api-framework django-ordered-model==3.7.4 # via - # -c requirements/base.txt # -r requirements/base.txt # django-admin-index django-otp==1.5.1 # via - # -c requirements/base.txt # -r requirements/base.txt # django-two-factor-auth django-phonenumber-field==7.3.0 # via - # -c requirements/base.txt # -r requirements/base.txt # django-two-factor-auth django-privates==2.0.0.post1 # via - # -c requirements/base.txt # -r requirements/base.txt # django-simple-certmanager django-redis==5.4.0 # via - # -c requirements/base.txt # -r requirements/base.txt # open-api-framework django-relativedelta==2.0.0 # via - # -c requirements/base.txt # -r requirements/base.txt # zgw-consumers django-rest-framework-condition==0.1.1 # via - # -c requirements/base.txt # -r requirements/base.txt # commonground-api-common django-sendfile2==0.7.1 # via - # -c requirements/base.txt # -r requirements/base.txt # django-privates django-setup-configuration==0.3.0 # via - # -c requirements/base.txt # -r requirements/base.txt # open-api-framework django-simple-certmanager==2.3.0 # via - # -c requirements/base.txt # -r requirements/base.txt # zgw-consumers django-solo==2.3.0 # via - # -c requirements/base.txt # -r requirements/base.txt # commonground-api-common # django-log-outgoing-requests @@ -295,14 +257,12 @@ django-solo==2.3.0 # zgw-consumers django-two-factor-auth[phonenumberslite,webauthn]==1.16.0 # via - # -c requirements/base.txt # -r requirements/base.txt # maykin-2fa django-webtest==1.9.11 # via -r requirements/test-tools.in djangorestframework==3.15.2 # via - # -c requirements/base.txt # -r requirements/base.txt # commonground-api-common # djangorestframework-gis @@ -314,18 +274,15 @@ djangorestframework==3.15.2 # open-api-framework djangorestframework-camel-case==1.4.2 # via - # -c requirements/base.txt # -r requirements/base.txt # commonground-api-common # notifications-api-common djangorestframework-gis==1.0 # via - # -c requirements/base.txt # -r requirements/base.txt # open-api-framework djangorestframework-inclusions==1.2.0 # via - # -c requirements/base.txt # -r requirements/base.txt # open-api-framework docutils==0.20.1 @@ -336,12 +293,10 @@ docutils==0.20.1 # sphinx-tabs drf-nested-routers==0.94.1 # via - # -c requirements/base.txt # -r requirements/base.txt # commonground-api-common drf-spectacular[sidecar]==0.27.2 # via - # -c requirements/base.txt # -r requirements/base.txt # open-api-framework drf-spectacular-sidecar==2024.7.1 @@ -351,22 +306,18 @@ drf-spectacular-sidecar==2024.7.1 # drf-spectacular drf-yasg==1.21.7 # via - # -c requirements/base.txt # -r requirements/base.txt # commonground-api-common ecs-logging==2.2.0 # via - # -c requirements/base.txt # -r requirements/base.txt # elastic-apm elastic-apm==6.23.0 # via - # -c requirements/base.txt # -r requirements/base.txt # open-api-framework face==20.1.1 # via - # -c requirements/base.txt # -r requirements/base.txt # glom factory-boy==3.3.0 @@ -377,35 +328,29 @@ flake8==7.1.0 # via -r requirements/test-tools.in flower==2.0.1 # via - # -c requirements/base.txt # -r requirements/base.txt # open-api-framework freezegun==1.5.1 # via -r requirements/test-tools.in furl==2.1.3 # via - # -c requirements/base.txt # -r requirements/base.txt # ape-pie gemma-zds-client==2.0.0 # via - # -c requirements/base.txt # -r requirements/base.txt # commonground-api-common # notifications-api-common glom==23.5.0 # via - # -c requirements/base.txt # -r requirements/base.txt # mozilla-django-oidc-db humanize==4.10.0 # via - # -c requirements/base.txt # -r requirements/base.txt # flower idna==3.7 # via - # -c requirements/base.txt # -r requirements/base.txt # requests # yarl @@ -413,18 +358,15 @@ imagesize==1.4.1 # via sphinx inflection==0.5.1 # via - # -c requirements/base.txt # -r requirements/base.txt # drf-spectacular # drf-yasg iso-639==0.4.5 # via - # -c requirements/base.txt # -r requirements/base.txt # commonground-api-common isodate==0.6.1 # via - # -c requirements/base.txt # -r requirements/base.txt # commonground-api-common isort==5.13.2 @@ -433,33 +375,27 @@ isort==5.13.2 # pylint itypes==1.2.0 # via - # -c requirements/base.txt # -r requirements/base.txt # coreapi jinja2==3.1.4 # via - # -c requirements/base.txt # -r requirements/base.txt # coreschema # sphinx josepy==1.14.0 # via - # -c requirements/base.txt # -r requirements/base.txt # mozilla-django-oidc jsonschema==4.23.0 # via - # -c requirements/base.txt # -r requirements/base.txt # drf-spectacular jsonschema-specifications==2023.12.1 # via - # -c requirements/base.txt # -r requirements/base.txt # jsonschema kombu==5.3.7 # via - # -c requirements/base.txt # -r requirements/base.txt # celery lxml==5.2.2 @@ -468,12 +404,10 @@ markdown==3.6 # via sphinx-markdown-tables markupsafe==2.1.5 # via - # -c requirements/base.txt # -r requirements/base.txt # jinja2 maykin-2fa==1.0.1 # via - # -c requirements/base.txt # -r requirements/base.txt # open-api-framework mccabe==0.7.0 @@ -482,12 +416,10 @@ mccabe==0.7.0 # pylint mozilla-django-oidc==4.0.1 # via - # -c requirements/base.txt # -r requirements/base.txt # mozilla-django-oidc-db mozilla-django-oidc-db==0.19.0 # via - # -c requirements/base.txt # -r requirements/base.txt # open-api-framework multidict==6.0.5 @@ -496,26 +428,21 @@ mypy-extensions==1.0.0 # via black notifications-api-common==0.2.2 # via - # -c requirements/base.txt # -r requirements/base.txt # commonground-api-common open-api-framework==0.8.1 # via - # -c requirements/base.txt # -r requirements/base.txt orderedmultidict==1.0.1 # via - # -c requirements/base.txt # -r requirements/base.txt # furl oyaml==1.0 # via - # -c requirements/base.txt # -r requirements/base.txt # commonground-api-common packaging==24.1 # via - # -c requirements/base.txt # -r requirements/base.txt # black # drf-yasg @@ -526,7 +453,6 @@ pep8==1.7.1 # via -r requirements/test-tools.in phonenumberslite==8.13.42 # via - # -c requirements/base.txt # -r requirements/base.txt # django-two-factor-auth platformdirs==4.2.2 @@ -535,24 +461,20 @@ platformdirs==4.2.2 # pylint prometheus-client==0.20.0 # via - # -c requirements/base.txt # -r requirements/base.txt # flower prompt-toolkit==3.0.47 # via - # -c requirements/base.txt # -r requirements/base.txt # click-repl psycopg2==2.9.9 # via - # -c requirements/base.txt # -r requirements/base.txt # open-api-framework pycodestyle==2.12.0 # via flake8 pycparser==2.22 # via - # -c requirements/base.txt # -r requirements/base.txt # cffi pyflakes==3.2.0 @@ -563,7 +485,6 @@ pygments==2.18.0 # sphinx-tabs pyjwt==2.9.0 # via - # -c requirements/base.txt # -r requirements/base.txt # commonground-api-common # gemma-zds-client @@ -572,20 +493,17 @@ pylint==3.2.6 # via -r requirements/test-tools.in pyopenssl==24.2.1 # via - # -c requirements/base.txt # -r requirements/base.txt # josepy # webauthn pypng==0.20220715.0 # via - # -c requirements/base.txt # -r requirements/base.txt # qrcode pyquery==2.0.0 # via -r requirements/test-tools.in python-dateutil==2.9.0.post0 # via - # -c requirements/base.txt # -r requirements/base.txt # celery # django-relativedelta @@ -593,23 +511,19 @@ python-dateutil==2.9.0.post0 # freezegun python-decouple==3.8 # via - # -c requirements/base.txt # -r requirements/base.txt # open-api-framework python-dotenv==1.0.1 # via - # -c requirements/base.txt # -r requirements/base.txt # open-api-framework pytz==2024.1 # via - # -c requirements/base.txt # -r requirements/base.txt # drf-yasg # flower pyyaml==6.0.1 # via - # -c requirements/base.txt # -r requirements/base.txt # drf-spectacular # drf-yasg @@ -618,27 +532,24 @@ pyyaml==6.0.1 # vcrpy qrcode==7.4.2 # via - # -c requirements/base.txt # -r requirements/base.txt # django-two-factor-auth recommonmark==0.7.1 - # via -r requirements/docs.in + # via -r requirements/test-tools.in redis==5.0.8 # via - # -c requirements/base.txt # -r requirements/base.txt # django-redis referencing==0.35.1 # via - # -c requirements/base.txt # -r requirements/base.txt # jsonschema # jsonschema-specifications requests==2.32.3 # via - # -c requirements/base.txt # -r requirements/base.txt # ape-pie + # codecov # commonground-api-common # coreapi # django-log-outgoing-requests @@ -652,18 +563,15 @@ requests-mock==1.12.1 # via -r requirements/test-tools.in rpds-py==0.19.1 # via - # -c requirements/base.txt # -r requirements/base.txt # jsonschema # referencing sentry-sdk==2.12.0 # via - # -c requirements/base.txt # -r requirements/base.txt # open-api-framework six==1.16.0 # via - # -c requirements/base.txt # -r requirements/base.txt # bleach # furl @@ -676,17 +584,17 @@ soupsieve==2.5 # via beautifulsoup4 sphinx==7.4.7 # via - # -r requirements/docs.in + # -r requirements/test-tools.in # recommonmark # sphinx-rtd-theme # sphinx-tabs # sphinxcontrib-jquery sphinx-markdown-tables==0.0.17 - # via -r requirements/docs.in + # via -r requirements/test-tools.in sphinx-rtd-theme==2.0.0 - # via -r requirements/docs.in + # via -r requirements/test-tools.in sphinx-tabs==3.4.5 - # via -r requirements/docs.in + # via -r requirements/test-tools.in sphinxcontrib-applehelp==2.0.0 # via sphinx sphinxcontrib-devhelp==2.0.0 @@ -703,7 +611,6 @@ sphinxcontrib-serializinghtml==2.0.0 # via sphinx sqlparse==0.5.1 # via - # -c requirements/base.txt # -r requirements/base.txt # django tblib==3.0.0 @@ -712,45 +619,38 @@ tomlkit==0.13.0 # via pylint tornado==6.4.1 # via - # -c requirements/base.txt # -r requirements/base.txt # flower typing-extensions==4.12.2 # via - # -c requirements/base.txt # -r requirements/base.txt # mozilla-django-oidc-db # qrcode # zgw-consumers tzdata==2024.1 # via - # -c requirements/base.txt # -r requirements/base.txt # celery uritemplate==4.1.1 # via - # -c requirements/base.txt # -r requirements/base.txt # coreapi # drf-spectacular # drf-yasg urllib3==2.2.2 # via - # -c requirements/base.txt # -r requirements/base.txt # elastic-apm # requests # sentry-sdk uwsgi==2.0.26 # via - # -c requirements/base.txt # -r requirements/base.txt # open-api-framework vcrpy==6.0.1 # via -r requirements/test-tools.in vine==5.1.0 # via - # -c requirements/base.txt # -r requirements/base.txt # amqp # celery @@ -761,17 +661,14 @@ waitress==3.0.0 # webtest wcwidth==0.2.13 # via - # -c requirements/base.txt # -r requirements/base.txt # prompt-toolkit webauthn==2.2.0 # via - # -c requirements/base.txt # -r requirements/base.txt # django-two-factor-auth webencodings==0.5.1 # via - # -c requirements/base.txt # -r requirements/base.txt # bleach webob==1.8.8 @@ -780,7 +677,6 @@ webtest==3.0.0 # via django-webtest wrapt==1.16.0 # via - # -c requirements/base.txt # -r requirements/base.txt # elastic-apm # vcrpy @@ -788,7 +684,6 @@ yarl==1.9.4 # via vcrpy zgw-consumers==0.34.0 # via - # -c requirements/base.txt # -r requirements/base.txt # notifications-api-common # open-api-framework diff --git a/requirements/dev.in b/requirements/dev.in index ff73e970..e36d8e90 100644 --- a/requirements/dev.in +++ b/requirements/dev.in @@ -1,5 +1,3 @@ --c ci.txt - # Helpers pip-tools gitpython @@ -7,7 +5,3 @@ gitpython # Debug tooling django-debug-toolbar django-extensions - -# Documentation -sphinx -sphinx_rtd_theme diff --git a/requirements/dev.txt b/requirements/dev.txt index 51e19765..d4bfcd7a 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -5,109 +5,81 @@ # ./bin/compile_dependencies.sh # alabaster==0.7.16 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # sphinx + # 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 astroid==3.2.4 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # pylint + # via pylint 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 - # -c requirements/ci.txt - # -r requirements/ci.txt - # sphinx + # 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 + # 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 # via pip-tools 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 # black # celery # click-didyoumean @@ -116,66 +88,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 commonground-api-common==1.13.3 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # open-api-framework commonmark==0.9.1 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # recommonmark + # via recommonmark 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==4.5.4 - # 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 dill==0.3.8 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # pylint + # via pylint 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 @@ -214,28 +167,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 @@ -243,85 +191,69 @@ 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-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 @@ -329,17 +261,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 @@ -350,37 +278,30 @@ 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 - # -c requirements/ci.txt - # -r requirements/ci.txt # recommonmark # sphinx # sphinx-rtd-theme # sphinx-tabs 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 @@ -389,55 +310,39 @@ 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 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.1.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 @@ -446,266 +351,195 @@ 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 - # -c requirements/ci.txt - # -r requirements/ci.txt - # sphinx + # 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==5.13.2 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/test-tools.in # pylint 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 markdown==3.6 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # sphinx-markdown-tables + # via sphinx-markdown-tables 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 # pylint 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 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 pep8==1.7.1 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # via -r requirements/test-tools.in 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 # pylint 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 - # -c requirements/ci.txt - # -r requirements/ci.txt # sphinx # sphinx-tabs pyjwt==2.9.0 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # commonground-api-common # gemma-zds-client # zgw-consumers pylint==3.2.6 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # via -r requirements/test-tools.in 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 @@ -713,28 +547,22 @@ 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 recommonmark==0.7.1 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # via -r requirements/test-tools.in 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 @@ -746,24 +574,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.12.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 @@ -772,181 +595,115 @@ six==1.16.0 smmap==5.0.1 # via gitdb snowballstemmer==2.2.0 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # sphinx + # via sphinx soupsieve==2.5 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # beautifulsoup4 + # via beautifulsoup4 sphinx==7.4.7 # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # -r requirements/dev.in + # -r requirements/test-tools.in # recommonmark # sphinx-rtd-theme # sphinx-tabs # sphinxcontrib-jquery sphinx-markdown-tables==0.0.17 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # via -r requirements/test-tools.in sphinx-rtd-theme==2.0.0 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # -r requirements/dev.in + # via -r requirements/test-tools.in sphinx-tabs==3.4.5 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # via -r requirements/test-tools.in sphinxcontrib-applehelp==2.0.0 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # sphinx + # via sphinx sphinxcontrib-devhelp==2.0.0 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # sphinx + # via sphinx sphinxcontrib-htmlhelp==2.1.0 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # sphinx + # via sphinx sphinxcontrib-jquery==4.1 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # sphinx-rtd-theme + # via sphinx-rtd-theme sphinxcontrib-jsmath==1.0.1 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # sphinx + # via sphinx sphinxcontrib-qthelp==2.0.0 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # sphinx + # via sphinx sphinxcontrib-serializinghtml==2.0.0 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # sphinx + # via sphinx sqlparse==0.5.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # django # django-debug-toolbar tblib==3.0.0 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # via -r requirements/test-tools.in tomlkit==0.13.0 - # via - # -c requirements/ci.txt - # -r requirements/ci.txt - # pylint + # via pylint 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 + # -r requirements/test-tools.in # 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/docs.in b/requirements/docs.in deleted file mode 100644 index 619af31b..00000000 --- a/requirements/docs.in +++ /dev/null @@ -1,8 +0,0 @@ --c base.txt - -# Documentation -sphinx -sphinx_rtd_theme -recommonmark -sphinx-markdown-tables -sphinx-tabs \ No newline at end of file diff --git a/requirements/production.txt b/requirements/production.txt index 9c9dec9e..69045c2f 100644 --- a/requirements/production.txt +++ b/requirements/production.txt @@ -1 +1,351 @@ --r base.txt \ No newline at end of file +# +# This file is autogenerated by pip-compile with Python 3.11 +# by the following command: +# +# ./bin/compile_dependencies.sh +# +amqp==5.2.0 + # via kombu +ape-pie==0.2.0 + # via zgw-consumers +asgiref==3.8.1 + # via + # django + # django-axes + # django-cors-headers +asn1crypto==1.5.1 + # via webauthn +attrs==23.2.0 + # via + # glom + # jsonschema + # referencing +billiard==4.2.0 + # via celery +bleach==6.1.0 + # via open-api-framework +boltons==24.0.0 + # via + # face + # glom +cbor2==5.6.4 + # via webauthn +celery==5.4.0 + # via + # flower + # notifications-api-common + # open-api-framework +certifi==2024.7.4 + # via + # elastic-apm + # requests + # sentry-sdk +cffi==1.16.0 + # via cryptography +charset-normalizer==3.3.2 + # via requests +click==8.1.7 + # via + # celery + # click-didyoumean + # click-plugins + # click-repl +click-didyoumean==0.3.1 + # via celery +click-plugins==1.1.1 + # via celery +click-repl==0.3.0 + # via celery +commonground-api-common==1.13.2 + # via open-api-framework +coreapi==2.3.3 + # via commonground-api-common +coreschema==0.0.4 + # via coreapi +cryptography==43.0.0 + # via + # django-simple-certmanager + # josepy + # mozilla-django-oidc + # pyopenssl + # webauthn +django==4.2.15 + # via + # commonground-api-common + # django-admin-index + # django-appconf + # django-axes + # django-cors-headers + # django-csp + # django-filter + # django-formtools + # django-jsonform + # django-log-outgoing-requests + # django-markup + # django-otp + # django-phonenumber-field + # django-privates + # django-redis + # django-relativedelta + # django-rest-framework-condition + # django-sendfile2 + # django-setup-configuration + # django-simple-certmanager + # django-solo + # django-two-factor-auth + # djangorestframework + # djangorestframework-inclusions + # drf-nested-routers + # drf-spectacular + # drf-yasg + # maykin-2fa + # mozilla-django-oidc + # mozilla-django-oidc-db + # notifications-api-common + # open-api-framework + # zgw-consumers +django-admin-index==3.1.1 + # via open-api-framework +django-appconf==1.0.6 + # via django-log-outgoing-requests +django-axes==6.5.1 + # via open-api-framework +django-cors-headers==4.4.0 + # via open-api-framework +django-csp==3.8 + # via open-api-framework +django-filter==24.2 + # via + # commonground-api-common + # open-api-framework +django-formtools==2.5.1 + # via django-two-factor-auth +django-jsonform==2.22.0 + # via + # mozilla-django-oidc-db + # open-api-framework +django-log-outgoing-requests==0.6.1 + # via open-api-framework +django-markup==1.8.1 + # via open-api-framework +django-ordered-model==3.7.4 + # via django-admin-index +django-otp==1.5.1 + # via django-two-factor-auth +django-phonenumber-field==7.3.0 + # via django-two-factor-auth +django-privates==2.0.0.post1 + # via django-simple-certmanager +django-redis==5.4.0 + # via open-api-framework +django-relativedelta==2.0.0 + # via zgw-consumers +django-rest-framework-condition==0.1.1 + # via commonground-api-common +django-sendfile2==0.7.1 + # via django-privates +django-setup-configuration==0.3.0 + # via open-api-framework +django-simple-certmanager==2.3.0 + # via zgw-consumers +django-solo==2.3.0 + # via + # commonground-api-common + # django-log-outgoing-requests + # mozilla-django-oidc-db + # notifications-api-common + # zgw-consumers +django-two-factor-auth[phonenumberslite,webauthn]==1.16.0 + # via maykin-2fa +djangorestframework==3.15.2 + # via + # commonground-api-common + # djangorestframework-gis + # djangorestframework-inclusions + # drf-nested-routers + # drf-spectacular + # drf-yasg + # notifications-api-common + # open-api-framework +djangorestframework-camel-case==1.4.2 + # via + # commonground-api-common + # notifications-api-common +djangorestframework-gis==1.0 + # via open-api-framework +djangorestframework-inclusions==1.2.0 + # via open-api-framework +drf-nested-routers==0.94.1 + # via commonground-api-common +drf-spectacular==0.27.2 + # via open-api-framework +drf-yasg==1.21.7 + # via commonground-api-common +ecs-logging==2.2.0 + # via elastic-apm +elastic-apm==6.23.0 + # via open-api-framework +face==20.1.1 + # via glom +flower==2.0.1 + # via open-api-framework +furl==2.1.3 + # via ape-pie +gemma-zds-client==2.0.0 + # via + # commonground-api-common + # notifications-api-common +glom==23.5.0 + # via mozilla-django-oidc-db +humanize==4.10.0 + # via flower +idna==3.7 + # via requests +inflection==0.5.1 + # via + # drf-spectacular + # drf-yasg +iso-639==0.4.5 + # via commonground-api-common +isodate==0.6.1 + # via commonground-api-common +itypes==1.2.0 + # via coreapi +jinja2==3.1.4 + # via coreschema +josepy==1.14.0 + # via mozilla-django-oidc +jsonschema==4.23.0 + # via drf-spectacular +jsonschema-specifications==2023.12.1 + # via jsonschema +kombu==5.3.7 + # via celery +markupsafe==2.1.5 + # via jinja2 +maykin-2fa==1.0.1 + # via open-api-framework +mozilla-django-oidc==4.0.1 + # via mozilla-django-oidc-db +mozilla-django-oidc-db==0.19.0 + # via open-api-framework +notifications-api-common==0.2.2 + # via commonground-api-common +open-api-framework==0.8.0 + # via -r requirements/base.in +orderedmultidict==1.0.1 + # via furl +oyaml==1.0 + # via commonground-api-common +packaging==24.1 + # via drf-yasg +phonenumberslite==8.13.42 + # via django-two-factor-auth +prometheus-client==0.20.0 + # via flower +prompt-toolkit==3.0.47 + # via click-repl +psycopg2==2.9.9 + # via open-api-framework +pycparser==2.22 + # via cffi +pyjwt==2.9.0 + # via + # commonground-api-common + # gemma-zds-client + # zgw-consumers +pyopenssl==24.2.1 + # via + # josepy + # webauthn +pypng==0.20220715.0 + # via qrcode +python-dateutil==2.9.0.post0 + # via + # celery + # django-relativedelta +python-decouple==3.8 + # via open-api-framework +python-dotenv==1.0.1 + # via open-api-framework +pytz==2024.1 + # via + # drf-yasg + # flower +pyyaml==6.0.1 + # via + # drf-spectacular + # drf-yasg + # gemma-zds-client + # oyaml +qrcode==7.4.2 + # via django-two-factor-auth +redis==5.0.8 + # via django-redis +referencing==0.35.1 + # via + # jsonschema + # jsonschema-specifications +requests==2.32.3 + # via + # ape-pie + # commonground-api-common + # coreapi + # django-log-outgoing-requests + # gemma-zds-client + # mozilla-django-oidc + # open-api-framework + # zgw-consumers +rpds-py==0.19.1 + # via + # jsonschema + # referencing +sentry-sdk==2.12.0 + # via open-api-framework +six==1.16.0 + # via + # bleach + # furl + # isodate + # orderedmultidict + # python-dateutil +sqlparse==0.5.1 + # via django +tornado==6.4.1 + # via flower +typing-extensions==4.12.2 + # via + # mozilla-django-oidc-db + # qrcode + # zgw-consumers +tzdata==2024.1 + # via celery +uritemplate==4.1.1 + # via + # coreapi + # drf-spectacular + # drf-yasg +urllib3==2.2.2 + # via + # elastic-apm + # requests + # sentry-sdk +uwsgi==2.0.26 + # via open-api-framework +vine==5.1.0 + # via + # amqp + # celery + # kombu +wcwidth==0.2.13 + # via prompt-toolkit +webauthn==2.2.0 + # via django-two-factor-auth +webencodings==0.5.1 + # via bleach +wrapt==1.16.0 + # via elastic-apm +zgw-consumers==0.34.0 + # via + # notifications-api-common + # open-api-framework diff --git a/requirements/test-tools.in b/requirements/test-tools.in index b647ba7b..a2812bba 100644 --- a/requirements/test-tools.in +++ b/requirements/test-tools.in @@ -1,5 +1,3 @@ --c base.txt - # Dependencies only relevant for (unit) testing coverage < 5.0 django-webtest @@ -17,3 +15,10 @@ waitress>=2.1.1 black isort flake8 + +# Documentation +sphinx +sphinx_rtd_theme +recommonmark +sphinx-markdown-tables +sphinx-tabs From 765b39eb1892477417a94ef0a388ac27ed0a3ab3 Mon Sep 17 00:00:00 2001 From: Sonny Bakker Date: Mon, 16 Sep 2024 12:13:53 +0200 Subject: [PATCH 03/12] [#13] Refactor after open-api-workflow d6a9fe1ff6c9ac6487839cda5907de6049d8aaec --- .github/workflows/ci.yml | 25 +++++------ .github/workflows/codeql.yml | 4 -- .../workflows/generate-postman-collection.yml | 7 ++++ .github/workflows/generate-sdks.yml | 7 ++++ .github/workflows/lint-oas.yml | 7 ++++ .github/workflows/oas-check.yml | 25 +++++++++++ .nvmrc | 1 + bin/check_schema.sh | 30 ------------- bin/compile_dependencies.sh | 9 ++-- bin/generate_postman_collection.sh | 22 ---------- bin/generate_sdks.sh | 42 ------------------- bin/lint_oas_files.sh | 16 ------- requirements/ci.in | 1 + requirements/ci.txt | 7 ++++ 14 files changed, 71 insertions(+), 132 deletions(-) create mode 100644 .github/workflows/oas-check.yml create mode 100644 .nvmrc delete mode 100755 bin/check_schema.sh delete mode 100755 bin/generate_postman_collection.sh delete mode 100755 bin/generate_sdks.sh delete mode 100755 bin/lint_oas_files.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index bec89fb8..218a0081 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -31,13 +31,13 @@ jobs: id: changed-py-files uses: tj-actions/changed-files@v45 with: - files: | - ^src/.+\.py + files: src/{,**/}*.py + - name: Get changed requirements files id: changed-requirements uses: tj-actions/changed-files@v45 with: - files: ^requirements/.+\.txt$ + files: requirements/*.txt outputs: changed-py-files: ${{ steps.changed-py-files.outputs.any_changed }} @@ -68,19 +68,12 @@ 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' + setup-node: true - - name: Install dependencies - run: pip install -r requirements/dev.txt codecov - - name: Build frontend - run: | - npm ci - npm run build - name: Run tests run: | python src/manage.py collectstatic --noinput --link @@ -103,7 +96,7 @@ jobs: cache: 'pip' cache-dependency-path: 'requirements/*.txt' - name: Install dependencies - run: pip install -r requirements/ci.txt pytest + run: pip install -r requirements/ci.txt - name: Generate environment variable documentation using OAf and check if it was updated run: | bin/generate_envvar_docs.sh @@ -119,7 +112,6 @@ jobs: runs-on: ubuntu-latest outputs: image-name: ${{ steps.image-name.outputs.image-name }} - sphinx-ssl-conf: ${{ steps.sphinx-ssl-conf.outputs.sphinx-ssl-conf }} steps: - run: echo "image-name=$IMAGE_NAME" >> $GITHUB_OUTPUT @@ -136,3 +128,6 @@ jobs: python-version: '3.11' 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/codeql.yml b/.github/workflows/codeql.yml index 9fabd9e0..f89383ae 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -26,9 +26,5 @@ jobs: node-version: '18' postgres-version: 'latest' - isort-src-pattern: 'src' - black-src-pattern: 'src docs' - flake8-src-pattern: 'src' - django-settings-module: 'openklant.conf.ci' django-secret-key: dummy diff --git a/.github/workflows/generate-postman-collection.yml b/.github/workflows/generate-postman-collection.yml index 62e5245e..51cace59 100644 --- a/.github/workflows/generate-postman-collection.yml +++ b/.github/workflows/generate-postman-collection.yml @@ -12,3 +12,10 @@ on: jobs: open-api-workflow-generate-postman-collection: uses: maykinmedia/open-api-workflows/.github/workflows/generate-postman-collection.yml@initial-setup + strategy: + matrix: + component: + - contactgevens + - klantinteracties + with: + schema-path: 'src/openklant/components/${{ matrix.component }}/openapi.yaml' diff --git a/.github/workflows/generate-sdks.yml b/.github/workflows/generate-sdks.yml index 1e250a16..5a8c8266 100644 --- a/.github/workflows/generate-sdks.yml +++ b/.github/workflows/generate-sdks.yml @@ -12,3 +12,10 @@ on: jobs: open-api-workflow-generate-sdks: uses: maykinmedia/open-api-workflows/.github/workflows/generate-sdks.yml@initial-setup + strategy: + matrix: + component: + - contactgevens + - klantinteracties + with: + schema-path: 'src/openklant/components/${{ matrix.component }}/openapi.yaml' diff --git a/.github/workflows/lint-oas.yml b/.github/workflows/lint-oas.yml index bbdfe20e..794d1c61 100644 --- a/.github/workflows/lint-oas.yml +++ b/.github/workflows/lint-oas.yml @@ -12,3 +12,10 @@ on: jobs: open-api-workflow-lint-oas: uses: maykinmedia/open-api-workflows/.github/workflows/lint-oas.yml@initial-setup + strategy: + matrix: + component: + - contactgevens + - klantinteracties + with: + schema-path: 'src/openklant/components/${{ matrix.component }}/openapi.yaml' diff --git a/.github/workflows/oas-check.yml b/.github/workflows/oas-check.yml new file mode 100644 index 00000000..50965637 --- /dev/null +++ b/.github/workflows/oas-check.yml @@ -0,0 +1,25 @@ +name: check-oas + +on: + push: + paths: + - "src/openklant/components/*/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@initial-setup + strategy: + matrix: + component: + - contactgegevens + - klantinteracties + with: + schema-path: 'src/openklant/components/${{ matrix.component }}/openapi.yaml' + schema-command: 'spectacular_for_component' + schema-options: "--component ${{ matrix.component }}" + python-version: '3.11' + django-settings-module: 'openklant.conf.ci' diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 00000000..3c032078 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +18 diff --git a/bin/check_schema.sh b/bin/check_schema.sh deleted file mode 100755 index cf94efd7..00000000 --- a/bin/check_schema.sh +++ /dev/null @@ -1,30 +0,0 @@ -#!/bin/bash - -# Run this script from the root of the repository - -set -e - -COMPONENTS=( - contactgegevens - klantinteracties -) - -if [[ -z "$VIRTUAL_ENV" ]] && [[ ! -v GITHUB_ACTIONS ]]; then - echo "You need to activate your virtual env before running this script" - exit 1 -fi - -for component in "${COMPONENTS[@]}"; -do - ./bin/generate_schema_for_component.sh "$component" "openapi-$component.yaml" - - echo "Checking src/openklant/components/$component/openapi.yaml ..." - - diff "openapi-$component.yaml" "src/openklant/components/$component/openapi.yaml" - - if (( $? > 0 )); then - echo "src/openklant/components/$component/openapi.yaml needs to be updated!" - else - echo "src/openklant/components/$component/openapi.yaml is up-to-date." - fi -done diff --git a/bin/compile_dependencies.sh b/bin/compile_dependencies.sh index f1d03361..39c7fb6f 100755 --- a/bin/compile_dependencies.sh +++ b/bin/compile_dependencies.sh @@ -23,6 +23,8 @@ export CUSTOM_COMPILE_COMMAND="./bin/compile_dependencies.sh" # Base (& prod) deps pip-compile \ --no-emit-index-url \ + --output-file requirements/base.txt \ + --output-file requirements/production.txt \ "$@" \ requirements/base.in @@ -33,12 +35,13 @@ pip-compile \ "$@" \ requirements/base.txt \ requirements/test-tools.in \ - requirements/docs.in + requirements/ci.in # Dev depedencies - exact same set as CI + some extra tooling pip-compile \ --no-emit-index-url \ --output-file requirements/dev.txt \ "$@" \ - requirements/ci.txt \ - requirements/dev.in \ No newline at end of file + requirements/base.txt \ + requirements/test-tools.in \ + requirements/dev.in diff --git a/bin/generate_postman_collection.sh b/bin/generate_postman_collection.sh deleted file mode 100755 index 835ba9f0..00000000 --- a/bin/generate_postman_collection.sh +++ /dev/null @@ -1,22 +0,0 @@ -#!/bin/bash - -# Run this script from the root of the repository - -set -e - -COMPONENTS=( - contactgegevens - klantinteracties -) - -OUTPUT_PATH="./tests/postman/collection.json" - -for component in "${COMPONENTS[@]}"; -do - echo "Converting src/openklant/components/$component/openapi.yaml into $OUTPUT_PATH ..." - - openapi2postmanv2 \ - --spec "./src/openklant/components/$component/openapi.yaml" \ - --output $OUTPUT_PATH \ - --pretty -done diff --git a/bin/generate_sdks.sh b/bin/generate_sdks.sh deleted file mode 100755 index 45bc4686..00000000 --- a/bin/generate_sdks.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/bin/bash - -# Run this script from the root of the repository - -set -e - -COMPONENTS=( - contactgegevens - klantinteracties -) - -OUTPUT_DIR="./sdks" - - -for component in "${COMPONENTS[@]}"; -do - COMPONENT_PATH="./src/openklant/components/${component}/openapi.yaml" - - echo "Validating OAS for $COMPONENT_PATH" - openapi-generator-cli validate -i "${COMPONENT_PATH}" - - echo "Generating Java SDK for $component ..." - openapi-generator-cli generate -i "$COMPONENT_PATH" \ - --global-property=modelTests=false,apiTests=false,modelDocs=false,apiDocs=false \ - -o "$OUTPUT_DIR/java" \ - -g java \ - --additional-properties=dateLibrary=java8,java8=true,optionalProjectFile=false,optionalAssemblyInfo=false - - echo "Generating .NET SDK for $component ..." - openapi-generator-cli generate -i "$COMPONENT_PATH" \ - --global-property=modelTests=false,apiTests=false,modelDocs=false,apiDocs=false \ - -o "$OUTPUT_DIR/net" \ - -g csharp \ - --additional-properties=optionalProjectFile=false,optionalAssemblyInfo=false - - echo "Generating Python SDK for $component ..." - openapi-generator-cli generate -i "$COMPONENT_PATH" \ - --global-property=modelTests=false,apiTests=false,modelDocs=false,apiDocs=false \ - -o "$OUTPUT_DIR/python" \ - -g python \ - --additional-properties=optionalProjectFile=false,optionalAssemblyInfo=false+ -done diff --git a/bin/lint_oas_files.sh b/bin/lint_oas_files.sh deleted file mode 100755 index 8e4ba07d..00000000 --- a/bin/lint_oas_files.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash - -# Run this script from the root of the repository - -set -e - -COMPONENTS=( - contactgegevens - klantinteracties -) - -for component in "${COMPONENTS[@]}"; -do - echo "Linting src/openklant/components/$component/openapi.yaml ..." - spectral lint "src/openklant/components/$component/openapi.yaml" -done diff --git a/requirements/ci.in b/requirements/ci.in index 15f1c729..76375907 100644 --- a/requirements/ci.in +++ b/requirements/ci.in @@ -1 +1,2 @@ codecov +pytest diff --git a/requirements/ci.txt b/requirements/ci.txt index da4f2fbd..7adc1d28 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -361,6 +361,8 @@ inflection==0.5.1 # -r requirements/base.txt # drf-spectacular # drf-yasg +iniconfig==2.0.0 + # via pytest iso-639==0.4.5 # via # -r requirements/base.txt @@ -446,6 +448,7 @@ packaging==24.1 # -r requirements/base.txt # black # drf-yasg + # pytest # sphinx pathspec==0.12.1 # via black @@ -459,6 +462,8 @@ platformdirs==4.2.2 # via # black # pylint +pluggy==1.5.0 + # via pytest prometheus-client==0.20.0 # via # -r requirements/base.txt @@ -502,6 +507,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 From 7930409ebb0dcfef06563f5a5e4bddea51360b77 Mon Sep 17 00:00:00 2001 From: Sonny Bakker Date: Mon, 16 Sep 2024 12:16:51 +0200 Subject: [PATCH 04/12] [#13] fix typos --- .github/workflows/generate-postman-collection.yml | 2 +- .github/workflows/generate-sdks.yml | 2 +- .github/workflows/lint-oas.yml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/generate-postman-collection.yml b/.github/workflows/generate-postman-collection.yml index 51cace59..399956e8 100644 --- a/.github/workflows/generate-postman-collection.yml +++ b/.github/workflows/generate-postman-collection.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: component: - - contactgevens + - contactgegevens - klantinteracties with: schema-path: 'src/openklant/components/${{ matrix.component }}/openapi.yaml' diff --git a/.github/workflows/generate-sdks.yml b/.github/workflows/generate-sdks.yml index 5a8c8266..9f7d0439 100644 --- a/.github/workflows/generate-sdks.yml +++ b/.github/workflows/generate-sdks.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: component: - - contactgevens + - contactgegevens - klantinteracties with: schema-path: 'src/openklant/components/${{ matrix.component }}/openapi.yaml' diff --git a/.github/workflows/lint-oas.yml b/.github/workflows/lint-oas.yml index 794d1c61..22ab9c2c 100644 --- a/.github/workflows/lint-oas.yml +++ b/.github/workflows/lint-oas.yml @@ -15,7 +15,7 @@ jobs: strategy: matrix: component: - - contactgevens + - contactgegevens - klantinteracties with: schema-path: 'src/openklant/components/${{ matrix.component }}/openapi.yaml' From 18d42f3170452f0e61eacbd7ff3e5ee495451375 Mon Sep 17 00:00:00 2001 From: Sonny Bakker Date: Tue, 17 Sep 2024 13:53:27 +0200 Subject: [PATCH 05/12] [#13] use default postgres image --- .github/workflows/codeql.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index f89383ae..3eb51f5f 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -24,7 +24,6 @@ jobs: with: python-version: '3.11' node-version: '18' - postgres-version: 'latest' django-settings-module: 'openklant.conf.ci' django-secret-key: dummy From 54126d1bd6aee213c0afb5679833b4e3fe647888 Mon Sep 17 00:00:00 2001 From: Sonny Bakker Date: Fri, 27 Sep 2024 15:50:21 +0200 Subject: [PATCH 06/12] [#13] update requirements --- requirements/ci.txt | 5 +---- requirements/dev.txt | 2 -- requirements/test-tools.in | 1 - 3 files changed, 1 insertion(+), 7 deletions(-) diff --git a/requirements/ci.txt b/requirements/ci.txt index 7adc1d28..21e2759f 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -97,7 +97,6 @@ click-repl==0.3.0 # celery codecov==2.1.13 # via -r requirements/ci.in - commonground-api-common==1.13.3 # via # -r requirements/base.txt @@ -113,9 +112,7 @@ coreschema==0.0.4 # -r requirements/base.txt # coreapi coverage==4.5.4 - # via - # -r requirements/test-tools.in - # codecov + # via codecov cryptography==43.0.0 # via # -r requirements/base.txt diff --git a/requirements/dev.txt b/requirements/dev.txt index d4bfcd7a..7fbd5859 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -112,8 +112,6 @@ coreschema==0.0.4 # via # -r requirements/base.txt # coreapi -coverage==4.5.4 - # via -r requirements/test-tools.in cryptography==43.0.0 # via # -r requirements/base.txt diff --git a/requirements/test-tools.in b/requirements/test-tools.in index a2812bba..d5a4403d 100644 --- a/requirements/test-tools.in +++ b/requirements/test-tools.in @@ -1,5 +1,4 @@ # Dependencies only relevant for (unit) testing -coverage < 5.0 django-webtest factory-boy freezegun From 5f28c589c323f65ed83618b57113e82aa138ae2e Mon Sep 17 00:00:00 2001 From: Sonny Bakker Date: Fri, 27 Sep 2024 15:53:09 +0200 Subject: [PATCH 07/12] [#13] refactor after open-api-workflows f59bfa52cc09cd191303d1d8e54360adb80e0ae2 --- .github/workflows/ci.yml | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 218a0081..90a90e6c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -90,13 +90,12 @@ 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 + setup-node: false + - name: Generate environment variable documentation using OAf and check if it was updated run: | bin/generate_envvar_docs.sh @@ -122,11 +121,19 @@ jobs: uses: maykinmedia/open-api-workflows/.github/workflows/ci.yml@initial-setup needs: - store-reusable-workflow-vars - - tests 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@initial-setup + needs: + - store-reusable-workflow-vars + - open-api-ci + - tests + with: + docker-image-name: ${{ needs.store-reusable-workflow-vars.outputs.image-name }} repository-owner: 'maykinmedia' secrets: docker-username: ${{ secrets.DOCKER_USERNAME }} From a20f0e32e9469b501905927a05f725a36a822bb1 Mon Sep 17 00:00:00 2001 From: Sonny Bakker Date: Fri, 4 Oct 2024 12:40:28 +0200 Subject: [PATCH 08/12] [#13] pin to release version --- .github/workflows/ci.yml | 4 ++-- .github/workflows/code-analysis.yml | 2 +- .github/workflows/codeql.yml | 2 +- .github/workflows/generate-postman-collection.yml | 2 +- .github/workflows/generate-sdks.yml | 2 +- .github/workflows/lint-oas.yml | 2 +- .github/workflows/oas-check.yml | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 90a90e6c..0d073306 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -118,7 +118,7 @@ jobs: id: image-name open-api-ci: - uses: maykinmedia/open-api-workflows/.github/workflows/ci.yml@initial-setup + uses: maykinmedia/open-api-workflows/.github/workflows/ci.yml@v1 needs: - store-reusable-workflow-vars with: @@ -127,7 +127,7 @@ jobs: docker-image-name: ${{ needs.store-reusable-workflow-vars.outputs.image-name }} open-api-publish: - uses: maykinmedia/open-api-workflows/.github/workflows/publish.yml@initial-setup + uses: maykinmedia/open-api-workflows/.github/workflows/publish.yml@v1 needs: - store-reusable-workflow-vars - open-api-ci diff --git a/.github/workflows/code-analysis.yml b/.github/workflows/code-analysis.yml index abf40966..8b3ac9ad 100644 --- a/.github/workflows/code-analysis.yml +++ b/.github/workflows/code-analysis.yml @@ -18,4 +18,4 @@ on: jobs: open-api-workflow-code-analysis: - uses: maykinmedia/open-api-workflows/.github/workflows/code-analysis.yml@initial-setup + uses: maykinmedia/open-api-workflows/.github/workflows/code-analysis.yml@v1 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 3eb51f5f..eadb1fea 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -20,7 +20,7 @@ on: jobs: open-api-workflow-code-quality: - uses: maykinmedia/open-api-workflows/.github/workflows/code-quality.yml@initial-setup + uses: maykinmedia/open-api-workflows/.github/workflows/code-quality.yml@v1 with: python-version: '3.11' node-version: '18' diff --git a/.github/workflows/generate-postman-collection.yml b/.github/workflows/generate-postman-collection.yml index 399956e8..007d5d6c 100644 --- a/.github/workflows/generate-postman-collection.yml +++ b/.github/workflows/generate-postman-collection.yml @@ -11,7 +11,7 @@ on: jobs: open-api-workflow-generate-postman-collection: - uses: maykinmedia/open-api-workflows/.github/workflows/generate-postman-collection.yml@initial-setup + uses: maykinmedia/open-api-workflows/.github/workflows/generate-postman-collection.yml@v1 strategy: matrix: component: diff --git a/.github/workflows/generate-sdks.yml b/.github/workflows/generate-sdks.yml index 9f7d0439..b8e46e70 100644 --- a/.github/workflows/generate-sdks.yml +++ b/.github/workflows/generate-sdks.yml @@ -11,7 +11,7 @@ on: jobs: open-api-workflow-generate-sdks: - uses: maykinmedia/open-api-workflows/.github/workflows/generate-sdks.yml@initial-setup + uses: maykinmedia/open-api-workflows/.github/workflows/generate-sdks.yml@v1 strategy: matrix: component: diff --git a/.github/workflows/lint-oas.yml b/.github/workflows/lint-oas.yml index 22ab9c2c..f909eaa5 100644 --- a/.github/workflows/lint-oas.yml +++ b/.github/workflows/lint-oas.yml @@ -11,7 +11,7 @@ on: jobs: open-api-workflow-lint-oas: - uses: maykinmedia/open-api-workflows/.github/workflows/lint-oas.yml@initial-setup + uses: maykinmedia/open-api-workflows/.github/workflows/lint-oas.yml@v1 strategy: matrix: component: diff --git a/.github/workflows/oas-check.yml b/.github/workflows/oas-check.yml index 50965637..9002e148 100644 --- a/.github/workflows/oas-check.yml +++ b/.github/workflows/oas-check.yml @@ -11,7 +11,7 @@ on: jobs: open-api-workflow-check-oas: - uses: maykinmedia/open-api-workflows/.github/workflows/oas-check.yml@initial-setup + uses: maykinmedia/open-api-workflows/.github/workflows/oas-check.yml@v1 strategy: matrix: component: From ae45e5a3bd131db7ea4304deefc718ac51e7870c Mon Sep 17 00:00:00 2001 From: Steven Bal Date: Fri, 25 Oct 2024 11:17:38 +0200 Subject: [PATCH 09/12] :wrench: Do not add extra dependencies in production.txt but base it entirely off of base.txt --- bin/compile_dependencies.sh | 2 - requirements/ci.txt | 4 +- requirements/dev.txt | 6 +- requirements/production.txt | 356 +----------------------------------- 4 files changed, 11 insertions(+), 357 deletions(-) diff --git a/bin/compile_dependencies.sh b/bin/compile_dependencies.sh index 39c7fb6f..e7409786 100755 --- a/bin/compile_dependencies.sh +++ b/bin/compile_dependencies.sh @@ -23,8 +23,6 @@ export CUSTOM_COMPILE_COMMAND="./bin/compile_dependencies.sh" # Base (& prod) deps pip-compile \ --no-emit-index-url \ - --output-file requirements/base.txt \ - --output-file requirements/production.txt \ "$@" \ requirements/base.in diff --git a/requirements/ci.txt b/requirements/ci.txt index 21e2759f..fdf434f2 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -298,7 +298,6 @@ drf-spectacular[sidecar]==0.27.2 # open-api-framework drf-spectacular-sidecar==2024.7.1 # via - # -c requirements/base.txt # -r requirements/base.txt # drf-spectacular drf-yasg==1.21.7 @@ -430,8 +429,7 @@ notifications-api-common==0.2.2 # -r requirements/base.txt # commonground-api-common open-api-framework==0.8.1 - # via - # -r requirements/base.txt + # via -r requirements/base.txt orderedmultidict==1.0.1 # via # -r requirements/base.txt diff --git a/requirements/dev.txt b/requirements/dev.txt index 7fbd5859..e8ee2d37 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -303,8 +303,7 @@ drf-spectacular[sidecar]==0.27.2 # open-api-framework drf-spectacular-sidecar==2024.7.1 # via - # -c requirements/ci.txt - # -r requirements/ci.txt + # -r requirements/base.txt # drf-spectacular drf-yasg==1.21.7 # via @@ -437,8 +436,7 @@ notifications-api-common==0.2.2 # -r requirements/base.txt # commonground-api-common open-api-framework==0.8.1 - # via - # -r requirements/base.txt + # via -r requirements/base.txt orderedmultidict==1.0.1 # via # -r requirements/base.txt diff --git a/requirements/production.txt b/requirements/production.txt index 69045c2f..906d1cc3 100644 --- a/requirements/production.txt +++ b/requirements/production.txt @@ -1,351 +1,11 @@ # -# This file is autogenerated by pip-compile with Python 3.11 -# by the following command: +# DO NOT ADD DEPENDENCIES HERE # -# ./bin/compile_dependencies.sh +# All dependencies (which includes sub-dependencies of dependencies) +# need to be pinned exactly. This happens during pip-compiling base.in into +# base.txt # -amqp==5.2.0 - # via kombu -ape-pie==0.2.0 - # via zgw-consumers -asgiref==3.8.1 - # via - # django - # django-axes - # django-cors-headers -asn1crypto==1.5.1 - # via webauthn -attrs==23.2.0 - # via - # glom - # jsonschema - # referencing -billiard==4.2.0 - # via celery -bleach==6.1.0 - # via open-api-framework -boltons==24.0.0 - # via - # face - # glom -cbor2==5.6.4 - # via webauthn -celery==5.4.0 - # via - # flower - # notifications-api-common - # open-api-framework -certifi==2024.7.4 - # via - # elastic-apm - # requests - # sentry-sdk -cffi==1.16.0 - # via cryptography -charset-normalizer==3.3.2 - # via requests -click==8.1.7 - # via - # celery - # click-didyoumean - # click-plugins - # click-repl -click-didyoumean==0.3.1 - # via celery -click-plugins==1.1.1 - # via celery -click-repl==0.3.0 - # via celery -commonground-api-common==1.13.2 - # via open-api-framework -coreapi==2.3.3 - # via commonground-api-common -coreschema==0.0.4 - # via coreapi -cryptography==43.0.0 - # via - # django-simple-certmanager - # josepy - # mozilla-django-oidc - # pyopenssl - # webauthn -django==4.2.15 - # via - # commonground-api-common - # django-admin-index - # django-appconf - # django-axes - # django-cors-headers - # django-csp - # django-filter - # django-formtools - # django-jsonform - # django-log-outgoing-requests - # django-markup - # django-otp - # django-phonenumber-field - # django-privates - # django-redis - # django-relativedelta - # django-rest-framework-condition - # django-sendfile2 - # django-setup-configuration - # django-simple-certmanager - # django-solo - # django-two-factor-auth - # djangorestframework - # djangorestframework-inclusions - # drf-nested-routers - # drf-spectacular - # drf-yasg - # maykin-2fa - # mozilla-django-oidc - # mozilla-django-oidc-db - # notifications-api-common - # open-api-framework - # zgw-consumers -django-admin-index==3.1.1 - # via open-api-framework -django-appconf==1.0.6 - # via django-log-outgoing-requests -django-axes==6.5.1 - # via open-api-framework -django-cors-headers==4.4.0 - # via open-api-framework -django-csp==3.8 - # via open-api-framework -django-filter==24.2 - # via - # commonground-api-common - # open-api-framework -django-formtools==2.5.1 - # via django-two-factor-auth -django-jsonform==2.22.0 - # via - # mozilla-django-oidc-db - # open-api-framework -django-log-outgoing-requests==0.6.1 - # via open-api-framework -django-markup==1.8.1 - # via open-api-framework -django-ordered-model==3.7.4 - # via django-admin-index -django-otp==1.5.1 - # via django-two-factor-auth -django-phonenumber-field==7.3.0 - # via django-two-factor-auth -django-privates==2.0.0.post1 - # via django-simple-certmanager -django-redis==5.4.0 - # via open-api-framework -django-relativedelta==2.0.0 - # via zgw-consumers -django-rest-framework-condition==0.1.1 - # via commonground-api-common -django-sendfile2==0.7.1 - # via django-privates -django-setup-configuration==0.3.0 - # via open-api-framework -django-simple-certmanager==2.3.0 - # via zgw-consumers -django-solo==2.3.0 - # via - # commonground-api-common - # django-log-outgoing-requests - # mozilla-django-oidc-db - # notifications-api-common - # zgw-consumers -django-two-factor-auth[phonenumberslite,webauthn]==1.16.0 - # via maykin-2fa -djangorestframework==3.15.2 - # via - # commonground-api-common - # djangorestframework-gis - # djangorestframework-inclusions - # drf-nested-routers - # drf-spectacular - # drf-yasg - # notifications-api-common - # open-api-framework -djangorestframework-camel-case==1.4.2 - # via - # commonground-api-common - # notifications-api-common -djangorestframework-gis==1.0 - # via open-api-framework -djangorestframework-inclusions==1.2.0 - # via open-api-framework -drf-nested-routers==0.94.1 - # via commonground-api-common -drf-spectacular==0.27.2 - # via open-api-framework -drf-yasg==1.21.7 - # via commonground-api-common -ecs-logging==2.2.0 - # via elastic-apm -elastic-apm==6.23.0 - # via open-api-framework -face==20.1.1 - # via glom -flower==2.0.1 - # via open-api-framework -furl==2.1.3 - # via ape-pie -gemma-zds-client==2.0.0 - # via - # commonground-api-common - # notifications-api-common -glom==23.5.0 - # via mozilla-django-oidc-db -humanize==4.10.0 - # via flower -idna==3.7 - # via requests -inflection==0.5.1 - # via - # drf-spectacular - # drf-yasg -iso-639==0.4.5 - # via commonground-api-common -isodate==0.6.1 - # via commonground-api-common -itypes==1.2.0 - # via coreapi -jinja2==3.1.4 - # via coreschema -josepy==1.14.0 - # via mozilla-django-oidc -jsonschema==4.23.0 - # via drf-spectacular -jsonschema-specifications==2023.12.1 - # via jsonschema -kombu==5.3.7 - # via celery -markupsafe==2.1.5 - # via jinja2 -maykin-2fa==1.0.1 - # via open-api-framework -mozilla-django-oidc==4.0.1 - # via mozilla-django-oidc-db -mozilla-django-oidc-db==0.19.0 - # via open-api-framework -notifications-api-common==0.2.2 - # via commonground-api-common -open-api-framework==0.8.0 - # via -r requirements/base.in -orderedmultidict==1.0.1 - # via furl -oyaml==1.0 - # via commonground-api-common -packaging==24.1 - # via drf-yasg -phonenumberslite==8.13.42 - # via django-two-factor-auth -prometheus-client==0.20.0 - # via flower -prompt-toolkit==3.0.47 - # via click-repl -psycopg2==2.9.9 - # via open-api-framework -pycparser==2.22 - # via cffi -pyjwt==2.9.0 - # via - # commonground-api-common - # gemma-zds-client - # zgw-consumers -pyopenssl==24.2.1 - # via - # josepy - # webauthn -pypng==0.20220715.0 - # via qrcode -python-dateutil==2.9.0.post0 - # via - # celery - # django-relativedelta -python-decouple==3.8 - # via open-api-framework -python-dotenv==1.0.1 - # via open-api-framework -pytz==2024.1 - # via - # drf-yasg - # flower -pyyaml==6.0.1 - # via - # drf-spectacular - # drf-yasg - # gemma-zds-client - # oyaml -qrcode==7.4.2 - # via django-two-factor-auth -redis==5.0.8 - # via django-redis -referencing==0.35.1 - # via - # jsonschema - # jsonschema-specifications -requests==2.32.3 - # via - # ape-pie - # commonground-api-common - # coreapi - # django-log-outgoing-requests - # gemma-zds-client - # mozilla-django-oidc - # open-api-framework - # zgw-consumers -rpds-py==0.19.1 - # via - # jsonschema - # referencing -sentry-sdk==2.12.0 - # via open-api-framework -six==1.16.0 - # via - # bleach - # furl - # isodate - # orderedmultidict - # python-dateutil -sqlparse==0.5.1 - # via django -tornado==6.4.1 - # via flower -typing-extensions==4.12.2 - # via - # mozilla-django-oidc-db - # qrcode - # zgw-consumers -tzdata==2024.1 - # via celery -uritemplate==4.1.1 - # via - # coreapi - # drf-spectacular - # drf-yasg -urllib3==2.2.2 - # via - # elastic-apm - # requests - # sentry-sdk -uwsgi==2.0.26 - # via open-api-framework -vine==5.1.0 - # via - # amqp - # celery - # kombu -wcwidth==0.2.13 - # via prompt-toolkit -webauthn==2.2.0 - # via django-two-factor-auth -webencodings==0.5.1 - # via bleach -wrapt==1.16.0 - # via elastic-apm -zgw-consumers==0.34.0 - # via - # notifications-api-common - # open-api-framework +# This file is nothing more than a semantic alias for base.txt +# + +-r base.txt From 77ab5b084deefe2d92d11420934763517ac81140 Mon Sep 17 00:00:00 2001 From: Steven Bal Date: Fri, 25 Oct 2024 11:32:39 +0200 Subject: [PATCH 10/12] :construction_worker: Fix tests not running in CI --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0d073306..43ac673a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -50,7 +50,7 @@ jobs: - changed-files # only run tests if source files have changed (e.g. skip for PRs that only update docs) - if: needs.changed-files.outputs.changed-files == 'true' || github.event_name == 'push' || github.event_name == 'workflow_dispatch' + if: ${{ needs.changed-files.outputs.changed-py-files == 'true'|| needs.changed-files.outputs.changed-requirements == 'true'|| github.event_name == 'push' }} strategy: matrix: From c42cf93370647307023d220de6b4466ce220bb2f Mon Sep 17 00:00:00 2001 From: Steven Bal Date: Fri, 25 Oct 2024 11:21:45 +0200 Subject: [PATCH 11/12] :arrow_up: Upgrade commonground-api-common to 1.13.4 this version moves the auth middleware to the proper directory, to avoid unnecessary migrations if the authorizations app is unused also remove the vng_api_common.authorizations.AuthMiddleware from the MIDDLEWARE setting, because Open Klant does not use JWT authentication --- requirements/base.txt | 2 +- requirements/ci.txt | 2 +- requirements/dev.txt | 2 +- src/openklant/conf/base.py | 5 ----- src/openklant/tests/test_cors_configuration.py | 2 +- 5 files changed, 4 insertions(+), 9 deletions(-) diff --git a/requirements/base.txt b/requirements/base.txt index 0d61323a..0d309152 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -56,7 +56,7 @@ click-plugins==1.1.1 # via celery click-repl==0.3.0 # via celery -commonground-api-common==1.13.3 +commonground-api-common==1.13.4 # via open-api-framework coreapi==2.3.3 # via commonground-api-common diff --git a/requirements/ci.txt b/requirements/ci.txt index fdf434f2..2adfb9f1 100644 --- a/requirements/ci.txt +++ b/requirements/ci.txt @@ -97,7 +97,7 @@ click-repl==0.3.0 # celery codecov==2.1.13 # via -r requirements/ci.in -commonground-api-common==1.13.3 +commonground-api-common==1.13.4 # via # -r requirements/base.txt # open-api-framework diff --git a/requirements/dev.txt b/requirements/dev.txt index e8ee2d37..0f895317 100644 --- a/requirements/dev.txt +++ b/requirements/dev.txt @@ -98,7 +98,7 @@ click-repl==0.3.0 # via # -r requirements/base.txt # celery -commonground-api-common==1.13.3 +commonground-api-common==1.13.4 # via # -r requirements/base.txt # open-api-framework diff --git a/src/openklant/conf/base.py b/src/openklant/conf/base.py index 3eb48d9c..8e45fbc5 100644 --- a/src/openklant/conf/base.py +++ b/src/openklant/conf/base.py @@ -19,11 +19,6 @@ # but we don't want to rely on it anymore (e.g. when generating the label for 2FA) INSTALLED_APPS.remove("django.contrib.sites") -# FIXME should these be part of OAf? -MIDDLEWARE.insert( - MIDDLEWARE.index("django.contrib.auth.middleware.AuthenticationMiddleware") + 1, - "vng_api_common.middleware.AuthMiddleware", -) MIDDLEWARE = MIDDLEWARE + ["openklant.utils.middleware.APIVersionHeaderMiddleware"] # diff --git a/src/openklant/tests/test_cors_configuration.py b/src/openklant/tests/test_cors_configuration.py index 1bc51902..acb53c9a 100644 --- a/src/openklant/tests/test_cors_configuration.py +++ b/src/openklant/tests/test_cors_configuration.py @@ -149,7 +149,7 @@ def test_credentialed_request(self): response = self.client.get( "/cors", HTTP_ORIGIN="http://localhost:3000", - HTTP_AUTHORIZATION="Bearer foobarbaz", + HTTP_AUTHORIZATION="Token foobarbaz", ) self.assertEqual(response["Access-Control-Allow-Origin"], "*") From 95789cce19b35ac717822e8611d2b08a56b95f99 Mon Sep 17 00:00:00 2001 From: Steven Bal Date: Thu, 31 Oct 2024 10:30:00 +0100 Subject: [PATCH 12/12] :construction_worker: Move code quality checks to separate workflow and add codeQL --- .github/workflows/code-quality.yml | 29 +++++++++++++++++++++++++++++ .github/workflows/codeql.yml | 26 ++++++++------------------ 2 files changed, 37 insertions(+), 18 deletions(-) create mode 100644 .github/workflows/code-quality.yml diff --git a/.github/workflows/code-quality.yml b/.github/workflows/code-quality.yml new file mode 100644 index 00000000..eadb1fea --- /dev/null +++ b/.github/workflows/code-quality.yml @@ -0,0 +1,29 @@ +# For most projects, this workflow file will not need changing; you simply need +# to commit it to your repository. +# +# You may wish to alter this file to override the set of languages analyzed, +# or to provide custom queries or build logic. +name: Code quality checks + +on: + push: + branches: + - master + paths: + - '**.py' + - '**.yml' + pull_request: + paths: + - '**.py' + - '**.yml' + workflow_dispatch: + +jobs: + open-api-workflow-code-quality: + uses: maykinmedia/open-api-workflows/.github/workflows/code-quality.yml@v1 + with: + python-version: '3.11' + node-version: '18' + + django-settings-module: 'openklant.conf.ci' + django-secret-key: dummy diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index eadb1fea..4d5a3484 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -3,27 +3,17 @@ # # You may wish to alter this file to override the set of languages analyzed, # or to provide custom queries or build logic. -name: Code quality checks +name: "CodeQL" on: push: - branches: - - master - paths: - - '**.py' - - '**.yml' + branches: [master] pull_request: - paths: - - '**.py' - - '**.yml' - workflow_dispatch: + # The branches below must be a subset of the branches above + branches: [master] + schedule: + - cron: '0 23 * * 6' jobs: - open-api-workflow-code-quality: - uses: maykinmedia/open-api-workflows/.github/workflows/code-quality.yml@v1 - with: - python-version: '3.11' - node-version: '18' - - django-settings-module: 'openklant.conf.ci' - django-secret-key: dummy + open-api-workflow-code-analysis: + uses: maykinmedia/open-api-workflows/.github/workflows/code-analysis.yml@v1