From c5c915e781063de1b00cc9fd7464c5764a6de0d1 Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Thu, 30 May 2024 20:12:01 -0700 Subject: [PATCH 1/8] Merge branch 'main' of https://github.com/bcgov/sbc-pay into feature-queue-python-upgrade --- .github/workflows/pay-queue-cd.yml | 118 +++++++++++++++--- .github/workflows/pay-queue-ci.yml | 1 - .github/workflows/pay-queue-gcp-cd.yml | 33 +++++ .gitignore | 3 + bcol-api/requirements.txt | 2 +- jobs/ftp-poller/config.py | 8 +- jobs/ftp-poller/devops/vaults.json | 7 ++ jobs/ftp-poller/invoke_jobs.py | 3 + jobs/ftp-poller/poetry.lock | 2 +- .../tasks/cgi_feeder_poller_task.py | 6 +- jobs/ftp-poller/tasks/eft_poller_ftp.py | 4 +- jobs/ftp-poller/tests/jobs/test_sftp.py | 15 ++- jobs/ftp-poller/utils/utils.py | 14 ++- jobs/notebook-report/requirements.txt | 2 +- jobs/notebook-report/requirements/prod.txt | 4 +- jobs/payment-jobs/config.py | 5 + jobs/payment-jobs/devops/vaults.json | 70 +++++++++++ jobs/payment-jobs/invoke_jobs.py | 2 + .../tasks/activate_pad_account_task.py | 5 +- jobs/payment-jobs/tasks/ap_task.py | 4 +- .../tasks/cfs_create_account_task.py | 3 +- .../tasks/cfs_create_invoice_task.py | 4 +- .../tasks/unpaid_invoice_notify_task.py | 6 +- jobs/payment-jobs/tests/jobs/conftest.py | 2 - .../tests/jobs/test_statement_due_task.py | 1 + jobs/payment-jobs/utils/mailer.py | 28 ++--- pay-api/devops/vaults.json | 59 +++++++++ pay-api/gunicorn_config.py | 2 +- pay-api/manage.py | 2 +- pay-api/scripts/verify_license_headers.sh | 4 +- pay-api/setup.cfg | 2 +- pay-api/setup.py | 2 +- pay-api/src/pay_api/__init__.py | 4 +- pay-api/src/pay_api/config.py | 16 ++- pay-api/src/pay_api/exceptions/__init__.py | 2 +- pay-api/src/pay_api/factory/__init__.py | 2 +- .../pay_api/factory/payment_system_factory.py | 2 +- pay-api/src/pay_api/models/__init__.py | 2 +- pay-api/src/pay_api/models/account_fee.py | 2 +- pay-api/src/pay_api/models/audit.py | 2 +- pay-api/src/pay_api/models/base_model.py | 2 +- pay-api/src/pay_api/models/base_schema.py | 2 +- pay-api/src/pay_api/models/cfs_account.py | 2 +- .../pay_api/models/cfs_account_status_code.py | 2 +- pay-api/src/pay_api/models/code_table.py | 2 +- pay-api/src/pay_api/models/comment.py | 2 +- pay-api/src/pay_api/models/corp_type.py | 2 +- pay-api/src/pay_api/models/credit.py | 2 +- pay-api/src/pay_api/models/db.py | 2 +- .../models/disbursement_status_code.py | 2 +- pay-api/src/pay_api/models/ejv_file.py | 2 +- pay-api/src/pay_api/models/ejv_header.py | 2 +- pay-api/src/pay_api/models/ejv_link.py | 2 +- pay-api/src/pay_api/models/error_code.py | 2 +- pay-api/src/pay_api/models/fee_code.py | 2 +- pay-api/src/pay_api/models/fee_schedule.py | 2 +- pay-api/src/pay_api/models/filing_type.py | 2 +- pay-api/src/pay_api/models/invoice.py | 2 +- pay-api/src/pay_api/models/invoice_batch.py | 2 +- .../src/pay_api/models/invoice_batch_link.py | 2 +- .../src/pay_api/models/invoice_reference.py | 2 +- .../models/invoice_reference_status_code.py | 2 +- .../src/pay_api/models/invoice_status_code.py | 2 +- .../pay_api/models/line_item_status_code.py | 2 +- .../pay_api/models/non_sufficient_funds.py | 2 +- .../models/notification_status_code.py | 2 +- pay-api/src/pay_api/models/payment.py | 2 +- pay-api/src/pay_api/models/payment_account.py | 2 +- .../src/pay_api/models/payment_line_item.py | 2 +- pay-api/src/pay_api/models/payment_method.py | 2 +- .../src/pay_api/models/payment_status_code.py | 2 +- pay-api/src/pay_api/models/payment_system.py | 2 +- .../src/pay_api/models/payment_transaction.py | 2 +- pay-api/src/pay_api/models/receipt.py | 2 +- pay-api/src/pay_api/models/refund.py | 2 +- pay-api/src/pay_api/models/routing_slip.py | 2 +- .../models/routing_slip_status_code.py | 2 +- pay-api/src/pay_api/models/statement.py | 2 +- .../src/pay_api/models/statement_invoices.py | 2 +- .../pay_api/models/statement_recipients.py | 2 +- .../src/pay_api/models/statement_settings.py | 2 +- .../pay_api/models/transaction_status_code.py | 2 +- pay-api/src/pay_api/resources/__init__.py | 2 +- pay-api/src/pay_api/resources/ops.py | 2 +- pay-api/src/pay_api/resources/v1/account.py | 2 +- .../resources/v1/account_statements.py | 2 +- .../v1/account_statements_notifications.py | 2 +- .../v1/account_statements_settings.py | 2 +- .../src/pay_api/resources/v1/bank_accounts.py | 2 +- pay-api/src/pay_api/resources/v1/code.py | 2 +- .../src/pay_api/resources/v1/distributions.py | 2 +- .../src/pay_api/resources/v1/fas/__init__.py | 2 +- .../src/pay_api/resources/v1/fas/refund.py | 2 +- .../pay_api/resources/v1/fas/routing_slip.py | 3 +- pay-api/src/pay_api/resources/v1/fee.py | 2 +- .../src/pay_api/resources/v1/fee_schedule.py | 2 +- pay-api/src/pay_api/resources/v1/invoice.py | 2 +- .../pay_api/resources/v1/invoice_receipt.py | 2 +- pay-api/src/pay_api/resources/v1/invoices.py | 2 +- pay-api/src/pay_api/resources/v1/meta.py | 2 +- .../resources/v1/non_sufficient_funds.py | 2 +- pay-api/src/pay_api/resources/v1/payment.py | 3 +- pay-api/src/pay_api/resources/v1/refund.py | 2 +- .../src/pay_api/resources/v1/transaction.py | 3 +- pay-api/src/pay_api/schemas/__init__.py | 2 +- pay-api/src/pay_api/schemas/utils.py | 2 +- pay-api/src/pay_api/services/__init__.py | 4 +- pay-api/src/pay_api/services/auth.py | 2 +- .../pay_api/services/base_payment_system.py | 15 ++- pay-api/src/pay_api/services/bcol_service.py | 2 +- pay-api/src/pay_api/services/cfs_service.py | 2 +- pay-api/src/pay_api/services/code.py | 2 +- .../src/pay_api/services/deposit_service.py | 6 +- .../pay_api/services/direct_pay_service.py | 2 +- .../src/pay_api/services/distribution_code.py | 2 +- pay-api/src/pay_api/services/eft_service.py | 2 +- .../src/pay_api/services/ejv_pay_service.py | 2 +- pay-api/src/pay_api/services/fas/__init__.py | 2 +- pay-api/src/pay_api/services/fas/comment.py | 2 +- .../src/pay_api/services/fas/routing_slip.py | 2 +- .../routing_slip_status_transition_service.py | 2 +- pay-api/src/pay_api/services/fee_schedule.py | 2 +- .../pay_api/services/gcp_queue/__init__.py | 2 +- .../pay_api/services/gcp_queue_publisher.py | 14 ++- pay-api/src/pay_api/services/hashing.py | 2 +- .../pay_api/services/internal_pay_service.py | 2 +- pay-api/src/pay_api/services/invoice.py | 2 +- .../src/pay_api/services/invoice_reference.py | 2 +- .../pay_api/services/non_sufficient_funds.py | 2 +- pay-api/src/pay_api/services/oauth_service.py | 2 +- .../services/online_banking_service.py | 2 +- pay-api/src/pay_api/services/pad_service.py | 2 +- pay-api/src/pay_api/services/paybc_service.py | 2 +- pay-api/src/pay_api/services/payment.py | 2 +- .../src/pay_api/services/payment_account.py | 29 +++-- .../src/pay_api/services/payment_line_item.py | 2 +- .../src/pay_api/services/payment_service.py | 2 +- .../pay_api/services/payment_transaction.py | 8 +- pay-api/src/pay_api/services/receipt.py | 2 +- pay-api/src/pay_api/services/refund.py | 2 +- pay-api/src/pay_api/services/statement.py | 2 +- .../pay_api/services/statement_recipients.py | 2 +- .../pay_api/services/statement_settings.py | 2 +- pay-api/src/pay_api/services/wire_service.py | 2 +- pay-api/src/pay_api/utils/__init__.py | 2 +- pay-api/src/pay_api/utils/auth.py | 2 +- pay-api/src/pay_api/utils/cache.py | 2 +- pay-api/src/pay_api/utils/constants.py | 2 +- pay-api/src/pay_api/utils/enums.py | 32 +---- pay-api/src/pay_api/utils/errors.py | 2 +- pay-api/src/pay_api/utils/logging.py | 2 +- .../utils/paybc_transaction_error_message.py | 2 +- pay-api/src/pay_api/utils/run_version.py | 2 +- pay-api/src/pay_api/utils/user_context.py | 2 +- pay-api/src/pay_api/utils/util.py | 20 +-- pay-api/src/pay_api/version.py | 2 +- pay-api/tests/__init__.py | 2 +- pay-api/tests/conftest.py | 27 +++- pay-api/tests/unit/__init__.py | 2 +- pay-api/tests/unit/api/__init__.py | 2 +- pay-api/tests/unit/api/fas/__init__.py | 2 +- pay-api/tests/unit/api/fas/test_refund.py | 2 +- .../tests/unit/api/fas/test_routing_slip.py | 2 +- pay-api/tests/unit/api/test_account.py | 2 +- pay-api/tests/unit/api/test_bank_accounts.py | 2 +- pay-api/tests/unit/api/test_code.py | 2 +- pay-api/tests/unit/api/test_distributions.py | 2 +- pay-api/tests/unit/api/test_fee.py | 2 +- pay-api/tests/unit/api/test_fee_schedule.py | 2 +- pay-api/tests/unit/api/test_invoice.py | 2 +- pay-api/tests/unit/api/test_meta.py | 2 +- .../unit/api/test_non_sufficient_funds.py | 2 +- pay-api/tests/unit/api/test_ops.py | 2 +- pay-api/tests/unit/api/test_payment.py | 2 +- .../tests/unit/api/test_payment_request.py | 2 +- pay-api/tests/unit/api/test_receipt.py | 2 +- pay-api/tests/unit/api/test_refund.py | 2 +- pay-api/tests/unit/api/test_statement.py | 2 +- .../tests/unit/api/test_statement_settings.py | 2 +- pay-api/tests/unit/api/test_transaction.py | 2 +- pay-api/tests/unit/conf/__init__.py | 2 +- pay-api/tests/unit/conf/test_configuration.py | 2 +- pay-api/tests/unit/conf/test_version.py | 2 +- pay-api/tests/unit/factory/__init__.py | 2 +- .../factory/test_payment_system_factory.py | 2 +- pay-api/tests/unit/models/__init__.py | 2 +- pay-api/tests/unit/models/test_comment.py | 2 +- pay-api/tests/unit/models/test_corp_type.py | 2 +- pay-api/tests/unit/models/test_fee_code.py | 2 +- .../tests/unit/models/test_fee_schedule.py | 2 +- pay-api/tests/unit/models/test_filing_type.py | 2 +- pay-api/tests/unit/models/test_invoice.py | 2 +- .../unit/models/test_non_sufficient_funds.py | 2 +- pay-api/tests/unit/models/test_payment.py | 2 +- .../tests/unit/models/test_payment_account.py | 2 +- .../tests/unit/models/test_payment_method.py | 2 +- .../tests/unit/models/test_payment_system.py | 2 +- .../unit/models/test_payment_transaction.py | 2 +- pay-api/tests/unit/models/test_receipt.py | 2 +- .../tests/unit/models/test_routing_slip.py | 2 +- pay-api/tests/unit/models/test_status_code.py | 2 +- pay-api/tests/unit/services/__init__.py | 2 +- pay-api/tests/unit/services/test_auth.py | 2 +- .../tests/unit/services/test_bcol_service.py | 2 +- .../tests/unit/services/test_cfs_service.py | 2 +- pay-api/tests/unit/services/test_code.py | 2 +- pay-api/tests/unit/services/test_comment.py | 2 +- .../unit/services/test_distribution_code.py | 2 +- .../tests/unit/services/test_eft_service.py | 2 +- .../tests/unit/services/test_fee_schedule.py | 2 +- pay-api/tests/unit/services/test_flags.py | 2 +- pay-api/tests/unit/services/test_gcp_queue.py | 67 ++++++---- .../unit/services/test_hashing_service.py | 2 +- pay-api/tests/unit/services/test_invoice.py | 2 +- .../unit/services/test_invoice_reference.py | 2 +- .../services/test_non_sufficient_funds.py | 2 +- .../tests/unit/services/test_oauth_service.py | 2 +- .../tests/unit/services/test_pad_service.py | 2 +- pay-api/tests/unit/services/test_payment.py | 2 +- .../unit/services/test_payment_account.py | 2 +- .../unit/services/test_payment_line_item.py | 2 +- .../unit/services/test_payment_service.py | 2 +- .../services/test_payment_system_service.py | 2 +- .../unit/services/test_payment_transaction.py | 2 +- pay-api/tests/unit/services/test_receipt.py | 2 +- pay-api/tests/unit/services/test_refund.py | 2 +- .../services/test_routing_slip_service.py | 2 +- pay-api/tests/unit/services/test_statement.py | 2 +- .../unit/services/test_statement_settings.py | 2 +- .../tests/unit/services/test_wire_service.py | 2 +- pay-api/tests/unit/utils/__init__.py | 2 +- pay-api/tests/unit/utils/test_error.py | 2 +- pay-api/tests/unit/utils/test_logging.py | 2 +- pay-api/tests/unit/utils/test_util.py | 2 +- pay-api/tests/unit/utils/test_util_cors.py | 2 +- pay-api/tests/utilities/__init__.py | 2 +- pay-api/tests/utilities/base_test.py | 2 +- pay-api/tests/utilities/decorators.py | 2 +- pay-api/tests/utilities/schema_assertions.py | 2 +- pay-api/wsgi.py | 2 +- pay-queue/README.md | 4 +- pay-queue/app.py | 9 +- pay-queue/devops/vaults.gcp.env | 6 +- pay-queue/devops/vaults.json | 58 +++++++++ pay-queue/logging.conf | 34 ----- pay-queue/scripts/verify_license_headers.sh | 4 +- pay-queue/setup.cfg | 9 +- pay-queue/setup.py | 4 +- pay-queue/src/pay_queue/__init__.py | 30 ++++- pay-queue/src/pay_queue/config.py | 27 ++-- pay-queue/src/pay_queue/enums.py | 2 +- pay-queue/src/pay_queue/external/__init__.py | 14 +++ pay-queue/src/pay_queue/external/gcp_auth.py | 20 ++- pay-queue/src/pay_queue/minio.py | 2 +- pay-queue/src/pay_queue/resources/worker.py | 35 ++++-- pay-queue/src/pay_queue/services/__init__.py | 5 - .../pay_queue/services/cgi_reconciliations.py | 55 +++++--- .../services/eft/eft_reconciliation.py | 5 +- .../services/payment_reconciliations.py | 29 ++--- pay-queue/src/pay_queue/version.py | 2 +- pay-queue/tests/__init__.py | 2 +- pay-queue/tests/conftest.py | 21 +++- pay-queue/tests/integration/__init__.py | 2 +- pay-queue/tests/integration/factory.py | 2 +- .../integration/test_cgi_reconciliations.py | 63 +++++----- .../integration/test_eft_reconciliation.py | 47 ++++--- .../test_payment_reconciliations.py | 69 ++++++---- .../tests/integration/test_worker_queue.py | 4 +- pay-queue/tests/integration/utils.py | 11 +- report-api/requirements.txt | 2 +- 270 files changed, 1026 insertions(+), 611 deletions(-) create mode 100644 .github/workflows/pay-queue-gcp-cd.yml create mode 100644 jobs/payment-jobs/devops/vaults.json create mode 100644 pay-api/devops/vaults.json create mode 100644 pay-queue/devops/vaults.json delete mode 100644 pay-queue/logging.conf create mode 100644 pay-queue/src/pay_queue/external/__init__.py diff --git a/.github/workflows/pay-queue-cd.yml b/.github/workflows/pay-queue-cd.yml index 73e2b0518..96124a711 100644 --- a/.github/workflows/pay-queue-cd.yml +++ b/.github/workflows/pay-queue-cd.yml @@ -4,30 +4,112 @@ on: push: branches: - main - - feature* paths: - "pay-queue/**" - "pay-api/src/pay_api/models/**" - "pay-api/src/pay_api/services/cfs_service.py" workflow_dispatch: inputs: - target: - description: "Deploy To" + environment: + description: "Environment (dev/test/prod)" required: true - type: choice - options: - - dev - - test - - sandbox - - prod + default: "dev" + +defaults: + run: + shell: bash + working-directory: ./pay-queue + +env: + APP_NAME: "pay-queue" + TAG_NAME: "dev" jobs: - pay-queue-cd: - uses: bcgov/bcregistry-sre/.github/workflows/cloud-run-service-cd.yaml@main - with: - target: ${{ inputs.target }} - app_name: "pay-queue" - working_directory: "./pay-queue" - secrets: - WORKLOAD_IDENTIFY_POOLS_PROVIDER: ${{ secrets.WORKLOAD_IDENTIFY_POOLS_PROVIDER }} - GCP_SERVICE_ACCOUNT: ${{ secrets.GCP_SERVICE_ACCOUNT }} \ No newline at end of file + pay-queue-cd-by-push: + runs-on: ubuntu-20.04 + + if: github.event_name == 'push' && github.repository == 'bcgov/sbc-pay' + environment: + name: "dev" + + steps: + - uses: actions/checkout@v3 + + - name: Login Openshift + shell: bash + run: | + oc login --server=${{secrets.OPENSHIFT4_LOGIN_REGISTRY}} --token=${{secrets.OPENSHIFT4_SA_TOKEN}} + + - name: CD Flow + shell: bash + env: + OPS_REPOSITORY: ${{ secrets.OPS_REPOSITORY }} + OPENSHIFT_DOCKER_REGISTRY: ${{ secrets.OPENSHIFT4_DOCKER_REGISTRY }} + OPENSHIFT_SA_NAME: ${{ secrets.OPENSHIFT4_SA_NAME }} + OPENSHIFT_SA_TOKEN: ${{ secrets.OPENSHIFT4_SA_TOKEN }} + OPENSHIFT_REPOSITORY: ${{ secrets.OPENSHIFT4_REPOSITORY }} + TAG_NAME: ${{ env.TAG_NAME }} + run: | + make cd + + - name: Watch new rollout (trigger by image change in Openshift) + shell: bash + run: | + oc rollout status dc/${{ env.APP_NAME }}-${{ env.TAG_NAME }} -n ${{ secrets.OPENSHIFT4_REPOSITORY }}-${{ env.TAG_NAME }} -w + + - name: Rocket.Chat Notification + uses: RocketChat/Rocket.Chat.GitHub.Action.Notification@master + if: failure() + with: + type: ${{ job.status }} + job_name: "*Payment Reconciliations Queue Built and Deployed to ${{env.TAG_NAME}}*" + channel: "#registries-bot" + url: ${{ secrets.ROCKETCHAT_WEBHOOK }} + commit: true + token: ${{ secrets.GITHUB_TOKEN }} + + pay-queue-cd-by-dispatch: + runs-on: ubuntu-20.04 + + if: github.event_name == 'workflow_dispatch' && github.repository == 'bcgov/sbc-pay' + environment: + name: "${{ github.event.inputs.environment }}" + + steps: + - uses: actions/checkout@v3 + - name: Set env by input + run: | + echo "TAG_NAME=${{ github.event.inputs.environment }}" >> $GITHUB_ENV + + - name: Login Openshift + shell: bash + run: | + oc login --server=${{secrets.OPENSHIFT4_LOGIN_REGISTRY}} --token=${{secrets.OPENSHIFT4_SA_TOKEN}} + + - name: CD Flow + shell: bash + env: + OPS_REPOSITORY: ${{ secrets.OPS_REPOSITORY }} + OPENSHIFT_DOCKER_REGISTRY: ${{ secrets.OPENSHIFT4_DOCKER_REGISTRY }} + OPENSHIFT_SA_NAME: ${{ secrets.OPENSHIFT4_SA_NAME }} + OPENSHIFT_SA_TOKEN: ${{ secrets.OPENSHIFT4_SA_TOKEN }} + OPENSHIFT_REPOSITORY: ${{ secrets.OPENSHIFT4_REPOSITORY }} + TAG_NAME: ${{ env.TAG_NAME }} + run: | + make cd + + - name: Watch new rollout (trigger by image change in Openshift) + shell: bash + run: | + oc rollout status dc/${{ env.APP_NAME }}-${{ env.TAG_NAME }} -n ${{ secrets.OPENSHIFT4_REPOSITORY }}-${{ env.TAG_NAME }} -w + + - name: Rocket.Chat Notification + uses: RocketChat/Rocket.Chat.GitHub.Action.Notification@master + if: failure() + with: + type: ${{ job.status }} + job_name: "*Payment Reconciliations Queue Built and Deployed to ${{env.TAG_NAME}}*" + channel: "#registries-bot" + url: ${{ secrets.ROCKETCHAT_WEBHOOK }} + commit: true + token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/pay-queue-ci.yml b/.github/workflows/pay-queue-ci.yml index 567c4d23b..238da6343 100644 --- a/.github/workflows/pay-queue-ci.yml +++ b/.github/workflows/pay-queue-ci.yml @@ -14,7 +14,6 @@ defaults: run: shell: bash working-directory: ./pay-queue - jobs: setup-job: runs-on: ubuntu-20.04 diff --git a/.github/workflows/pay-queue-gcp-cd.yml b/.github/workflows/pay-queue-gcp-cd.yml new file mode 100644 index 000000000..73e2b0518 --- /dev/null +++ b/.github/workflows/pay-queue-gcp-cd.yml @@ -0,0 +1,33 @@ +name: Pay Queue CD + +on: + push: + branches: + - main + - feature* + paths: + - "pay-queue/**" + - "pay-api/src/pay_api/models/**" + - "pay-api/src/pay_api/services/cfs_service.py" + workflow_dispatch: + inputs: + target: + description: "Deploy To" + required: true + type: choice + options: + - dev + - test + - sandbox + - prod + +jobs: + pay-queue-cd: + uses: bcgov/bcregistry-sre/.github/workflows/cloud-run-service-cd.yaml@main + with: + target: ${{ inputs.target }} + app_name: "pay-queue" + working_directory: "./pay-queue" + secrets: + WORKLOAD_IDENTIFY_POOLS_PROVIDER: ${{ secrets.WORKLOAD_IDENTIFY_POOLS_PROVIDER }} + GCP_SERVICE_ACCOUNT: ${{ secrets.GCP_SERVICE_ACCOUNT }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index b3f42e947..ba3b879e1 100644 --- a/.gitignore +++ b/.gitignore @@ -129,3 +129,6 @@ ACK.INBOX.F12022020202 pay-queue/ACK.* pay-queue/FEEDBACK.* jobs/notebook-report/data/ +test_eft_tdi17.txt +ACK.INBOX* +FEEDBACK.INBOX* diff --git a/bcol-api/requirements.txt b/bcol-api/requirements.txt index 44c6e1330..f9b2fad15 100644 --- a/bcol-api/requirements.txt +++ b/bcol-api/requirements.txt @@ -36,7 +36,7 @@ python-ldap==3.4.4 pytz==2024.1 requests-file==2.0.0 requests-toolbelt==1.0.0 -requests==2.31.0 +requests==2.32.2 rsa==4.9 sentry-sdk==1.41.0 six==1.16.0 diff --git a/jobs/ftp-poller/config.py b/jobs/ftp-poller/config.py index 81a331765..12082de1e 100644 --- a/jobs/ftp-poller/config.py +++ b/jobs/ftp-poller/config.py @@ -136,11 +136,9 @@ class _Config(object): # pylint: disable=too-few-public-methods SENTRY_ENABLE = os.getenv('SENTRY_ENABLE', 'False') SENTRY_DSN = os.getenv('SENTRY_DSN', None) - # GCP PubSub - AUDIENCE = os.getenv('AUDIENCE', None) - GCP_AUTH_KEY = os.getenv('GCP_AUTH_KEY', None) - PUBLISHER_AUDIENCE = os.getenv('PUBLISHER_AUDIENCE', None) - FTP_POLLER_TOPIC = os.getenv('FTP_POLLER_TOPIC', None) + # PUB/SUB - PUB: ftp-poller-payment-reconciliation-dev + FTP_POLLER_TOPIC = os.getenv('FTP_POLLER_TOPIC', 'ftp-poller-payment-reconciliation-dev') + GCP_AUTH_KEY = os.getenv('AUTHPAY_GCP_AUTH_KEY', None) TESTING = False DEBUG = True diff --git a/jobs/ftp-poller/devops/vaults.json b/jobs/ftp-poller/devops/vaults.json index 433ed9cbd..209734136 100644 --- a/jobs/ftp-poller/devops/vaults.json +++ b/jobs/ftp-poller/devops/vaults.json @@ -19,5 +19,12 @@ "application": [ "relationship-api" ] + }, + { + "vault": "gcp-queue", + "application": [ + "gtksf3", + "topics" + ] } ] diff --git a/jobs/ftp-poller/invoke_jobs.py b/jobs/ftp-poller/invoke_jobs.py index 5e18dcccb..eddfc319f 100755 --- a/jobs/ftp-poller/invoke_jobs.py +++ b/jobs/ftp-poller/invoke_jobs.py @@ -21,6 +21,7 @@ import sentry_sdk from flask import Flask from sentry_sdk.integrations.flask import FlaskIntegration +from pay_api.services.gcp_queue import queue import config from utils.logger import setup_logging @@ -44,6 +45,8 @@ def create_app(run_mode=os.getenv('FLASK_ENV', 'production')): integrations=[FlaskIntegration()] ) app.logger.info(f'<<<< Starting Ftp Poller Job >>>>') + queue.init_app(app) + db.init_app(app) ma.init_app(app) register_shellcontext(app) diff --git a/jobs/ftp-poller/poetry.lock b/jobs/ftp-poller/poetry.lock index c49f113da..7aa6aec79 100644 --- a/jobs/ftp-poller/poetry.lock +++ b/jobs/ftp-poller/poetry.lock @@ -2235,7 +2235,7 @@ jaeger-client = "*" type = "git" url = "https://github.com/bcgov/sbc-common-components.git" reference = "HEAD" -resolved_reference = "5f99e135214ae949c9af951d4aa0b88b1067d853" +resolved_reference = "94986110a7f6c7ba4f57ed8b038101ba7d864a94" subdirectory = "python" [[package]] diff --git a/jobs/ftp-poller/tasks/cgi_feeder_poller_task.py b/jobs/ftp-poller/tasks/cgi_feeder_poller_task.py index 7542a4d84..ba79e2347 100644 --- a/jobs/ftp-poller/tasks/cgi_feeder_poller_task.py +++ b/jobs/ftp-poller/tasks/cgi_feeder_poller_task.py @@ -16,8 +16,8 @@ from flask import current_app from paramiko.sftp_attr import SFTPAttributes +from sbc_common_components.utils.enums import QueueMessageTypes -from pay_api.utils.enums import MessageType from services.sftp import SFTPService from utils import utils @@ -48,12 +48,12 @@ def poll_ftp(cls): f'Skipping directory {file_name}.') continue if cls._is_ack_file(file_name): - utils.publish_to_queue([file_name], MessageType.CGI_ACK_RECEIVED.value) + utils.publish_to_queue([file_name], QueueMessageTypes.CGI_ACK_MESSAGE_TYPE.value) cls._move_file_to_backup(sftp_client, [file_name]) elif cls._is_feedback_file(file_name): bucket_name = current_app.config.get('MINIO_CGI_BUCKET_NAME') utils.upload_to_minio(file, file_full_name, sftp_client, bucket_name) - utils.publish_to_queue([file_name], MessageType.CGI_FEEDBACK_RECEIVED.value, + utils.publish_to_queue([file_name], QueueMessageTypes.CGI_FEEDBACK_MESSAGE_TYPE.value, location=bucket_name) cls._move_file_to_backup(sftp_client, [file_name]) elif cls._is_a_trigger_file(file_name): diff --git a/jobs/ftp-poller/tasks/eft_poller_ftp.py b/jobs/ftp-poller/tasks/eft_poller_ftp.py index 10f59a4f4..ff6b3dc52 100644 --- a/jobs/ftp-poller/tasks/eft_poller_ftp.py +++ b/jobs/ftp-poller/tasks/eft_poller_ftp.py @@ -17,7 +17,7 @@ from flask import current_app from paramiko.sftp_attr import SFTPAttributes -from pay_api.utils.enums import MessageType +from sbc_common_components.utils.enums import QueueMessageTypes from services.sftp import SFTPService from utils.utils import publish_to_queue, upload_to_minio @@ -66,7 +66,7 @@ def _post_process(cls, sftp_client, payment_file_list: List[str]): 2.Send a message to queue """ cls._move_file_to_backup(sftp_client, payment_file_list) - publish_to_queue(payment_file_list, MessageType.EFT_FILE_UPLOADED.value, + publish_to_queue(payment_file_list, QueueMessageTypes.EFT_FILE_UPLOADED.value, location=current_app.config.get('MINIO_EFT_BUCKET_NAME')) @classmethod diff --git a/jobs/ftp-poller/tests/jobs/test_sftp.py b/jobs/ftp-poller/tests/jobs/test_sftp.py index d88470a8d..07dc79d5b 100644 --- a/jobs/ftp-poller/tests/jobs/test_sftp.py +++ b/jobs/ftp-poller/tests/jobs/test_sftp.py @@ -19,6 +19,8 @@ import pytest from flask import current_app +from sbc_common_components.utils.enums import QueueMessageTypes + from services.sftp import SFTPService from utils.utils import publish_to_queue @@ -38,7 +40,14 @@ def test_poll_ftp_task(): assert len(files) == 1, 'Files exist in FTP folder' -@pytest.mark.skip(reason='leave this to manually verify pubsub connection; needs env vars') -def test_queue_message(): +@pytest.mark.skip(reason='leave this to manually verify pubsub connection;' + 'needs env vars, disable def mock_queue_publish(monkeypatch):') +def test_queue_message(session): # pylint:disable=unused-argument """Test publishing to topic.""" - publish_to_queue(['file1.csv']) + file_name = 'file1.csv' + publish_to_queue([file_name]) + publish_to_queue([file_name], QueueMessageTypes.CGI_ACK_MESSAGE_TYPE.value) + publish_to_queue([file_name], QueueMessageTypes.CGI_FEEDBACK_MESSAGE_TYPE.value, + location=current_app.config.get('MINIO_CGI_BUCKET_NAME')) + publish_to_queue([file_name], QueueMessageTypes.EFT_FILE_UPLOADED.value, + location=current_app.config.get('MINIO_EFT_BUCKET_NAME')) diff --git a/jobs/ftp-poller/utils/utils.py b/jobs/ftp-poller/utils/utils.py index aa452f5c4..afc22828a 100644 --- a/jobs/ftp-poller/utils/utils.py +++ b/jobs/ftp-poller/utils/utils.py @@ -12,18 +12,21 @@ # See the License for the specific language governing permissions and # limitations under the License. """Service to manage PAYBC services.""" +from time import time from typing import List from flask import current_app from paramiko import SFTPFile from pay_api.services import gcp_queue_publisher from pay_api.services.gcp_queue_publisher import QueueMessage -from pay_api.utils.enums import MessageType, QueueSources +from pay_api.utils.enums import QueueSources +from sbc_common_components.utils.enums import QueueMessageTypes from utils.minio import put_object -def publish_to_queue(payment_file_list: List[str], message_type=MessageType.CAS_UPLOADED.value, location: str = ''): +def publish_to_queue(payment_file_list: List[str], message_type=QueueMessageTypes.CAS_MESSAGE_TYPE.value, + location: str = ''): """Publish message to the Queue, saying file has been uploaded. Using the event spec.""" queue_data = { 'fileSource': 'MINIO', @@ -38,11 +41,11 @@ def publish_to_queue(payment_file_list: List[str], message_type=MessageType.CAS_ source=QueueSources.FTP_POLLER.value, message_type=message_type, payload=queue_data, - topic=current_app.config.get('FTP_POLLER_TOPIC') + topic=current_app.config.get('FTP_POLLER_TOPIC'), + ordering_key=str(time()) ) ) except Exception as e: # NOQA # pylint: disable=broad-except - current_app.logger.error(e) current_app.logger.warning( f'Notification to Queue failed for the file {file_name}', e) @@ -57,7 +60,6 @@ def upload_to_minio(file, file_full_name, sftp_client, bucket_name): value_as_bytes = f.read() try: put_object(value_as_bytes, file.filename, bucket_name, file.st_size, ) - except Exception as e: # NOQA # pylint: disable=broad-except - current_app.logger.error(e) + except Exception: # NOQA # pylint: disable=broad-except current_app.logger.error(f'upload to minio failed for the file: {file_full_name}') raise diff --git a/jobs/notebook-report/requirements.txt b/jobs/notebook-report/requirements.txt index bb27f8d33..4a095802e 100644 --- a/jobs/notebook-report/requirements.txt +++ b/jobs/notebook-report/requirements.txt @@ -30,5 +30,5 @@ marshmallow==2.20.5 Werkzeug==0.16.1 certifi==2023.7.22 urllib3==1.26.17 -idna==2.9 +idna==3.7 pylint diff --git a/jobs/notebook-report/requirements/prod.txt b/jobs/notebook-report/requirements/prod.txt index 1f8cbae23..6d869f683 100644 --- a/jobs/notebook-report/requirements/prod.txt +++ b/jobs/notebook-report/requirements/prod.txt @@ -25,9 +25,9 @@ pyrsistent==0.16.0 Flask==1.1.2 Click==7.1.2 python-dotenv==0.13.0 -requests==2.31.0 +requests==2.32.2 marshmallow==2.20.5 Werkzeug==0.16.1 certifi==2023.7.22 urllib3==1.26.17 -idna==2.9 +idna==3.7 diff --git a/jobs/payment-jobs/config.py b/jobs/payment-jobs/config.py index cede16606..891a99927 100644 --- a/jobs/payment-jobs/config.py +++ b/jobs/payment-jobs/config.py @@ -116,6 +116,11 @@ class _Config(object): # pylint: disable=too-few-public-methods AUTH_WEB_STATEMENT_URL = os.getenv('AUTH_WEB_STATEMENT_URL', 'account/orgId/settings/statements') REGISTRIES_LOGO_IMAGE_NAME = os.getenv('REGISTRIES_LOGO_IMAGE_NAME', 'bc_logo_for_email.png') + # PUB/SUB- PUB: account-mailer-dev + ACCOUNT_MAILER_TOPIC = os.getenv('ACCOUNT_MAILER_TOPIC', 'account-mailer-dev') + GCP_AUTH_KEY = os.getenv('AUTHPAY_GCP_AUTH_KEY', None) + + CFS_ACCOUNT_DESCRIPTION = os.getenv('CFS_ACCOUNT_DESCRIPTION', 'BCR') CFS_INVOICE_PREFIX = os.getenv('CFS_INVOICE_PREFIX', 'REG') CFS_STOP_PAD_ACCOUNT_CREATION = os.getenv('CFS_STOP_PAD_ACCOUNT_CREATION', 'false').lower() == 'true' diff --git a/jobs/payment-jobs/devops/vaults.json b/jobs/payment-jobs/devops/vaults.json new file mode 100644 index 000000000..420b0bbe9 --- /dev/null +++ b/jobs/payment-jobs/devops/vaults.json @@ -0,0 +1,70 @@ +[ + { + "vault": "shared", + "application": [ + "api-endpoints", + "encryption-key" + ] + }, + { + "vault": "keycloak", + "application": [ + "jwt-base", + "sbc-auth-admin" + ] + }, + { + "vault": "payment-external-services", + "application": [ + "paybc", + "cfs" + ] + }, + { + "vault": "relationship", + "application": [ + "postgres-pay", + "pay-api", + "jwt", + "payment-jobs", + "ftp-poller" + ] + }, + { + "vault": "sentry", + "application": [ + "relationship-api" + ] + }, + { + "vault": "minio", + "application": [ + "payment-jobs" + ] + }, + { + "vault": "minio", + "application": [ + "base" + ] + }, + { + "vault": "launchdarkly", + "application": [ + "pay" + ] + }, + { + "vault": "entity", + "application": [ + "colin-api" + ] + }, + { + "vault": "gcp-queue", + "application": [ + "gtksf3", + "topics" + ] + } +] diff --git a/jobs/payment-jobs/invoke_jobs.py b/jobs/payment-jobs/invoke_jobs.py index ebbb7d567..7636770a6 100755 --- a/jobs/payment-jobs/invoke_jobs.py +++ b/jobs/payment-jobs/invoke_jobs.py @@ -30,6 +30,7 @@ from utils.logger import setup_logging from pay_api.services import Flags +from pay_api.services.gcp_queue import queue setup_logging(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'logging.conf')) # important to do this first @@ -51,6 +52,7 @@ def create_app(run_mode=os.getenv('DEPLOYMENT_ENV', 'production'), job_name='unk release=f'payment-jobs-{job_name}@-', ) app.logger.info('<<<< Starting Payment Jobs >>>>') + queue.init_app(app) db.init_app(app) if init_oracle: oracle_db.init_app(app) diff --git a/jobs/payment-jobs/tasks/activate_pad_account_task.py b/jobs/payment-jobs/tasks/activate_pad_account_task.py index d24127537..2659006aa 100644 --- a/jobs/payment-jobs/tasks/activate_pad_account_task.py +++ b/jobs/payment-jobs/tasks/activate_pad_account_task.py @@ -19,7 +19,8 @@ from flask import current_app from pay_api.models import CfsAccount as CfsAccountModel from pay_api.models import PaymentAccount as PaymentAccountModel -from pay_api.utils.enums import CfsAccountStatus, MessageType, PaymentMethod +from pay_api.utils.enums import CfsAccountStatus, PaymentMethod +from sbc_common_components.utils.enums import QueueMessageTypes from utils import mailer @@ -57,4 +58,4 @@ def activate_pad_accounts(cls): if pay_account.payment_method != PaymentMethod.PAD.value: pay_account.payment_method = PaymentMethod.PAD.value pay_account.save() - mailer.publish_mailer_events(MessageType.PAD_CONFIRMATION_PERIOD_OVER, pay_account) + mailer.publish_mailer_events(QueueMessageTypes.CONFIRMATION_PERIOD_OVER.value, pay_account) diff --git a/jobs/payment-jobs/tasks/ap_task.py b/jobs/payment-jobs/tasks/ap_task.py index 0633a8c3b..c317cb447 100644 --- a/jobs/payment-jobs/tasks/ap_task.py +++ b/jobs/payment-jobs/tasks/ap_task.py @@ -76,7 +76,7 @@ def _create_routing_slip_refund_file(cls): # pylint:disable=too-many-locals, to if not routing_slips_dao: return - for routing_slips in batched(routing_slips_dao, 250): + for routing_slips in list(batched(routing_slips_dao, 250)): ejv_file_model: EjvFileModel = EjvFileModel( file_type=cls.ap_type.value, file_ref=cls.get_file_name(), @@ -118,7 +118,7 @@ def _create_non_gov_disbursement_file(cls): # pylint:disable=too-many-locals return # 250 MAX is all the transactions the feeder can take per batch. - for invoices in batched(total_invoices, 250): + for invoices in list(batched(total_invoices, 250)): bca_distribution = cls._get_bca_distribution_string() ejv_file_model: EjvFileModel = EjvFileModel( file_type=cls.ap_type.value, diff --git a/jobs/payment-jobs/tasks/cfs_create_account_task.py b/jobs/payment-jobs/tasks/cfs_create_account_task.py index 4c075604c..d19682ed1 100644 --- a/jobs/payment-jobs/tasks/cfs_create_account_task.py +++ b/jobs/payment-jobs/tasks/cfs_create_account_task.py @@ -23,6 +23,7 @@ from pay_api.services.oauth_service import OAuthService from pay_api.utils.constants import RECEIPT_METHOD_EFT_MONTHLY, RECEIPT_METHOD_PAD_DAILY from pay_api.utils.enums import AuthHeaderType, CfsAccountStatus, ContentType, MessageType, PaymentMethod +from sbc_common_components.utils.enums import QueueMessageTypes from sentry_sdk import capture_message from services import routing_slip from utils import mailer @@ -140,7 +141,7 @@ def _create_cfs_account(cls, pending_account: CfsAccountModel, pay_account: Paym capture_message(f'User Input needed for creating CFS Account: account id={pay_account.id}, ' f'auth account : {pay_account.auth_account_id}, ERROR : Invalid Bank Details', level='error') - mailer.publish_mailer_events(MessageType.PAD_SETUP_FAILED, pay_account) + mailer.publish_mailer_events(QueueMessageTypes.PAD_SETUP_FAILED.value, pay_account) pending_account.status = CfsAccountStatus.INACTIVE.value pending_account.save() return diff --git a/jobs/payment-jobs/tasks/cfs_create_invoice_task.py b/jobs/payment-jobs/tasks/cfs_create_invoice_task.py index bdc24ec4a..052b69ea0 100644 --- a/jobs/payment-jobs/tasks/cfs_create_invoice_task.py +++ b/jobs/payment-jobs/tasks/cfs_create_invoice_task.py @@ -34,6 +34,7 @@ from pay_api.utils.enums import ( CfsAccountStatus, InvoiceReferenceStatus, InvoiceStatus, MessageType, PaymentMethod, PaymentStatus, PaymentSystem) from pay_api.utils.util import generate_transaction_number +from sbc_common_components.utils.enums import QueueMessageTypes from sentry_sdk import capture_message from utils import mailer @@ -320,7 +321,8 @@ def _create_pad_invoices(cls): # pylint: disable=too-many-locals 'invoice_total': float(invoice_total), 'invoice_process_date': f'{datetime.now()}' } - mailer.publish_mailer_events(MessageType.PAD_INVOICE_CREATED, payment_account, additional_params) + mailer.publish_mailer_events(QueueMessageTypes.PAD_INVOICE_CREATED.value, payment_account, + additional_params) # Iterate invoice and create invoice reference records for invoice in account_invoices: invoice_reference = InvoiceReferenceModel( diff --git a/jobs/payment-jobs/tasks/unpaid_invoice_notify_task.py b/jobs/payment-jobs/tasks/unpaid_invoice_notify_task.py index 2a04f3485..200f792c6 100644 --- a/jobs/payment-jobs/tasks/unpaid_invoice_notify_task.py +++ b/jobs/payment-jobs/tasks/unpaid_invoice_notify_task.py @@ -19,7 +19,8 @@ from pay_api.models import Invoice as InvoiceModel from pay_api.models import PaymentAccount as PaymentAccountModel from pay_api.models import db -from pay_api.utils.enums import InvoiceStatus, MessageType, PaymentMethod +from pay_api.utils.enums import InvoiceStatus, PaymentMethod +from sbc_common_components.utils.enums import QueueMessageTypes from sentry_sdk import capture_message from sqlalchemy import Date, and_, cast, func @@ -76,7 +77,8 @@ def _notify_for_ob(cls): # pylint: disable=too-many-locals 'cfsAccountId': cfs_account.cfs_account, 'authAccountId': pay_account.auth_account_id, } - mailer.publish_mailer_events(MessageType.ONLINE_BANKING_OUTSTANDING_INVOICE, pay_account, + mailer.publish_mailer_events(QueueMessageTypes.PAYMENT_PENDING.value, + pay_account, addition_params_to_mailer) except Exception as e: # NOQA # pylint: disable=broad-except capture_message(f'Error on notifying mailer OB Pending invoice: account id={pay_account.id}, ' diff --git a/jobs/payment-jobs/tests/jobs/conftest.py b/jobs/payment-jobs/tests/jobs/conftest.py index 0f6bcfeb3..7287b03ce 100644 --- a/jobs/payment-jobs/tests/jobs/conftest.py +++ b/jobs/payment-jobs/tests/jobs/conftest.py @@ -32,13 +32,11 @@ def app(): """Return a session-wide application configured in TEST mode.""" return create_app('testing') - @pytest.fixture(scope='function') def app_request(): """Return a session-wide application configured in TEST mode.""" return create_app('testing') - @pytest.fixture(scope='session') def client(app): # pylint: disable=redefined-outer-name """Return a session-wide Flask test client.""" diff --git a/jobs/payment-jobs/tests/jobs/test_statement_due_task.py b/jobs/payment-jobs/tests/jobs/test_statement_due_task.py index 9b3f596d8..7b4fd3960 100644 --- a/jobs/payment-jobs/tests/jobs/test_statement_due_task.py +++ b/jobs/payment-jobs/tests/jobs/test_statement_due_task.py @@ -45,6 +45,7 @@ app = None +# Travis Semple - in the future please remove this, this should be inside of conftest.py like the other fixtures. @pytest.fixture def setup(): """Initialize app with test env for testing.""" diff --git a/jobs/payment-jobs/utils/mailer.py b/jobs/payment-jobs/utils/mailer.py index 1379db03c..69cf1a6b9 100644 --- a/jobs/payment-jobs/utils/mailer.py +++ b/jobs/payment-jobs/utils/mailer.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. @@ -14,15 +14,14 @@ """Task to activate accounts with pending activation.Mostly for PAD with 3 day activation period.""" from dataclasses import dataclass from datetime import datetime -from typing import Dict from flask import current_app from pay_api.models import FeeSchedule as FeeScheduleModel from pay_api.models import PaymentAccount as PaymentAccountModel from pay_api.models import Statement as StatementModel from pay_api.services import gcp_queue_publisher -from pay_api.services.gcp_queue_publisher import QueueMessage -from pay_api.utils.enums import QueueSources, MessageType +from pay_api.utils.enums import QueueSources +from sbc_common_components.utils.enums import QueueMessageTypes from sentry_sdk import capture_message @@ -38,8 +37,7 @@ class StatementNotificationInfo: total_amount_owing: float -def publish_mailer_events(message_type: str, pay_account: PaymentAccountModel, - additional_params: Dict = {}): +def publish_mailer_events(message_type: str, pay_account: PaymentAccountModel, additional_params=None): """Publish payment message to the mailer queue.""" # Publish message to the Queue, saying account has been activated. Using the event spec. @@ -48,11 +46,11 @@ def publish_mailer_events(message_type: str, pay_account: PaymentAccountModel, payload = { 'accountId': pay_account.auth_account_id, 'nsfFee': float(fee_schedule.fee.amount), - **additional_params + **(additional_params or {}) } try: gcp_queue_publisher.publish_to_queue( - QueueMessage( + gcp_queue_publisher.QueueMessage( source=QueueSources.PAY_JOBS.value, message_type=message_type, payload=payload, @@ -71,6 +69,7 @@ def publish_mailer_events(message_type: str, pay_account: PaymentAccountModel, def publish_statement_notification(pay_account: PaymentAccountModel, statement: StatementModel, total_amount_owing: float, emails: str) -> bool: """Publish payment statement notification message to the mailer queue.""" + message_type = QueueMessageTypes.STATEMENT_NOTIFICATION.value payload = { 'emailAddresses': emails, 'accountId': pay_account.auth_account_id, @@ -81,9 +80,9 @@ def publish_statement_notification(pay_account: PaymentAccountModel, statement: } try: gcp_queue_publisher.publish_to_queue( - QueueMessage( + gcp_queue_publisher.QueueMessage( source=QueueSources.PAY_JOBS.value, - message_type=MessageType.STATEMENT_NOTIFICATION.value, + message_type=message_type, payload=payload, topic=current_app.config.get('ACCOUNT_MAILER_TOPIC') ) @@ -103,8 +102,8 @@ def publish_statement_notification(pay_account: PaymentAccountModel, statement: def publish_payment_notification(info: StatementNotificationInfo) -> bool: """Publish payment notification message to the mailer queue.""" - notification_type = MessageType.STATEMENT_DUE_NOTIFICATION.value if info.is_due \ - else MessageType.STATEMENT_REMINDER_NOTIFICATION.value + message_type = QueueMessageTypes.PAYMENT_DUE_NOTIFICATION.value if info.is_due \ + else QueueMessageTypes.PAYMENT_REMINDER_NOTIFICATION.value payload = { 'emailAddresses': info.emails, @@ -115,9 +114,9 @@ def publish_payment_notification(info: StatementNotificationInfo) -> bool: } try: gcp_queue_publisher.publish_to_queue( - QueueMessage( + gcp_queue_publisher.QueueMessage( source=QueueSources.PAY_JOBS.value, - message_type=notification_type, + message_type=message_type, payload=payload, topic=current_app.config.get('ACCOUNT_MAILER_TOPIC') ) @@ -133,4 +132,3 @@ def publish_payment_notification(info: StatementNotificationInfo) -> bool: return False return True - diff --git a/pay-api/devops/vaults.json b/pay-api/devops/vaults.json new file mode 100644 index 000000000..5a1bc6bf6 --- /dev/null +++ b/pay-api/devops/vaults.json @@ -0,0 +1,59 @@ +[ + { + "vault": "shared", + "application": [ + "api-endpoints", + "encryption-key" + ] + }, + { + "vault": "keycloak", + "application": [ + "jwt-base", + "sbc-auth-admin" + ] + }, + { + "vault": "gcp-queue", + "application": [ + "base", + "account-events-listener", + "payment", + "account-mailer" + ] + }, + { + "vault": "payment-external-services", + "application": [ + "paybc", + "cfs" + ] + }, + { + "vault": "relationship", + "application": [ + "postgres-pay", + "pay-api", + "jwt" + ] + }, + { + "vault": "sentry", + "application": [ + "relationship-api" + ] + }, + { + "vault": "launchdarkly", + "application": [ + "pay" + ] + }, + { + "vault": "gcp-queue", + "application": [ + "gtksf3", + "topics" + ] + } +] diff --git a/pay-api/gunicorn_config.py b/pay-api/gunicorn_config.py index a3ab9633f..5a05fdb3b 100755 --- a/pay-api/gunicorn_config.py +++ b/pay-api/gunicorn_config.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/manage.py b/pay-api/manage.py index 8e1952a5c..7f786c35b 100755 --- a/pay-api/manage.py +++ b/pay-api/manage.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/scripts/verify_license_headers.sh b/pay-api/scripts/verify_license_headers.sh index 028b95c63..a160d3ac8 100755 --- a/pay-api/scripts/verify_license_headers.sh +++ b/pay-api/scripts/verify_license_headers.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ # limitations under the License. -COPYRIGHT="Copyright © 2019 Province of British Columbia" +COPYRIGHT="Copyright © 2024 Province of British Columbia" RET=0 for file in $(find $@ -not \( -path */venv -prune \) -not \( -path */migrations -prune \) -not \( -path */tests -prune \) -not \( -path */.egg* -prune \) -name \*.py) diff --git a/pay-api/setup.cfg b/pay-api/setup.cfg index 4a29f38b9..ccbd8d7ce 100755 --- a/pay-api/setup.cfg +++ b/pay-api/setup.cfg @@ -9,7 +9,7 @@ classifiers = Topic :: Payment License :: OSI Approved :: Apache Software License Natural Language :: English - Programming Language :: Python :: 3.7 + Programming Language :: Python :: 3.12 license = Apache Software License Version 2.0 description = A short description of the project long_description = file: README.md diff --git a/pay-api/setup.py b/pay-api/setup.py index 9f0ddb399..59919617f 100755 --- a/pay-api/setup.py +++ b/pay-api/setup.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia. +# Copyright © 2024 Province of British Columbia. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/__init__.py b/pay-api/src/pay_api/__init__.py index 611fdcba2..950fd5e65 100755 --- a/pay-api/src/pay_api/__init__.py +++ b/pay-api/src/pay_api/__init__.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -36,6 +36,7 @@ from pay_api.utils.cache import cache from pay_api.utils.logging import setup_logging from pay_api.utils.run_version import get_run_version +from .services.gcp_queue import queue setup_logging(os.path.join(_Config.PROJECT_ROOT, 'logging.conf')) @@ -48,6 +49,7 @@ def create_app(run_mode=os.getenv('DEPLOYMENT_ENV', 'production')): app.config.from_object(config.CONFIGURATION[run_mode]) flags.init_app(app) + queue.init_app(app) db.init_app(app) queue.init_app(app) Migrate(app, db) diff --git a/pay-api/src/pay_api/config.py b/pay-api/src/pay_api/config.py index 408484a69..5d2593124 100755 --- a/pay-api/src/pay_api/config.py +++ b/pay-api/src/pay_api/config.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. @@ -132,14 +132,12 @@ class _Config: # pylint: disable=too-few-public-methods 'PAYBC_DIRECT_PAY_CC_REFUND_BASE_URL' ) - # GCP PubSub - AUDIENCE = os.getenv('AUDIENCE', None) - GCP_AUTH_KEY = os.getenv('GCP_AUTH_KEY', None) - PUBLISHER_AUDIENCE = os.getenv('PUBLISHER_AUDIENCE', 'https://pubsub.googleapis.com/google.pubsub.v1.Publisher') - ACCOUNT_MAILER_TOPIC = os.getenv('ACCOUNT_MAILER_TOPIC', None) - EVENT_LISTENER_TOPIC = os.getenv('EVENT_LISTENER_TOPIC', None) - NAMEX_PAY_TOPIC = os.getenv('NAMEX_PAY_TOPIC', None) - BUSINESS_PAY_TOPIC = os.getenv('BUSINESS_PAY_TOPIC', None) + # PUB/SUB - PUB: auth-event-dev, account-mailer-dev, business-pay-dev, namex-pay-dev + ACCOUNT_MAILER_TOPIC = os.getenv('ACCOUNT_MAILER_TOPIC', 'account-mailer-dev') + AUTH_EVENT_TOPIC = os.getenv('AUTH_EVENT_TOPIC', 'auth-event-dev') + BUSINESS_PAY_TOPIC = os.getenv('BUSINESS_PAY_TOPIC', 'business-pay-dev') + GCP_AUTH_KEY = os.getenv('AUTHPAY_GCP_AUTH_KEY', None) + NAMEX_PAY_TOPIC = os.getenv('NAMEX_PAY_TOPIC', 'namex-pay-dev') # API Endpoints AUTH_API_URL = os.getenv('AUTH_API_URL', '') diff --git a/pay-api/src/pay_api/exceptions/__init__.py b/pay-api/src/pay_api/exceptions/__init__.py index 03c47bcea..07dd45970 100755 --- a/pay-api/src/pay_api/exceptions/__init__.py +++ b/pay-api/src/pay_api/exceptions/__init__.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/factory/__init__.py b/pay-api/src/pay_api/factory/__init__.py index c24369f03..2f5095570 100644 --- a/pay-api/src/pay_api/factory/__init__.py +++ b/pay-api/src/pay_api/factory/__init__.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/factory/payment_system_factory.py b/pay-api/src/pay_api/factory/payment_system_factory.py index f5ffbb998..b9000b55f 100644 --- a/pay-api/src/pay_api/factory/payment_system_factory.py +++ b/pay-api/src/pay_api/factory/payment_system_factory.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/__init__.py b/pay-api/src/pay_api/models/__init__.py index 31ba7d754..c8f85920e 100755 --- a/pay-api/src/pay_api/models/__init__.py +++ b/pay-api/src/pay_api/models/__init__.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/account_fee.py b/pay-api/src/pay_api/models/account_fee.py index 7df2f5663..a23a340ef 100644 --- a/pay-api/src/pay_api/models/account_fee.py +++ b/pay-api/src/pay_api/models/account_fee.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/audit.py b/pay-api/src/pay_api/models/audit.py index 663ee514b..5845ac386 100644 --- a/pay-api/src/pay_api/models/audit.py +++ b/pay-api/src/pay_api/models/audit.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/base_model.py b/pay-api/src/pay_api/models/base_model.py index 22a10e467..7ad36bbac 100644 --- a/pay-api/src/pay_api/models/base_model.py +++ b/pay-api/src/pay_api/models/base_model.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/base_schema.py b/pay-api/src/pay_api/models/base_schema.py index e4255a85b..d628f1cb6 100644 --- a/pay-api/src/pay_api/models/base_schema.py +++ b/pay-api/src/pay_api/models/base_schema.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/cfs_account.py b/pay-api/src/pay_api/models/cfs_account.py index b16eb778b..2d13c78ac 100644 --- a/pay-api/src/pay_api/models/cfs_account.py +++ b/pay-api/src/pay_api/models/cfs_account.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/cfs_account_status_code.py b/pay-api/src/pay_api/models/cfs_account_status_code.py index 1507d6495..b13ba1a3c 100644 --- a/pay-api/src/pay_api/models/cfs_account_status_code.py +++ b/pay-api/src/pay_api/models/cfs_account_status_code.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/code_table.py b/pay-api/src/pay_api/models/code_table.py index aac84d3c1..9cb7afd11 100644 --- a/pay-api/src/pay_api/models/code_table.py +++ b/pay-api/src/pay_api/models/code_table.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/comment.py b/pay-api/src/pay_api/models/comment.py index eece02a87..1f57b9f43 100644 --- a/pay-api/src/pay_api/models/comment.py +++ b/pay-api/src/pay_api/models/comment.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/corp_type.py b/pay-api/src/pay_api/models/corp_type.py index 0174857b7..587e59cc5 100644 --- a/pay-api/src/pay_api/models/corp_type.py +++ b/pay-api/src/pay_api/models/corp_type.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/credit.py b/pay-api/src/pay_api/models/credit.py index 1b010b921..d604f1e3c 100644 --- a/pay-api/src/pay_api/models/credit.py +++ b/pay-api/src/pay_api/models/credit.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/db.py b/pay-api/src/pay_api/models/db.py index dee2fa81c..9ee95c8fd 100755 --- a/pay-api/src/pay_api/models/db.py +++ b/pay-api/src/pay_api/models/db.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/disbursement_status_code.py b/pay-api/src/pay_api/models/disbursement_status_code.py index 7ffb5720c..bed1297e1 100644 --- a/pay-api/src/pay_api/models/disbursement_status_code.py +++ b/pay-api/src/pay_api/models/disbursement_status_code.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/ejv_file.py b/pay-api/src/pay_api/models/ejv_file.py index d0f5b4343..7c44c6d8e 100644 --- a/pay-api/src/pay_api/models/ejv_file.py +++ b/pay-api/src/pay_api/models/ejv_file.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/ejv_header.py b/pay-api/src/pay_api/models/ejv_header.py index aa514e4f8..c6fe07fa1 100644 --- a/pay-api/src/pay_api/models/ejv_header.py +++ b/pay-api/src/pay_api/models/ejv_header.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/ejv_link.py b/pay-api/src/pay_api/models/ejv_link.py index 4055df51d..210803a5a 100644 --- a/pay-api/src/pay_api/models/ejv_link.py +++ b/pay-api/src/pay_api/models/ejv_link.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/error_code.py b/pay-api/src/pay_api/models/error_code.py index c0190cbb7..630f0d32d 100644 --- a/pay-api/src/pay_api/models/error_code.py +++ b/pay-api/src/pay_api/models/error_code.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/fee_code.py b/pay-api/src/pay_api/models/fee_code.py index b0992c696..5c5854173 100644 --- a/pay-api/src/pay_api/models/fee_code.py +++ b/pay-api/src/pay_api/models/fee_code.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/fee_schedule.py b/pay-api/src/pay_api/models/fee_schedule.py index 70686b08f..044cc567a 100644 --- a/pay-api/src/pay_api/models/fee_schedule.py +++ b/pay-api/src/pay_api/models/fee_schedule.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/filing_type.py b/pay-api/src/pay_api/models/filing_type.py index 08f45fb84..08d8c010a 100644 --- a/pay-api/src/pay_api/models/filing_type.py +++ b/pay-api/src/pay_api/models/filing_type.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/invoice.py b/pay-api/src/pay_api/models/invoice.py index cdafa08bb..1627d5fd4 100644 --- a/pay-api/src/pay_api/models/invoice.py +++ b/pay-api/src/pay_api/models/invoice.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/invoice_batch.py b/pay-api/src/pay_api/models/invoice_batch.py index 7d769dc11..27ee84d97 100644 --- a/pay-api/src/pay_api/models/invoice_batch.py +++ b/pay-api/src/pay_api/models/invoice_batch.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/invoice_batch_link.py b/pay-api/src/pay_api/models/invoice_batch_link.py index 2c1451d6b..111a62bcc 100644 --- a/pay-api/src/pay_api/models/invoice_batch_link.py +++ b/pay-api/src/pay_api/models/invoice_batch_link.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/invoice_reference.py b/pay-api/src/pay_api/models/invoice_reference.py index fcfb903ca..dd2f8747c 100644 --- a/pay-api/src/pay_api/models/invoice_reference.py +++ b/pay-api/src/pay_api/models/invoice_reference.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/invoice_reference_status_code.py b/pay-api/src/pay_api/models/invoice_reference_status_code.py index ea707dd5e..998ae5892 100644 --- a/pay-api/src/pay_api/models/invoice_reference_status_code.py +++ b/pay-api/src/pay_api/models/invoice_reference_status_code.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/invoice_status_code.py b/pay-api/src/pay_api/models/invoice_status_code.py index ce92ef38c..696fa15d3 100644 --- a/pay-api/src/pay_api/models/invoice_status_code.py +++ b/pay-api/src/pay_api/models/invoice_status_code.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/line_item_status_code.py b/pay-api/src/pay_api/models/line_item_status_code.py index 4f7d86690..5fe9ea968 100644 --- a/pay-api/src/pay_api/models/line_item_status_code.py +++ b/pay-api/src/pay_api/models/line_item_status_code.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/non_sufficient_funds.py b/pay-api/src/pay_api/models/non_sufficient_funds.py index deb5169ef..21dc9bd13 100644 --- a/pay-api/src/pay_api/models/non_sufficient_funds.py +++ b/pay-api/src/pay_api/models/non_sufficient_funds.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/notification_status_code.py b/pay-api/src/pay_api/models/notification_status_code.py index 856ae0aa6..b86942693 100644 --- a/pay-api/src/pay_api/models/notification_status_code.py +++ b/pay-api/src/pay_api/models/notification_status_code.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/payment.py b/pay-api/src/pay_api/models/payment.py index be3c35823..fc996bc5b 100644 --- a/pay-api/src/pay_api/models/payment.py +++ b/pay-api/src/pay_api/models/payment.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/payment_account.py b/pay-api/src/pay_api/models/payment_account.py index 3e2b7b72a..46bbc179f 100644 --- a/pay-api/src/pay_api/models/payment_account.py +++ b/pay-api/src/pay_api/models/payment_account.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/payment_line_item.py b/pay-api/src/pay_api/models/payment_line_item.py index 85a5acfd7..62635f4a5 100644 --- a/pay-api/src/pay_api/models/payment_line_item.py +++ b/pay-api/src/pay_api/models/payment_line_item.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/payment_method.py b/pay-api/src/pay_api/models/payment_method.py index 8f77ef949..ed9b4edb7 100644 --- a/pay-api/src/pay_api/models/payment_method.py +++ b/pay-api/src/pay_api/models/payment_method.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/payment_status_code.py b/pay-api/src/pay_api/models/payment_status_code.py index 6fcf9da34..bb4f92378 100644 --- a/pay-api/src/pay_api/models/payment_status_code.py +++ b/pay-api/src/pay_api/models/payment_status_code.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/payment_system.py b/pay-api/src/pay_api/models/payment_system.py index dd6f29074..91a0ab6b7 100644 --- a/pay-api/src/pay_api/models/payment_system.py +++ b/pay-api/src/pay_api/models/payment_system.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/payment_transaction.py b/pay-api/src/pay_api/models/payment_transaction.py index ea1877c14..0e38d3966 100644 --- a/pay-api/src/pay_api/models/payment_transaction.py +++ b/pay-api/src/pay_api/models/payment_transaction.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/receipt.py b/pay-api/src/pay_api/models/receipt.py index 91b3faa27..a9f617f94 100644 --- a/pay-api/src/pay_api/models/receipt.py +++ b/pay-api/src/pay_api/models/receipt.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/refund.py b/pay-api/src/pay_api/models/refund.py index c8db6e5ce..bba73faed 100644 --- a/pay-api/src/pay_api/models/refund.py +++ b/pay-api/src/pay_api/models/refund.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/routing_slip.py b/pay-api/src/pay_api/models/routing_slip.py index 8a5cd062c..a6c3163fe 100644 --- a/pay-api/src/pay_api/models/routing_slip.py +++ b/pay-api/src/pay_api/models/routing_slip.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/routing_slip_status_code.py b/pay-api/src/pay_api/models/routing_slip_status_code.py index f1ae33e70..9f7273aed 100644 --- a/pay-api/src/pay_api/models/routing_slip_status_code.py +++ b/pay-api/src/pay_api/models/routing_slip_status_code.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/statement.py b/pay-api/src/pay_api/models/statement.py index 422bf1ffd..6899525bd 100644 --- a/pay-api/src/pay_api/models/statement.py +++ b/pay-api/src/pay_api/models/statement.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/statement_invoices.py b/pay-api/src/pay_api/models/statement_invoices.py index 5dea45eec..92060cb53 100644 --- a/pay-api/src/pay_api/models/statement_invoices.py +++ b/pay-api/src/pay_api/models/statement_invoices.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/statement_recipients.py b/pay-api/src/pay_api/models/statement_recipients.py index 5a89f4a4b..531fffd62 100644 --- a/pay-api/src/pay_api/models/statement_recipients.py +++ b/pay-api/src/pay_api/models/statement_recipients.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/statement_settings.py b/pay-api/src/pay_api/models/statement_settings.py index 3b4eacbbd..325b31b80 100644 --- a/pay-api/src/pay_api/models/statement_settings.py +++ b/pay-api/src/pay_api/models/statement_settings.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/models/transaction_status_code.py b/pay-api/src/pay_api/models/transaction_status_code.py index c42128c72..615a1c9ae 100644 --- a/pay-api/src/pay_api/models/transaction_status_code.py +++ b/pay-api/src/pay_api/models/transaction_status_code.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/resources/__init__.py b/pay-api/src/pay_api/resources/__init__.py index b9e0dcbb5..13c649a27 100644 --- a/pay-api/src/pay_api/resources/__init__.py +++ b/pay-api/src/pay_api/resources/__init__.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/resources/ops.py b/pay-api/src/pay_api/resources/ops.py index 2926fa831..c399771a1 100755 --- a/pay-api/src/pay_api/resources/ops.py +++ b/pay-api/src/pay_api/resources/ops.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/resources/v1/account.py b/pay-api/src/pay_api/resources/v1/account.py index 097a638ae..ad54e40ea 100644 --- a/pay-api/src/pay_api/resources/v1/account.py +++ b/pay-api/src/pay_api/resources/v1/account.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/resources/v1/account_statements.py b/pay-api/src/pay_api/resources/v1/account_statements.py index 32a348c61..8559819d7 100644 --- a/pay-api/src/pay_api/resources/v1/account_statements.py +++ b/pay-api/src/pay_api/resources/v1/account_statements.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/resources/v1/account_statements_notifications.py b/pay-api/src/pay_api/resources/v1/account_statements_notifications.py index 59beb51af..0c8dba6ef 100644 --- a/pay-api/src/pay_api/resources/v1/account_statements_notifications.py +++ b/pay-api/src/pay_api/resources/v1/account_statements_notifications.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/resources/v1/account_statements_settings.py b/pay-api/src/pay_api/resources/v1/account_statements_settings.py index e1f4b42e7..60cdc4335 100644 --- a/pay-api/src/pay_api/resources/v1/account_statements_settings.py +++ b/pay-api/src/pay_api/resources/v1/account_statements_settings.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/resources/v1/bank_accounts.py b/pay-api/src/pay_api/resources/v1/bank_accounts.py index 9398164e8..2783c5855 100644 --- a/pay-api/src/pay_api/resources/v1/bank_accounts.py +++ b/pay-api/src/pay_api/resources/v1/bank_accounts.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/resources/v1/code.py b/pay-api/src/pay_api/resources/v1/code.py index d1f3d64d6..a578bd1e8 100644 --- a/pay-api/src/pay_api/resources/v1/code.py +++ b/pay-api/src/pay_api/resources/v1/code.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/resources/v1/distributions.py b/pay-api/src/pay_api/resources/v1/distributions.py index 42e5b7b75..3f9c1a94b 100644 --- a/pay-api/src/pay_api/resources/v1/distributions.py +++ b/pay-api/src/pay_api/resources/v1/distributions.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/resources/v1/fas/__init__.py b/pay-api/src/pay_api/resources/v1/fas/__init__.py index 7ec3a8f2d..d248d9f54 100644 --- a/pay-api/src/pay_api/resources/v1/fas/__init__.py +++ b/pay-api/src/pay_api/resources/v1/fas/__init__.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/resources/v1/fas/refund.py b/pay-api/src/pay_api/resources/v1/fas/refund.py index 78e098f32..b6ca9cd39 100644 --- a/pay-api/src/pay_api/resources/v1/fas/refund.py +++ b/pay-api/src/pay_api/resources/v1/fas/refund.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/resources/v1/fas/routing_slip.py b/pay-api/src/pay_api/resources/v1/fas/routing_slip.py index aab02d8be..f8311e8f5 100644 --- a/pay-api/src/pay_api/resources/v1/fas/routing_slip.py +++ b/pay-api/src/pay_api/resources/v1/fas/routing_slip.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -190,6 +190,7 @@ def get_routing_slip_comments(routing_slip_number: str): def post_routing_slip_comment(routing_slip_number: str): """Create comment for a slip.""" current_app.logger.info(' InvoiceReference: """Return a static invoice number for direct pay.""" current_app.logger.debug(' PaymentAccount: pay_account.save() pa_service = cls.find_by_id(pay_account.id) if not already_has_eft_enabled: - payload = pa_service.create_account_event_payload(MessageType.EFT_AVAILABLE_NOTIFICATION.value) - pa_service._publish_queue_message(payload, MessageType.EFT_AVAILABLE_NOTIFICATION.value) + payload = pa_service.create_account_event_payload(QueueMessageTypes.EFT_AVAILABLE_NOTIFICATION.value) + pa_service._publish_queue_message(payload, QueueMessageTypes.EFT_AVAILABLE_NOTIFICATION.value) return pa_service diff --git a/pay-api/src/pay_api/services/payment_line_item.py b/pay-api/src/pay_api/services/payment_line_item.py index 6c3b36d4f..9098efd7f 100644 --- a/pay-api/src/pay_api/services/payment_line_item.py +++ b/pay-api/src/pay_api/services/payment_line_item.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/services/payment_service.py b/pay-api/src/pay_api/services/payment_service.py index 6da906950..feecefa92 100644 --- a/pay-api/src/pay_api/services/payment_service.py +++ b/pay-api/src/pay_api/services/payment_service.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/services/payment_transaction.py b/pay-api/src/pay_api/services/payment_transaction.py index d93b02079..bfd19f6db 100644 --- a/pay-api/src/pay_api/services/payment_transaction.py +++ b/pay-api/src/pay_api/services/payment_transaction.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. @@ -23,6 +23,8 @@ import humps from flask import current_app from sentry_sdk import capture_message +from sbc_common_components.utils.dataclasses import PaymentToken +from sbc_common_components.utils.enums import QueueMessageTypes from pay_api.exceptions import BusinessException, ServiceUnavailableException from pay_api.factory.payment_system_factory import PaymentSystemFactory @@ -36,7 +38,7 @@ from pay_api.services.payment_account import PaymentAccount from pay_api.services.receipt import Receipt from pay_api.utils.enums import ( - InvoiceReferenceStatus, InvoiceStatus, MessageType, PaymentMethod, PaymentStatus, QueueSources, TransactionStatus) + InvoiceReferenceStatus, InvoiceStatus, PaymentMethod, PaymentStatus, QueueSources, TransactionStatus) from pay_api.utils.errors import Error from pay_api.utils.util import get_topic_for_corp_type, is_valid_redirect_url @@ -511,7 +513,7 @@ def publish_status(transaction_dao: PaymentTransactionModel, invoice: Invoice): gcp_queue_publisher.publish_to_queue( QueueMessage( source=QueueSources.PAY_API.value, - message_type=MessageType.PAYMENT.value, + message_type=QueueMessageTypes.PAYMENT.value, payload=PaymentTransaction.create_event_payload(invoice, status_code), topic=get_topic_for_corp_type(invoice.corp_type_code) ) diff --git a/pay-api/src/pay_api/services/receipt.py b/pay-api/src/pay_api/services/receipt.py index 3cc5a108e..7d1312de0 100644 --- a/pay-api/src/pay_api/services/receipt.py +++ b/pay-api/src/pay_api/services/receipt.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/services/refund.py b/pay-api/src/pay_api/services/refund.py index d0d21b8e7..3fc23d9c3 100644 --- a/pay-api/src/pay_api/services/refund.py +++ b/pay-api/src/pay_api/services/refund.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/services/statement.py b/pay-api/src/pay_api/services/statement.py index 5a23b00c5..ab0f9e77f 100644 --- a/pay-api/src/pay_api/services/statement.py +++ b/pay-api/src/pay_api/services/statement.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/services/statement_recipients.py b/pay-api/src/pay_api/services/statement_recipients.py index 750577f68..8180cf7c7 100644 --- a/pay-api/src/pay_api/services/statement_recipients.py +++ b/pay-api/src/pay_api/services/statement_recipients.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/services/statement_settings.py b/pay-api/src/pay_api/services/statement_settings.py index 602c943ce..c233b96f3 100644 --- a/pay-api/src/pay_api/services/statement_settings.py +++ b/pay-api/src/pay_api/services/statement_settings.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/services/wire_service.py b/pay-api/src/pay_api/services/wire_service.py index 1d4d20d91..20bfa2333 100644 --- a/pay-api/src/pay_api/services/wire_service.py +++ b/pay-api/src/pay_api/services/wire_service.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/utils/__init__.py b/pay-api/src/pay_api/utils/__init__.py index 9b5291dad..8150902f6 100755 --- a/pay-api/src/pay_api/utils/__init__.py +++ b/pay-api/src/pay_api/utils/__init__.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/utils/auth.py b/pay-api/src/pay_api/utils/auth.py index c900a8ab7..19435fc86 100644 --- a/pay-api/src/pay_api/utils/auth.py +++ b/pay-api/src/pay_api/utils/auth.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/utils/cache.py b/pay-api/src/pay_api/utils/cache.py index c1011ca67..1f57a55cf 100644 --- a/pay-api/src/pay_api/utils/cache.py +++ b/pay-api/src/pay_api/utils/cache.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/utils/constants.py b/pay-api/src/pay_api/utils/constants.py index a01f3d7c2..657e5793a 100644 --- a/pay-api/src/pay_api/utils/constants.py +++ b/pay-api/src/pay_api/utils/constants.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/utils/enums.py b/pay-api/src/pay_api/utils/enums.py index 1437c2e02..7a91fd76a 100644 --- a/pay-api/src/pay_api/utils/enums.py +++ b/pay-api/src/pay_api/utils/enums.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. @@ -195,6 +195,9 @@ class CfsAccountStatus(Enum): class CorpType(Enum): """Corp Type.""" + BTR = 'BTR' + ESRA = 'ESRA' + MHR = 'MHR' NRO = 'NRO' PPR = 'PPR' VS = 'VS' @@ -216,6 +219,7 @@ class Product(Enum): """Product.""" BUSINESS = 'BUSINESS' + NRO = 'NRO' class RoutingSlipStatus(Enum): @@ -349,32 +353,6 @@ class EFTShortnameStatus(Enum): PENDING = 'PENDING' -class MessageType(Enum): - """Queue Event Types.""" - - EFT_AVAILABLE_NOTIFICATION = 'eftAvailableNotification' - PAD_PAYMENT_SUCCESS = 'PAD.PaymentSuccess' - PAD_ACCOUNT_CREATE = 'padAccountCreate' - NSF_LOCK_ACCOUNT = 'lockAccount' - NSF_UNLOCK_ACCOUNT = 'unlockAccount' - STATEMENT_NOTIFICATION = 'statementNotification' - STATEMENT_DUE_NOTIFICATION = 'statementDueNotification' - STATEMENT_REMINDER_NOTIFICATION = 'statementReminderNotification' - PAYMENT = 'payment' - EJV_FAILED = 'ejvFailed' - CAS_UPLOADED = 'casSettlementUploaded' - INCORPORATION = 'incorporationApplication' - REGISTRATION = 'registration' - CGI_ACK_RECEIVED = 'ACKReceived' - CGI_FEEDBACK_RECEIVED = 'FEEDBACKReceived' - EFT_FILE_UPLOADED = 'eftFileUploaded' - EFT_INVOICE_CREATED = 'eft.invoiceCreated' - PAD_INVOICE_CREATED = 'pad.invoiceCreated' - PAD_SETUP_FAILED = 'PadSetupFailed' - PAD_CONFIRMATION_PERIOD_OVER = 'confirmationPeriodOver' - ONLINE_BANKING_OUTSTANDING_INVOICE = 'ob.outstandingInvoice' - - class PaymentDetailsGlStatus(Enum): """Payment details GL status.""" diff --git a/pay-api/src/pay_api/utils/errors.py b/pay-api/src/pay_api/utils/errors.py index f8048e660..30a064df8 100644 --- a/pay-api/src/pay_api/utils/errors.py +++ b/pay-api/src/pay_api/utils/errors.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/utils/logging.py b/pay-api/src/pay_api/utils/logging.py index 8568f87dd..905300f5a 100755 --- a/pay-api/src/pay_api/utils/logging.py +++ b/pay-api/src/pay_api/utils/logging.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/utils/paybc_transaction_error_message.py b/pay-api/src/pay_api/utils/paybc_transaction_error_message.py index c93067cbb..73eb1b628 100644 --- a/pay-api/src/pay_api/utils/paybc_transaction_error_message.py +++ b/pay-api/src/pay_api/utils/paybc_transaction_error_message.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/utils/run_version.py b/pay-api/src/pay_api/utils/run_version.py index 41c42458b..f447beb71 100755 --- a/pay-api/src/pay_api/utils/run_version.py +++ b/pay-api/src/pay_api/utils/run_version.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/utils/user_context.py b/pay-api/src/pay_api/utils/user_context.py index 2719e323c..b31b5a813 100644 --- a/pay-api/src/pay_api/utils/user_context.py +++ b/pay-api/src/pay_api/utils/user_context.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. diff --git a/pay-api/src/pay_api/utils/util.py b/pay-api/src/pay_api/utils/util.py index a2640f985..631d31f8f 100755 --- a/pay-api/src/pay_api/utils/util.py +++ b/pay-api/src/pay_api/utils/util.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -28,9 +28,11 @@ from dpath import get as dpath_get from flask import current_app +from pay_api.services.code import Code as CodeService + from .constants import DT_SHORT_FORMAT from .converter import Converter -from .enums import CorpType, StatementFrequency +from .enums import Code, CorpType, Product, StatementFrequency def cors_preflight(methods: str = 'GET'): @@ -274,14 +276,12 @@ def cents_to_decimal(amount: int): def get_topic_for_corp_type(corp_type: str): """Return a topic to direct the queue message to.""" - match corp_type: - case CorpType.NRO.value: - return current_app.config.get('NAMEX_PAY_TOPIC') - # Unused for now, intentionally don't send a queue message for these. - case CorpType.PPR.value | CorpType.VS.value | CorpType.CSO.value: - return None - case _: - return current_app.config.get('BUSINESS_PAY_TOPIC') + if corp_type == CorpType.NRO.value: + return current_app.config.get('NAMEX_PAY_TOPIC') + product_code = CodeService.find_code_value_by_type_and_code(Code.CORP_TYPE.value, corp_type).get('product') + if product_code == Product.BUSINESS.value: + return current_app.config.get('BUSINESS_PAY_TOPIC') + return None def unstructure_schema_items(schema, items): diff --git a/pay-api/src/pay_api/version.py b/pay-api/src/pay_api/version.py index 7003370ab..f80e8c8d1 100644 --- a/pay-api/src/pay_api/version.py +++ b/pay-api/src/pay_api/version.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/__init__.py b/pay-api/tests/__init__.py index 5b2e2f73f..212195959 100755 --- a/pay-api/tests/__init__.py +++ b/pay-api/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/conftest.py b/pay-api/tests/conftest.py index 0e56f8990..e6b606c2e 100755 --- a/pay-api/tests/conftest.py +++ b/pay-api/tests/conftest.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -35,10 +35,27 @@ def app(): @pytest.fixture(autouse=True) -def mock_queue_publish(monkeypatch): - """Mock queue publish.""" - # TODO: so it can be used like this from gcp_queue_publisher import publish_to_queue - monkeypatch.setattr('pay_api.services.gcp_queue_publisher.publish_to_queue', lambda *args, **kwargs: None) +def mock_pub_sub_call(mocker): + """Mock pub sub call.""" + class Expando(object): + """Expando class.""" + + class PublisherMock: + """Publisher Mock.""" + + def __init__(self, *args, **kwargs): + def result(): + """Return true for mock.""" + return True + self.result = result + + def publish(self, *args, **kwargs): + """Publish mock.""" + ex = Expando() + ex.result = self.result + return ex + + mocker.patch('google.cloud.pubsub_v1.PublisherClient', PublisherMock) @pytest.fixture(scope='function') diff --git a/pay-api/tests/unit/__init__.py b/pay-api/tests/unit/__init__.py index d755f6a1d..65e08c540 100755 --- a/pay-api/tests/unit/__init__.py +++ b/pay-api/tests/unit/__init__.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/api/__init__.py b/pay-api/tests/unit/api/__init__.py index 02d5354ad..b8fd2aced 100755 --- a/pay-api/tests/unit/api/__init__.py +++ b/pay-api/tests/unit/api/__init__.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/api/fas/__init__.py b/pay-api/tests/unit/api/fas/__init__.py index 5bef134ec..c538a08a1 100644 --- a/pay-api/tests/unit/api/fas/__init__.py +++ b/pay-api/tests/unit/api/fas/__init__.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/api/fas/test_refund.py b/pay-api/tests/unit/api/fas/test_refund.py index 18cfc28f2..de9f3530f 100644 --- a/pay-api/tests/unit/api/fas/test_refund.py +++ b/pay-api/tests/unit/api/fas/test_refund.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/api/fas/test_routing_slip.py b/pay-api/tests/unit/api/fas/test_routing_slip.py index de829e550..64eab26fe 100755 --- a/pay-api/tests/unit/api/fas/test_routing_slip.py +++ b/pay-api/tests/unit/api/fas/test_routing_slip.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/api/test_account.py b/pay-api/tests/unit/api/test_account.py index d417df26b..0aeda1e47 100755 --- a/pay-api/tests/unit/api/test_account.py +++ b/pay-api/tests/unit/api/test_account.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/api/test_bank_accounts.py b/pay-api/tests/unit/api/test_bank_accounts.py index ee49c5145..ccab4f65b 100755 --- a/pay-api/tests/unit/api/test_bank_accounts.py +++ b/pay-api/tests/unit/api/test_bank_accounts.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/api/test_code.py b/pay-api/tests/unit/api/test_code.py index e8d1020a2..5006fce95 100755 --- a/pay-api/tests/unit/api/test_code.py +++ b/pay-api/tests/unit/api/test_code.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/api/test_distributions.py b/pay-api/tests/unit/api/test_distributions.py index 2b3f0d799..7e2b08673 100755 --- a/pay-api/tests/unit/api/test_distributions.py +++ b/pay-api/tests/unit/api/test_distributions.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/api/test_fee.py b/pay-api/tests/unit/api/test_fee.py index 594aaa503..f8cd3928e 100755 --- a/pay-api/tests/unit/api/test_fee.py +++ b/pay-api/tests/unit/api/test_fee.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/api/test_fee_schedule.py b/pay-api/tests/unit/api/test_fee_schedule.py index 704517346..c6bc5638b 100755 --- a/pay-api/tests/unit/api/test_fee_schedule.py +++ b/pay-api/tests/unit/api/test_fee_schedule.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/api/test_invoice.py b/pay-api/tests/unit/api/test_invoice.py index a8fbe8d6a..253cb3fe7 100755 --- a/pay-api/tests/unit/api/test_invoice.py +++ b/pay-api/tests/unit/api/test_invoice.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/api/test_meta.py b/pay-api/tests/unit/api/test_meta.py index 52df42ed2..02757760d 100755 --- a/pay-api/tests/unit/api/test_meta.py +++ b/pay-api/tests/unit/api/test_meta.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/api/test_non_sufficient_funds.py b/pay-api/tests/unit/api/test_non_sufficient_funds.py index 74dad35f0..ba7638669 100644 --- a/pay-api/tests/unit/api/test_non_sufficient_funds.py +++ b/pay-api/tests/unit/api/test_non_sufficient_funds.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/api/test_ops.py b/pay-api/tests/unit/api/test_ops.py index ca4473f74..c081b9aa5 100755 --- a/pay-api/tests/unit/api/test_ops.py +++ b/pay-api/tests/unit/api/test_ops.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/api/test_payment.py b/pay-api/tests/unit/api/test_payment.py index 7aceb0dac..114125990 100755 --- a/pay-api/tests/unit/api/test_payment.py +++ b/pay-api/tests/unit/api/test_payment.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/api/test_payment_request.py b/pay-api/tests/unit/api/test_payment_request.py index b7348b6e5..aa06aa51f 100755 --- a/pay-api/tests/unit/api/test_payment_request.py +++ b/pay-api/tests/unit/api/test_payment_request.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/api/test_receipt.py b/pay-api/tests/unit/api/test_receipt.py index f4ad0a0ee..a5ba50b64 100644 --- a/pay-api/tests/unit/api/test_receipt.py +++ b/pay-api/tests/unit/api/test_receipt.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/api/test_refund.py b/pay-api/tests/unit/api/test_refund.py index 69b15993c..d92c23bb1 100644 --- a/pay-api/tests/unit/api/test_refund.py +++ b/pay-api/tests/unit/api/test_refund.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/api/test_statement.py b/pay-api/tests/unit/api/test_statement.py index f29c80eb1..d8e7463c6 100755 --- a/pay-api/tests/unit/api/test_statement.py +++ b/pay-api/tests/unit/api/test_statement.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/api/test_statement_settings.py b/pay-api/tests/unit/api/test_statement_settings.py index 3bacd7f0c..83c6bc3df 100755 --- a/pay-api/tests/unit/api/test_statement_settings.py +++ b/pay-api/tests/unit/api/test_statement_settings.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/api/test_transaction.py b/pay-api/tests/unit/api/test_transaction.py index f1315518a..3d2a83d04 100755 --- a/pay-api/tests/unit/api/test_transaction.py +++ b/pay-api/tests/unit/api/test_transaction.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/conf/__init__.py b/pay-api/tests/unit/conf/__init__.py index 47a9b4f52..e369ad9a8 100755 --- a/pay-api/tests/unit/conf/__init__.py +++ b/pay-api/tests/unit/conf/__init__.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/conf/test_configuration.py b/pay-api/tests/unit/conf/test_configuration.py index fe7515de9..4e3dcf323 100755 --- a/pay-api/tests/unit/conf/test_configuration.py +++ b/pay-api/tests/unit/conf/test_configuration.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia. +# Copyright © 2024 Province of British Columbia. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/conf/test_version.py b/pay-api/tests/unit/conf/test_version.py index c21d371ee..9e6571073 100755 --- a/pay-api/tests/unit/conf/test_version.py +++ b/pay-api/tests/unit/conf/test_version.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/factory/__init__.py b/pay-api/tests/unit/factory/__init__.py index 02d5354ad..b8fd2aced 100644 --- a/pay-api/tests/unit/factory/__init__.py +++ b/pay-api/tests/unit/factory/__init__.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/factory/test_payment_system_factory.py b/pay-api/tests/unit/factory/test_payment_system_factory.py index 3e52c2b4f..932b56394 100644 --- a/pay-api/tests/unit/factory/test_payment_system_factory.py +++ b/pay-api/tests/unit/factory/test_payment_system_factory.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/models/__init__.py b/pay-api/tests/unit/models/__init__.py index 4a0c382d6..c0d5410ee 100755 --- a/pay-api/tests/unit/models/__init__.py +++ b/pay-api/tests/unit/models/__init__.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/models/test_comment.py b/pay-api/tests/unit/models/test_comment.py index 8cd96b28d..26694f80b 100644 --- a/pay-api/tests/unit/models/test_comment.py +++ b/pay-api/tests/unit/models/test_comment.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/models/test_corp_type.py b/pay-api/tests/unit/models/test_corp_type.py index 1a90df909..5541b42ce 100644 --- a/pay-api/tests/unit/models/test_corp_type.py +++ b/pay-api/tests/unit/models/test_corp_type.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/models/test_fee_code.py b/pay-api/tests/unit/models/test_fee_code.py index 82a75f1e3..d3bed9c4b 100644 --- a/pay-api/tests/unit/models/test_fee_code.py +++ b/pay-api/tests/unit/models/test_fee_code.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/models/test_fee_schedule.py b/pay-api/tests/unit/models/test_fee_schedule.py index 89d7b43fb..b23f934fe 100644 --- a/pay-api/tests/unit/models/test_fee_schedule.py +++ b/pay-api/tests/unit/models/test_fee_schedule.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/models/test_filing_type.py b/pay-api/tests/unit/models/test_filing_type.py index f5cc35831..608a77240 100644 --- a/pay-api/tests/unit/models/test_filing_type.py +++ b/pay-api/tests/unit/models/test_filing_type.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/models/test_invoice.py b/pay-api/tests/unit/models/test_invoice.py index 3b2e999c4..4878a3799 100644 --- a/pay-api/tests/unit/models/test_invoice.py +++ b/pay-api/tests/unit/models/test_invoice.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/models/test_non_sufficient_funds.py b/pay-api/tests/unit/models/test_non_sufficient_funds.py index 8f88ce59f..6782ec2b1 100644 --- a/pay-api/tests/unit/models/test_non_sufficient_funds.py +++ b/pay-api/tests/unit/models/test_non_sufficient_funds.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/models/test_payment.py b/pay-api/tests/unit/models/test_payment.py index fde0ebfe4..e3b474096 100644 --- a/pay-api/tests/unit/models/test_payment.py +++ b/pay-api/tests/unit/models/test_payment.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/models/test_payment_account.py b/pay-api/tests/unit/models/test_payment_account.py index 0e6b35724..9dd064c5e 100644 --- a/pay-api/tests/unit/models/test_payment_account.py +++ b/pay-api/tests/unit/models/test_payment_account.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/models/test_payment_method.py b/pay-api/tests/unit/models/test_payment_method.py index e3042161e..5c6009315 100644 --- a/pay-api/tests/unit/models/test_payment_method.py +++ b/pay-api/tests/unit/models/test_payment_method.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/models/test_payment_system.py b/pay-api/tests/unit/models/test_payment_system.py index e5095f2d9..7e12a68ff 100644 --- a/pay-api/tests/unit/models/test_payment_system.py +++ b/pay-api/tests/unit/models/test_payment_system.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/models/test_payment_transaction.py b/pay-api/tests/unit/models/test_payment_transaction.py index 4ad738bef..b14788a11 100644 --- a/pay-api/tests/unit/models/test_payment_transaction.py +++ b/pay-api/tests/unit/models/test_payment_transaction.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/models/test_receipt.py b/pay-api/tests/unit/models/test_receipt.py index b04303dcb..9acf4b405 100644 --- a/pay-api/tests/unit/models/test_receipt.py +++ b/pay-api/tests/unit/models/test_receipt.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/models/test_routing_slip.py b/pay-api/tests/unit/models/test_routing_slip.py index 68943e440..e4aff84b2 100644 --- a/pay-api/tests/unit/models/test_routing_slip.py +++ b/pay-api/tests/unit/models/test_routing_slip.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/models/test_status_code.py b/pay-api/tests/unit/models/test_status_code.py index d67bf3b80..a85ec1ff2 100644 --- a/pay-api/tests/unit/models/test_status_code.py +++ b/pay-api/tests/unit/models/test_status_code.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/services/__init__.py b/pay-api/tests/unit/services/__init__.py index c467e0241..051177240 100755 --- a/pay-api/tests/unit/services/__init__.py +++ b/pay-api/tests/unit/services/__init__.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/services/test_auth.py b/pay-api/tests/unit/services/test_auth.py index d1ec39d9f..adba238fa 100644 --- a/pay-api/tests/unit/services/test_auth.py +++ b/pay-api/tests/unit/services/test_auth.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/services/test_bcol_service.py b/pay-api/tests/unit/services/test_bcol_service.py index 52cb3a044..c1f856950 100644 --- a/pay-api/tests/unit/services/test_bcol_service.py +++ b/pay-api/tests/unit/services/test_bcol_service.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/services/test_cfs_service.py b/pay-api/tests/unit/services/test_cfs_service.py index 94ab0d5b2..14c74377b 100644 --- a/pay-api/tests/unit/services/test_cfs_service.py +++ b/pay-api/tests/unit/services/test_cfs_service.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/services/test_code.py b/pay-api/tests/unit/services/test_code.py index 165838cb5..5232be98c 100644 --- a/pay-api/tests/unit/services/test_code.py +++ b/pay-api/tests/unit/services/test_code.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/services/test_comment.py b/pay-api/tests/unit/services/test_comment.py index 17beae748..e8bd43232 100644 --- a/pay-api/tests/unit/services/test_comment.py +++ b/pay-api/tests/unit/services/test_comment.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/services/test_distribution_code.py b/pay-api/tests/unit/services/test_distribution_code.py index 26dd69c5c..d4bcad620 100644 --- a/pay-api/tests/unit/services/test_distribution_code.py +++ b/pay-api/tests/unit/services/test_distribution_code.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/services/test_eft_service.py b/pay-api/tests/unit/services/test_eft_service.py index b3382b78f..c236f925d 100644 --- a/pay-api/tests/unit/services/test_eft_service.py +++ b/pay-api/tests/unit/services/test_eft_service.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/services/test_fee_schedule.py b/pay-api/tests/unit/services/test_fee_schedule.py index a0a8307a9..aed929a34 100644 --- a/pay-api/tests/unit/services/test_fee_schedule.py +++ b/pay-api/tests/unit/services/test_fee_schedule.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/services/test_flags.py b/pay-api/tests/unit/services/test_flags.py index f1259206c..b59a11aba 100644 --- a/pay-api/tests/unit/services/test_flags.py +++ b/pay-api/tests/unit/services/test_flags.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/services/test_gcp_queue.py b/pay-api/tests/unit/services/test_gcp_queue.py index 6b293f1b5..8ded5facb 100644 --- a/pay-api/tests/unit/services/test_gcp_queue.py +++ b/pay-api/tests/unit/services/test_gcp_queue.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -18,29 +18,27 @@ """ from unittest.mock import ANY, MagicMock, patch +from dataclasses import asdict +from dotenv import load_dotenv +from gcp_queue.gcp_queue import GcpQueue +import humps import pytest -from flask import Flask -from pay_api.services.gcp_queue.gcp_queue import GcpQueue +from pay_api import create_app +from pay_api.services import gcp_queue_publisher +from pay_api.services.payment_transaction import PaymentToken from pay_api.services.gcp_queue_publisher import QueueMessage, publish_to_queue +from pay_api.utils.enums import TransactionStatus -@pytest.fixture(autouse=True) -def setup(): - """Initialize app with test env for testing.""" - global app - app = Flask(__name__) - app.env = 'testing' - - -@pytest.fixture(autouse=True) +@pytest.fixture() def mock_publisher_client(): """Mock the PublisherClient used in GcpQueue.""" with patch('google.cloud.pubsub_v1.PublisherClient') as publisher: yield publisher.return_value -@pytest.fixture(autouse=True) +@pytest.fixture() def mock_credentials(): """Mock Credentials.""" with patch('google.auth.jwt.Credentials') as mock: @@ -48,7 +46,7 @@ def mock_credentials(): yield mock -def test_publish_to_queue_success(): +def test_publish_to_queue_success(app, mock_credentials, mock_publisher_client): """Test publishing to GCP PubSub Queue successfully.""" with patch.object(GcpQueue, 'publish') as mock_publisher: with app.app_context(): @@ -63,17 +61,34 @@ def test_publish_to_queue_success(): mock_publisher.assert_called_once_with('projects/project-id/topics/topic', ANY) -def test_publish_to_queue_no_topic(): +def test_publish_to_queue_no_topic(app, mock_credentials, mock_publisher_client): """Test that publish_to_queue does not publish if no topic is set.""" with patch.object(GcpQueue, 'publish') as mock_publisher: - with patch.object(Flask, 'logger') as logger: - with app.app_context(): - queue_message = QueueMessage( - source='test-source', - message_type='test-message-type', - payload={'key': 'value'}, - topic=None - ) - publish_to_queue(queue_message) - mock_publisher.publish.assert_not_called() - logger.info.assert_called_once_with('Skipping queue message topic not set.') + with app.app_context(): + queue_message = QueueMessage( + source='test-source', + message_type='test-message-type', + payload={'key': 'value'}, + topic=None + ) + publish_to_queue(queue_message) + mock_publisher.publish.assert_not_called() + + +@pytest.mark.skip(reason='ADHOC only test.') +def test_gcp_pubsub_connectivity(monkeypatch): + """Test that a queue can publish to gcp pubsub.""" + # We don't want any of the monkeypatches by the fixtures. + monkeypatch.undo() + load_dotenv('.env') + app_prod = create_app('production') + payload = humps.camelize(asdict(PaymentToken(55, TransactionStatus.COMPLETED.value, 55, 'NRO'))) + with app_prod.app_context(): + gcp_queue_publisher.publish_to_queue( + QueueMessage(source='test', message_type='bc.registry.payment', payload=payload, + topic=app_prod.config.get('NAMEX_PAY_TOPIC')) + ) + gcp_queue_publisher.publish_to_queue( + QueueMessage(source='test', message_type='test', payload={'key': 'value'}, + topic=app_prod.config.get('ACCOUNT_MAILER_TOPIC')) + ) diff --git a/pay-api/tests/unit/services/test_hashing_service.py b/pay-api/tests/unit/services/test_hashing_service.py index 97a390115..b65b2defe 100644 --- a/pay-api/tests/unit/services/test_hashing_service.py +++ b/pay-api/tests/unit/services/test_hashing_service.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/services/test_invoice.py b/pay-api/tests/unit/services/test_invoice.py index c0030af6e..1c97a686e 100644 --- a/pay-api/tests/unit/services/test_invoice.py +++ b/pay-api/tests/unit/services/test_invoice.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/services/test_invoice_reference.py b/pay-api/tests/unit/services/test_invoice_reference.py index 8d52fddda..3b34e3763 100644 --- a/pay-api/tests/unit/services/test_invoice_reference.py +++ b/pay-api/tests/unit/services/test_invoice_reference.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/services/test_non_sufficient_funds.py b/pay-api/tests/unit/services/test_non_sufficient_funds.py index 8f639fdd6..d10e33d31 100644 --- a/pay-api/tests/unit/services/test_non_sufficient_funds.py +++ b/pay-api/tests/unit/services/test_non_sufficient_funds.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/services/test_oauth_service.py b/pay-api/tests/unit/services/test_oauth_service.py index e1a35f197..a49473ec8 100644 --- a/pay-api/tests/unit/services/test_oauth_service.py +++ b/pay-api/tests/unit/services/test_oauth_service.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/services/test_pad_service.py b/pay-api/tests/unit/services/test_pad_service.py index 276b49938..99cf83071 100644 --- a/pay-api/tests/unit/services/test_pad_service.py +++ b/pay-api/tests/unit/services/test_pad_service.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/services/test_payment.py b/pay-api/tests/unit/services/test_payment.py index dbde1d521..ecdce80d0 100644 --- a/pay-api/tests/unit/services/test_payment.py +++ b/pay-api/tests/unit/services/test_payment.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/services/test_payment_account.py b/pay-api/tests/unit/services/test_payment_account.py index d6e465752..da1a626dd 100644 --- a/pay-api/tests/unit/services/test_payment_account.py +++ b/pay-api/tests/unit/services/test_payment_account.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/services/test_payment_line_item.py b/pay-api/tests/unit/services/test_payment_line_item.py index c5157f259..db802f04c 100644 --- a/pay-api/tests/unit/services/test_payment_line_item.py +++ b/pay-api/tests/unit/services/test_payment_line_item.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/services/test_payment_service.py b/pay-api/tests/unit/services/test_payment_service.py index 727842b62..be9483799 100644 --- a/pay-api/tests/unit/services/test_payment_service.py +++ b/pay-api/tests/unit/services/test_payment_service.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/services/test_payment_system_service.py b/pay-api/tests/unit/services/test_payment_system_service.py index b36490955..619c34ca8 100644 --- a/pay-api/tests/unit/services/test_payment_system_service.py +++ b/pay-api/tests/unit/services/test_payment_system_service.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/services/test_payment_transaction.py b/pay-api/tests/unit/services/test_payment_transaction.py index 52e9c3f22..2f6387be3 100644 --- a/pay-api/tests/unit/services/test_payment_transaction.py +++ b/pay-api/tests/unit/services/test_payment_transaction.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/services/test_receipt.py b/pay-api/tests/unit/services/test_receipt.py index 357aa0e35..688c9c8c0 100644 --- a/pay-api/tests/unit/services/test_receipt.py +++ b/pay-api/tests/unit/services/test_receipt.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/services/test_refund.py b/pay-api/tests/unit/services/test_refund.py index d28e305e1..a4a06986f 100644 --- a/pay-api/tests/unit/services/test_refund.py +++ b/pay-api/tests/unit/services/test_refund.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/services/test_routing_slip_service.py b/pay-api/tests/unit/services/test_routing_slip_service.py index f62c8ae16..ff283b40c 100644 --- a/pay-api/tests/unit/services/test_routing_slip_service.py +++ b/pay-api/tests/unit/services/test_routing_slip_service.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/services/test_statement.py b/pay-api/tests/unit/services/test_statement.py index 99239f168..5700ed97f 100644 --- a/pay-api/tests/unit/services/test_statement.py +++ b/pay-api/tests/unit/services/test_statement.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/services/test_statement_settings.py b/pay-api/tests/unit/services/test_statement_settings.py index fdabd32cb..c3dd9378d 100644 --- a/pay-api/tests/unit/services/test_statement_settings.py +++ b/pay-api/tests/unit/services/test_statement_settings.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/services/test_wire_service.py b/pay-api/tests/unit/services/test_wire_service.py index c7a5427a3..528234770 100644 --- a/pay-api/tests/unit/services/test_wire_service.py +++ b/pay-api/tests/unit/services/test_wire_service.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/utils/__init__.py b/pay-api/tests/unit/utils/__init__.py index a41ec6419..16727833c 100755 --- a/pay-api/tests/unit/utils/__init__.py +++ b/pay-api/tests/unit/utils/__init__.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/utils/test_error.py b/pay-api/tests/unit/utils/test_error.py index 1b93a07ac..f0dd7b189 100755 --- a/pay-api/tests/unit/utils/test_error.py +++ b/pay-api/tests/unit/utils/test_error.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/utils/test_logging.py b/pay-api/tests/unit/utils/test_logging.py index 81f8de9cc..0f07a8843 100755 --- a/pay-api/tests/unit/utils/test_logging.py +++ b/pay-api/tests/unit/utils/test_logging.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/utils/test_util.py b/pay-api/tests/unit/utils/test_util.py index f40af87a6..80aae8383 100644 --- a/pay-api/tests/unit/utils/test_util.py +++ b/pay-api/tests/unit/utils/test_util.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/unit/utils/test_util_cors.py b/pay-api/tests/unit/utils/test_util_cors.py index df4bbf050..fea00d6f8 100755 --- a/pay-api/tests/unit/utils/test_util_cors.py +++ b/pay-api/tests/unit/utils/test_util_cors.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/utilities/__init__.py b/pay-api/tests/utilities/__init__.py index eb431264d..af6a70494 100644 --- a/pay-api/tests/utilities/__init__.py +++ b/pay-api/tests/utilities/__init__.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/utilities/base_test.py b/pay-api/tests/utilities/base_test.py index 0c322bce6..adf30be69 100644 --- a/pay-api/tests/utilities/base_test.py +++ b/pay-api/tests/utilities/base_test.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/utilities/decorators.py b/pay-api/tests/utilities/decorators.py index 88deec93f..d6be57699 100644 --- a/pay-api/tests/utilities/decorators.py +++ b/pay-api/tests/utilities/decorators.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/tests/utilities/schema_assertions.py b/pay-api/tests/utilities/schema_assertions.py index 24d3d1f8e..55cd2e6b3 100755 --- a/pay-api/tests/utilities/schema_assertions.py +++ b/pay-api/tests/utilities/schema_assertions.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-api/wsgi.py b/pay-api/wsgi.py index d584bdf8a..7c25417b6 100755 --- a/pay-api/wsgi.py +++ b/pay-api/wsgi.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-queue/README.md b/pay-queue/README.md index b98948f78..f2709a676 100755 --- a/pay-queue/README.md +++ b/pay-queue/README.md @@ -3,11 +3,11 @@ # Application Name -BC Registries Payment Reconciliation Queue +BC Registries Pay Queue ## Technology Stack Used * Python, Flask -* Postgres - SQLAlchemy, psycopg2-binary & alembic +* Postgres - SQLAlchemy, psycopg2-binary, alembic & Google PUB/SUB ## License diff --git a/pay-queue/app.py b/pay-queue/app.py index dd7bd16a7..a1f9fdbe5 100755 --- a/pay-queue/app.py +++ b/pay-queue/app.py @@ -1,7 +1,7 @@ #!/usr/bin/env python # -*- coding: utf-8 -*- -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. @@ -14,13 +14,12 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""Provides the WSGI entry point for running the application.""" -import os +"""Initialize Flask app.""" +import os from pay_queue import create_app - app = create_app() if __name__ == '__main__': - server_port = os.environ.get('PORT', '8080') + server_port = os.environ.get('PORT', '5001') app.run(debug=False, port=server_port, host='0.0.0.0') diff --git a/pay-queue/devops/vaults.gcp.env b/pay-queue/devops/vaults.gcp.env index fa6f68780..ee10ddf5f 100644 --- a/pay-queue/devops/vaults.gcp.env +++ b/pay-queue/devops/vaults.gcp.env @@ -16,9 +16,8 @@ EFT_INVOICE_PREFIX="op://payment-external-services/$APP_ENV/eft/EFT_INVOICE_PREF AUDIENCE="op://gcp-queue/$APP_ENV/base/AUDIENCE" GCP_AUTH_KEY="op://gcp-queue/$APP_ENV/base/GCP_AUTH_KEY" PUBLISHER_AUDIENCE="op://gcp-queue/$APP_ENV/base/PUBLISHER_AUDIENCE" -PAY_SUB_AUDIENCE="op://gcp-queue/$APP_ENV/base/PAY_SUB_AUDIENCE" -VERIFY_PUBSUB_EMAIL="op://gcp-queue/$APP_ENV/base/VERIFY_PUBSUB_EMAIL" -VERIFY_PUBSUB_VIA_JWT="op://gcp-queue/$APP_ENV/base/VERIFY_PUBSUB_VIA_JWT" +PAY_AUDIENCE_SUB="op://gcp-queue/$APP_ENV/base/PAY_AUDIENCE_SUB" +VERIFY_PUBSUB_EMAILS="op://gcp-queue/$APP_ENV/base/VERIFY_PUBSUB_EMAILS" DEBUG_REQUEST="op://gcp-queue/$APP_ENV/base/DEBUG_REQUEST" ACCOUNT_MAILER_TOPIC="op://gcp-queue/$APP_ENV/topics/ACCOUNT_MAILER_TOPIC" SENTRY_ENABLE="op://sentry/$APP_ENV/relationship-api/SENTRY_ENABLE" @@ -26,4 +25,3 @@ SENTRY_DSN="op://sentry/$APP_ENV/relationship-api/SENTRY_DSN" LEGISLATIVE_TIMEZONE="op://relationship/$APP_ENV/pay-api/LEGISLATIVE_TIMEZONE" ACCOUNT_SECRET_KEY="op://relationship/$APP_ENV/pay-api/ACCOUNT_SECRET_KEY" DISABLE_EJV_ERROR_EMAIL="True" -DISABLE_PAD_SUCCESS_EMAIL="False" diff --git a/pay-queue/devops/vaults.json b/pay-queue/devops/vaults.json new file mode 100644 index 000000000..54912865c --- /dev/null +++ b/pay-queue/devops/vaults.json @@ -0,0 +1,58 @@ +[ + { + "vault": "shared", + "application": [ + "encryption-key" + ] + }, + { + "vault": "minio", + "application": [ + "base", + "pay-queue" + ] + }, + { + "vault": "gcp-queue", + "application": [ + "base", + "account-events-listener", + "account-mailer", + "payment", + "pay-queue" + ] + }, + { + "vault": "payment-external-services", + "application": [ + "cfs" + ] + }, + { + "vault": "relationship", + "application": [ + "postgres-pay" + ] + }, + { + "vault": "sentry", + "application": [ + "relationship-api" + ] + }, + { + "vault": "launchdarkly", + "application": [ + "pay" + ] + }, + { + "vault": "gcp-queue", + "application": [ + "a083gt", + "authpay", + "gtksf3", + "topics" + ] + } +] diff --git a/pay-queue/logging.conf b/pay-queue/logging.conf deleted file mode 100644 index ded5cb81c..000000000 --- a/pay-queue/logging.conf +++ /dev/null @@ -1,34 +0,0 @@ -[loggers] -keys=root,api,asyncio - -[handlers] -keys=console - -[formatters] -keys=simple - -[logger_root] -level=DEBUG -handlers=console - -[logger_asyncio] -level=DEBUG -handlers=console -qualname=asyncio -propagate=0 - -[logger_api] -level=DEBUG -handlers=console -qualname=api -propagate=0 - -[handler_console] -class=StreamHandler -level=DEBUG -formatter=simple -args=(sys.stdout,) - -[formatter_simple] -format=%(asctime)s - %(name)s - %(levelname)s in %(module)s:%(filename)s:%(lineno)d - %(funcName)s: %(message)s -datefmt= diff --git a/pay-queue/scripts/verify_license_headers.sh b/pay-queue/scripts/verify_license_headers.sh index 028b95c63..a160d3ac8 100755 --- a/pay-queue/scripts/verify_license_headers.sh +++ b/pay-queue/scripts/verify_license_headers.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -15,7 +15,7 @@ # limitations under the License. -COPYRIGHT="Copyright © 2019 Province of British Columbia" +COPYRIGHT="Copyright © 2024 Province of British Columbia" RET=0 for file in $(find $@ -not \( -path */venv -prune \) -not \( -path */migrations -prune \) -not \( -path */tests -prune \) -not \( -path */.egg* -prune \) -name \*.py) diff --git a/pay-queue/setup.cfg b/pay-queue/setup.cfg index a09beb534..a3d8c7414 100644 --- a/pay-queue/setup.cfg +++ b/pay-queue/setup.cfg @@ -1,6 +1,6 @@ [metadata] -name = pay-queue -url = https://github.com/bcgov/sbc-pay/pay-queue +name = pay_queue +url = https://github.com/bcgov/sbc-pay/ author = SBC Relationships team author_email = classifiers = @@ -22,7 +22,7 @@ include_package_data = True packages = find: [options.package_data] -reconciliations = +pay_queue = [wheel] universal = 1 @@ -34,6 +34,7 @@ universal = 1 test = pytest [flake8] +ignore = B902 exclude = .git,*migrations* max-line-length = 120 docstring-min-length=10 @@ -45,7 +46,7 @@ max_line_length = 120 ignore = E501 docstring-min-length=10 notes=FIXME,XXX # TODO is ignored -match_dir = src/reconciliations +match_dir = src/pay_queue ignored-modules=flask_sqlalchemy sqlalchemy per-file-ignores = diff --git a/pay-queue/setup.py b/pay-queue/setup.py index 31939e558..9bc1ac212 100644 --- a/pay-queue/setup.py +++ b/pay-queue/setup.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia. +# Copyright © 2024 Province of British Columbia. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -54,7 +54,7 @@ def read(filepath): REQUIREMENTS = read_requirements('requirements.txt') setup( - name="reconciliations", + name="pay_queue", version=version, author_email='', packages=find_packages('src'), diff --git a/pay-queue/src/pay_queue/__init__.py b/pay-queue/src/pay_queue/__init__.py index 01c2cf845..1fe3ebdcc 100644 --- a/pay-queue/src/pay_queue/__init__.py +++ b/pay-queue/src/pay_queue/__init__.py @@ -11,7 +11,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -"""The Reconciliations queue service. +"""The pay-queue service. The service worker for applying payments, receipts and account balance to payment system. """ @@ -23,21 +23,26 @@ from flask import Flask from pay_api.models import db from pay_api.services.flags import flags +from pay_api.services.gcp_queue import queue +from pay_api.utils.cache import cache +from pay_api.utils.logging import setup_logging from pay_api.utils.run_version import get_run_version from sentry_sdk.integrations.flask import FlaskIntegration -from pay_queue.config import CONFIGURATION +from pay_queue import config from pay_queue.version import __version__ from .resources import register_endpoints -from .services import queue + + +setup_logging(os.path.join(os.path.abspath(os.path.dirname(__file__)), 'logging.conf')) # important to do this first def create_app(run_mode=os.getenv('DEPLOYMENT_ENV', 'production')) -> Flask: """Return a configured Flask App using the Factory method.""" app = Flask(__name__) app.env = run_mode - app.config.from_object(CONFIGURATION[run_mode]) + app.config.from_object(config.CONFIGURATION[run_mode]) # Configure Sentry if dsn := app.config.get('SENTRY_DSN', None): @@ -48,10 +53,25 @@ def create_app(run_mode=os.getenv('DEPLOYMENT_ENV', 'production')) -> Flask: send_default_pii=False, ) + queue.init_app(app) flags.init_app(app) db.init_app(app) - queue.init_app(app) register_endpoints(app) + build_cache(app) return app + + +def build_cache(app): + """Build cache.""" + cache.init_app(app) + with app.app_context(): + cache.clear() + if not app.config.get('TESTING', False): + try: + from pay_api.services.code import Code as CodeService # pylint: disable=import-outside-toplevel + CodeService.build_all_codes_cache() + except Exception as e: # NOQA pylint:disable=broad-except + app.logger.error('Error on caching ') + app.logger.error(e) diff --git a/pay-queue/src/pay_queue/config.py b/pay-queue/src/pay_queue/config.py index cbceb71f4..1a284c1a5 100644 --- a/pay-queue/src/pay_queue/config.py +++ b/pay-queue/src/pay_queue/config.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the 'License'); # you may not use this file except in compliance with the License. @@ -51,7 +51,7 @@ def get_named_config(config_name: str = 'production'): return app_config -class _Config(): # pylint: disable=too-few-public-methods +class _Config(): # pylint: disable=too-few-public-methods,protected-access """Base class configuration that should set reasonable defaults. Used as the base for all the other configurations. @@ -99,19 +99,14 @@ class _Config(): # pylint: disable=too-few-public-methods # Disable EJV Error Email DISABLE_EJV_ERROR_EMAIL = os.getenv('DISABLE_EJV_ERROR_EMAIL', 'true').lower() == 'true' - # Disable PAD Success Email - Incase we need to reprocess records weeks/months later - DISABLE_PAD_SUCCESS_EMAIL = os.getenv('DISABLE_PAD_SUCCESS_EMAIL', 'false').lower() == 'true' - # GCP PubSub - AUDIENCE = os.getenv('AUDIENCE', None) - GCP_AUTH_KEY = os.getenv('GCP_AUTH_KEY', None) - PUBLISHER_AUDIENCE = os.getenv('PUBLISHER_AUDIENCE', None) - ACCOUNT_MAILER_TOPIC = os.getenv('ACCOUNT_MAILER_TOPIC', None) - PAY_SUB_AUDIENCE = os.getenv('PAY_SUB_AUDIENCE', None) - VERIFY_PUBSUB_EMAIL = os.getenv('VERIFY_PUBSUB_EMAIL', None) - - VERIFY_PUBSUB_VIA_JWT = os.getenv('VERIFY_PUBSUB_VIA_JWT', 'true').lower() == 'true' - VERIFY_PUBSUB_VIA_JWT = os.getenv('DEBUG_REQUEST', 'true').lower() == 'true' + # PUB/SUB - PUB: account-mailer-dev, auth-event-dev, SUB to ftp-poller-payment-reconciliation-dev, business-events + ACCOUNT_MAILER_TOPIC = os.getenv('ACCOUNT_MAILER_TOPIC', 'account-mailer-dev') + AUTH_EVENT_TOPIC = os.getenv('AUTH_EVENT_TOPIC', 'auth-event-dev') + GCP_AUTH_KEY = os.getenv('AUTHPAY_GCP_AUTH_KEY', None) + # If blank in PUBSUB, this should match the https endpoint the subscription is pushing to. + PAY_AUDIENCE_SUB = os.getenv('PAY_AUDIENCE_SUB', None) + VERIFY_PUBSUB_EMAILS = f'{os.getenv("AUTHPAY_SERVICE_ACCOUNT")},{os.getenv("BUSINESS_SERVICE_ACCOUNT")}'.split(',') class DevConfig(_Config): # pylint: disable=too-few-public-methods @@ -157,11 +152,13 @@ class TestConfig(_Config): # pylint: disable=too-few-public-methods ACCOUNT_SECRET_KEY = os.getenv('ACCOUNT_SECRET_KEY', 'test') # Secrets for integration tests - TEST_GCP_PROJECT_NAME = 'abdefg-dev' + TEST_GCP_PROJECT_NAME = 'pay-queue-dev' # Needs to have ftp-poller-dev in it. TEST_GCP_TOPICS = ['account-mailer-dev', 'ftp-poller-dev', 'business-identifier-update-pay-dev'] TEST_PUSH_ENDPOINT_PORT = 5020 TEST_PUSH_ENDPOINT = os.getenv('TEST_PUSH_ENDPOINT', f'http://host.docker.internal:{str(TEST_PUSH_ENDPOINT_PORT)}/') + GCP_AUTH_KEY = None + DISABLE_EJV_ERROR_EMAIL = False class ProdConfig(_Config): # pylint: disable=too-few-public-methods diff --git a/pay-queue/src/pay_queue/enums.py b/pay-queue/src/pay_queue/enums.py index cf16aabf2..f23c76288 100644 --- a/pay-queue/src/pay_queue/enums.py +++ b/pay-queue/src/pay_queue/enums.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-queue/src/pay_queue/external/__init__.py b/pay-queue/src/pay_queue/external/__init__.py new file mode 100644 index 000000000..de7538dc3 --- /dev/null +++ b/pay-queue/src/pay_queue/external/__init__.py @@ -0,0 +1,14 @@ +# Copyright © 2024 Province of British Columbia +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +"""External to gcp auth.""" diff --git a/pay-queue/src/pay_queue/external/gcp_auth.py b/pay-queue/src/pay_queue/external/gcp_auth.py index 31f575ac6..398b9ca5f 100644 --- a/pay-queue/src/pay_queue/external/gcp_auth.py +++ b/pay-queue/src/pay_queue/external/gcp_auth.py @@ -19,15 +19,16 @@ def verify_jwt(session): claims = id_token.verify_oauth2_token( jwt_token, Request(session=session), - audience=current_app.config.get('PAY_SUB_AUDIENCE') + audience=current_app.config.get('PAY_AUDIENCE_SUB') ) - # Check if the email is verified and matches the configured email - required_email = current_app.config.get('VERIFY_PUBSUB_EMAIL') - if not claims.get('email_verified') or claims.get('email') != required_email: + required_emails = current_app.config.get('VERIFY_PUBSUB_EMAILS') + if claims.get('email_verified') and claims.get('email') in required_emails: + return None + else: return 'Email not verified or does not match', 401 except Exception as e: + current_app.logger.info(f'Invalid token {e}') return f'Invalid token: {e}', 400 - return None def ensure_authorized_queue_user(f): @@ -35,12 +36,7 @@ def ensure_authorized_queue_user(f): @functools.wraps(f) def decorated_function(*args, **kwargs): # Use CacheControl to avoid re-fetching certificates for every request. - if current_app.config.get('DEBUG_REQUEST') is True: - current_app.logger.info(f'Headers: {request.headers}') - verifyJWT = current_app.config.get('VERIFY_PUBSUB_VIA_JWT', True) - current_app.logger.info(f'verifyJWT: {verifyJWT}') - if verifyJWT is True: - if message := verify_jwt(CacheControl(Session())): - abort(HTTPStatus.UNAUTHORIZED) + if verify_jwt(CacheControl(Session())): + abort(HTTPStatus.UNAUTHORIZED) return f(*args, **kwargs) return decorated_function diff --git a/pay-queue/src/pay_queue/minio.py b/pay-queue/src/pay_queue/minio.py index ad58ae8cd..d8e8f4eec 100644 --- a/pay-queue/src/pay_queue/minio.py +++ b/pay-queue/src/pay_queue/minio.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-queue/src/pay_queue/resources/worker.py b/pay-queue/src/pay_queue/resources/worker.py index d429ec693..aee57b242 100644 --- a/pay-queue/src/pay_queue/resources/worker.py +++ b/pay-queue/src/pay_queue/resources/worker.py @@ -12,13 +12,17 @@ # See the License for the specific language governing permissions and # limitations under the License. """Worker resource to handle incoming queue pushes from gcp.""" + +import dataclasses +import json from http import HTTPStatus -from flask import Blueprint, request -from pay_api.utils.enums import MessageType +from flask import Blueprint, current_app, request +from pay_api.services.gcp_queue_publisher import queue +from sbc_common_components.utils.enums import QueueMessageTypes from pay_queue.external.gcp_auth import ensure_authorized_queue_user -from pay_queue.services import queue, update_temporary_identifier +from pay_queue.services import update_temporary_identifier from pay_queue.services.cgi_reconciliations import reconcile_distributions from pay_queue.services.eft.eft_reconciliation import reconcile_eft_payments from pay_queue.services.payment_reconciliations import reconcile_payments @@ -31,22 +35,27 @@ @ensure_authorized_queue_user def worker(): """Worker to handle incoming queue pushes.""" - if not (ce := queue.get_simple_cloud_event(request)): - # Return a 200, so event is removed from the Queue + ce = queue.get_simple_cloud_event(request, wrapped=True) + if not ce: return {}, HTTPStatus.OK - match ce.type: - case MessageType.CAS_UPLOADED.value: + try: + current_app.logger.info('Event Message Received: %s ', json.dumps(dataclasses.asdict(ce))) + if ce.type == QueueMessageTypes.CAS_MESSAGE_TYPE.value: reconcile_payments(ce.data) - case MessageType.CGI_ACK_RECEIVED.value: + elif ce.type == QueueMessageTypes.CGI_ACK_MESSAGE_TYPE.value: reconcile_distributions(ce.data) - case MessageType.CGI_FEEDBACK_RECEIVED.value: + elif ce.type == QueueMessageTypes.CGI_FEEDBACK_MESSAGE_TYPE.value: reconcile_distributions(ce.data, is_feedback=True) - case MessageType.EFT_FILE_UPLOADED.value: + elif ce.type == QueueMessageTypes.EFT_FILE_UPLOADED.value: reconcile_eft_payments(ce.data) - case MessageType.INCORPORATION.value | MessageType.REGISTRATION.value: + elif ce.type in [QueueMessageTypes.INCORPORATION.value, QueueMessageTypes.REGISTRATION.value]: update_temporary_identifier(ce.data) - case _: + else: raise Exception('Invalid queue message type') # pylint: disable=broad-exception-raised - return {}, HTTPStatus.OK + return {}, HTTPStatus.OK + except Exception: # pylint: disable=broad-exception-caught + current_app.logger.error('Failed to process queue message: %s', HTTPStatus.INTERNAL_SERVER_ERROR) + # Optionally, return an error status code or message + return {}, HTTPStatus.OK diff --git a/pay-queue/src/pay_queue/services/__init__.py b/pay-queue/src/pay_queue/services/__init__.py index c86353543..45b466b91 100644 --- a/pay-queue/src/pay_queue/services/__init__.py +++ b/pay-queue/src/pay_queue/services/__init__.py @@ -33,9 +33,4 @@ # POSSIBILITY OF SUCH DAMAGE. """This module provides Queue type services.""" -from pay_api.services.gcp_queue import GcpQueue - from .identifier_updater import update_temporary_identifier - - -queue = GcpQueue() diff --git a/pay-queue/src/pay_queue/services/cgi_reconciliations.py b/pay-queue/src/pay_queue/services/cgi_reconciliations.py index 9926acb86..e47945b69 100644 --- a/pay-queue/src/pay_queue/services/cgi_reconciliations.py +++ b/pay-queue/src/pay_queue/services/cgi_reconciliations.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -32,7 +32,7 @@ from pay_api.services import gcp_queue_publisher from pay_api.services.gcp_queue_publisher import QueueMessage from pay_api.utils.enums import ( - DisbursementStatus, EjvFileType, EJVLinkType, InvoiceReferenceStatus, InvoiceStatus, MessageType, PaymentMethod, + DisbursementStatus, EjvFileType, EJVLinkType, InvoiceReferenceStatus, InvoiceStatus, PaymentMethod, PaymentStatus, PaymentSystem, QueueSources, RoutingSlipStatus) from sentry_sdk import capture_message @@ -90,25 +90,46 @@ def _update_acknowledgement(msg: Dict[str, any]): def _update_feedback(msg: Dict[str, any]): # pylint:disable=too-many-locals, too-many-statements # Read the file and find records from the database, and update status. + file_name: str = msg.get('fileName') minio_location: str = msg.get('location') file = get_object(minio_location, file_name) content = file.data.decode('utf-8-sig') group_batches: List[str] = _group_batches(content) - has_errors, already_processed = _process_ejv_feedback(group_batches['EJV'], file_name) - if not already_processed: - has_errors = _process_ap_feedback(group_batches['AP']) or has_errors + if _is_processed_or_processing(group_batches['EJV'], file_name): + return + + has_errors = _process_ejv_feedback(group_batches['EJV']) + has_errors = _process_ap_feedback(group_batches['AP']) or has_errors - if has_errors and not APP_CONFIG.DISABLE_EJV_ERROR_EMAIL: - _publish_mailer_events(file_name, minio_location) - current_app.logger.info('> update_feedback') + if has_errors and not APP_CONFIG.DISABLE_EJV_ERROR_EMAIL: + _publish_mailer_events(file_name, minio_location) + current_app.logger.info('Feedback file processing completed.') -def _process_ejv_feedback(group_batches, file_name) -> bool: # pylint:disable=too-many-locals +def _is_processed_or_processing(group_batches, file_name) -> bool: + """Check to see if file has already been processed. Mark them as processing.""" + for group_batch in group_batches: + ejv_file: Optional[EjvFileModel] = None + for line in group_batch.splitlines(): + is_batch_group: bool = line[2:4] == 'BG' + if is_batch_group: + batch_number = int(line[15:24]) + ejv_file = EjvFileModel.find_by_id(batch_number) + if ejv_file.feedback_file_ref: + current_app.logger.info( + 'EJV file id %s with feedback file %s is already processing or has been processed. Skipping.', + batch_number, file_name) + return True + ejv_file.feedback_file_ref = file_name + ejv_file.save() + return False + + +def _process_ejv_feedback(group_batches) -> bool: # pylint:disable=too-many-locals """Process EJV Feedback contents.""" has_errors = False - already_processed = False for group_batch in group_batches: ejv_file: Optional[EjvFileModel] = None receipt_number: Optional[str] = None @@ -121,13 +142,6 @@ def _process_ejv_feedback(group_batches, file_name) -> bool: # pylint:disable=t if is_batch_group: batch_number = int(line[15:24]) ejv_file = EjvFileModel.find_by_id(batch_number) - if ejv_file.feedback_file_ref: - current_app.logger.info( - 'EJV file id %s with feedback file %s has already been processed, skipping.', - batch_number, file_name) - already_processed = True - return has_errors, already_processed - ejv_file.feedback_file_ref = file_name elif is_batch_header: return_code = line[7:11] return_message = line[11:161] @@ -155,7 +169,7 @@ def _process_ejv_feedback(group_batches, file_name) -> bool: # pylint:disable=t has_errors = _process_jv_details_feedback(ejv_file, has_errors, line, receipt_number) db.session.commit() - return has_errors, already_processed + return has_errors def _process_jv_details_feedback(ejv_file, has_errors, line, receipt_number): # pylint:disable=too-many-locals @@ -174,6 +188,7 @@ def _process_jv_details_feedback(ejv_file, has_errors, line, receipt_number): # invoice_return_message = line[319:469] # If the JV process failed, then mark the GL code against the invoice to be stopped # for further JV process for the credit GL. + logger.info('Is Credit or Debit %s - %s', line[104:105], ejv_file.file_type) current_app.logger.info('Is Credit or Debit %s - %s', line[104:105], ejv_file.file_type) if line[104:105] == 'C' and ejv_file.file_type == EjvFileType.DISBURSEMENT.value: disbursement_status = _get_disbursement_status(invoice_return_code) @@ -251,7 +266,7 @@ def _fix_invoice_line(line): # Check for zeros within 300->315 range. Bump them over with spaces. if (zero_position := line[300:315].find('0')) > -1: spaces_to_insert = 15 - zero_position - return line[:300+zero_position] + (' ' * spaces_to_insert) + line[300+zero_position:] + return line[:300 + zero_position] + (' ' * spaces_to_insert) + line[300 + zero_position:] return line @@ -316,7 +331,7 @@ def _publish_mailer_events(file_name: str, minio_location: str): gcp_queue_publisher.publish_to_queue( QueueMessage( source=QueueSources.PAY_QUEUE.value, - message_type=MessageType.EJV_FAILED.value, + message_type=QueueMessageTypes.EJV_FAILED.value, payload=payload, topic=current_app.config.get('ACCOUNT_MAILER_TOPIC') ) diff --git a/pay-queue/src/pay_queue/services/eft/eft_reconciliation.py b/pay-queue/src/pay_queue/services/eft/eft_reconciliation.py index dd0774b1b..8ff86f2b9 100644 --- a/pay-queue/src/pay_queue/services/eft/eft_reconciliation.py +++ b/pay-queue/src/pay_queue/services/eft/eft_reconciliation.py @@ -64,8 +64,9 @@ def reconcile_eft_payments(msg: Dict[str, any]): # pylint: disable=too-many-loc eft_file_model: EFTFileModel = db.session.query(EFTFileModel).filter( EFTFileModel.file_ref == file_name).one_or_none() - if eft_file_model and eft_file_model.status_code == EFTProcessStatus.COMPLETED.value: - current_app.logger.info('File: %s already completed processing on %s.', file_name, eft_file_model.completed_on) + if eft_file_model and eft_file_model.status_code in \ + [EFTProcessStatus.IN_PROGRESS.value, EFTProcessStatus.COMPLETED.value]: + current_app.logger.info('File: %s already %s.', file_name, str(eft_file_model.status_code)) return # There is no existing EFT File record - instantiate one diff --git a/pay-queue/src/pay_queue/services/payment_reconciliations.py b/pay-queue/src/pay_queue/services/payment_reconciliations.py index de5cefeb7..82105187d 100644 --- a/pay-queue/src/pay_queue/services/payment_reconciliations.py +++ b/pay-queue/src/pay_queue/services/payment_reconciliations.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -37,9 +37,9 @@ from pay_api.services.non_sufficient_funds import NonSufficientFundsService from pay_api.services.payment_transaction import PaymentTransaction as PaymentTransactionService from pay_api.utils.enums import ( - CfsAccountStatus, InvoiceReferenceStatus, InvoiceStatus, LineItemStatus, MessageType, PaymentMethod, PaymentStatus, - QueueSources) + CfsAccountStatus, InvoiceReferenceStatus, InvoiceStatus, LineItemStatus, PaymentMethod, PaymentStatus, QueueSources) from pay_api.utils.util import get_topic_for_corp_type +from sbc_common_components.utils.enums import QueueMessageTypes from sentry_sdk import capture_message from pay_queue import config @@ -191,12 +191,9 @@ def reconcile_payments(msg: Dict[str, any]): cas_settlement: CasSettlementModel = db.session.query(CasSettlementModel) \ .filter(CasSettlementModel.file_name == file_name).one_or_none() - if cas_settlement and not cas_settlement.processed_on: - current_app.logger.info('File: %s has attempted to be processed before.', file_name) - elif cas_settlement and cas_settlement.processed_on: - current_app.logger.info('File: %s already processed on: %s. Skipping file.', - file_name, cas_settlement.processed_on) - return + if cas_settlement: + current_app.logger.info('File: %s has been processed or processing in progress. Skipping file. ' + 'Removing this row will allow processing to be restarted.', file_name) else: current_app.logger.info('Creating cas_settlement record for file: %s', file_name) cas_settlement = _create_cas_settlement(file_name) @@ -277,15 +274,13 @@ def _process_consolidated_invoices(row): level='error') return _process_paid_invoices(inv_references, row) - if not APP_CONFIG.DISABLE_PAD_SUCCESS_EMAIL: - _publish_mailer_events(MessageType.PAD_PAYMENT_SUCCESS.value, payment_account, row) elif target_txn_status.lower() == Status.NOT_PAID.value.lower() \ or record_type in (RecordType.PADR.value, RecordType.PAYR.value): current_app.logger.info('NOT PAID. NSF identified.') # NSF Condition. Publish to account events for NSF. if _process_failed_payments(row): # Send mailer and account events to update status and send email notification - _publish_account_events(MessageType.NSF_LOCK_ACCOUNT.value, payment_account, row) + _publish_account_events(QueueMessageTypes.NSF_LOCK_ACCOUNT.value, payment_account, row) else: current_app.logger.error('Target Transaction Type is received as %s for PAD, and cannot process %s.', target_txn, row) @@ -593,7 +588,7 @@ def _publish_payment_event(inv: InvoiceModel): gcp_queue_publisher.publish_to_queue( QueueMessage( source=QueueSources.PAY_QUEUE.value, - message_type=MessageType.PAYMENT.value, + message_type=QueueMessageTypes.PAYMENT.value, payload=payload, topic=get_topic_for_corp_type(inv.corp_type_code) ) @@ -638,13 +633,13 @@ def _publish_online_banking_mailer_events(rows: List[Dict[str, str]], paid_amoun credit_amount: float = 0 if credit_rows: - message_type = 'bc.registry.payment.OverPaid' + message_type = QueueMessageTypes.ONLINE_BANKING_OVER_PAYMENT.value for row in credit_rows: credit_amount += float(_get_row_value(row, Column.APP_AMOUNT)) elif under_pay_rows: - message_type = 'bc.registry.payment.UnderPaid' + message_type = QueueMessageTypes.ONLINE_BANKING_UNDER_PAYMENT.value else: - message_type = 'bc.registry.payment.Payment' + message_type = QueueMessageTypes.ONLINE_BANKING_PAYMENT.value payload = { 'accountId': pay_account.auth_account_id, @@ -681,7 +676,7 @@ def _publish_account_events(message_type: str, pay_account: PaymentAccountModel, source=QueueSources.PAY_QUEUE.value, message_type=message_type, payload=payload, - topic=current_app.config.get('AUTH_QUEUE_TOPIC') + topic=current_app.config.get('AUTH_EVENT_TOPIC') ) ) except Exception as e: # NOQA pylint: disable=broad-except diff --git a/pay-queue/src/pay_queue/version.py b/pay-queue/src/pay_queue/version.py index 3b723bf04..c29b19b02 100644 --- a/pay-queue/src/pay_queue/version.py +++ b/pay-queue/src/pay_queue/version.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-queue/tests/__init__.py b/pay-queue/tests/__init__.py index 3e44a42f5..b2425e245 100644 --- a/pay-queue/tests/__init__.py +++ b/pay-queue/tests/__init__.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-queue/tests/conftest.py b/pay-queue/tests/conftest.py index c691641c5..dd9dfd3f3 100644 --- a/pay-queue/tests/conftest.py +++ b/pay-queue/tests/conftest.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -30,9 +30,6 @@ def app(): """Return a session-wide application configured in TEST mode.""" _app = create_app('testing') - _app.config['GCP_AUTH_KEY'] = 'xxxxx' - _app.config['AUDIENCE'] = 'https://pubsub.googleapis.com/google.pubsub.v1.Subscriber' - _app.config['PUBLISHER_AUDIENCE'] = 'https://pubsub.googleapis.com/google.pubsub.v1.Publisher' return _app @@ -157,3 +154,19 @@ def initialize_pubsub(app): 'push_config': push_config, } ) + + +@pytest.fixture(autouse=True) +def mock_pub_sub_call(mocker): + """Mock pub sub call.""" + class PublisherMock: + """Publisher Mock.""" + + def __init__(self, *args, **kwargs): + pass + + def publish(self, *args, **kwargs): + """Publish mock.""" + raise CancelledError('This is a mock') + + mocker.patch('google.cloud.pubsub_v1.PublisherClient', PublisherMock) \ No newline at end of file diff --git a/pay-queue/tests/integration/__init__.py b/pay-queue/tests/integration/__init__.py index 44812fe3c..d95cabaff 100644 --- a/pay-queue/tests/integration/__init__.py +++ b/pay-queue/tests/integration/__init__.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-queue/tests/integration/factory.py b/pay-queue/tests/integration/factory.py index e7ccc4bdd..744cb377c 100644 --- a/pay-queue/tests/integration/factory.py +++ b/pay-queue/tests/integration/factory.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. diff --git a/pay-queue/tests/integration/test_cgi_reconciliations.py b/pay-queue/tests/integration/test_cgi_reconciliations.py index f308d9f46..61ab286ac 100644 --- a/pay-queue/tests/integration/test_cgi_reconciliations.py +++ b/pay-queue/tests/integration/test_cgi_reconciliations.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -35,6 +35,7 @@ from pay_api.utils.enums import ( CfsAccountStatus, DisbursementStatus, EjvFileType, EJVLinkType, InvoiceReferenceStatus, InvoiceStatus, MessageType, PaymentMethod, PaymentStatus, RoutingSlipStatus) +from sbc_common_components.utils.enums import QueueMessageTypes from tests.integration.utils import add_file_event_to_queue_and_process @@ -44,7 +45,7 @@ from .utils import upload_to_minio -def test_successful_partner_ejv_reconciliations(client): +def test_successful_partner_ejv_reconciliations(session, app, client): """Test Reconciliations worker.""" # 1. Create payment account # 2. Create invoice and related records @@ -107,7 +108,7 @@ def test_successful_partner_ejv_reconciliations(client): # Now upload the ACK file to minio and publish message. upload_to_minio(str.encode(''), ack_file_name) - add_file_event_to_queue_and_process(client, ack_file_name, MessageType.CGI_ACK_RECEIVED.value) + add_file_event_to_queue_and_process(client, ack_file_name, QueueMessageTypes.CGI_ACK_MESSAGE_TYPE.value) # Query EJV File and assert the status is changed ejv_file = EjvFileModel.find_by_id(ejv_file_id) @@ -149,7 +150,7 @@ def test_successful_partner_ejv_reconciliations(client): with open(feedback_file_name, 'rb') as f: upload_to_minio(f.read(), feedback_file_name) - add_file_event_to_queue_and_process(client, feedback_file_name, MessageType.CGI_FEEDBACK_RECEIVED.value) + add_file_event_to_queue_and_process(client, feedback_file_name, QueueMessageTypes.CGI_FEEDBACK_MESSAGE_TYPE.value) # Query EJV File and assert the status is changed ejv_file = EjvFileModel.find_by_id(ejv_file_id) @@ -158,7 +159,7 @@ def test_successful_partner_ejv_reconciliations(client): assert invoice.disbursement_status_code == DisbursementStatus.COMPLETED.value -def test_failed_partner_ejv_reconciliations(client): +def test_failed_partner_ejv_reconciliations(session, app, client): """Test Reconciliations worker.""" # 1. Create payment account # 2. Create invoice and related records @@ -223,7 +224,7 @@ def test_failed_partner_ejv_reconciliations(client): # Now upload the ACK file to minio and publish message. upload_to_minio(str.encode(''), ack_file_name) - add_file_event_to_queue_and_process(client, ack_file_name, MessageType.CGI_ACK_RECEIVED.value) + add_file_event_to_queue_and_process(client, ack_file_name, QueueMessageTypes.CGI_ACK_MESSAGE_TYPE.value) # Query EJV File and assert the status is changed ejv_file = EjvFileModel.find_by_id(ejv_file_id) @@ -265,7 +266,7 @@ def test_failed_partner_ejv_reconciliations(client): with open(feedback_file_name, 'rb') as f: upload_to_minio(f.read(), feedback_file_name) - add_file_event_to_queue_and_process(client, feedback_file_name, MessageType.CGI_FEEDBACK_RECEIVED.value) + add_file_event_to_queue_and_process(client, feedback_file_name, QueueMessageTypes.CGI_FEEDBACK_MESSAGE_TYPE.value) # Query EJV File and assert the status is changed ejv_file = EjvFileModel.find_by_id(ejv_file_id) @@ -276,7 +277,7 @@ def test_failed_partner_ejv_reconciliations(client): assert disbursement_distribution_code.stop_ejv -def test_successful_partner_reversal_ejv_reconciliations(client): +def test_successful_partner_reversal_ejv_reconciliations(session, app, client): """Test Reconciliations worker.""" # 1. Create payment account # 2. Create invoice and related records @@ -342,7 +343,7 @@ def test_successful_partner_reversal_ejv_reconciliations(client): # Now upload the ACK file to minio and publish message. upload_to_minio(str.encode(''), ack_file_name) - add_file_event_to_queue_and_process(client, ack_file_name, MessageType.CGI_ACK_RECEIVED.value) + add_file_event_to_queue_and_process(client, ack_file_name, QueueMessageTypes.CGI_ACK_MESSAGE_TYPE.value) # Query EJV File and assert the status is changed ejv_file = EjvFileModel.find_by_id(ejv_file_id) @@ -384,7 +385,7 @@ def test_successful_partner_reversal_ejv_reconciliations(client): with open(feedback_file_name, 'rb') as f: upload_to_minio(f.read(), feedback_file_name) - add_file_event_to_queue_and_process(client, feedback_file_name, MessageType.CGI_FEEDBACK_RECEIVED.value) + add_file_event_to_queue_and_process(client, feedback_file_name, QueueMessageTypes.CGI_FEEDBACK_MESSAGE_TYPE.value) # Query EJV File and assert the status is changed ejv_file = EjvFileModel.find_by_id(ejv_file_id) @@ -394,7 +395,7 @@ def test_successful_partner_reversal_ejv_reconciliations(client): assert invoice.disbursement_date == datetime(2023, 5, 29) -def test_succesful_payment_ejv_reconciliations(client): +def test_succesful_payment_ejv_reconciliations(session, app, client): """Test Reconciliations worker.""" # 1. Create EJV payment accounts # 2. Create invoice and related records @@ -511,7 +512,7 @@ def test_succesful_payment_ejv_reconciliations(client): # Now upload the ACK file to minio and publish message. upload_to_minio(str.encode(''), ack_file_name) - add_file_event_to_queue_and_process(client, ack_file_name, MessageType.CGI_ACK_RECEIVED.value) + add_file_event_to_queue_and_process(client, ack_file_name, QueueMessageTypes.CGI_ACK_MESSAGE_TYPE.value) # Query EJV File and assert the status is changed ejv_file = EjvFileModel.find_by_id(ejv_file_id) @@ -527,7 +528,7 @@ def test_succesful_payment_ejv_reconciliations(client): with open(feedback_file_name, 'rb') as f: upload_to_minio(f.read(), feedback_file_name) - add_file_event_to_queue_and_process(client, feedback_file_name, MessageType.CGI_FEEDBACK_RECEIVED.value) + add_file_event_to_queue_and_process(client, feedback_file_name, QueueMessageTypes.CGI_FEEDBACK_MESSAGE_TYPE.value) # Query EJV File and assert the status is changed ejv_file = EjvFileModel.find_by_id(ejv_file_id) @@ -555,7 +556,7 @@ def test_succesful_payment_ejv_reconciliations(client): assert payment[0][0].paid_amount == inv_total_amount -def test_succesful_payment_reversal_ejv_reconciliations(client): +def test_succesful_payment_reversal_ejv_reconciliations(session, app, client): """Test Reconciliations worker.""" # 1. Create EJV payment accounts # 2. Create invoice and related records @@ -669,7 +670,7 @@ def test_succesful_payment_reversal_ejv_reconciliations(client): # Now upload the ACK file to minio and publish message. upload_to_minio(str.encode(''), ack_file_name) - add_file_event_to_queue_and_process(client, ack_file_name, MessageType.CGI_ACK_RECEIVED.value) + add_file_event_to_queue_and_process(client, ack_file_name, QueueMessageTypes.CGI_ACK_MESSAGE_TYPE.value) # Query EJV File and assert the status is changed ejv_file = EjvFileModel.find_by_id(ejv_file_id) @@ -685,7 +686,7 @@ def test_succesful_payment_reversal_ejv_reconciliations(client): with open(feedback_file_name, 'rb') as f: upload_to_minio(f.read(), feedback_file_name) - add_file_event_to_queue_and_process(client, feedback_file_name, MessageType.CGI_FEEDBACK_RECEIVED.value) + add_file_event_to_queue_and_process(client, feedback_file_name, QueueMessageTypes.CGI_FEEDBACK_MESSAGE_TYPE.value) # Query EJV File and assert the status is changed ejv_file = EjvFileModel.find_by_id(ejv_file_id) @@ -711,7 +712,7 @@ def test_succesful_payment_reversal_ejv_reconciliations(client): assert payment[0][0].paid_amount == inv_total_amount -def test_successful_refund_reconciliations(client): +def test_successful_refund_reconciliations(session, app, client): """Test Reconciliations worker.""" # 1. Create a routing slip. # 2. Mark the routing slip for refund. @@ -759,7 +760,7 @@ def test_successful_refund_reconciliations(client): # Now upload the ACK file to minio and publish message. upload_to_minio(str.encode(''), ack_file_name) - add_file_event_to_queue_and_process(client, ack_file_name, MessageType.CGI_ACK_RECEIVED.value) + add_file_event_to_queue_and_process(client, ack_file_name, QueueMessageTypes.CGI_ACK_MESSAGE_TYPE.value) # Query EJV File and assert the status is changed ejv_file = EjvFileModel.find_by_id(ejv_file_id) @@ -834,7 +835,7 @@ def test_successful_refund_reconciliations(client): with open(feedback_file_name, 'rb') as f: upload_to_minio(f.read(), feedback_file_name) - add_file_event_to_queue_and_process(client, feedback_file_name, MessageType.CGI_FEEDBACK_RECEIVED.value) + add_file_event_to_queue_and_process(client, feedback_file_name, QueueMessageTypes.CGI_FEEDBACK_MESSAGE_TYPE.value) # Query EJV File and assert the status is changed ejv_file = EjvFileModel.find_by_id(ejv_file_id) @@ -844,7 +845,7 @@ def test_successful_refund_reconciliations(client): assert routing_slip.status == RoutingSlipStatus.REFUND_COMPLETED.value -def test_failed_refund_reconciliations(client): +def test_failed_refund_reconciliations(session, app, client): """Test Reconciliations worker.""" # 1. Create a routing slip. # 2. Mark the routing slip for refund. @@ -892,7 +893,7 @@ def test_failed_refund_reconciliations(client): # Now upload the ACK file to minio and publish message. upload_to_minio(str.encode(''), ack_file_name) - add_file_event_to_queue_and_process(client, ack_file_name, MessageType.CGI_ACK_RECEIVED.value) + add_file_event_to_queue_and_process(client, ack_file_name, QueueMessageTypes.CGI_ACK_MESSAGE_TYPE.value) # Query EJV File and assert the status is changed ejv_file = EjvFileModel.find_by_id(ejv_file_id) @@ -968,7 +969,7 @@ def test_failed_refund_reconciliations(client): with open(feedback_file_name, 'rb') as f: upload_to_minio(f.read(), feedback_file_name) - add_file_event_to_queue_and_process(client, feedback_file_name, MessageType.CGI_FEEDBACK_RECEIVED.value) + add_file_event_to_queue_and_process(client, feedback_file_name, QueueMessageTypes.CGI_FEEDBACK_MESSAGE_TYPE.value) # Query EJV File and assert the status is changed ejv_file = EjvFileModel.find_by_id(ejv_file_id) @@ -980,7 +981,7 @@ def test_failed_refund_reconciliations(client): assert routing_slip_2.status == RoutingSlipStatus.REFUND_REJECTED.value -def test_prevent_duplicate_ack(client): +def test_prevent_duplicate_ack(session, app, client): """Assert processing completes when existing ack.""" file_ref = f'INBOX.{datetime.now()}' # Upload an acknowledgement file @@ -994,18 +995,18 @@ def test_prevent_duplicate_ack(client): jv_file.write('') jv_file.close() - add_file_event_to_queue_and_process(client, ack_file_name, MessageType.CGI_ACK_RECEIVED.value) + add_file_event_to_queue_and_process(client, ack_file_name, QueueMessageTypes.CGI_ACK_MESSAGE_TYPE.value) assert ejv.ack_file_ref == ack_file_name assert ejv.disbursement_status_code == DisbursementStatus.ACKNOWLEDGED.value # Nothing should change, because it's already processed this ACK. ejv.disbursement_status_code = DisbursementStatus.UPLOADED.value - add_file_event_to_queue_and_process(client, ack_file_name, MessageType.CGI_ACK_RECEIVED.value) + add_file_event_to_queue_and_process(client, ack_file_name, QueueMessageTypes.CGI_ACK_MESSAGE_TYPE.value) assert ejv.ack_file_ref == ack_file_name assert ejv.disbursement_status_code == DisbursementStatus.UPLOADED.value -def test_successful_ap_disbursement(client): +def test_successful_ap_disbursement(session, app, client): """Test Reconciliations worker for ap disbursement.""" # 1. Create invoice. # 2. Create a AP reconciliation file. @@ -1065,7 +1066,7 @@ def test_successful_ap_disbursement(client): upload_to_minio(str.encode(''), ack_file_name) - add_file_event_to_queue_and_process(client, ack_file_name, MessageType.CGI_ACK_RECEIVED.value) + add_file_event_to_queue_and_process(client, ack_file_name, QueueMessageTypes.CGI_ACK_MESSAGE_TYPE.value) ejv_file = EjvFileModel.find_by_id(ejv_file_id) assert ejv_file.disbursement_status_code == DisbursementStatus.ACKNOWLEDGED.value @@ -1138,7 +1139,7 @@ def test_successful_ap_disbursement(client): with open(feedback_file_name, 'rb') as f: upload_to_minio(f.read(), feedback_file_name) - add_file_event_to_queue_and_process(client, feedback_file_name, MessageType.CGI_FEEDBACK_RECEIVED.value) + add_file_event_to_queue_and_process(client, feedback_file_name, QueueMessageTypes.CGI_FEEDBACK_MESSAGE_TYPE.value) ejv_file = EjvFileModel.find_by_id(ejv_file_id) assert ejv_file.disbursement_status_code == DisbursementStatus.COMPLETED.value @@ -1154,7 +1155,7 @@ def test_successful_ap_disbursement(client): assert refund.gl_posted is not None -def test_failure_ap_disbursement(client): +def test_failure_ap_disbursement(session, app, client): """Test Reconciliations worker for ap disbursement.""" # 1. Create invoice. # 2. Create a AP reconciliation file. @@ -1212,7 +1213,7 @@ def test_failure_ap_disbursement(client): upload_to_minio(str.encode(''), ack_file_name) - add_file_event_to_queue_and_process(client, ack_file_name, MessageType.CGI_ACK_RECEIVED.value) + add_file_event_to_queue_and_process(client, ack_file_name, QueueMessageTypes.CGI_ACK_MESSAGE_TYPE.value) ejv_file = EjvFileModel.find_by_id(ejv_file_id) assert ejv_file.disbursement_status_code == DisbursementStatus.ACKNOWLEDGED.value @@ -1288,7 +1289,7 @@ def test_failure_ap_disbursement(client): with open(feedback_file_name, 'rb') as f: upload_to_minio(f.read(), feedback_file_name) - add_file_event_to_queue_and_process(client, feedback_file_name, MessageType.CGI_FEEDBACK_RECEIVED.value) + add_file_event_to_queue_and_process(client, feedback_file_name, QueueMessageTypes.CGI_FEEDBACK_MESSAGE_TYPE.value) ejv_file = EjvFileModel.find_by_id(ejv_file_id) assert ejv_file.disbursement_status_code == DisbursementStatus.COMPLETED.value diff --git a/pay-queue/tests/integration/test_eft_reconciliation.py b/pay-queue/tests/integration/test_eft_reconciliation.py index 114ae89e2..64ba097c7 100644 --- a/pay-queue/tests/integration/test_eft_reconciliation.py +++ b/pay-queue/tests/integration/test_eft_reconciliation.py @@ -19,6 +19,7 @@ from datetime import datetime from typing import List +from flask import current_app from pay_api import db from pay_api.models import EFTCredit as EFTCreditModel from pay_api.models import EFTCreditInvoiceLink as EFTCreditInvoiceLinkModel @@ -29,6 +30,7 @@ from pay_api.models import Invoice as InvoiceModel from pay_api.models import PaymentAccount as PaymentAccountModel from pay_api.utils.enums import EFTFileLineType, EFTProcessStatus, EFTShortnameStatus, MessageType, PaymentMethod +from sbc_common_components.utils.enums import QueueMessageTypes from pay_queue.services.eft.eft_enums import EFTConstants from tests.integration.factory import factory_create_eft_account, factory_invoice @@ -36,7 +38,7 @@ from tests.utilities.factory_utils import factory_eft_header, factory_eft_record, factory_eft_trailer -def test_eft_tdi17_fail_header(client): +def test_eft_tdi17_fail_header(session, app, client): """Test EFT Reconciliations properly fails for a bad EFT header.""" # Generate file with invalid header file_name: str = 'test_eft_tdi17.txt' @@ -45,7 +47,7 @@ def test_eft_tdi17_fail_header(client): create_and_upload_eft_file(file_name, [header]) - add_file_event_to_queue_and_process(client, file_name, MessageType.EFT_FILE_UPLOADED.value) + add_file_event_to_queue_and_process(client, file_name, QueueMessageTypes.EFT_FILE_UPLOADED.value) # Assert EFT File record was created eft_file_model: EFTFileModel = db.session.query(EFTFileModel).filter( @@ -88,7 +90,7 @@ def test_eft_tdi17_fail_header(client): assert not bool(eft_transactions) -def test_eft_tdi17_fail_trailer(client): +def test_eft_tdi17_fail_trailer(session, app, client): """Test EFT Reconciliations properly fails for a bad EFT trailer.""" # Generate file with invalid trailer file_name: str = 'test_eft_tdi17.txt' @@ -99,7 +101,9 @@ def test_eft_tdi17_fail_trailer(client): create_and_upload_eft_file(file_name, [header, trailer]) - add_file_event_to_queue_and_process(client, file_name=file_name, message_type=MessageType.EFT_FILE_UPLOADED.value) + add_file_event_to_queue_and_process(client, + file_name=file_name, + message_type=QueueMessageTypes.EFT_FILE_UPLOADED.value) # Assert EFT File record was created eft_file_model: EFTFileModel = db.session.query(EFTFileModel).filter( @@ -142,7 +146,7 @@ def test_eft_tdi17_fail_trailer(client): assert not bool(eft_transactions) -def test_eft_tdi17_fail_transactions(client): +def test_eft_tdi17_fail_transactions(session, app, client): """Test EFT Reconciliations properly fails for a bad EFT trailer.""" # Generate file with invalid trailer file_name: str = 'test_eft_tdi17.txt' @@ -161,7 +165,9 @@ def test_eft_tdi17_fail_transactions(client): create_and_upload_eft_file(file_name, [header, transaction_1, trailer]) - add_file_event_to_queue_and_process(client, file_name=file_name, message_type=MessageType.EFT_FILE_UPLOADED.value) + add_file_event_to_queue_and_process(client, + file_name=file_name, + message_type=QueueMessageTypes.EFT_FILE_UPLOADED.value) # Assert EFT File record was created eft_file_model: EFTFileModel = db.session.query(EFTFileModel).filter( @@ -199,13 +205,15 @@ def test_eft_tdi17_fail_transactions(client): assert eft_transactions[0].error_messages[0] == 'Invalid transaction deposit amount CAD.' -def test_eft_tdi17_basic_process(client): +def test_eft_tdi17_basic_process(session, app, client): """Test EFT Reconciliations worker is able to create basic EFT processing records.""" # Generate happy path file file_name: str = 'test_eft_tdi17.txt' generate_basic_tdi17_file(file_name) - add_file_event_to_queue_and_process(client, file_name=file_name, message_type=MessageType.EFT_FILE_UPLOADED.value) + add_file_event_to_queue_and_process(client, + file_name=file_name, + message_type=QueueMessageTypes.EFT_FILE_UPLOADED.value) # Assert EFT File record was created eft_file_model: EFTFileModel = db.session.query(EFTFileModel).filter( @@ -281,14 +289,20 @@ def test_eft_tdi17_basic_process(client): assert not eft_credit_invoice_links -def test_eft_tdi17_process(client): +def test_eft_tdi17_process(session, app, client): """Test EFT Reconciliations worker.""" payment_account, eft_shortname, invoice = create_test_data() + + assert payment_account is not None + assert eft_shortname is not None + assert invoice is not None # Generate happy path file file_name: str = 'test_eft_tdi17.txt' generate_tdi17_file(file_name) - add_file_event_to_queue_and_process(client, file_name=file_name, message_type=MessageType.EFT_FILE_UPLOADED.value) + add_file_event_to_queue_and_process(client, + file_name=file_name, + message_type=QueueMessageTypes.EFT_FILE_UPLOADED.value) # Assert EFT File record was created eft_file_model: EFTFileModel = db.session.query(EFTFileModel).filter( @@ -342,8 +356,7 @@ def test_eft_tdi17_process(client): assert eft_shortnames[1].short_name == 'ABC123' # NOTE THIS NEEDS TO BE RE-WRITTEN INSIDE OF THE JOB. - # today = datetime.now().date() - + today = datetime.now().date() # # Assert Invoice is paid # invoice: InvoiceModel = InvoiceModel.find_by_id(invoice.id) # expected_amount = 100 @@ -410,7 +423,7 @@ def test_eft_tdi17_process(client): # assert eft_credit_invoice_links[0].invoice_id == invoice.id -def test_eft_tdi17_rerun(client): +def test_eft_tdi17_rerun(session, app, client): """Test EFT Reconciliations can be re-executed with a corrected file.""" payment_account, eft_shortname, invoice = create_test_data() @@ -431,7 +444,9 @@ def test_eft_tdi17_rerun(client): create_and_upload_eft_file(file_name, [header, transaction_1, trailer]) - add_file_event_to_queue_and_process(client, file_name=file_name, message_type=MessageType.EFT_FILE_UPLOADED.value) + add_file_event_to_queue_and_process(client, + file_name=file_name, + message_type=QueueMessageTypes.EFT_FILE_UPLOADED.value) # Assert EFT File record was created eft_file_model: EFTFileModel = db.session.query(EFTFileModel).filter( @@ -470,7 +485,9 @@ def test_eft_tdi17_rerun(client): jv_number='002425669', transaction_date='') create_and_upload_eft_file(file_name, [header, transaction_1, trailer]) - add_file_event_to_queue_and_process(client, file_name=file_name, message_type=MessageType.EFT_FILE_UPLOADED.value) + add_file_event_to_queue_and_process(client, + file_name=file_name, + message_type=QueueMessageTypes.EFT_FILE_UPLOADED.value) # Check file is completed after correction eft_file_model: EFTFileModel = db.session.query(EFTFileModel).filter( diff --git a/pay-queue/tests/integration/test_payment_reconciliations.py b/pay-queue/tests/integration/test_payment_reconciliations.py index 8e6850413..ff12a1f6e 100644 --- a/pay-queue/tests/integration/test_payment_reconciliations.py +++ b/pay-queue/tests/integration/test_payment_reconciliations.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -28,6 +28,7 @@ from pay_api.models import Receipt as ReceiptModel from pay_api.utils.enums import ( CfsAccountStatus, InvoiceReferenceStatus, InvoiceStatus, MessageType, PaymentMethod, PaymentStatus) +from sbc_common_components.utils.enums import QueueMessageTypes from pay_queue.enums import RecordType, SourceTransaction, Status, TargetTransaction @@ -37,7 +38,7 @@ from .utils import add_file_event_to_queue_and_process, create_and_upload_settlement_file -def test_online_banking_reconciliations(client): +def test_online_banking_reconciliations(session, app, client): """Test Reconciliations worker.""" # 1. Create payment account # 2. Create invoice and related records @@ -67,7 +68,9 @@ def test_online_banking_reconciliations(client): TargetTransaction.INV.value, invoice_number, total, 0, Status.PAID.value] create_and_upload_settlement_file(file_name, [row]) - add_file_event_to_queue_and_process(client, file_name=file_name, message_type=MessageType.CAS_UPLOADED.value) + add_file_event_to_queue_and_process(client, + file_name=file_name, + message_type=QueueMessageTypes.CAS_MESSAGE_TYPE.value) # The invoice should be in PAID status and Payment should be completed updated_invoice = InvoiceModel.find_by_id(invoice_id) @@ -81,7 +84,7 @@ def test_online_banking_reconciliations(client): assert payment.invoice_number == invoice_number -def test_online_banking_reconciliations_over_payment(client): +def test_online_banking_reconciliations_over_payment(session, app, client): """Test Reconciliations worker.""" # 1. Create payment account # 2. Create invoice and related records @@ -113,7 +116,9 @@ def test_online_banking_reconciliations_over_payment(client): over_payment_amount, cfs_account_number, TargetTransaction.INV.value, invoice_number, over_payment_amount, 0, Status.ON_ACC.value] create_and_upload_settlement_file(file_name, [inv_row, credit_row]) - add_file_event_to_queue_and_process(client, file_name=file_name, message_type=MessageType.CAS_UPLOADED.value) + add_file_event_to_queue_and_process(client, + file_name=file_name, + message_type=QueueMessageTypes.CAS_MESSAGE_TYPE.value) # The invoice should be in PAID status and Payment should be completed updated_invoice = InvoiceModel.find_by_id(invoice_id) @@ -127,7 +132,7 @@ def test_online_banking_reconciliations_over_payment(client): assert payment.invoice_number is None # No invoice_number if payment is not for 1 invoice -def test_online_banking_reconciliations_with_credit(client): +def test_online_banking_reconciliations_with_credit(session, app, client): """Test Reconciliations worker.""" # 1. Create payment account # 2. Create invoice and related records @@ -159,7 +164,9 @@ def test_online_banking_reconciliations_with_credit(client): credit_row = [RecordType.ONAC.value, SourceTransaction.EFT_WIRE.value, '555566677', 100001, date, credit_amount, cfs_account_number, TargetTransaction.INV.value, invoice_number, total, 0, Status.PAID.value] create_and_upload_settlement_file(file_name, [inv_row, credit_row]) - add_file_event_to_queue_and_process(client, file_name=file_name, message_type=MessageType.CAS_UPLOADED.value) + add_file_event_to_queue_and_process(client, + file_name=file_name, + message_type=QueueMessageTypes.CAS_MESSAGE_TYPE.value) # The invoice should be in PAID status and Payment should be completed updated_invoice = InvoiceModel.find_by_id(invoice_id) @@ -173,7 +180,7 @@ def test_online_banking_reconciliations_with_credit(client): assert payment.invoice_number == invoice_number -def test_online_banking_reconciliations_overflows_credit(client): +def test_online_banking_reconciliations_overflows_credit(session, app, client): """Test Reconciliations worker.""" # 1. Create payment account # 2. Create invoice and related records @@ -210,7 +217,9 @@ def test_online_banking_reconciliations_overflows_credit(client): Status.ON_ACC.value] create_and_upload_settlement_file(file_name, [inv_row, credit_row, onac_row]) - add_file_event_to_queue_and_process(client, file_name=file_name, message_type=MessageType.CAS_UPLOADED.value) + add_file_event_to_queue_and_process(client, + file_name=file_name, + message_type=QueueMessageTypes.CAS_MESSAGE_TYPE.value) # The invoice should be in PAID status and Payment should be completed updated_invoice = InvoiceModel.find_by_id(invoice_id) @@ -224,7 +233,7 @@ def test_online_banking_reconciliations_overflows_credit(client): assert payment.invoice_number is None -def test_online_banking_under_payment(client): +def test_online_banking_under_payment(session, app, client): """Test Reconciliations worker.""" # 1. Create payment account # 2. Create invoice and related records @@ -256,7 +265,9 @@ def test_online_banking_under_payment(client): TargetTransaction.INV.value, invoice_number, total, total - paid_amount, Status.PARTIAL.value] create_and_upload_settlement_file(file_name, [row]) - add_file_event_to_queue_and_process(client, file_name=file_name, message_type=MessageType.CAS_UPLOADED.value) + add_file_event_to_queue_and_process(client, + file_name=file_name, + message_type=QueueMessageTypes.CAS_MESSAGE_TYPE.value) # The invoice should be in PAID status and Payment should be completed updated_invoice: InvoiceModel = InvoiceModel.find_by_id(invoice_id) @@ -271,7 +282,7 @@ def test_online_banking_under_payment(client): assert payment.invoice_number == invoice_number -def test_pad_reconciliations(client): +def test_pad_reconciliations(session, app, client): """Test Reconciliations worker.""" # 1. Create payment account # 2. Create invoices and related records @@ -313,7 +324,9 @@ def test_pad_reconciliations(client): 'INV', invoice_number, total, 0, Status.PAID.value] create_and_upload_settlement_file(file_name, [row]) - add_file_event_to_queue_and_process(client, file_name=file_name, message_type=MessageType.CAS_UPLOADED.value) + add_file_event_to_queue_and_process(client, + file_name=file_name, + message_type=QueueMessageTypes.CAS_MESSAGE_TYPE.value) # The invoice should be in PAID status and Payment should be completed updated_invoice1 = InvoiceModel.find_by_id(invoice1_id) @@ -335,7 +348,7 @@ def test_pad_reconciliations(client): assert rcpt1.receipt_date == rcpt2.receipt_date -def test_pad_reconciliations_with_credit_memo(client): +def test_pad_reconciliations_with_credit_memo(session, app, client): """Test Reconciliations worker.""" # 1. Create payment account # 2. Create invoices and related records @@ -381,7 +394,9 @@ def test_pad_reconciliations_with_credit_memo(client): pad_row = [RecordType.PAD.value, SourceTransaction.PAD.value, receipt_number, 100001, date, total - credit_amount, cfs_account_number, 'INV', invoice_number, total, 0, Status.PAID.value] create_and_upload_settlement_file(file_name, [credit_row, pad_row]) - add_file_event_to_queue_and_process(client, file_name=file_name, message_type=MessageType.CAS_UPLOADED.value) + add_file_event_to_queue_and_process(client, + file_name=file_name, + message_type=QueueMessageTypes.CAS_MESSAGE_TYPE.value) # The invoice should be in PAID status and Payment should be completed updated_invoice1 = InvoiceModel.find_by_id(invoice1_id) @@ -403,7 +418,7 @@ def test_pad_reconciliations_with_credit_memo(client): assert rcpt1.receipt_date == rcpt2.receipt_date -def test_pad_nsf_reconciliations(client): +def test_pad_nsf_reconciliations(session, app, client): """Test Reconciliations worker for NSF.""" # 1. Create payment account # 2. Create invoices and related records @@ -446,7 +461,9 @@ def test_pad_nsf_reconciliations(client): 'INV', invoice_number, total, total, Status.NOT_PAID.value] create_and_upload_settlement_file(file_name, [row]) - add_file_event_to_queue_and_process(client, file_name=file_name, message_type=MessageType.CAS_UPLOADED.value) + add_file_event_to_queue_and_process(client, + file_name=file_name, + message_type=QueueMessageTypes.CAS_MESSAGE_TYPE.value) # The invoice should be in SETTLEMENT_SCHEDULED status and Payment should be FAILED updated_invoice1 = InvoiceModel.find_by_id(invoice1_id) @@ -465,7 +482,7 @@ def test_pad_nsf_reconciliations(client): assert cfs_account.status == CfsAccountStatus.FREEZE.value -def test_pad_reversal_reconciliations(client): +def test_pad_reversal_reconciliations(session, app, client): """Test Reconciliations worker for NSF.""" # 1. Create payment account # 2. Create invoices and related records for a completed payment @@ -517,7 +534,9 @@ def test_pad_reversal_reconciliations(client): 'INV', invoice_number, total, total, Status.NOT_PAID.value] create_and_upload_settlement_file(file_name, [row]) - add_file_event_to_queue_and_process(client, file_name=file_name, message_type=MessageType.CAS_UPLOADED.value) + add_file_event_to_queue_and_process(client, + file_name=file_name, + message_type=QueueMessageTypes.CAS_MESSAGE_TYPE.value) # The invoice should be in SETTLEMENT_SCHEDULED status and Payment should be FAILED updated_invoice1 = InvoiceModel.find_by_id(invoice1_id) @@ -541,7 +560,7 @@ def test_pad_reversal_reconciliations(client): @pytest.mark.asyncio -async def test_eft_wire_reconciliations(client): +async def test_eft_wire_reconciliations(session, app, client): """Test Reconciliations worker.""" # 1. Create payment account # 2. Create invoice and related records @@ -582,7 +601,9 @@ async def test_eft_wire_reconciliations(client): row = [RecordType.EFTP.value, SourceTransaction.EFT_WIRE.value, eft_wire_receipt, 100001, date, total, cfs_account_number, TargetTransaction.INV.value, invoice_number, total, 0, Status.PAID.value] create_and_upload_settlement_file(file_name, [row]) - add_file_event_to_queue_and_process(client, file_name=file_name, message_type=MessageType.CAS_UPLOADED.value) + add_file_event_to_queue_and_process(client, + file_name=file_name, + message_type=QueueMessageTypes.CAS_MESSAGE_TYPE.value) # The invoice should be in PAID status and Payment should be completed updated_invoice = InvoiceModel.find_by_id(invoice_id) @@ -595,7 +616,7 @@ async def test_eft_wire_reconciliations(client): @pytest.mark.asyncio -async def test_credits(client, monkeypatch): +async def test_credits(session, app, client, monkeypatch): """Test Reconciliations worker.""" # 1. Create payment account. # 2. Create EFT/WIRE payment db record. @@ -657,7 +678,9 @@ def mock_cms(cfs_account: CfsAccountModel, cfs_account_number, TargetTransaction.RECEIPT.value, eft_wire_receipt, onac_amount, 0, Status.ON_ACC.value] create_and_upload_settlement_file(file_name, [row]) - add_file_event_to_queue_and_process(client, file_name=file_name, message_type=MessageType.CAS_UPLOADED.value) + add_file_event_to_queue_and_process(client, + file_name=file_name, + message_type=QueueMessageTypes.CAS_MESSAGE_TYPE.value) # Look up credit file and make sure the credits are recorded. pay_account = PaymentAccountModel.find_by_id(pay_account_id) diff --git a/pay-queue/tests/integration/test_worker_queue.py b/pay-queue/tests/integration/test_worker_queue.py index 932aa48bd..79d1002e2 100644 --- a/pay-queue/tests/integration/test_worker_queue.py +++ b/pay-queue/tests/integration/test_worker_queue.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -21,7 +21,7 @@ from .utils import helper_add_identifier_event_to_queue -def test_update_payment(client): +def test_update_payment(session, app, client): """Assert that the update internal payment records works.""" # vars old_identifier = 'T000000000' diff --git a/pay-queue/tests/integration/utils.py b/pay-queue/tests/integration/utils.py index 58d190d4b..07b9e7c7e 100644 --- a/pay-queue/tests/integration/utils.py +++ b/pay-queue/tests/integration/utils.py @@ -1,4 +1,4 @@ -# Copyright © 2019 Province of British Columbia +# Copyright © 2024 Province of British Columbia # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -27,7 +27,8 @@ from minio import Minio from pay_api.services import gcp_queue_publisher from pay_api.services.gcp_queue_publisher import QueueMessage -from pay_api.utils.enums import MessageType, QueueSources +from pay_api.utils.enums import QueueSources +from sbc_common_components.utils.enums import QueueMessageTypes from simple_cloudevent import SimpleCloudEvent, to_queue_message @@ -98,7 +99,7 @@ def upload_to_minio(value_as_bytes, file_name: str): os.stat(file_name).st_size) -def forward_incoming_message_to_test_instance(client): +def forward_incoming_message_to_test_instance(session, app, client): """Forward incoming http message to test instance.""" # Note this is a bit different than how the queue could behave, it could send multiples. # This just receives one HTTP request and forwards it to the test instance. @@ -122,7 +123,7 @@ def forward_incoming_message_to_test_instance(client): assert tries > 0 -def add_file_event_to_queue_and_process(client, file_name: str, message_type: str, use_pubsub_emulator=True): +def add_file_event_to_queue_and_process(client, file_name: str, message_type: str, use_pubsub_emulator=False): """Add event to the Queue.""" queue_payload = { 'fileName': file_name, @@ -146,7 +147,7 @@ def add_file_event_to_queue_and_process(client, file_name: str, message_type: st def helper_add_identifier_event_to_queue(client, old_identifier: str = 'T1234567890', new_identifier: str = 'BC1234567890'): """Add event to the Queue.""" - message_type = MessageType.INCORPORATION.value + message_type = QueueMessageTypes.INCORPORATION.value queue_payload = { 'filing': { 'header': {'filingId': '12345678'}, diff --git a/report-api/requirements.txt b/report-api/requirements.txt index 3956cf9ad..4e81b8787 100644 --- a/report-api/requirements.txt +++ b/report-api/requirements.txt @@ -21,7 +21,7 @@ flask-restx==1.1.0 fonttools==4.43.0 gunicorn==20.1.0 html5lib==1.1 -idna==3.4 +idna==3.7 importlib-resources==5.12.0 itsdangerous==2.0.1 jaeger-client==4.8.0 From 522ed4997b03f8bb5d88864e739815548aa606be Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Thu, 30 May 2024 20:46:12 -0700 Subject: [PATCH 2/8] Fix linting issues. Make units tests pass for pay-api. --- pay-api/poetry.lock | 405 +++++++++--------- pay-api/pyproject.toml | 15 +- pay-api/src/pay_api/__init__.py | 1 - .../src/pay_api/services/payment_account.py | 6 +- .../pay_api/services/payment_transaction.py | 14 +- 5 files changed, 218 insertions(+), 223 deletions(-) diff --git a/pay-api/poetry.lock b/pay-api/poetry.lock index 49cd2bdc5..3253cd826 100644 --- a/pay-api/poetry.lock +++ b/pay-api/poetry.lock @@ -32,13 +32,13 @@ files = [ [[package]] name = "astroid" -version = "3.1.0" +version = "3.2.2" description = "An abstract syntax tree for Python with inference support." optional = false python-versions = ">=3.8.0" files = [ - {file = "astroid-3.1.0-py3-none-any.whl", hash = "sha256:951798f922990137ac090c53af473db7ab4e70c770e6d7fae0cec59f74411819"}, - {file = "astroid-3.1.0.tar.gz", hash = "sha256:ac248253bfa4bd924a0de213707e7ebeeb3138abeb48d798784ead1e56d419d4"}, + {file = "astroid-3.2.2-py3-none-any.whl", hash = "sha256:e8a0083b4bb28fcffb6207a3bfc9e5d0a68be951dd7e336d5dcf639c682388c0"}, + {file = "astroid-3.2.2.tar.gz", hash = "sha256:8ead48e31b92b2e217b6c9733a21afafe479d52d6e164dd25fb1a770c7c3cf94"}, ] [[package]] @@ -62,13 +62,13 @@ tests-no-zope = ["attrs[tests-mypy]", "cloudpickle", "hypothesis", "pympler", "p [[package]] name = "autopep8" -version = "2.1.0" +version = "2.2.0" description = "A tool that automatically formats Python code to conform to the PEP 8 style guide" optional = false python-versions = ">=3.8" files = [ - {file = "autopep8-2.1.0-py2.py3-none-any.whl", hash = "sha256:2bb76888c5edbcafe6aabab3c47ba534f5a2c2d245c2eddced4a30c4b4946357"}, - {file = "autopep8-2.1.0.tar.gz", hash = "sha256:1fa8964e4618929488f4ec36795c7ff12924a68b8bf01366c094fc52f770b6e7"}, + {file = "autopep8-2.2.0-py2.py3-none-any.whl", hash = "sha256:05418a981f038969d8bdcd5636bf15948db7555ae944b9f79b5a34b35f1370d4"}, + {file = "autopep8-2.2.0.tar.gz", hash = "sha256:d306a0581163ac29908280ad557773a95a9bede072c0fafed6f141f5311f43c1"}, ] [package.dependencies] @@ -331,63 +331,63 @@ files = [ [[package]] name = "coverage" -version = "7.4.4" +version = "7.5.3" description = "Code coverage measurement for Python" optional = false python-versions = ">=3.8" files = [ - {file = "coverage-7.4.4-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:e0be5efd5127542ef31f165de269f77560d6cdef525fffa446de6f7e9186cfb2"}, - {file = "coverage-7.4.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:ccd341521be3d1b3daeb41960ae94a5e87abe2f46f17224ba5d6f2b8398016cf"}, - {file = "coverage-7.4.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:09fa497a8ab37784fbb20ab699c246053ac294d13fc7eb40ec007a5043ec91f8"}, - {file = "coverage-7.4.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:b1a93009cb80730c9bca5d6d4665494b725b6e8e157c1cb7f2db5b4b122ea562"}, - {file = "coverage-7.4.4-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:690db6517f09336559dc0b5f55342df62370a48f5469fabf502db2c6d1cffcd2"}, - {file = "coverage-7.4.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:09c3255458533cb76ef55da8cc49ffab9e33f083739c8bd4f58e79fecfe288f7"}, - {file = "coverage-7.4.4-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:8ce1415194b4a6bd0cdcc3a1dfbf58b63f910dcb7330fe15bdff542c56949f87"}, - {file = "coverage-7.4.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b91cbc4b195444e7e258ba27ac33769c41b94967919f10037e6355e998af255c"}, - {file = "coverage-7.4.4-cp310-cp310-win32.whl", hash = "sha256:598825b51b81c808cb6f078dcb972f96af96b078faa47af7dfcdf282835baa8d"}, - {file = "coverage-7.4.4-cp310-cp310-win_amd64.whl", hash = "sha256:09ef9199ed6653989ebbcaacc9b62b514bb63ea2f90256e71fea3ed74bd8ff6f"}, - {file = "coverage-7.4.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:0f9f50e7ef2a71e2fae92774c99170eb8304e3fdf9c8c3c7ae9bab3e7229c5cf"}, - {file = "coverage-7.4.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:623512f8ba53c422fcfb2ce68362c97945095b864cda94a92edbaf5994201083"}, - {file = "coverage-7.4.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0513b9508b93da4e1716744ef6ebc507aff016ba115ffe8ecff744d1322a7b63"}, - {file = "coverage-7.4.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:40209e141059b9370a2657c9b15607815359ab3ef9918f0196b6fccce8d3230f"}, - {file = "coverage-7.4.4-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8a2b2b78c78293782fd3767d53e6474582f62443d0504b1554370bde86cc8227"}, - {file = "coverage-7.4.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:73bfb9c09951125d06ee473bed216e2c3742f530fc5acc1383883125de76d9cd"}, - {file = "coverage-7.4.4-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:1f384c3cc76aeedce208643697fb3e8437604b512255de6d18dae3f27655a384"}, - {file = "coverage-7.4.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:54eb8d1bf7cacfbf2a3186019bcf01d11c666bd495ed18717162f7eb1e9dd00b"}, - {file = "coverage-7.4.4-cp311-cp311-win32.whl", hash = "sha256:cac99918c7bba15302a2d81f0312c08054a3359eaa1929c7e4b26ebe41e9b286"}, - {file = "coverage-7.4.4-cp311-cp311-win_amd64.whl", hash = "sha256:b14706df8b2de49869ae03a5ccbc211f4041750cd4a66f698df89d44f4bd30ec"}, - {file = "coverage-7.4.4-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:201bef2eea65e0e9c56343115ba3814e896afe6d36ffd37bab783261db430f76"}, - {file = "coverage-7.4.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:41c9c5f3de16b903b610d09650e5e27adbfa7f500302718c9ffd1c12cf9d6818"}, - {file = "coverage-7.4.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:d898fe162d26929b5960e4e138651f7427048e72c853607f2b200909794ed978"}, - {file = "coverage-7.4.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3ea79bb50e805cd6ac058dfa3b5c8f6c040cb87fe83de10845857f5535d1db70"}, - {file = "coverage-7.4.4-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ce4b94265ca988c3f8e479e741693d143026632672e3ff924f25fab50518dd51"}, - {file = "coverage-7.4.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:00838a35b882694afda09f85e469c96367daa3f3f2b097d846a7216993d37f4c"}, - {file = "coverage-7.4.4-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:fdfafb32984684eb03c2d83e1e51f64f0906b11e64482df3c5db936ce3839d48"}, - {file = "coverage-7.4.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:69eb372f7e2ece89f14751fbcbe470295d73ed41ecd37ca36ed2eb47512a6ab9"}, - {file = "coverage-7.4.4-cp312-cp312-win32.whl", hash = "sha256:137eb07173141545e07403cca94ab625cc1cc6bc4c1e97b6e3846270e7e1fea0"}, - {file = "coverage-7.4.4-cp312-cp312-win_amd64.whl", hash = "sha256:d71eec7d83298f1af3326ce0ff1d0ea83c7cb98f72b577097f9083b20bdaf05e"}, - {file = "coverage-7.4.4-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:d5ae728ff3b5401cc320d792866987e7e7e880e6ebd24433b70a33b643bb0384"}, - {file = "coverage-7.4.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:cc4f1358cb0c78edef3ed237ef2c86056206bb8d9140e73b6b89fbcfcbdd40e1"}, - {file = "coverage-7.4.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8130a2aa2acb8788e0b56938786c33c7c98562697bf9f4c7d6e8e5e3a0501e4a"}, - {file = "coverage-7.4.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cf271892d13e43bc2b51e6908ec9a6a5094a4df1d8af0bfc360088ee6c684409"}, - {file = "coverage-7.4.4-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a4cdc86d54b5da0df6d3d3a2f0b710949286094c3a6700c21e9015932b81447e"}, - {file = "coverage-7.4.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:ae71e7ddb7a413dd60052e90528f2f65270aad4b509563af6d03d53e979feafd"}, - {file = "coverage-7.4.4-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:38dd60d7bf242c4ed5b38e094baf6401faa114fc09e9e6632374388a404f98e7"}, - {file = "coverage-7.4.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:aa5b1c1bfc28384f1f53b69a023d789f72b2e0ab1b3787aae16992a7ca21056c"}, - {file = "coverage-7.4.4-cp38-cp38-win32.whl", hash = "sha256:dfa8fe35a0bb90382837b238fff375de15f0dcdb9ae68ff85f7a63649c98527e"}, - {file = "coverage-7.4.4-cp38-cp38-win_amd64.whl", hash = "sha256:b2991665420a803495e0b90a79233c1433d6ed77ef282e8e152a324bbbc5e0c8"}, - {file = "coverage-7.4.4-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3b799445b9f7ee8bf299cfaed6f5b226c0037b74886a4e11515e569b36fe310d"}, - {file = "coverage-7.4.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:b4d33f418f46362995f1e9d4f3a35a1b6322cb959c31d88ae56b0298e1c22357"}, - {file = "coverage-7.4.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:aadacf9a2f407a4688d700e4ebab33a7e2e408f2ca04dbf4aef17585389eff3e"}, - {file = "coverage-7.4.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:7c95949560050d04d46b919301826525597f07b33beba6187d04fa64d47ac82e"}, - {file = "coverage-7.4.4-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ff7687ca3d7028d8a5f0ebae95a6e4827c5616b31a4ee1192bdfde697db110d4"}, - {file = "coverage-7.4.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:5fc1de20b2d4a061b3df27ab9b7c7111e9a710f10dc2b84d33a4ab25065994ec"}, - {file = "coverage-7.4.4-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:c74880fc64d4958159fbd537a091d2a585448a8f8508bf248d72112723974cbd"}, - {file = "coverage-7.4.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:742a76a12aa45b44d236815d282b03cfb1de3b4323f3e4ec933acfae08e54ade"}, - {file = "coverage-7.4.4-cp39-cp39-win32.whl", hash = "sha256:d89d7b2974cae412400e88f35d86af72208e1ede1a541954af5d944a8ba46c57"}, - {file = "coverage-7.4.4-cp39-cp39-win_amd64.whl", hash = "sha256:9ca28a302acb19b6af89e90f33ee3e1906961f94b54ea37de6737b7ca9d8827c"}, - {file = "coverage-7.4.4-pp38.pp39.pp310-none-any.whl", hash = "sha256:b2c5edc4ac10a7ef6605a966c58929ec6c1bd0917fb8c15cb3363f65aa40e677"}, - {file = "coverage-7.4.4.tar.gz", hash = "sha256:c901df83d097649e257e803be22592aedfd5182f07b3cc87d640bbb9afd50f49"}, + {file = "coverage-7.5.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a6519d917abb15e12380406d721e37613e2a67d166f9fb7e5a8ce0375744cd45"}, + {file = "coverage-7.5.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:aea7da970f1feccf48be7335f8b2ca64baf9b589d79e05b9397a06696ce1a1ec"}, + {file = "coverage-7.5.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:923b7b1c717bd0f0f92d862d1ff51d9b2b55dbbd133e05680204465f454bb286"}, + {file = "coverage-7.5.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:62bda40da1e68898186f274f832ef3e759ce929da9a9fd9fcf265956de269dbc"}, + {file = "coverage-7.5.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d8b7339180d00de83e930358223c617cc343dd08e1aa5ec7b06c3a121aec4e1d"}, + {file = "coverage-7.5.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:25a5caf742c6195e08002d3b6c2dd6947e50efc5fc2c2205f61ecb47592d2d83"}, + {file = "coverage-7.5.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:05ac5f60faa0c704c0f7e6a5cbfd6f02101ed05e0aee4d2822637a9e672c998d"}, + {file = "coverage-7.5.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:239a4e75e09c2b12ea478d28815acf83334d32e722e7433471fbf641c606344c"}, + {file = "coverage-7.5.3-cp310-cp310-win32.whl", hash = "sha256:a5812840d1d00eafae6585aba38021f90a705a25b8216ec7f66aebe5b619fb84"}, + {file = "coverage-7.5.3-cp310-cp310-win_amd64.whl", hash = "sha256:33ca90a0eb29225f195e30684ba4a6db05dbef03c2ccd50b9077714c48153cac"}, + {file = "coverage-7.5.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f81bc26d609bf0fbc622c7122ba6307993c83c795d2d6f6f6fd8c000a770d974"}, + {file = "coverage-7.5.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7cec2af81f9e7569280822be68bd57e51b86d42e59ea30d10ebdbb22d2cb7232"}, + {file = "coverage-7.5.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:55f689f846661e3f26efa535071775d0483388a1ccfab899df72924805e9e7cd"}, + {file = "coverage-7.5.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:50084d3516aa263791198913a17354bd1dc627d3c1639209640b9cac3fef5807"}, + {file = "coverage-7.5.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:341dd8f61c26337c37988345ca5c8ccabeff33093a26953a1ac72e7d0103c4fb"}, + {file = "coverage-7.5.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ab0b028165eea880af12f66086694768f2c3139b2c31ad5e032c8edbafca6ffc"}, + {file = "coverage-7.5.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:5bc5a8c87714b0c67cfeb4c7caa82b2d71e8864d1a46aa990b5588fa953673b8"}, + {file = "coverage-7.5.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:38a3b98dae8a7c9057bd91fbf3415c05e700a5114c5f1b5b0ea5f8f429ba6614"}, + {file = "coverage-7.5.3-cp311-cp311-win32.whl", hash = "sha256:fcf7d1d6f5da887ca04302db8e0e0cf56ce9a5e05f202720e49b3e8157ddb9a9"}, + {file = "coverage-7.5.3-cp311-cp311-win_amd64.whl", hash = "sha256:8c836309931839cca658a78a888dab9676b5c988d0dd34ca247f5f3e679f4e7a"}, + {file = "coverage-7.5.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:296a7d9bbc598e8744c00f7a6cecf1da9b30ae9ad51c566291ff1314e6cbbed8"}, + {file = "coverage-7.5.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:34d6d21d8795a97b14d503dcaf74226ae51eb1f2bd41015d3ef332a24d0a17b3"}, + {file = "coverage-7.5.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e317953bb4c074c06c798a11dbdd2cf9979dbcaa8ccc0fa4701d80042d4ebf1"}, + {file = "coverage-7.5.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:705f3d7c2b098c40f5b81790a5fedb274113373d4d1a69e65f8b68b0cc26f6db"}, + {file = "coverage-7.5.3-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b1196e13c45e327d6cd0b6e471530a1882f1017eb83c6229fc613cd1a11b53cd"}, + {file = "coverage-7.5.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:015eddc5ccd5364dcb902eaecf9515636806fa1e0d5bef5769d06d0f31b54523"}, + {file = "coverage-7.5.3-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:fd27d8b49e574e50caa65196d908f80e4dff64d7e592d0c59788b45aad7e8b35"}, + {file = "coverage-7.5.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:33fc65740267222fc02975c061eb7167185fef4cc8f2770267ee8bf7d6a42f84"}, + {file = "coverage-7.5.3-cp312-cp312-win32.whl", hash = "sha256:7b2a19e13dfb5c8e145c7a6ea959485ee8e2204699903c88c7d25283584bfc08"}, + {file = "coverage-7.5.3-cp312-cp312-win_amd64.whl", hash = "sha256:0bbddc54bbacfc09b3edaec644d4ac90c08ee8ed4844b0f86227dcda2d428fcb"}, + {file = "coverage-7.5.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:f78300789a708ac1f17e134593f577407d52d0417305435b134805c4fb135adb"}, + {file = "coverage-7.5.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b368e1aee1b9b75757942d44d7598dcd22a9dbb126affcbba82d15917f0cc155"}, + {file = "coverage-7.5.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f836c174c3a7f639bded48ec913f348c4761cbf49de4a20a956d3431a7c9cb24"}, + {file = "coverage-7.5.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:244f509f126dc71369393ce5fea17c0592c40ee44e607b6d855e9c4ac57aac98"}, + {file = "coverage-7.5.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c4c2872b3c91f9baa836147ca33650dc5c172e9273c808c3c3199c75490e709d"}, + {file = "coverage-7.5.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:dd4b3355b01273a56b20c219e74e7549e14370b31a4ffe42706a8cda91f19f6d"}, + {file = "coverage-7.5.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:f542287b1489c7a860d43a7d8883e27ca62ab84ca53c965d11dac1d3a1fab7ce"}, + {file = "coverage-7.5.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:75e3f4e86804023e991096b29e147e635f5e2568f77883a1e6eed74512659ab0"}, + {file = "coverage-7.5.3-cp38-cp38-win32.whl", hash = "sha256:c59d2ad092dc0551d9f79d9d44d005c945ba95832a6798f98f9216ede3d5f485"}, + {file = "coverage-7.5.3-cp38-cp38-win_amd64.whl", hash = "sha256:fa21a04112c59ad54f69d80e376f7f9d0f5f9123ab87ecd18fbb9ec3a2beed56"}, + {file = "coverage-7.5.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f5102a92855d518b0996eb197772f5ac2a527c0ec617124ad5242a3af5e25f85"}, + {file = "coverage-7.5.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d1da0a2e3b37b745a2b2a678a4c796462cf753aebf94edcc87dcc6b8641eae31"}, + {file = "coverage-7.5.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8383a6c8cefba1b7cecc0149415046b6fc38836295bc4c84e820872eb5478b3d"}, + {file = "coverage-7.5.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9aad68c3f2566dfae84bf46295a79e79d904e1c21ccfc66de88cd446f8686341"}, + {file = "coverage-7.5.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2e079c9ec772fedbade9d7ebc36202a1d9ef7291bc9b3a024ca395c4d52853d7"}, + {file = "coverage-7.5.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:bde997cac85fcac227b27d4fb2c7608a2c5f6558469b0eb704c5726ae49e1c52"}, + {file = "coverage-7.5.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:990fb20b32990b2ce2c5f974c3e738c9358b2735bc05075d50a6f36721b8f303"}, + {file = "coverage-7.5.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:3d5a67f0da401e105753d474369ab034c7bae51a4c31c77d94030d59e41df5bd"}, + {file = "coverage-7.5.3-cp39-cp39-win32.whl", hash = "sha256:e08c470c2eb01977d221fd87495b44867a56d4d594f43739a8028f8646a51e0d"}, + {file = "coverage-7.5.3-cp39-cp39-win_amd64.whl", hash = "sha256:1d2a830ade66d3563bb61d1e3c77c8def97b30ed91e166c67d0632c018f380f0"}, + {file = "coverage-7.5.3-pp38.pp39.pp310-none-any.whl", hash = "sha256:3538d8fb1ee9bdd2e2692b3b18c22bb1c19ffbefd06880f5ac496e42d7bb3884"}, + {file = "coverage-7.5.3.tar.gz", hash = "sha256:04aefca5190d1dc7a53a4c1a5a7f8568811306d7a8ee231c42fb69215571944f"}, ] [package.extras] @@ -522,13 +522,13 @@ tests = ["coverage", "coveralls", "dill", "mock", "nose"] [[package]] name = "faker" -version = "24.3.0" +version = "24.14.1" description = "Faker is a Python package that generates fake data for you." optional = false python-versions = ">=3.8" files = [ - {file = "Faker-24.3.0-py3-none-any.whl", hash = "sha256:9978025e765ba79f8bf6154c9630a9c2b7f9c9b0f175d4ad5e04b19a82a8d8d6"}, - {file = "Faker-24.3.0.tar.gz", hash = "sha256:5fb5aa9749d09971e04a41281ae3ceda9414f683d4810a694f8a8eebb8f9edec"}, + {file = "Faker-24.14.1-py3-none-any.whl", hash = "sha256:a5edba3aa17a1d689c8907e5b0cd1653079c2466a4807f083aa7b5f80a00225d"}, + {file = "Faker-24.14.1.tar.gz", hash = "sha256:380a3697e696ae4fcf50a93a3d9e0286fab7dfbf05a9caa4421fa4727c6b1e89"}, ] [package.dependencies] @@ -646,13 +646,13 @@ dotenv = ["python-dotenv"] [[package]] name = "flask-caching" -version = "2.1.0" +version = "2.3.0" description = "Adds caching support to Flask applications." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "Flask-Caching-2.1.0.tar.gz", hash = "sha256:b7500c145135836a952e3de3a80881d9654e327a29c852c9265607f5c449235c"}, - {file = "Flask_Caching-2.1.0-py3-none-any.whl", hash = "sha256:f02645a629a8c89800d96dc8f690a574a0d49dcd66c7536badc6d362ba46b716"}, + {file = "Flask_Caching-2.3.0-py3-none-any.whl", hash = "sha256:51771c75682e5abc1483b78b96d9131d7941dc669b073852edfa319dd4e29b6e"}, + {file = "flask_caching-2.3.0.tar.gz", hash = "sha256:d7e4ca64a33b49feb339fcdd17e6ba25f5e01168cf885e53790e885f83a4d2cf"}, ] [package.dependencies] @@ -674,25 +674,25 @@ files = [ Flask = ">=0.9" [[package]] -name = "flask_jwt_oidc" -version = "0.3.0" -description = "Flask JWT OIDC" +name = "flask-jwt-oidc" +version = "0.7.0" +description = "Opinionated flask oidc client" optional = false -python-versions = "*" +python-versions = "^3.9" files = [] develop = false [package.dependencies] -cachelib = "*" -flask = "*" -python-jose = "*" -six = "*" +cachelib = "0.*" +Flask = ">=2" +python-jose = "^3.3.0" +six = "^1.16.0" [package.source] type = "git" -url = "https://github.com/thorwolpert/flask-jwt-oidc.git" +url = "https://github.com/seeker25/flask-jwt-oidc.git" reference = "HEAD" -resolved_reference = "40cc811ccf70e838c5f7522fe8d83b7e58853539" +resolved_reference = "d208d4643e3b17358f7295bee0f955e67ba6ac88" [[package]] name = "flask-marshmallow" @@ -793,27 +793,49 @@ sqlalchemy = ">=2.0.16" [[package]] name = "freezegun" -version = "1.4.0" +version = "1.5.1" description = "Let your Python tests travel through time" optional = false python-versions = ">=3.7" files = [ - {file = "freezegun-1.4.0-py3-none-any.whl", hash = "sha256:55e0fc3c84ebf0a96a5aa23ff8b53d70246479e9a68863f1fcac5a3e52f19dd6"}, - {file = "freezegun-1.4.0.tar.gz", hash = "sha256:10939b0ba0ff5adaecf3b06a5c2f73071d9678e507c5eaedb23c761d56ac774b"}, + {file = "freezegun-1.5.1-py3-none-any.whl", hash = "sha256:bf111d7138a8abe55ab48a71755673dbaa4ab87f4cff5634a4442dfec34c15f1"}, + {file = "freezegun-1.5.1.tar.gz", hash = "sha256:b29dedfcda6d5e8e083ce71b2b542753ad48cfec44037b3fc79702e2980a89e9"}, ] [package.dependencies] python-dateutil = ">=2.7" +[[package]] +name = "gcp-queue" +version = "0.3.0" +description = "" +optional = false +python-versions = "^3.9" +files = [] +develop = false + +[package.dependencies] +flask = ">=1" +google-auth = "^2.28.2" +google-cloud-pubsub = "^2.20.2" +simple-cloudevent = {git = "https://github.com/daxiom/simple-cloudevent.py.git"} + +[package.source] +type = "git" +url = "https://github.com/seeker25/sbc-connect-common.git" +reference = "main" +resolved_reference = "c0d1dea449ac6332510841caee5400ff8f550159" +subdirectory = "python/gcp-queue" + [[package]] name = "google-api-core" -version = "2.17.1" +version = "2.19.0" description = "Google API client core library" optional = false python-versions = ">=3.7" files = [ - {file = "google-api-core-2.17.1.tar.gz", hash = "sha256:9df18a1f87ee0df0bc4eea2770ebc4228392d8cc4066655b320e2cfccb15db95"}, - {file = "google_api_core-2.17.1-py3-none-any.whl", hash = "sha256:610c5b90092c360736baccf17bd3efbcb30dd380e7a6dc28a71059edb8bd0d8e"}, + {file = "google-api-core-2.19.0.tar.gz", hash = "sha256:cf1b7c2694047886d2af1128a03ae99e391108a08804f87cfd35970e49c9cd10"}, + {file = "google_api_core-2.19.0-py3-none-any.whl", hash = "sha256:8661eec4078c35428fd3f69a2c7ee29e342896b70f01d1a1cbcb334372dd6251"}, ] [package.dependencies] @@ -821,6 +843,7 @@ google-auth = ">=2.14.1,<3.0.dev0" googleapis-common-protos = ">=1.56.2,<2.0.dev0" grpcio = {version = ">=1.49.1,<2.0dev", optional = true, markers = "python_version >= \"3.11\" and extra == \"grpc\""} grpcio-status = {version = ">=1.49.1,<2.0.dev0", optional = true, markers = "python_version >= \"3.11\" and extra == \"grpc\""} +proto-plus = ">=1.22.3,<2.0.0dev" protobuf = ">=3.19.5,<3.20.0 || >3.20.0,<3.20.1 || >3.20.1,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<5.0.0.dev0" requests = ">=2.18.0,<3.0.0.dev0" @@ -831,13 +854,13 @@ grpcio-gcp = ["grpcio-gcp (>=0.2.2,<1.0.dev0)"] [[package]] name = "google-auth" -version = "2.28.1" +version = "2.29.0" description = "Google Authentication Library" optional = false python-versions = ">=3.7" files = [ - {file = "google-auth-2.28.1.tar.gz", hash = "sha256:34fc3046c257cedcf1622fc4b31fc2be7923d9b4d44973d481125ecc50d83885"}, - {file = "google_auth-2.28.1-py2.py3-none-any.whl", hash = "sha256:25141e2d7a14bfcba945f5e9827f98092716e99482562f15306e5b026e21aa72"}, + {file = "google-auth-2.29.0.tar.gz", hash = "sha256:672dff332d073227550ffc7457868ac4218d6c500b155fe6cc17d2b13602c360"}, + {file = "google_auth-2.29.0-py2.py3-none-any.whl", hash = "sha256:d452ad095688cd52bae0ad6fafe027f6a6d6f560e810fec20914e17a09526415"}, ] [package.dependencies] @@ -854,13 +877,13 @@ requests = ["requests (>=2.20.0,<3.0.0.dev0)"] [[package]] name = "google-cloud-pubsub" -version = "2.20.0" +version = "2.21.2" description = "Google Cloud Pub/Sub API client library" optional = false python-versions = ">=3.7" files = [ - {file = "google-cloud-pubsub-2.20.0.tar.gz", hash = "sha256:48c8e17a8168c43e3188635cbd9e07fbe3004120433712ce84b3a04bbf18c188"}, - {file = "google_cloud_pubsub-2.20.0-py2.py3-none-any.whl", hash = "sha256:8c69ed04800f4f552cdf3b9028f06d9271ac6e60443b2308c984def442e69684"}, + {file = "google-cloud-pubsub-2.21.2.tar.gz", hash = "sha256:fc72226b14731db2873f7c4031cc757e274bbcdabcac7523b2cd6e46130d6096"}, + {file = "google_cloud_pubsub-2.21.2-py2.py3-none-any.whl", hash = "sha256:05a6b01e5bda6f4a4858700e3e9a12e3080589718d648b2383e5818131db9ce4"}, ] [package.dependencies] @@ -982,84 +1005,76 @@ protobuf = ">=3.19.5,<3.20.0 || >3.20.0,<3.20.1 || >3.20.1,<4.21.1 || >4.21.1,<4 [[package]] name = "grpcio" -version = "1.62.1" +version = "1.64.0" description = "HTTP/2-based RPC framework" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "grpcio-1.62.1-cp310-cp310-linux_armv7l.whl", hash = "sha256:179bee6f5ed7b5f618844f760b6acf7e910988de77a4f75b95bbfaa8106f3c1e"}, - {file = "grpcio-1.62.1-cp310-cp310-macosx_12_0_universal2.whl", hash = "sha256:48611e4fa010e823ba2de8fd3f77c1322dd60cb0d180dc6630a7e157b205f7ea"}, - {file = "grpcio-1.62.1-cp310-cp310-manylinux_2_17_aarch64.whl", hash = "sha256:b2a0e71b0a2158aa4bce48be9f8f9eb45cbd17c78c7443616d00abbe2a509f6d"}, - {file = "grpcio-1.62.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fbe80577c7880911d3ad65e5ecc997416c98f354efeba2f8d0f9112a67ed65a5"}, - {file = "grpcio-1.62.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58f6c693d446964e3292425e1d16e21a97a48ba9172f2d0df9d7b640acb99243"}, - {file = "grpcio-1.62.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:77c339403db5a20ef4fed02e4d1a9a3d9866bf9c0afc77a42234677313ea22f3"}, - {file = "grpcio-1.62.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b5a4ea906db7dec694098435d84bf2854fe158eb3cd51e1107e571246d4d1d70"}, - {file = "grpcio-1.62.1-cp310-cp310-win32.whl", hash = "sha256:4187201a53f8561c015bc745b81a1b2d278967b8de35f3399b84b0695e281d5f"}, - {file = "grpcio-1.62.1-cp310-cp310-win_amd64.whl", hash = "sha256:844d1f3fb11bd1ed362d3fdc495d0770cfab75761836193af166fee113421d66"}, - {file = "grpcio-1.62.1-cp311-cp311-linux_armv7l.whl", hash = "sha256:833379943d1728a005e44103f17ecd73d058d37d95783eb8f0b28ddc1f54d7b2"}, - {file = "grpcio-1.62.1-cp311-cp311-macosx_10_10_universal2.whl", hash = "sha256:c7fcc6a32e7b7b58f5a7d27530669337a5d587d4066060bcb9dee7a8c833dfb7"}, - {file = "grpcio-1.62.1-cp311-cp311-manylinux_2_17_aarch64.whl", hash = "sha256:fa7d28eb4d50b7cbe75bb8b45ed0da9a1dc5b219a0af59449676a29c2eed9698"}, - {file = "grpcio-1.62.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:48f7135c3de2f298b833be8b4ae20cafe37091634e91f61f5a7eb3d61ec6f660"}, - {file = "grpcio-1.62.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:71f11fd63365ade276c9d4a7b7df5c136f9030e3457107e1791b3737a9b9ed6a"}, - {file = "grpcio-1.62.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:4b49fd8fe9f9ac23b78437da94c54aa7e9996fbb220bac024a67469ce5d0825f"}, - {file = "grpcio-1.62.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:482ae2ae78679ba9ed5752099b32e5fe580443b4f798e1b71df412abf43375db"}, - {file = "grpcio-1.62.1-cp311-cp311-win32.whl", hash = "sha256:1faa02530b6c7426404372515fe5ddf66e199c2ee613f88f025c6f3bd816450c"}, - {file = "grpcio-1.62.1-cp311-cp311-win_amd64.whl", hash = "sha256:5bd90b8c395f39bc82a5fb32a0173e220e3f401ff697840f4003e15b96d1befc"}, - {file = "grpcio-1.62.1-cp312-cp312-linux_armv7l.whl", hash = "sha256:b134d5d71b4e0837fff574c00e49176051a1c532d26c052a1e43231f252d813b"}, - {file = "grpcio-1.62.1-cp312-cp312-macosx_10_10_universal2.whl", hash = "sha256:d1f6c96573dc09d50dbcbd91dbf71d5cf97640c9427c32584010fbbd4c0e0037"}, - {file = "grpcio-1.62.1-cp312-cp312-manylinux_2_17_aarch64.whl", hash = "sha256:359f821d4578f80f41909b9ee9b76fb249a21035a061a327f91c953493782c31"}, - {file = "grpcio-1.62.1-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a485f0c2010c696be269184bdb5ae72781344cb4e60db976c59d84dd6354fac9"}, - {file = "grpcio-1.62.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b50b09b4dc01767163d67e1532f948264167cd27f49e9377e3556c3cba1268e1"}, - {file = "grpcio-1.62.1-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:3227c667dccbe38f2c4d943238b887bac588d97c104815aecc62d2fd976e014b"}, - {file = "grpcio-1.62.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:3952b581eb121324853ce2b191dae08badb75cd493cb4e0243368aa9e61cfd41"}, - {file = "grpcio-1.62.1-cp312-cp312-win32.whl", hash = "sha256:83a17b303425104d6329c10eb34bba186ffa67161e63fa6cdae7776ff76df73f"}, - {file = "grpcio-1.62.1-cp312-cp312-win_amd64.whl", hash = "sha256:6696ffe440333a19d8d128e88d440f91fb92c75a80ce4b44d55800e656a3ef1d"}, - {file = "grpcio-1.62.1-cp37-cp37m-linux_armv7l.whl", hash = "sha256:e3393b0823f938253370ebef033c9fd23d27f3eae8eb9a8f6264900c7ea3fb5a"}, - {file = "grpcio-1.62.1-cp37-cp37m-macosx_10_10_universal2.whl", hash = "sha256:83e7ccb85a74beaeae2634f10eb858a0ed1a63081172649ff4261f929bacfd22"}, - {file = "grpcio-1.62.1-cp37-cp37m-manylinux_2_17_aarch64.whl", hash = "sha256:882020c87999d54667a284c7ddf065b359bd00251fcd70279ac486776dbf84ec"}, - {file = "grpcio-1.62.1-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a10383035e864f386fe096fed5c47d27a2bf7173c56a6e26cffaaa5a361addb1"}, - {file = "grpcio-1.62.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:960edebedc6b9ada1ef58e1c71156f28689978188cd8cff3b646b57288a927d9"}, - {file = "grpcio-1.62.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:23e2e04b83f347d0aadde0c9b616f4726c3d76db04b438fd3904b289a725267f"}, - {file = "grpcio-1.62.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:978121758711916d34fe57c1f75b79cdfc73952f1481bb9583399331682d36f7"}, - {file = "grpcio-1.62.1-cp37-cp37m-win_amd64.whl", hash = "sha256:9084086190cc6d628f282e5615f987288b95457292e969b9205e45b442276407"}, - {file = "grpcio-1.62.1-cp38-cp38-linux_armv7l.whl", hash = "sha256:22bccdd7b23c420a27fd28540fb5dcbc97dc6be105f7698cb0e7d7a420d0e362"}, - {file = "grpcio-1.62.1-cp38-cp38-macosx_10_10_universal2.whl", hash = "sha256:8999bf1b57172dbc7c3e4bb3c732658e918f5c333b2942243f10d0d653953ba9"}, - {file = "grpcio-1.62.1-cp38-cp38-manylinux_2_17_aarch64.whl", hash = "sha256:d9e52558b8b8c2f4ac05ac86344a7417ccdd2b460a59616de49eb6933b07a0bd"}, - {file = "grpcio-1.62.1-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1714e7bc935780bc3de1b3fcbc7674209adf5208ff825799d579ffd6cd0bd505"}, - {file = "grpcio-1.62.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c8842ccbd8c0e253c1f189088228f9b433f7a93b7196b9e5b6f87dba393f5d5d"}, - {file = "grpcio-1.62.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:1f1e7b36bdff50103af95a80923bf1853f6823dd62f2d2a2524b66ed74103e49"}, - {file = "grpcio-1.62.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:bba97b8e8883a8038606480d6b6772289f4c907f6ba780fa1f7b7da7dfd76f06"}, - {file = "grpcio-1.62.1-cp38-cp38-win32.whl", hash = "sha256:a7f615270fe534548112a74e790cd9d4f5509d744dd718cd442bf016626c22e4"}, - {file = "grpcio-1.62.1-cp38-cp38-win_amd64.whl", hash = "sha256:e6c8c8693df718c5ecbc7babb12c69a4e3677fd11de8886f05ab22d4e6b1c43b"}, - {file = "grpcio-1.62.1-cp39-cp39-linux_armv7l.whl", hash = "sha256:73db2dc1b201d20ab7083e7041946910bb991e7e9761a0394bbc3c2632326483"}, - {file = "grpcio-1.62.1-cp39-cp39-macosx_10_10_universal2.whl", hash = "sha256:407b26b7f7bbd4f4751dbc9767a1f0716f9fe72d3d7e96bb3ccfc4aace07c8de"}, - {file = "grpcio-1.62.1-cp39-cp39-manylinux_2_17_aarch64.whl", hash = "sha256:f8de7c8cef9261a2d0a62edf2ccea3d741a523c6b8a6477a340a1f2e417658de"}, - {file = "grpcio-1.62.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9bd5c8a1af40ec305d001c60236308a67e25419003e9bb3ebfab5695a8d0b369"}, - {file = "grpcio-1.62.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:be0477cb31da67846a33b1a75c611f88bfbcd427fe17701b6317aefceee1b96f"}, - {file = "grpcio-1.62.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:60dcd824df166ba266ee0cfaf35a31406cd16ef602b49f5d4dfb21f014b0dedd"}, - {file = "grpcio-1.62.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:973c49086cabab773525f6077f95e5a993bfc03ba8fc32e32f2c279497780585"}, - {file = "grpcio-1.62.1-cp39-cp39-win32.whl", hash = "sha256:12859468e8918d3bd243d213cd6fd6ab07208195dc140763c00dfe901ce1e1b4"}, - {file = "grpcio-1.62.1-cp39-cp39-win_amd64.whl", hash = "sha256:b7209117bbeebdfa5d898205cc55153a51285757902dd73c47de498ad4d11332"}, - {file = "grpcio-1.62.1.tar.gz", hash = "sha256:6c455e008fa86d9e9a9d85bb76da4277c0d7d9668a3bfa70dbe86e9f3c759947"}, + {file = "grpcio-1.64.0-cp310-cp310-linux_armv7l.whl", hash = "sha256:3b09c3d9de95461214a11d82cc0e6a46a6f4e1f91834b50782f932895215e5db"}, + {file = "grpcio-1.64.0-cp310-cp310-macosx_12_0_universal2.whl", hash = "sha256:7e013428ab472892830287dd082b7d129f4d8afef49227a28223a77337555eaa"}, + {file = "grpcio-1.64.0-cp310-cp310-manylinux_2_17_aarch64.whl", hash = "sha256:02cc9cc3f816d30f7993d0d408043b4a7d6a02346d251694d8ab1f78cc723e7e"}, + {file = "grpcio-1.64.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1f5de082d936e0208ce8db9095821361dfa97af8767a6607ae71425ac8ace15c"}, + {file = "grpcio-1.64.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d7b7bf346391dffa182fba42506adf3a84f4a718a05e445b37824136047686a1"}, + {file = "grpcio-1.64.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:b2cbdfba18408389a1371f8c2af1659119e1831e5ed24c240cae9e27b4abc38d"}, + {file = "grpcio-1.64.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:aca4f15427d2df592e0c8f3d38847e25135e4092d7f70f02452c0e90d6a02d6d"}, + {file = "grpcio-1.64.0-cp310-cp310-win32.whl", hash = "sha256:7c1f5b2298244472bcda49b599be04579f26425af0fd80d3f2eb5fd8bc84d106"}, + {file = "grpcio-1.64.0-cp310-cp310-win_amd64.whl", hash = "sha256:73f84f9e5985a532e47880b3924867de16fa1aa513fff9b26106220c253c70c5"}, + {file = "grpcio-1.64.0-cp311-cp311-linux_armv7l.whl", hash = "sha256:2a18090371d138a57714ee9bffd6c9c9cb2e02ce42c681aac093ae1e7189ed21"}, + {file = "grpcio-1.64.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:59c68df3a934a586c3473d15956d23a618b8f05b5e7a3a904d40300e9c69cbf0"}, + {file = "grpcio-1.64.0-cp311-cp311-manylinux_2_17_aarch64.whl", hash = "sha256:b52e1ec7185512103dd47d41cf34ea78e7a7361ba460187ddd2416b480e0938c"}, + {file = "grpcio-1.64.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8d598b5d5e2c9115d7fb7e2cb5508d14286af506a75950762aa1372d60e41851"}, + {file = "grpcio-1.64.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:01615bbcae6875eee8091e6b9414072f4e4b00d8b7e141f89635bdae7cf784e5"}, + {file = "grpcio-1.64.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:0b2dfe6dcace264807d9123d483d4c43274e3f8c39f90ff51de538245d7a4145"}, + {file = "grpcio-1.64.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:7f17572dc9acd5e6dfd3014d10c0b533e9f79cd9517fc10b0225746f4c24b58e"}, + {file = "grpcio-1.64.0-cp311-cp311-win32.whl", hash = "sha256:6ec5ed15b4ffe56e2c6bc76af45e6b591c9be0224b3fb090adfb205c9012367d"}, + {file = "grpcio-1.64.0-cp311-cp311-win_amd64.whl", hash = "sha256:597191370951b477b7a1441e1aaa5cacebeb46a3b0bd240ec3bb2f28298c7553"}, + {file = "grpcio-1.64.0-cp312-cp312-linux_armv7l.whl", hash = "sha256:1ce4cd5a61d4532651079e7aae0fedf9a80e613eed895d5b9743e66b52d15812"}, + {file = "grpcio-1.64.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:650a8150a9b288f40d5b7c1d5400cc11724eae50bd1f501a66e1ea949173649b"}, + {file = "grpcio-1.64.0-cp312-cp312-manylinux_2_17_aarch64.whl", hash = "sha256:8de0399b983f8676a7ccfdd45e5b2caec74a7e3cc576c6b1eecf3b3680deda5e"}, + {file = "grpcio-1.64.0-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:46b8b43ba6a2a8f3103f103f97996cad507bcfd72359af6516363c48793d5a7b"}, + {file = "grpcio-1.64.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a54362f03d4dcfae63be455d0a7d4c1403673498b92c6bfe22157d935b57c7a9"}, + {file = "grpcio-1.64.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:1f8ea18b928e539046bb5f9c124d717fbf00cc4b2d960ae0b8468562846f5aa1"}, + {file = "grpcio-1.64.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:c56c91bd2923ddb6e7ed28ebb66d15633b03e0df22206f22dfcdde08047e0a48"}, + {file = "grpcio-1.64.0-cp312-cp312-win32.whl", hash = "sha256:874c741c8a66f0834f653a69e7e64b4e67fcd4a8d40296919b93bab2ccc780ba"}, + {file = "grpcio-1.64.0-cp312-cp312-win_amd64.whl", hash = "sha256:0da1d921f8e4bcee307aeef6c7095eb26e617c471f8cb1c454fd389c5c296d1e"}, + {file = "grpcio-1.64.0-cp38-cp38-linux_armv7l.whl", hash = "sha256:c46fb6bfca17bfc49f011eb53416e61472fa96caa0979b4329176bdd38cbbf2a"}, + {file = "grpcio-1.64.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:3d2004e85cf5213995d09408501f82c8534700d2babeb81dfdba2a3bff0bb396"}, + {file = "grpcio-1.64.0-cp38-cp38-manylinux_2_17_aarch64.whl", hash = "sha256:6d5541eb460d73a07418524fb64dcfe0adfbcd32e2dac0f8f90ce5b9dd6c046c"}, + {file = "grpcio-1.64.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1f279ad72dd7d64412e10f2443f9f34872a938c67387863c4cd2fb837f53e7d2"}, + {file = "grpcio-1.64.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:85fda90b81da25993aa47fae66cae747b921f8f6777550895fb62375b776a231"}, + {file = "grpcio-1.64.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a053584079b793a54bece4a7d1d1b5c0645bdbee729215cd433703dc2532f72b"}, + {file = "grpcio-1.64.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:579dd9fb11bc73f0de061cab5f8b2def21480fd99eb3743ed041ad6a1913ee2f"}, + {file = "grpcio-1.64.0-cp38-cp38-win32.whl", hash = "sha256:23b6887bb21d77649d022fa1859e05853fdc2e60682fd86c3db652a555a282e0"}, + {file = "grpcio-1.64.0-cp38-cp38-win_amd64.whl", hash = "sha256:753cb58683ba0c545306f4e17dabf468d29cb6f6b11832e1e432160bb3f8403c"}, + {file = "grpcio-1.64.0-cp39-cp39-linux_armv7l.whl", hash = "sha256:2186d76a7e383e1466e0ea2b0febc343ffeae13928c63c6ec6826533c2d69590"}, + {file = "grpcio-1.64.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:0f30596cdcbed3c98024fb4f1d91745146385b3f9fd10c9f2270cbfe2ed7ed91"}, + {file = "grpcio-1.64.0-cp39-cp39-manylinux_2_17_aarch64.whl", hash = "sha256:d9171f025a196f5bcfec7e8e7ffb7c3535f7d60aecd3503f9e250296c7cfc150"}, + {file = "grpcio-1.64.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cf4c8daed18ae2be2f1fc7d613a76ee2a2e28fdf2412d5c128be23144d28283d"}, + {file = "grpcio-1.64.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3550493ac1d23198d46dc9c9b24b411cef613798dc31160c7138568ec26bc9b4"}, + {file = "grpcio-1.64.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:3161a8f8bb38077a6470508c1a7301cd54301c53b8a34bb83e3c9764874ecabd"}, + {file = "grpcio-1.64.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:2e8fabe2cc57a369638ab1ad8e6043721014fdf9a13baa7c0e35995d3a4a7618"}, + {file = "grpcio-1.64.0-cp39-cp39-win32.whl", hash = "sha256:31890b24d47b62cc27da49a462efe3d02f3c120edb0e6c46dcc0025506acf004"}, + {file = "grpcio-1.64.0-cp39-cp39-win_amd64.whl", hash = "sha256:5a56797dea8c02e7d3a85dfea879f286175cf4d14fbd9ab3ef2477277b927baa"}, + {file = "grpcio-1.64.0.tar.gz", hash = "sha256:257baf07f53a571c215eebe9679c3058a313fd1d1f7c4eede5a8660108c52d9c"}, ] [package.extras] -protobuf = ["grpcio-tools (>=1.62.1)"] +protobuf = ["grpcio-tools (>=1.64.0)"] [[package]] name = "grpcio-status" -version = "1.62.1" +version = "1.62.2" description = "Status proto mapping for gRPC" optional = false python-versions = ">=3.6" files = [ - {file = "grpcio-status-1.62.1.tar.gz", hash = "sha256:3431c8abbab0054912c41df5c72f03ddf3b7a67be8a287bb3c18a3456f96ff77"}, - {file = "grpcio_status-1.62.1-py3-none-any.whl", hash = "sha256:af0c3ab85da31669f21749e8d53d669c061ebc6ce5637be49a46edcb7aa8ab17"}, + {file = "grpcio-status-1.62.2.tar.gz", hash = "sha256:62e1bfcb02025a1cd73732a2d33672d3e9d0df4d21c12c51e0bbcaf09bab742a"}, + {file = "grpcio_status-1.62.2-py3-none-any.whl", hash = "sha256:206ddf0eb36bc99b033f03b2c8e95d319f0044defae9b41ae21408e7e0cda48f"}, ] [package.dependencies] googleapis-common-protos = ">=1.5.5" -grpcio = ">=1.62.1" +grpcio = ">=1.62.2" protobuf = ">=4.21.6" [[package]] @@ -1214,28 +1229,26 @@ urllib3 = ">=1.26.0,<3" [[package]] name = "launchdarkly-server-sdk" -version = "9.2.2" +version = "8.2.1" description = "LaunchDarkly SDK for Python" optional = false -python-versions = ">=3.8" +python-versions = "*" files = [ - {file = "launchdarkly_server_sdk-9.2.2-py3-none-any.whl", hash = "sha256:d7b544c60c7c2b431c8976dda472c68f910c7c0061b90c8c2ef0397d8f05c519"}, - {file = "launchdarkly_server_sdk-9.2.2.tar.gz", hash = "sha256:3785d0159c2a74434cd85c16dd88e41ac94bb5cd7563def4d781d99e59c4eba0"}, + {file = "launchdarkly-server-sdk-8.2.1.tar.gz", hash = "sha256:94adbd52f635ad2f1a8b4a835cbbe4ce77919a6915136b303eaca3e2a54903be"}, + {file = "launchdarkly_server_sdk-8.2.1-py3-none-any.whl", hash = "sha256:b7680a4d5856da133b0dad8eca820e48bb5f2fb6dc34ebbf7f1a3a681033b426"}, ] [package.dependencies] certifi = ">=2018.4.16" expiringdict = ">=1.1.4" -launchdarkly-eventsource = ">=1.1.0,<2.0.0" pyRFC3339 = ">=1.0" semver = ">=2.10.2" -urllib3 = ">=1.26.0,<3" +urllib3 = ">=1.22.0,<3" [package.extras] consul = ["python-consul (>=1.0.1)"] dynamodb = ["boto3 (>=1.9.71)"] redis = ["redis (>=2.10.5)"] -test-filesource = ["pyyaml (>=5.3.1)", "watchdog (>=3.0.0)"] [[package]] name = "lovely-pytest-docker" @@ -1429,43 +1442,44 @@ flake8 = ">=5.0.0" [[package]] name = "pg8000" -version = "1.30.5" +version = "1.31.2" description = "PostgreSQL interface library" optional = false python-versions = ">=3.8" files = [ - {file = "pg8000-1.30.5-py3-none-any.whl", hash = "sha256:1abf18da652b0ad8e9cbfe57ed841c350b5330c33d8151303555db1fe5ce57f8"}, - {file = "pg8000-1.30.5.tar.gz", hash = "sha256:072f7ad00cd723695cb2e9fc02c1dfb84c781455e97b8de6f4c4281eea08078c"}, + {file = "pg8000-1.31.2-py3-none-any.whl", hash = "sha256:436c771ede71af4d4c22ba867a30add0bc5c942d7ab27fadbb6934a487ecc8f6"}, + {file = "pg8000-1.31.2.tar.gz", hash = "sha256:1ea46cf09d8eca07fe7eaadefd7951e37bee7fabe675df164f1a572ffb300876"}, ] [package.dependencies] python-dateutil = ">=2.8.2" -scramp = ">=1.4.4" +scramp = ">=1.4.5" [[package]] name = "platformdirs" -version = "4.2.0" -description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +version = "4.2.2" +description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." optional = false python-versions = ">=3.8" files = [ - {file = "platformdirs-4.2.0-py3-none-any.whl", hash = "sha256:0614df2a2f37e1a662acbd8e2b25b92ccf8632929bc6d43467e17fe89c75e068"}, - {file = "platformdirs-4.2.0.tar.gz", hash = "sha256:ef0cc731df711022c174543cb70a9b5bd22e5a9337c8624ef2c2ceb8ddad8768"}, + {file = "platformdirs-4.2.2-py3-none-any.whl", hash = "sha256:2d7a1657e36a80ea911db832a8a6ece5ee53d8de21edd5cc5879af6530b1bfee"}, + {file = "platformdirs-4.2.2.tar.gz", hash = "sha256:38b7b51f512eed9e84a22788b4bce1de17c0adb134d6becb09836e37d8654cd3"}, ] [package.extras] docs = ["furo (>=2023.9.10)", "proselint (>=0.13)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.25.2)"] test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)"] +type = ["mypy (>=1.8)"] [[package]] name = "pluggy" -version = "1.4.0" +version = "1.5.0" description = "plugin and hook calling mechanisms for python" optional = false python-versions = ">=3.8" files = [ - {file = "pluggy-1.4.0-py3-none-any.whl", hash = "sha256:7db9f7b503d67d1c5b95f59773ebb58a8c1c288129a88665838012cfb07b8981"}, - {file = "pluggy-1.4.0.tar.gz", hash = "sha256:8c85c2876142a764e5b7548e7d9a0e0ddb46f5185161049a79b7e974454223be"}, + {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, + {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, ] [package.extras] @@ -1695,17 +1709,17 @@ files = [ [[package]] name = "pylint" -version = "3.1.0" +version = "3.2.2" description = "python code static checker" optional = false python-versions = ">=3.8.0" files = [ - {file = "pylint-3.1.0-py3-none-any.whl", hash = "sha256:507a5b60953874766d8a366e8e8c7af63e058b26345cfcb5f91f89d987fd6b74"}, - {file = "pylint-3.1.0.tar.gz", hash = "sha256:6a69beb4a6f63debebaab0a3477ecd0f559aa726af4954fc948c51f7a2549e23"}, + {file = "pylint-3.2.2-py3-none-any.whl", hash = "sha256:3f8788ab20bb8383e06dd2233e50f8e08949cfd9574804564803441a4946eab4"}, + {file = "pylint-3.2.2.tar.gz", hash = "sha256:d068ca1dfd735fb92a07d33cb8f288adc0f6bc1287a139ca2425366f7cbe38f8"}, ] [package.dependencies] -astroid = ">=3.1.0,<=3.2.0-dev0" +astroid = ">=3.2.2,<=3.3.0-dev0" colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} dill = {version = ">=0.3.7", markers = "python_version >= \"3.12\""} isort = ">=4.2.5,<5.13.0 || >5.13.0,<6" @@ -1801,23 +1815,23 @@ files = [ [[package]] name = "pytest" -version = "8.1.1" +version = "8.2.1" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" files = [ - {file = "pytest-8.1.1-py3-none-any.whl", hash = "sha256:2a8386cfc11fa9d2c50ee7b2a57e7d898ef90470a7a34c4b949ff59662bb78b7"}, - {file = "pytest-8.1.1.tar.gz", hash = "sha256:ac978141a75948948817d360297b7aae0fcb9d6ff6bc9ec6d514b85d5a65c044"}, + {file = "pytest-8.2.1-py3-none-any.whl", hash = "sha256:faccc5d332b8c3719f40283d0d44aa5cf101cec36f88cde9ed8f2bc0538612b1"}, + {file = "pytest-8.2.1.tar.gz", hash = "sha256:5046e5b46d8e4cac199c373041f26be56fdb81eb4e67dc11d4e10811fc3408fd"}, ] [package.dependencies] colorama = {version = "*", markers = "sys_platform == \"win32\""} iniconfig = "*" packaging = "*" -pluggy = ">=1.4,<2.0" +pluggy = ">=1.5,<2.0" [package.extras] -testing = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-cov" @@ -1839,17 +1853,17 @@ testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtuale [[package]] name = "pytest-mock" -version = "3.12.0" +version = "3.14.0" description = "Thin-wrapper around the mock package for easier use with pytest" optional = false python-versions = ">=3.8" files = [ - {file = "pytest-mock-3.12.0.tar.gz", hash = "sha256:31a40f038c22cad32287bb43932054451ff5583ff094bca6f675df2f8bc1a6e9"}, - {file = "pytest_mock-3.12.0-py3-none-any.whl", hash = "sha256:0972719a7263072da3a21c7f4773069bcc7486027d7e8e1f81d98a47e701bc4f"}, + {file = "pytest-mock-3.14.0.tar.gz", hash = "sha256:2719255a1efeceadbc056d6bf3df3d1c5015530fb40cf347c0f9afac88410bd0"}, + {file = "pytest_mock-3.14.0-py3-none-any.whl", hash = "sha256:0b72c38033392a5f4621342fe11e9219ac11ec9d375f8e2a0c164539e0d70f6f"}, ] [package.dependencies] -pytest = ">=5.0" +pytest = ">=6.2.5" [package.extras] dev = ["pre-commit", "pytest-asyncio", "tox"] @@ -1969,18 +1983,18 @@ jaeger-client = "*" type = "git" url = "https://github.com/bcgov/sbc-common-components.git" reference = "HEAD" -resolved_reference = "5f99e135214ae949c9af951d4aa0b88b1067d853" +resolved_reference = "e770b4ab496e044d292500e62bc19a17079a73ec" subdirectory = "python" [[package]] name = "scramp" -version = "1.4.4" +version = "1.4.5" description = "An implementation of the SCRAM protocol." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "scramp-1.4.4-py3-none-any.whl", hash = "sha256:b142312df7c2977241d951318b7ee923d6b7a4f75ba0f05b621ece1ed616faa3"}, - {file = "scramp-1.4.4.tar.gz", hash = "sha256:b7022a140040f33cf863ab2657917ed05287a807b917950489b89b9f685d59bc"}, + {file = "scramp-1.4.5-py3-none-any.whl", hash = "sha256:50e37c464fc67f37994e35bee4151e3d8f9320e9c204fca83a5d313c121bbbe7"}, + {file = "scramp-1.4.5.tar.gz", hash = "sha256:be3fbe774ca577a7a658117dca014e5d254d158cecae3dd60332dfe33ce6d78e"}, ] [package.dependencies] @@ -2044,19 +2058,18 @@ tornado = ["tornado (>=5)"] [[package]] name = "setuptools" -version = "69.2.0" +version = "70.0.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "setuptools-69.2.0-py3-none-any.whl", hash = "sha256:c21c49fb1042386df081cb5d86759792ab89efca84cf114889191cd09aacc80c"}, - {file = "setuptools-69.2.0.tar.gz", hash = "sha256:0ff4183f8f42cd8fa3acea16c45205521a4ef28f73c6391d8a25e92893134f2e"}, + {file = "setuptools-70.0.0-py3-none-any.whl", hash = "sha256:54faa7f2e8d2d11bcd2c07bed282eef1046b5c080d1c32add737d7b5817b1ad4"}, + {file = "setuptools-70.0.0.tar.gz", hash = "sha256:f211a66637b8fa059bb28183da127d4e86396c991a942b028c6650d4319c3fd0"}, ] [package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] -testing = ["build[virtualenv]", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "mypy (==1.9)", "packaging (>=23.2)", "pip (>=19.1)", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff (>=0.2.1)", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] -testing-integration = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "packaging (>=23.2)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] +testing = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "mypy (==1.9)", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.1)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (>=0.2.1)", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] [[package]] name = "simple-cloudevent" @@ -2111,7 +2124,7 @@ develop = false type = "git" url = "https://github.com/bcgov/lear.git" reference = "feature-legal-name" -resolved_reference = "bb3209f8e8894c9b9f7be95a9fd871c644e2ec69" +resolved_reference = "e5a432d1460dc84208465ef35c0c81ab02e66f51" subdirectory = "python/common/sql-versioning" [[package]] @@ -2273,13 +2286,13 @@ twisted = ["twisted"] [[package]] name = "tomlkit" -version = "0.12.4" +version = "0.12.5" description = "Style preserving TOML library" optional = false python-versions = ">=3.7" files = [ - {file = "tomlkit-0.12.4-py3-none-any.whl", hash = "sha256:5cd82d48a3dd89dee1f9d64420aa20ae65cfbd00668d6f094d7578a78efbb77b"}, - {file = "tomlkit-0.12.4.tar.gz", hash = "sha256:7ca1cfc12232806517a8515047ba66a19369e71edf2439d0f5824f91032b6cc3"}, + {file = "tomlkit-0.12.5-py3-none-any.whl", hash = "sha256:af914f5a9c59ed9d0762c7b64d3b5d5df007448eb9cd2edc8a46b1eafead172f"}, + {file = "tomlkit-0.12.5.tar.gz", hash = "sha256:eef34fba39834d4d6b73c9ba7f3e4d1c417a4e56f89a7e96e090dd0d24b8fb3c"}, ] [[package]] @@ -2350,4 +2363,4 @@ watchdog = ["watchdog (>=2.3)"] [metadata] lock-version = "2.0" python-versions = "^3.12" -content-hash = "6ed39989416242b0917aea66317b7c94e2d6bdc34e58c391ce23c15defbd55e6" +content-hash = "fbf5a52a364793793ad0d5944f9f222cc7fcc3af331f493284727ff4aa2cd5de" diff --git a/pay-api/pyproject.toml b/pay-api/pyproject.toml index c9639f753..b8335b7a8 100644 --- a/pay-api/pyproject.toml +++ b/pay-api/pyproject.toml @@ -7,7 +7,7 @@ readme = "README.md" [tool.poetry.dependencies] python = "^3.12" -flask-caching = "2.1.0" +flask-caching = "2.3.0" flask-cors = "4.0.0" flask-migrate = "4.0.7" flask-moment = "1.0.5" @@ -35,16 +35,10 @@ cryptography = "42.0.5" dpath = "2.1.6" ecdsa = "0.18.0" expiringdict = "1.2.2" -flask-jwt-oidc = {git = "https://github.com/thorwolpert/flask-jwt-oidc.git"} +flask-jwt-oidc = {git = "https://github.com/seeker25/flask-jwt-oidc.git"} flask-marshmallow = "1.2.0" -google-api-core = "2.17.1" -google-auth = "2.28.1" -google-cloud-pubsub = "2.20.0" -googleapis-common-protos = "1.63.0" +gcp-queue = { git = "https://github.com/seeker25/sbc-connect-common.git", subdirectory = "python/gcp-queue", branch = "main" } greenlet = "3.0.3" -grpc-google-iam-v1 = "0.13.0" -grpcio-status = "1.62.1" -grpcio = "1.62.1" gunicorn = "21.2.0" holidays = "0.37" idna = "3.6" @@ -52,7 +46,7 @@ itsdangerous = "2.1.2" jaeger-client = "4.8.0" jsonschema = "4.17.3" launchdarkly-eventsource = "1.1.1" -launchdarkly-server-sdk = "9.2.2" +launchdarkly-server-sdk = "8.2.1" marshmallow-sqlalchemy = "1.0.0" marshmallow = "3.21.1" opentracing = "2.4.0" @@ -80,7 +74,6 @@ thrift = "0.16.0" tornado = "6.4" typing-extensions = "4.10.0" urllib3 = "2.2.1" -simple-cloudevent = {git = "https://github.com/daxiom/simple-cloudevent.py.git"} sbc-common-components = {git = "https://github.com/bcgov/sbc-common-components.git", subdirectory = "python"} pg8000 = "^1.30.5" sql-versioning = { git = "https://github.com/bcgov/lear.git", subdirectory = "python/common/sql-versioning", branch = "feature-legal-name" } diff --git a/pay-api/src/pay_api/__init__.py b/pay-api/src/pay_api/__init__.py index 950fd5e65..c5216cd3e 100755 --- a/pay-api/src/pay_api/__init__.py +++ b/pay-api/src/pay_api/__init__.py @@ -36,7 +36,6 @@ from pay_api.utils.cache import cache from pay_api.utils.logging import setup_logging from pay_api.utils.run_version import get_run_version -from .services.gcp_queue import queue setup_logging(os.path.join(_Config.PROJECT_ROOT, 'logging.conf')) diff --git a/pay-api/src/pay_api/services/payment_account.py b/pay-api/src/pay_api/services/payment_account.py index 6f7348590..d67bdca16 100644 --- a/pay-api/src/pay_api/services/payment_account.py +++ b/pay-api/src/pay_api/services/payment_account.py @@ -47,7 +47,7 @@ from pay_api.services.statement_settings import StatementSettings from pay_api.utils.enums import ( AuthHeaderType, CfsAccountStatus, ContentType, InvoiceStatus, PaymentMethod, PaymentSystem, QueueSources, - QueueSources, StatementFrequency) + StatementFrequency) from pay_api.utils.errors import Error from pay_api.utils.user_context import UserContext, user_context from pay_api.utils.util import ( @@ -822,7 +822,7 @@ def _publish_queue_message(self, payload: dict, message_type: str): """Publish to account mailer to send out confirmation email or notification email.""" try: gcp_queue_publisher.publish_to_queue( - gcp_queue_publisher.QueueMessage( + QueueMessage( source=QueueSources.PAY_API.value, message_type=message_type, payload=payload, @@ -884,7 +884,7 @@ def unlock_frozen_accounts(payment: Payment): try: gcp_queue_publisher.publish_to_queue( - gcp_queue_publisher.QueueMessage( + QueueMessage( source=QueueSources.PAY_API.value, message_type=QueueMessageTypes.NSF_UNLOCK_ACCOUNT.value, payload=payload, diff --git a/pay-api/src/pay_api/services/payment_transaction.py b/pay-api/src/pay_api/services/payment_transaction.py index bfd19f6db..3fa1cea81 100644 --- a/pay-api/src/pay_api/services/payment_transaction.py +++ b/pay-api/src/pay_api/services/payment_transaction.py @@ -16,9 +16,9 @@ from __future__ import annotations import uuid -from dataclasses import asdict, dataclass +from dataclasses import asdict from datetime import datetime -from typing import Dict, List, Optional +from typing import Dict, List import humps from flask import current_app @@ -45,16 +45,6 @@ from .payment import Payment -@dataclass -class PaymentToken: - """Payment Token payload common interface for LEAR and Names.""" - - id: Optional[str] = None - status_code: Optional[str] = None - filing_identifier: Optional[str] = None - corp_type_code: Optional[str] = None - - class PaymentTransaction: # pylint: disable=too-many-instance-attributes, too-many-public-methods """Service to manage Payment transaction operations.""" From 7411bde70b1664887bbced197999d53379ba1213 Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Thu, 30 May 2024 20:54:28 -0700 Subject: [PATCH 3/8] Fix lint and test for ftp-poller --- jobs/ftp-poller/invoke_jobs.py | 3 +- .../openshift/ftp-poller-build.json | 139 ---- .../openshift/ftp-poller-deploy.json | 417 ------------ jobs/ftp-poller/poetry.lock | 622 ++++++++++-------- jobs/ftp-poller/pyproject.toml | 6 +- 5 files changed, 366 insertions(+), 821 deletions(-) delete mode 100644 jobs/ftp-poller/openshift/ftp-poller-build.json delete mode 100644 jobs/ftp-poller/openshift/ftp-poller-deploy.json diff --git a/jobs/ftp-poller/invoke_jobs.py b/jobs/ftp-poller/invoke_jobs.py index eddfc319f..875ff01e8 100755 --- a/jobs/ftp-poller/invoke_jobs.py +++ b/jobs/ftp-poller/invoke_jobs.py @@ -44,9 +44,8 @@ def create_app(run_mode=os.getenv('FLASK_ENV', 'production')): dsn=app.config.get('SENTRY_DSN'), integrations=[FlaskIntegration()] ) - app.logger.info(f'<<<< Starting Ftp Poller Job >>>>') + app.logger.info('<<<< Starting Ftp Poller Job >>>>') queue.init_app(app) - db.init_app(app) ma.init_app(app) register_shellcontext(app) diff --git a/jobs/ftp-poller/openshift/ftp-poller-build.json b/jobs/ftp-poller/openshift/ftp-poller-build.json deleted file mode 100644 index 8713416c5..000000000 --- a/jobs/ftp-poller/openshift/ftp-poller-build.json +++ /dev/null @@ -1,139 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "annotations": { - "description": "Build template for a FTP Poller job.", - "tags": "flask", - "iconClass": "icon-python" - }, - "name": "${NAME}-build-template" - }, - "objects": [ - { - "kind": "ImageStream", - "apiVersion": "v1", - "metadata": { - "name": "${NAME}" - } - }, - { - "kind": "BuildConfig", - "apiVersion": "v1", - "metadata": { - "name": "${NAME}", - "labels": { - "app": "${NAME}", - "app-group": "${APP_GROUP}", - "template": "${NAME}-build" - } - }, - "spec": { - "source": { - "type": "Git", - "git": { - "uri": "${GIT_REPO_URL}", - "ref": "${GIT_REF}" - }, - "contextDir": "${SOURCE_CONTEXT_DIR}" - }, - "strategy": { - "type": "Docker", - "dockerStrategy": { - "dockerfilePath": "${DOCKER_FILE_PATH}" - } - }, - "output": { - "to": { - "kind": "ImageStreamTag", - "name": "${NAME}:${OUTPUT_IMAGE_TAG}" - } - }, - "triggers": [ - { - "type": "ConfigChange" - } - ] - } - } - ], - "parameters": [ - { - "name": "NAME", - "displayName": "Name", - "description": "The name assigned to all of the objects defined in this template. You should keep this as default unless your know what your doing.", - "required": true, - "value": "ftp-poller" - }, - { - "name": "APP_GROUP", - "displayName": "App Group", - "description": "The name assigned to all of the deployments in this project.", - "required": true, - "value": "sbc-pay" - }, - { - "name": "GIT_REPO_URL", - "displayName": "Git Repo URL", - "description": "The URL to your GIT repo, don't use the this default unless your just experimenting.", - "required": true, - "value": "https://github.com/bcgov/sbc-pay.git" - }, - { - "name": "GIT_REF", - "displayName": "Git Reference", - "description": "The git reference or branch.", - "required": true, - "value": "development" - }, - { - "name": "SOURCE_CONTEXT_DIR", - "displayName": "Source Context Directory", - "description": "The source context directory.", - "required": true, - "value": "jobs/ftp-poller" - }, - { - "name": "SOURCE_IMAGE_KIND", - "displayName": "Source Image Kind", - "required": true, - "description": "The 'kind' (type) of the source image; typically ImageStreamTag, or DockerImage.", - "value": "ImageStreamTag" - }, - { - "name": "SOURCE_IMAGE_NAME_SPACE", - "displayName": "Source Image Name Space", - "required": true, - "description": "The name space of the source image.", - "value": "d7eovc-tools" - }, - { - "name": "SOURCE_IMAGE_NAME", - "displayName": "Source Image Name", - "required": true, - "description": "The name of the source image.", - "value": "python" - }, - { - "name": "SOURCE_IMAGE_TAG", - "displayName": "Source Image Tag", - "required": true, - "description": "The tag of the source image.", - "value": "3.7" - }, - { - "name": "OUTPUT_IMAGE_TAG", - "displayName": "Output Image Tag", - "description": "The tag given to the built image.", - "required": true, - "value": "latest" - }, - { - "name": "DOCKER_FILE_PATH", - "displayName": "Docker File Path", - "description": "The path to the docker file defining the build.", - "required": false, - "value": "Dockerfile" - } - ] -} diff --git a/jobs/ftp-poller/openshift/ftp-poller-deploy.json b/jobs/ftp-poller/openshift/ftp-poller-deploy.json deleted file mode 100644 index 87dd37b9e..000000000 --- a/jobs/ftp-poller/openshift/ftp-poller-deploy.json +++ /dev/null @@ -1,417 +0,0 @@ -{ - "kind": "Template", - "apiVersion": "v1", - "metadata": { - "annotations": { - "description": "Deployment template for a ftp poller job.", - "tags": "${NAME}-${TAG_NAME}" - }, - "name": "${NAME}-${TAG_NAME}-deploy" - }, - "objects": [ - { - "kind": "DeploymentConfig", - "apiVersion": "v1", - "metadata": { - "name": "${NAME}-${TAG_NAME}", - "labels": { - "app": "${NAME}-${TAG_NAME}", - "app-group": "${APP_GROUP}", - "template": "${NAME}-deploy" - } - }, - "spec": { - "strategy": { - "type": "Rolling", - "rollingParams": { - "updatePeriodSeconds": 1, - "intervalSeconds": 1, - "timeoutSeconds": 600, - "maxUnavailable": "25%", - "maxSurge": "25%" - } - }, - "triggers": [ - { - "type": "ImageChange", - "imageChangeParams": { - "automatic": true, - "containerNames": [ - "${NAME}-${TAG_NAME}" - ], - "from": { - "kind": "ImageStreamTag", - "namespace": "${IMAGE_NAMESPACE}", - "name": "${NAME}:${TAG_NAME}" - } - } - }, - { - "type": "ConfigChange" - } - ], - "replicas": 1, - "test": false, - "selector": { - "app": "${NAME}-${TAG_NAME}", - "deploymentconfig": "${NAME}-${TAG_NAME}" - }, - "template": { - "metadata": { - "labels": { - "app": "${NAME}-${TAG_NAME}", - "app-group": "${APP_GROUP}", - "deploymentconfig": "${NAME}-${TAG_NAME}", - "template": "${NAME}-deploy" - } - }, - "spec": { - "volumes": [ - { - "name": "cron-config", - "configMap": { - "name": "${NAME}-${TAG_NAME}-cron-configuration", - "defaultMode": 420 - } - }, - { - "name": "sftp-private-key", - "configMap": { - "name": "${NAME}-${TAG_NAME}-sftp-configuration", - "defaultMode": 420 - } - } - ], - "containers": [ - { - "name": "${NAME}-${TAG_NAME}", - "image": "docker-registry.default.svc:5000/${IMAGE_NAMESPACE}/${NAME}:${TAG_NAME}", - "ports": [ - { - "containerPort": 8080, - "protocol": "TCP" - } - ], - "volumeMounts": [ - { - "name": "cron-config", - "readOnly": true, - "mountPath": "/ftp-poller/cron/" - }, - { - "name": "sftp-private-key", - "readOnly": true, - "mountPath": "/ftp-poller/key/" - } - ], - "env": [ - { - "name": "DATABASE_USERNAME", - "valueFrom": { - "configMapKeyRef": { - "name": "${DATABASE_NAME}-${TAG_NAME}-config", - "key": "DATABASE_USER" - } - } - }, - { - "name": "DATABASE_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "name": "${DATABASE_NAME}-${TAG_NAME}-secret", - "key": "DATABASE_PASSWORD" - } - } - }, - { - "name": "DATABASE_NAME", - "valueFrom": { - "configMapKeyRef": { - "name": "${DATABASE_NAME}-${TAG_NAME}-config", - "key": "DATABASE_NAME" - } - } - }, - { - "name": "DATABASE_HOST", - "valueFrom": { - "configMapKeyRef": { - "name": "${DATABASE_NAME}-${TAG_NAME}-config", - "key": "DATABASE_HOST" - } - } - }, - { - "name": "DATABASE_PORT", - "valueFrom": { - "configMapKeyRef": { - "name": "${DATABASE_NAME}-${TAG_NAME}-config", - "key": "DATABASE_PORT" - } - } - }, - { - "name": "DATABASE_TEST_USERNAME", - "valueFrom": { - "configMapKeyRef": { - "name": "${DATABASE_NAME}-${TAG_NAME}-config", - "key": "DATABASE_TEST_USER" - } - } - }, - { - "name": "DATABASE_TEST_PASSWORD", - "valueFrom": { - "secretKeyRef": { - "name": "${DATABASE_NAME}-${TAG_NAME}-secret", - "key": "DATABASE_TEST_PASSWORD" - } - } - }, - { - "name": "DATABASE_TEST_NAME", - "valueFrom": { - "configMapKeyRef": { - "name": "${DATABASE_NAME}-${TAG_NAME}-config", - "key": "DATABASE_TEST_NAME" - } - } - }, - { - "name": "DATABASE_TEST_HOST", - "valueFrom": { - "configMapKeyRef": { - "name": "${DATABASE_NAME}-${TAG_NAME}-config", - "key": "DATABASE_TEST_HOST" - } - } - }, - { - "name": "DATABASE_TEST_PORT", - "valueFrom": { - "configMapKeyRef": { - "name": "${DATABASE_NAME}-${TAG_NAME}-config", - "key": "DATABASE_TEST_PORT" - } - } - }, - { - "name": "PAYBC_DIRECT_PAY_REF_NUMBER", - "valueFrom": { - "secretKeyRef": { - "name": "pay-api-${TAG_NAME}-secret", - "key": "PAYBC_DIRECT_PAY_REF_NUMBER" - } - } - }, - { - "name": "PAYBC_DIRECT_PAY_API_KEY", - "valueFrom": { - "secretKeyRef": { - "name": "pay-api-${TAG_NAME}-secret", - "key": "PAYBC_DIRECT_PAY_API_KEY" - } - } - }, - { - "name": "PAYBC_DIRECT_PAY_BASE_URL", - "valueFrom": { - "secretKeyRef": { - "name": "pay-api-${TAG_NAME}-secret", - "key": "PAYBC_DIRECT_PAY_BASE_URL" - } - } - }, - { - "name": "PAYBC_DIRECT_PAY_CLIENT_ID", - "valueFrom": { - "secretKeyRef": { - "name": "pay-api-${TAG_NAME}-secret", - "key": "PAYBC_DIRECT_PAY_CLIENT_ID" - } - } - }, - { - "name": "PAYBC_DIRECT_PAY_CLIENT_SECRET", - "valueFrom": { - "secretKeyRef": { - "name": "pay-api-${TAG_NAME}-secret", - "key": "PAYBC_DIRECT_PAY_CLIENT_SECRET" - } - } - }, - { - "name": "NOTIFY_API_URL", - "valueFrom": { - "secretKeyRef": { - "name": "pay-api-${TAG_NAME}-secret", - "key": "NOTIFY_API_URL" - } - } - }, - { - "name": "KEYCLOAK_SERVICE_ACCOUNT_ID", - "valueFrom": { - "secretKeyRef": { - "name": "pay-api-${TAG_NAME}-secret", - "key": "KEYCLOAK_SERVICE_ACCOUNT_ID" - } - } - }, - { - "name": "KEYCLOAK_SERVICE_ACCOUNT_SECRET", - "valueFrom": { - "secretKeyRef": { - "name": "pay-api-${TAG_NAME}-secret", - "key": "KEYCLOAK_SERVICE_ACCOUNT_SECRET" - } - } - }, - { - "name": "JWT_OIDC_ISSUER", - "valueFrom": { - "secretKeyRef": { - "name": "pay-api-${TAG_NAME}-secret", - "key": "JWT_OIDC_ISSUER" - } - } - }, - { - "name": "AUTH_WEB_PAY_TRANSACTION_URL", - "valueFrom": { - "secretKeyRef": { - "name": "pay-api-${TAG_NAME}-secret", - "key": "AUTH_WEB_PAY_TRANSACTION_URL" - } - } - } - ], - "resources": { - "requests": { - "cpu": "${CPU_REQUEST}", - "memory": "${MEMORY_REQUEST}" - }, - "limits": { - "cpu": "${CPU_LIMIT}", - "memory": "${MEMORY_LIMIT}" - } - }, - "terminationMessagePath": "/dev/termination-log", - "terminationMessagePolicy": "File", - "imagePullPolicy": "Always" - } - ], - "restartPolicy": "Always", - "terminationGracePeriodSeconds": 30, - "dnsPolicy": "ClusterFirst", - "securityContext": {}, - "schedulerName": "default-scheduler" - } - } - } - }, - { - "kind": "Service", - "apiVersion": "v1", - "metadata": { - "name": "${NAME}-${TAG_NAME}", - "creationTimestamp": null, - "labels": { - "app": "${NAME}-${TAG_NAME}", - "app-group": "${APP_GROUP}", - "template": "${NAME}-deploy" - } - }, - "spec": { - "ports": [ - { - "name": "8080-tcp", - "protocol": "TCP", - "port": 8080, - "targetPort": 8080 - } - ], - "selector": { - "deploymentconfig": "${NAME}-${TAG_NAME}" - }, - "type": "ClusterIP", - "sessionAffinity": "None" - }, - "status": { - "loadBalancer": {} - } - } - ], - "parameters": [ - { - "name": "NAME", - "displayName": "Name", - "description": "The name assigned to all of the OpenShift resources associated to the server instance.", - "required": true, - "value": "ftp-poller" - }, - { - "name": "APP_GROUP", - "displayName": "App Group", - "description": "The name assigned to all of the deployments in this project.", - "required": true, - "value": "sbc-pay" - }, - { - "name": "IMAGE_NAMESPACE", - "displayName": "Image Namespace", - "required": true, - "description": "The namespace of the OpenShift project containing the imagestream for the application.", - "value": "l4ygcl-tools" - }, - { - "name": "TAG_NAME", - "displayName": "Environment TAG name", - "description": "The TAG name for this environment, e.g., dev, test, prod", - "required": true, - "value": "dev" - }, - { - "name": "DATABASE_NAME", - "displayName": "Database App Name", - "description": "A valid database app name used by the service.", - "required": true, - "value": "postgresql" - }, - { - "name": "CPU_REQUEST", - "displayName": "Resources CPU Request", - "description": "The resources CPU request (in cores) for this build.", - "required": true, - "value": "100m" - }, - { - "name": "CPU_LIMIT", - "displayName": "Resources CPU Limit", - "description": "The resources CPU limit (in cores) for this build.", - "required": true, - "value": "750m" - }, - { - "name": "MEMORY_REQUEST", - "displayName": "Resources Memory Request", - "description": "The resources Memory request (in Mi, Gi, etc) for this build.", - "required": true, - "value": "100Mi" - }, - { - "name": "MEMORY_LIMIT", - "displayName": "Resources Memory Limit", - "description": "The resources Memory limit (in Mi, Gi, etc) for this build.", - "required": true, - "value": "2Gi" - }, - { - "name": "REPLICAS", - "displayName": "The number of replicas to run", - "description": "The number of replicas to run in this environment.", - "required": true, - "value": "1" - } - ] -} \ No newline at end of file diff --git a/jobs/ftp-poller/poetry.lock b/jobs/ftp-poller/poetry.lock index 7aa6aec79..befc94f7c 100644 --- a/jobs/ftp-poller/poetry.lock +++ b/jobs/ftp-poller/poetry.lock @@ -90,15 +90,26 @@ cffi = ">=1.0.1" dev = ["cogapp", "pre-commit", "pytest", "wheel"] tests = ["pytest"] +[[package]] +name = "asn1crypto" +version = "1.5.1" +description = "Fast ASN.1 parser and serializer with definitions for private keys, public keys, certificates, CRL, OCSP, CMS, PKCS#3, PKCS#7, PKCS#8, PKCS#12, PKCS#5, X.509 and TSP" +optional = false +python-versions = "*" +files = [ + {file = "asn1crypto-1.5.1-py2.py3-none-any.whl", hash = "sha256:db4e40728b728508912cbb3d44f19ce188f218e9eba635821bb4b68564f8fd67"}, + {file = "asn1crypto-1.5.1.tar.gz", hash = "sha256:13ae38502be632115abf8a24cbe5f4da52e3b5231990aff31123c805306ccb9c"}, +] + [[package]] name = "astroid" -version = "3.1.0" +version = "3.2.2" description = "An abstract syntax tree for Python with inference support." optional = false python-versions = ">=3.8.0" files = [ - {file = "astroid-3.1.0-py3-none-any.whl", hash = "sha256:951798f922990137ac090c53af473db7ab4e70c770e6d7fae0cec59f74411819"}, - {file = "astroid-3.1.0.tar.gz", hash = "sha256:ac248253bfa4bd924a0de213707e7ebeeb3138abeb48d798784ead1e56d419d4"}, + {file = "astroid-3.2.2-py3-none-any.whl", hash = "sha256:e8a0083b4bb28fcffb6207a3bfc9e5d0a68be951dd7e336d5dcf639c682388c0"}, + {file = "astroid-3.2.2.tar.gz", hash = "sha256:8ead48e31b92b2e217b6c9733a21afafe479d52d6e164dd25fb1a770c7c3cf94"}, ] [[package]] @@ -122,52 +133,52 @@ tests-no-zope = ["attrs[tests-mypy]", "cloudpickle", "hypothesis", "pympler", "p [[package]] name = "autopep8" -version = "2.0.4" +version = "2.2.0" description = "A tool that automatically formats Python code to conform to the PEP 8 style guide" optional = false -python-versions = ">=3.6" +python-versions = ">=3.8" files = [ - {file = "autopep8-2.0.4-py2.py3-none-any.whl", hash = "sha256:067959ca4a07b24dbd5345efa8325f5f58da4298dab0dde0443d5ed765de80cb"}, - {file = "autopep8-2.0.4.tar.gz", hash = "sha256:2913064abd97b3419d1cc83ea71f042cb821f87e45b9c88cad5ad3c4ea87fe0c"}, + {file = "autopep8-2.2.0-py2.py3-none-any.whl", hash = "sha256:05418a981f038969d8bdcd5636bf15948db7555ae944b9f79b5a34b35f1370d4"}, + {file = "autopep8-2.2.0.tar.gz", hash = "sha256:d306a0581163ac29908280ad557773a95a9bede072c0fafed6f141f5311f43c1"}, ] [package.dependencies] -pycodestyle = ">=2.10.0" +pycodestyle = ">=2.11.0" [[package]] name = "bcrypt" -version = "4.1.2" +version = "4.1.3" description = "Modern password hashing for your software and your servers" optional = false python-versions = ">=3.7" files = [ - {file = "bcrypt-4.1.2-cp37-abi3-macosx_10_12_universal2.whl", hash = "sha256:ac621c093edb28200728a9cca214d7e838529e557027ef0581685909acd28b5e"}, - {file = "bcrypt-4.1.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ea505c97a5c465ab8c3ba75c0805a102ce526695cd6818c6de3b1a38f6f60da1"}, - {file = "bcrypt-4.1.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:57fa9442758da926ed33a91644649d3e340a71e2d0a5a8de064fb621fd5a3326"}, - {file = "bcrypt-4.1.2-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:eb3bd3321517916696233b5e0c67fd7d6281f0ef48e66812db35fc963a422a1c"}, - {file = "bcrypt-4.1.2-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:6cad43d8c63f34b26aef462b6f5e44fdcf9860b723d2453b5d391258c4c8e966"}, - {file = "bcrypt-4.1.2-cp37-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:44290ccc827d3a24604f2c8bcd00d0da349e336e6503656cb8192133e27335e2"}, - {file = "bcrypt-4.1.2-cp37-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:732b3920a08eacf12f93e6b04ea276c489f1c8fb49344f564cca2adb663b3e4c"}, - {file = "bcrypt-4.1.2-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:1c28973decf4e0e69cee78c68e30a523be441972c826703bb93099868a8ff5b5"}, - {file = "bcrypt-4.1.2-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:b8df79979c5bae07f1db22dcc49cc5bccf08a0380ca5c6f391cbb5790355c0b0"}, - {file = "bcrypt-4.1.2-cp37-abi3-win32.whl", hash = "sha256:fbe188b878313d01b7718390f31528be4010fed1faa798c5a1d0469c9c48c369"}, - {file = "bcrypt-4.1.2-cp37-abi3-win_amd64.whl", hash = "sha256:9800ae5bd5077b13725e2e3934aa3c9c37e49d3ea3d06318010aa40f54c63551"}, - {file = "bcrypt-4.1.2-cp39-abi3-macosx_10_12_universal2.whl", hash = "sha256:71b8be82bc46cedd61a9f4ccb6c1a493211d031415a34adde3669ee1b0afbb63"}, - {file = "bcrypt-4.1.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:68e3c6642077b0c8092580c819c1684161262b2e30c4f45deb000c38947bf483"}, - {file = "bcrypt-4.1.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:387e7e1af9a4dd636b9505a465032f2f5cb8e61ba1120e79a0e1cd0b512f3dfc"}, - {file = "bcrypt-4.1.2-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:f70d9c61f9c4ca7d57f3bfe88a5ccf62546ffbadf3681bb1e268d9d2e41c91a7"}, - {file = "bcrypt-4.1.2-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:2a298db2a8ab20056120b45e86c00a0a5eb50ec4075b6142db35f593b97cb3fb"}, - {file = "bcrypt-4.1.2-cp39-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:ba55e40de38a24e2d78d34c2d36d6e864f93e0d79d0b6ce915e4335aa81d01b1"}, - {file = "bcrypt-4.1.2-cp39-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:3566a88234e8de2ccae31968127b0ecccbb4cddb629da744165db72b58d88ca4"}, - {file = "bcrypt-4.1.2-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:b90e216dc36864ae7132cb151ffe95155a37a14e0de3a8f64b49655dd959ff9c"}, - {file = "bcrypt-4.1.2-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:69057b9fc5093ea1ab00dd24ede891f3e5e65bee040395fb1e66ee196f9c9b4a"}, - {file = "bcrypt-4.1.2-cp39-abi3-win32.whl", hash = "sha256:02d9ef8915f72dd6daaef40e0baeef8a017ce624369f09754baf32bb32dba25f"}, - {file = "bcrypt-4.1.2-cp39-abi3-win_amd64.whl", hash = "sha256:be3ab1071662f6065899fe08428e45c16aa36e28bc42921c4901a191fda6ee42"}, - {file = "bcrypt-4.1.2-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:d75fc8cd0ba23f97bae88a6ec04e9e5351ff3c6ad06f38fe32ba50cbd0d11946"}, - {file = "bcrypt-4.1.2-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:a97e07e83e3262599434816f631cc4c7ca2aa8e9c072c1b1a7fec2ae809a1d2d"}, - {file = "bcrypt-4.1.2-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:e51c42750b7585cee7892c2614be0d14107fad9581d1738d954a262556dd1aab"}, - {file = "bcrypt-4.1.2-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:ba4e4cc26610581a6329b3937e02d319f5ad4b85b074846bf4fef8a8cf51e7bb"}, - {file = "bcrypt-4.1.2.tar.gz", hash = "sha256:33313a1200a3ae90b75587ceac502b048b840fc69e7f7a0905b5f87fac7a1258"}, + {file = "bcrypt-4.1.3-cp37-abi3-macosx_10_12_universal2.whl", hash = "sha256:48429c83292b57bf4af6ab75809f8f4daf52aa5d480632e53707805cc1ce9b74"}, + {file = "bcrypt-4.1.3-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4a8bea4c152b91fd8319fef4c6a790da5c07840421c2b785084989bf8bbb7455"}, + {file = "bcrypt-4.1.3-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3d3b317050a9a711a5c7214bf04e28333cf528e0ed0ec9a4e55ba628d0f07c1a"}, + {file = "bcrypt-4.1.3-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:094fd31e08c2b102a14880ee5b3d09913ecf334cd604af27e1013c76831f7b05"}, + {file = "bcrypt-4.1.3-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:4fb253d65da30d9269e0a6f4b0de32bd657a0208a6f4e43d3e645774fb5457f3"}, + {file = "bcrypt-4.1.3-cp37-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:193bb49eeeb9c1e2db9ba65d09dc6384edd5608d9d672b4125e9320af9153a15"}, + {file = "bcrypt-4.1.3-cp37-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:8cbb119267068c2581ae38790e0d1fbae65d0725247a930fc9900c285d95725d"}, + {file = "bcrypt-4.1.3-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:6cac78a8d42f9d120b3987f82252bdbeb7e6e900a5e1ba37f6be6fe4e3848286"}, + {file = "bcrypt-4.1.3-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:01746eb2c4299dd0ae1670234bf77704f581dd72cc180f444bfe74eb80495b64"}, + {file = "bcrypt-4.1.3-cp37-abi3-win32.whl", hash = "sha256:037c5bf7c196a63dcce75545c8874610c600809d5d82c305dd327cd4969995bf"}, + {file = "bcrypt-4.1.3-cp37-abi3-win_amd64.whl", hash = "sha256:8a893d192dfb7c8e883c4576813bf18bb9d59e2cfd88b68b725990f033f1b978"}, + {file = "bcrypt-4.1.3-cp39-abi3-macosx_10_12_universal2.whl", hash = "sha256:0d4cf6ef1525f79255ef048b3489602868c47aea61f375377f0d00514fe4a78c"}, + {file = "bcrypt-4.1.3-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f5698ce5292a4e4b9e5861f7e53b1d89242ad39d54c3da451a93cac17b61921a"}, + {file = "bcrypt-4.1.3-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ec3c2e1ca3e5c4b9edb94290b356d082b721f3f50758bce7cce11d8a7c89ce84"}, + {file = "bcrypt-4.1.3-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:3a5be252fef513363fe281bafc596c31b552cf81d04c5085bc5dac29670faa08"}, + {file = "bcrypt-4.1.3-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:5f7cd3399fbc4ec290378b541b0cf3d4398e4737a65d0f938c7c0f9d5e686611"}, + {file = "bcrypt-4.1.3-cp39-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:c4c8d9b3e97209dd7111bf726e79f638ad9224b4691d1c7cfefa571a09b1b2d6"}, + {file = "bcrypt-4.1.3-cp39-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:31adb9cbb8737a581a843e13df22ffb7c84638342de3708a98d5c986770f2834"}, + {file = "bcrypt-4.1.3-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:551b320396e1d05e49cc18dd77d970accd52b322441628aca04801bbd1d52a73"}, + {file = "bcrypt-4.1.3-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:6717543d2c110a155e6821ce5670c1f512f602eabb77dba95717ca76af79867d"}, + {file = "bcrypt-4.1.3-cp39-abi3-win32.whl", hash = "sha256:6004f5229b50f8493c49232b8e75726b568535fd300e5039e255d919fc3a07f2"}, + {file = "bcrypt-4.1.3-cp39-abi3-win_amd64.whl", hash = "sha256:2505b54afb074627111b5a8dc9b6ae69d0f01fea65c2fcaea403448c503d3991"}, + {file = "bcrypt-4.1.3-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:cb9c707c10bddaf9e5ba7cdb769f3e889e60b7d4fea22834b261f51ca2b89fed"}, + {file = "bcrypt-4.1.3-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:9f8ea645eb94fb6e7bea0cf4ba121c07a3a182ac52876493870033141aa687bc"}, + {file = "bcrypt-4.1.3-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:f44a97780677e7ac0ca393bd7982b19dbbd8d7228c1afe10b128fd9550eef5f1"}, + {file = "bcrypt-4.1.3-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:d84702adb8f2798d813b17d8187d27076cca3cd52fe3686bb07a9083930ce650"}, + {file = "bcrypt-4.1.3.tar.gz", hash = "sha256:2ee15dd749f5952fe3f0430d0ff6b74082e159c50332a1413d51b5689cf06623"}, ] [package.extras] @@ -431,63 +442,63 @@ files = [ [[package]] name = "coverage" -version = "7.4.3" +version = "7.5.3" description = "Code coverage measurement for Python" optional = false python-versions = ">=3.8" files = [ - {file = "coverage-7.4.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:8580b827d4746d47294c0e0b92854c85a92c2227927433998f0d3320ae8a71b6"}, - {file = "coverage-7.4.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:718187eeb9849fc6cc23e0d9b092bc2348821c5e1a901c9f8975df0bc785bfd4"}, - {file = "coverage-7.4.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:767b35c3a246bcb55b8044fd3a43b8cd553dd1f9f2c1eeb87a302b1f8daa0524"}, - {file = "coverage-7.4.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:ae7f19afe0cce50039e2c782bff379c7e347cba335429678450b8fe81c4ef96d"}, - {file = "coverage-7.4.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba3a8aaed13770e970b3df46980cb068d1c24af1a1968b7818b69af8c4347efb"}, - {file = "coverage-7.4.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:ee866acc0861caebb4f2ab79f0b94dbfbdbfadc19f82e6e9c93930f74e11d7a0"}, - {file = "coverage-7.4.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:506edb1dd49e13a2d4cac6a5173317b82a23c9d6e8df63efb4f0380de0fbccbc"}, - {file = "coverage-7.4.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:fd6545d97c98a192c5ac995d21c894b581f1fd14cf389be90724d21808b657e2"}, - {file = "coverage-7.4.3-cp310-cp310-win32.whl", hash = "sha256:f6a09b360d67e589236a44f0c39218a8efba2593b6abdccc300a8862cffc2f94"}, - {file = "coverage-7.4.3-cp310-cp310-win_amd64.whl", hash = "sha256:18d90523ce7553dd0b7e23cbb28865db23cddfd683a38fb224115f7826de78d0"}, - {file = "coverage-7.4.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:cbbe5e739d45a52f3200a771c6d2c7acf89eb2524890a4a3aa1a7fa0695d2a47"}, - {file = "coverage-7.4.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:489763b2d037b164846ebac0cbd368b8a4ca56385c4090807ff9fad817de4113"}, - {file = "coverage-7.4.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:451f433ad901b3bb00184d83fd83d135fb682d780b38af7944c9faeecb1e0bfe"}, - {file = "coverage-7.4.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fcc66e222cf4c719fe7722a403888b1f5e1682d1679bd780e2b26c18bb648cdc"}, - {file = "coverage-7.4.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b3ec74cfef2d985e145baae90d9b1b32f85e1741b04cd967aaf9cfa84c1334f3"}, - {file = "coverage-7.4.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:abbbd8093c5229c72d4c2926afaee0e6e3140de69d5dcd918b2921f2f0c8baba"}, - {file = "coverage-7.4.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:35eb581efdacf7b7422af677b92170da4ef34500467381e805944a3201df2079"}, - {file = "coverage-7.4.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:8249b1c7334be8f8c3abcaaa996e1e4927b0e5a23b65f5bf6cfe3180d8ca7840"}, - {file = "coverage-7.4.3-cp311-cp311-win32.whl", hash = "sha256:cf30900aa1ba595312ae41978b95e256e419d8a823af79ce670835409fc02ad3"}, - {file = "coverage-7.4.3-cp311-cp311-win_amd64.whl", hash = "sha256:18c7320695c949de11a351742ee001849912fd57e62a706d83dfc1581897fa2e"}, - {file = "coverage-7.4.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:b51bfc348925e92a9bd9b2e48dad13431b57011fd1038f08316e6bf1df107d10"}, - {file = "coverage-7.4.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:d6cdecaedea1ea9e033d8adf6a0ab11107b49571bbb9737175444cea6eb72328"}, - {file = "coverage-7.4.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:3b2eccb883368f9e972e216c7b4c7c06cabda925b5f06dde0650281cb7666a30"}, - {file = "coverage-7.4.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6c00cdc8fa4e50e1cc1f941a7f2e3e0f26cb2a1233c9696f26963ff58445bac7"}, - {file = "coverage-7.4.3-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b9a4a8dd3dcf4cbd3165737358e4d7dfbd9d59902ad11e3b15eebb6393b0446e"}, - {file = "coverage-7.4.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:062b0a75d9261e2f9c6d071753f7eef0fc9caf3a2c82d36d76667ba7b6470003"}, - {file = "coverage-7.4.3-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:ebe7c9e67a2d15fa97b77ea6571ce5e1e1f6b0db71d1d5e96f8d2bf134303c1d"}, - {file = "coverage-7.4.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:c0a120238dd71c68484f02562f6d446d736adcc6ca0993712289b102705a9a3a"}, - {file = "coverage-7.4.3-cp312-cp312-win32.whl", hash = "sha256:37389611ba54fd6d278fde86eb2c013c8e50232e38f5c68235d09d0a3f8aa352"}, - {file = "coverage-7.4.3-cp312-cp312-win_amd64.whl", hash = "sha256:d25b937a5d9ffa857d41be042b4238dd61db888533b53bc76dc082cb5a15e914"}, - {file = "coverage-7.4.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:28ca2098939eabab044ad68850aac8f8db6bf0b29bc7f2887d05889b17346454"}, - {file = "coverage-7.4.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:280459f0a03cecbe8800786cdc23067a8fc64c0bd51dc614008d9c36e1659d7e"}, - {file = "coverage-7.4.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6c0cdedd3500e0511eac1517bf560149764b7d8e65cb800d8bf1c63ebf39edd2"}, - {file = "coverage-7.4.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9a9babb9466fe1da12417a4aed923e90124a534736de6201794a3aea9d98484e"}, - {file = "coverage-7.4.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dec9de46a33cf2dd87a5254af095a409ea3bf952d85ad339751e7de6d962cde6"}, - {file = "coverage-7.4.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:16bae383a9cc5abab9bb05c10a3e5a52e0a788325dc9ba8499e821885928968c"}, - {file = "coverage-7.4.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:2c854ce44e1ee31bda4e318af1dbcfc929026d12c5ed030095ad98197eeeaed0"}, - {file = "coverage-7.4.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:ce8c50520f57ec57aa21a63ea4f325c7b657386b3f02ccaedeccf9ebe27686e1"}, - {file = "coverage-7.4.3-cp38-cp38-win32.whl", hash = "sha256:708a3369dcf055c00ddeeaa2b20f0dd1ce664eeabde6623e516c5228b753654f"}, - {file = "coverage-7.4.3-cp38-cp38-win_amd64.whl", hash = "sha256:1bf25fbca0c8d121a3e92a2a0555c7e5bc981aee5c3fdaf4bb7809f410f696b9"}, - {file = "coverage-7.4.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:3b253094dbe1b431d3a4ac2f053b6d7ede2664ac559705a704f621742e034f1f"}, - {file = "coverage-7.4.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:77fbfc5720cceac9c200054b9fab50cb2a7d79660609200ab83f5db96162d20c"}, - {file = "coverage-7.4.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:6679060424faa9c11808598504c3ab472de4531c571ab2befa32f4971835788e"}, - {file = "coverage-7.4.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:4af154d617c875b52651dd8dd17a31270c495082f3d55f6128e7629658d63765"}, - {file = "coverage-7.4.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:8640f1fde5e1b8e3439fe482cdc2b0bb6c329f4bb161927c28d2e8879c6029ee"}, - {file = "coverage-7.4.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:69b9f6f66c0af29642e73a520b6fed25ff9fd69a25975ebe6acb297234eda501"}, - {file = "coverage-7.4.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:0842571634f39016a6c03e9d4aba502be652a6e4455fadb73cd3a3a49173e38f"}, - {file = "coverage-7.4.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:a78ed23b08e8ab524551f52953a8a05d61c3a760781762aac49f8de6eede8c45"}, - {file = "coverage-7.4.3-cp39-cp39-win32.whl", hash = "sha256:c0524de3ff096e15fcbfe8f056fdb4ea0bf497d584454f344d59fce069d3e6e9"}, - {file = "coverage-7.4.3-cp39-cp39-win_amd64.whl", hash = "sha256:0209a6369ccce576b43bb227dc8322d8ef9e323d089c6f3f26a597b09cb4d2aa"}, - {file = "coverage-7.4.3-pp38.pp39.pp310-none-any.whl", hash = "sha256:7cbde573904625509a3f37b6fecea974e363460b556a627c60dc2f47e2fffa51"}, - {file = "coverage-7.4.3.tar.gz", hash = "sha256:276f6077a5c61447a48d133ed13e759c09e62aff0dc84274a68dc18660104d52"}, + {file = "coverage-7.5.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a6519d917abb15e12380406d721e37613e2a67d166f9fb7e5a8ce0375744cd45"}, + {file = "coverage-7.5.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:aea7da970f1feccf48be7335f8b2ca64baf9b589d79e05b9397a06696ce1a1ec"}, + {file = "coverage-7.5.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:923b7b1c717bd0f0f92d862d1ff51d9b2b55dbbd133e05680204465f454bb286"}, + {file = "coverage-7.5.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:62bda40da1e68898186f274f832ef3e759ce929da9a9fd9fcf265956de269dbc"}, + {file = "coverage-7.5.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d8b7339180d00de83e930358223c617cc343dd08e1aa5ec7b06c3a121aec4e1d"}, + {file = "coverage-7.5.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:25a5caf742c6195e08002d3b6c2dd6947e50efc5fc2c2205f61ecb47592d2d83"}, + {file = "coverage-7.5.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:05ac5f60faa0c704c0f7e6a5cbfd6f02101ed05e0aee4d2822637a9e672c998d"}, + {file = "coverage-7.5.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:239a4e75e09c2b12ea478d28815acf83334d32e722e7433471fbf641c606344c"}, + {file = "coverage-7.5.3-cp310-cp310-win32.whl", hash = "sha256:a5812840d1d00eafae6585aba38021f90a705a25b8216ec7f66aebe5b619fb84"}, + {file = "coverage-7.5.3-cp310-cp310-win_amd64.whl", hash = "sha256:33ca90a0eb29225f195e30684ba4a6db05dbef03c2ccd50b9077714c48153cac"}, + {file = "coverage-7.5.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f81bc26d609bf0fbc622c7122ba6307993c83c795d2d6f6f6fd8c000a770d974"}, + {file = "coverage-7.5.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7cec2af81f9e7569280822be68bd57e51b86d42e59ea30d10ebdbb22d2cb7232"}, + {file = "coverage-7.5.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:55f689f846661e3f26efa535071775d0483388a1ccfab899df72924805e9e7cd"}, + {file = "coverage-7.5.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:50084d3516aa263791198913a17354bd1dc627d3c1639209640b9cac3fef5807"}, + {file = "coverage-7.5.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:341dd8f61c26337c37988345ca5c8ccabeff33093a26953a1ac72e7d0103c4fb"}, + {file = "coverage-7.5.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ab0b028165eea880af12f66086694768f2c3139b2c31ad5e032c8edbafca6ffc"}, + {file = "coverage-7.5.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:5bc5a8c87714b0c67cfeb4c7caa82b2d71e8864d1a46aa990b5588fa953673b8"}, + {file = "coverage-7.5.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:38a3b98dae8a7c9057bd91fbf3415c05e700a5114c5f1b5b0ea5f8f429ba6614"}, + {file = "coverage-7.5.3-cp311-cp311-win32.whl", hash = "sha256:fcf7d1d6f5da887ca04302db8e0e0cf56ce9a5e05f202720e49b3e8157ddb9a9"}, + {file = "coverage-7.5.3-cp311-cp311-win_amd64.whl", hash = "sha256:8c836309931839cca658a78a888dab9676b5c988d0dd34ca247f5f3e679f4e7a"}, + {file = "coverage-7.5.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:296a7d9bbc598e8744c00f7a6cecf1da9b30ae9ad51c566291ff1314e6cbbed8"}, + {file = "coverage-7.5.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:34d6d21d8795a97b14d503dcaf74226ae51eb1f2bd41015d3ef332a24d0a17b3"}, + {file = "coverage-7.5.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e317953bb4c074c06c798a11dbdd2cf9979dbcaa8ccc0fa4701d80042d4ebf1"}, + {file = "coverage-7.5.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:705f3d7c2b098c40f5b81790a5fedb274113373d4d1a69e65f8b68b0cc26f6db"}, + {file = "coverage-7.5.3-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b1196e13c45e327d6cd0b6e471530a1882f1017eb83c6229fc613cd1a11b53cd"}, + {file = "coverage-7.5.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:015eddc5ccd5364dcb902eaecf9515636806fa1e0d5bef5769d06d0f31b54523"}, + {file = "coverage-7.5.3-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:fd27d8b49e574e50caa65196d908f80e4dff64d7e592d0c59788b45aad7e8b35"}, + {file = "coverage-7.5.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:33fc65740267222fc02975c061eb7167185fef4cc8f2770267ee8bf7d6a42f84"}, + {file = "coverage-7.5.3-cp312-cp312-win32.whl", hash = "sha256:7b2a19e13dfb5c8e145c7a6ea959485ee8e2204699903c88c7d25283584bfc08"}, + {file = "coverage-7.5.3-cp312-cp312-win_amd64.whl", hash = "sha256:0bbddc54bbacfc09b3edaec644d4ac90c08ee8ed4844b0f86227dcda2d428fcb"}, + {file = "coverage-7.5.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:f78300789a708ac1f17e134593f577407d52d0417305435b134805c4fb135adb"}, + {file = "coverage-7.5.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b368e1aee1b9b75757942d44d7598dcd22a9dbb126affcbba82d15917f0cc155"}, + {file = "coverage-7.5.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f836c174c3a7f639bded48ec913f348c4761cbf49de4a20a956d3431a7c9cb24"}, + {file = "coverage-7.5.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:244f509f126dc71369393ce5fea17c0592c40ee44e607b6d855e9c4ac57aac98"}, + {file = "coverage-7.5.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c4c2872b3c91f9baa836147ca33650dc5c172e9273c808c3c3199c75490e709d"}, + {file = "coverage-7.5.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:dd4b3355b01273a56b20c219e74e7549e14370b31a4ffe42706a8cda91f19f6d"}, + {file = "coverage-7.5.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:f542287b1489c7a860d43a7d8883e27ca62ab84ca53c965d11dac1d3a1fab7ce"}, + {file = "coverage-7.5.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:75e3f4e86804023e991096b29e147e635f5e2568f77883a1e6eed74512659ab0"}, + {file = "coverage-7.5.3-cp38-cp38-win32.whl", hash = "sha256:c59d2ad092dc0551d9f79d9d44d005c945ba95832a6798f98f9216ede3d5f485"}, + {file = "coverage-7.5.3-cp38-cp38-win_amd64.whl", hash = "sha256:fa21a04112c59ad54f69d80e376f7f9d0f5f9123ab87ecd18fbb9ec3a2beed56"}, + {file = "coverage-7.5.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f5102a92855d518b0996eb197772f5ac2a527c0ec617124ad5242a3af5e25f85"}, + {file = "coverage-7.5.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d1da0a2e3b37b745a2b2a678a4c796462cf753aebf94edcc87dcc6b8641eae31"}, + {file = "coverage-7.5.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8383a6c8cefba1b7cecc0149415046b6fc38836295bc4c84e820872eb5478b3d"}, + {file = "coverage-7.5.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9aad68c3f2566dfae84bf46295a79e79d904e1c21ccfc66de88cd446f8686341"}, + {file = "coverage-7.5.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2e079c9ec772fedbade9d7ebc36202a1d9ef7291bc9b3a024ca395c4d52853d7"}, + {file = "coverage-7.5.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:bde997cac85fcac227b27d4fb2c7608a2c5f6558469b0eb704c5726ae49e1c52"}, + {file = "coverage-7.5.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:990fb20b32990b2ce2c5f974c3e738c9358b2735bc05075d50a6f36721b8f303"}, + {file = "coverage-7.5.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:3d5a67f0da401e105753d474369ab034c7bae51a4c31c77d94030d59e41df5bd"}, + {file = "coverage-7.5.3-cp39-cp39-win32.whl", hash = "sha256:e08c470c2eb01977d221fd87495b44867a56d4d594f43739a8028f8646a51e0d"}, + {file = "coverage-7.5.3-cp39-cp39-win_amd64.whl", hash = "sha256:1d2a830ade66d3563bb61d1e3c77c8def97b30ed91e166c67d0632c018f380f0"}, + {file = "coverage-7.5.3-pp38.pp39.pp310-none-any.whl", hash = "sha256:3538d8fb1ee9bdd2e2692b3b18c22bb1c19ffbefd06880f5ac496e42d7bb3884"}, + {file = "coverage-7.5.3.tar.gz", hash = "sha256:04aefca5190d1dc7a53a4c1a5a7f8568811306d7a8ee231c42fb69215571944f"}, ] [package.extras] @@ -732,13 +743,13 @@ dotenv = ["python-dotenv"] [[package]] name = "flask-caching" -version = "2.1.0" +version = "2.3.0" description = "Adds caching support to Flask applications." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "Flask-Caching-2.1.0.tar.gz", hash = "sha256:b7500c145135836a952e3de3a80881d9654e327a29c852c9265607f5c449235c"}, - {file = "Flask_Caching-2.1.0-py3-none-any.whl", hash = "sha256:f02645a629a8c89800d96dc8f690a574a0d49dcd66c7536badc6d362ba46b716"}, + {file = "Flask_Caching-2.3.0-py3-none-any.whl", hash = "sha256:51771c75682e5abc1483b78b96d9131d7941dc669b073852edfa319dd4e29b6e"}, + {file = "flask_caching-2.3.0.tar.gz", hash = "sha256:d7e4ca64a33b49feb339fcdd17e6ba25f5e01168cf885e53790e885f83a4d2cf"}, ] [package.dependencies] @@ -760,25 +771,25 @@ files = [ Flask = ">=0.9" [[package]] -name = "flask_jwt_oidc" -version = "0.3.0" -description = "Flask JWT OIDC" +name = "flask-jwt-oidc" +version = "0.7.0" +description = "Opinionated flask oidc client" optional = false -python-versions = "*" +python-versions = "^3.9" files = [] develop = false [package.dependencies] -cachelib = "*" -flask = "*" -python-jose = "*" -six = "*" +cachelib = "0.*" +Flask = ">=2" +python-jose = "^3.3.0" +six = "^1.16.0" [package.source] type = "git" -url = "https://github.com/thorwolpert/flask-jwt-oidc.git" +url = "https://github.com/seeker25/flask-jwt-oidc.git" reference = "HEAD" -resolved_reference = "40cc811ccf70e838c5f7522fe8d83b7e58853539" +resolved_reference = "d208d4643e3b17358f7295bee0f955e67ba6ac88" [[package]] name = "flask-marshmallow" @@ -900,15 +911,37 @@ files = [ flask = ">=2.2.5" sqlalchemy = ">=2.0.16" +[[package]] +name = "gcp-queue" +version = "0.3.0" +description = "" +optional = false +python-versions = "^3.9" +files = [] +develop = false + +[package.dependencies] +flask = ">=1" +google-auth = "^2.28.2" +google-cloud-pubsub = "^2.20.2" +simple-cloudevent = {git = "https://github.com/daxiom/simple-cloudevent.py.git"} + +[package.source] +type = "git" +url = "https://github.com/seeker25/sbc-connect-common.git" +reference = "main" +resolved_reference = "c0d1dea449ac6332510841caee5400ff8f550159" +subdirectory = "python/gcp-queue" + [[package]] name = "google-api-core" -version = "2.17.1" +version = "2.19.0" description = "Google API client core library" optional = false python-versions = ">=3.7" files = [ - {file = "google-api-core-2.17.1.tar.gz", hash = "sha256:9df18a1f87ee0df0bc4eea2770ebc4228392d8cc4066655b320e2cfccb15db95"}, - {file = "google_api_core-2.17.1-py3-none-any.whl", hash = "sha256:610c5b90092c360736baccf17bd3efbcb30dd380e7a6dc28a71059edb8bd0d8e"}, + {file = "google-api-core-2.19.0.tar.gz", hash = "sha256:cf1b7c2694047886d2af1128a03ae99e391108a08804f87cfd35970e49c9cd10"}, + {file = "google_api_core-2.19.0-py3-none-any.whl", hash = "sha256:8661eec4078c35428fd3f69a2c7ee29e342896b70f01d1a1cbcb334372dd6251"}, ] [package.dependencies] @@ -916,6 +949,7 @@ google-auth = ">=2.14.1,<3.0.dev0" googleapis-common-protos = ">=1.56.2,<2.0.dev0" grpcio = {version = ">=1.49.1,<2.0dev", optional = true, markers = "python_version >= \"3.11\" and extra == \"grpc\""} grpcio-status = {version = ">=1.49.1,<2.0.dev0", optional = true, markers = "python_version >= \"3.11\" and extra == \"grpc\""} +proto-plus = ">=1.22.3,<2.0.0dev" protobuf = ">=3.19.5,<3.20.0 || >3.20.0,<3.20.1 || >3.20.1,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<5.0.0.dev0" requests = ">=2.18.0,<3.0.0.dev0" @@ -926,13 +960,13 @@ grpcio-gcp = ["grpcio-gcp (>=0.2.2,<1.0.dev0)"] [[package]] name = "google-auth" -version = "2.28.1" +version = "2.29.0" description = "Google Authentication Library" optional = false python-versions = ">=3.7" files = [ - {file = "google-auth-2.28.1.tar.gz", hash = "sha256:34fc3046c257cedcf1622fc4b31fc2be7923d9b4d44973d481125ecc50d83885"}, - {file = "google_auth-2.28.1-py2.py3-none-any.whl", hash = "sha256:25141e2d7a14bfcba945f5e9827f98092716e99482562f15306e5b026e21aa72"}, + {file = "google-auth-2.29.0.tar.gz", hash = "sha256:672dff332d073227550ffc7457868ac4218d6c500b155fe6cc17d2b13602c360"}, + {file = "google_auth-2.29.0-py2.py3-none-any.whl", hash = "sha256:d452ad095688cd52bae0ad6fafe027f6a6d6f560e810fec20914e17a09526415"}, ] [package.dependencies] @@ -949,13 +983,13 @@ requests = ["requests (>=2.20.0,<3.0.0.dev0)"] [[package]] name = "google-cloud-pubsub" -version = "2.20.0" +version = "2.21.2" description = "Google Cloud Pub/Sub API client library" optional = false python-versions = ">=3.7" files = [ - {file = "google-cloud-pubsub-2.20.0.tar.gz", hash = "sha256:48c8e17a8168c43e3188635cbd9e07fbe3004120433712ce84b3a04bbf18c188"}, - {file = "google_cloud_pubsub-2.20.0-py2.py3-none-any.whl", hash = "sha256:8c69ed04800f4f552cdf3b9028f06d9271ac6e60443b2308c984def442e69684"}, + {file = "google-cloud-pubsub-2.21.2.tar.gz", hash = "sha256:fc72226b14731db2873f7c4031cc757e274bbcdabcac7523b2cd6e46130d6096"}, + {file = "google_cloud_pubsub-2.21.2-py2.py3-none-any.whl", hash = "sha256:05a6b01e5bda6f4a4858700e3e9a12e3080589718d648b2383e5818131db9ce4"}, ] [package.dependencies] @@ -1077,84 +1111,76 @@ protobuf = ">=3.19.5,<3.20.0 || >3.20.0,<3.20.1 || >3.20.1,<4.21.1 || >4.21.1,<4 [[package]] name = "grpcio" -version = "1.62.1" +version = "1.64.0" description = "HTTP/2-based RPC framework" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "grpcio-1.62.1-cp310-cp310-linux_armv7l.whl", hash = "sha256:179bee6f5ed7b5f618844f760b6acf7e910988de77a4f75b95bbfaa8106f3c1e"}, - {file = "grpcio-1.62.1-cp310-cp310-macosx_12_0_universal2.whl", hash = "sha256:48611e4fa010e823ba2de8fd3f77c1322dd60cb0d180dc6630a7e157b205f7ea"}, - {file = "grpcio-1.62.1-cp310-cp310-manylinux_2_17_aarch64.whl", hash = "sha256:b2a0e71b0a2158aa4bce48be9f8f9eb45cbd17c78c7443616d00abbe2a509f6d"}, - {file = "grpcio-1.62.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fbe80577c7880911d3ad65e5ecc997416c98f354efeba2f8d0f9112a67ed65a5"}, - {file = "grpcio-1.62.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58f6c693d446964e3292425e1d16e21a97a48ba9172f2d0df9d7b640acb99243"}, - {file = "grpcio-1.62.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:77c339403db5a20ef4fed02e4d1a9a3d9866bf9c0afc77a42234677313ea22f3"}, - {file = "grpcio-1.62.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b5a4ea906db7dec694098435d84bf2854fe158eb3cd51e1107e571246d4d1d70"}, - {file = "grpcio-1.62.1-cp310-cp310-win32.whl", hash = "sha256:4187201a53f8561c015bc745b81a1b2d278967b8de35f3399b84b0695e281d5f"}, - {file = "grpcio-1.62.1-cp310-cp310-win_amd64.whl", hash = "sha256:844d1f3fb11bd1ed362d3fdc495d0770cfab75761836193af166fee113421d66"}, - {file = "grpcio-1.62.1-cp311-cp311-linux_armv7l.whl", hash = "sha256:833379943d1728a005e44103f17ecd73d058d37d95783eb8f0b28ddc1f54d7b2"}, - {file = "grpcio-1.62.1-cp311-cp311-macosx_10_10_universal2.whl", hash = "sha256:c7fcc6a32e7b7b58f5a7d27530669337a5d587d4066060bcb9dee7a8c833dfb7"}, - {file = "grpcio-1.62.1-cp311-cp311-manylinux_2_17_aarch64.whl", hash = "sha256:fa7d28eb4d50b7cbe75bb8b45ed0da9a1dc5b219a0af59449676a29c2eed9698"}, - {file = "grpcio-1.62.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:48f7135c3de2f298b833be8b4ae20cafe37091634e91f61f5a7eb3d61ec6f660"}, - {file = "grpcio-1.62.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:71f11fd63365ade276c9d4a7b7df5c136f9030e3457107e1791b3737a9b9ed6a"}, - {file = "grpcio-1.62.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:4b49fd8fe9f9ac23b78437da94c54aa7e9996fbb220bac024a67469ce5d0825f"}, - {file = "grpcio-1.62.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:482ae2ae78679ba9ed5752099b32e5fe580443b4f798e1b71df412abf43375db"}, - {file = "grpcio-1.62.1-cp311-cp311-win32.whl", hash = "sha256:1faa02530b6c7426404372515fe5ddf66e199c2ee613f88f025c6f3bd816450c"}, - {file = "grpcio-1.62.1-cp311-cp311-win_amd64.whl", hash = "sha256:5bd90b8c395f39bc82a5fb32a0173e220e3f401ff697840f4003e15b96d1befc"}, - {file = "grpcio-1.62.1-cp312-cp312-linux_armv7l.whl", hash = "sha256:b134d5d71b4e0837fff574c00e49176051a1c532d26c052a1e43231f252d813b"}, - {file = "grpcio-1.62.1-cp312-cp312-macosx_10_10_universal2.whl", hash = "sha256:d1f6c96573dc09d50dbcbd91dbf71d5cf97640c9427c32584010fbbd4c0e0037"}, - {file = "grpcio-1.62.1-cp312-cp312-manylinux_2_17_aarch64.whl", hash = "sha256:359f821d4578f80f41909b9ee9b76fb249a21035a061a327f91c953493782c31"}, - {file = "grpcio-1.62.1-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a485f0c2010c696be269184bdb5ae72781344cb4e60db976c59d84dd6354fac9"}, - {file = "grpcio-1.62.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b50b09b4dc01767163d67e1532f948264167cd27f49e9377e3556c3cba1268e1"}, - {file = "grpcio-1.62.1-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:3227c667dccbe38f2c4d943238b887bac588d97c104815aecc62d2fd976e014b"}, - {file = "grpcio-1.62.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:3952b581eb121324853ce2b191dae08badb75cd493cb4e0243368aa9e61cfd41"}, - {file = "grpcio-1.62.1-cp312-cp312-win32.whl", hash = "sha256:83a17b303425104d6329c10eb34bba186ffa67161e63fa6cdae7776ff76df73f"}, - {file = "grpcio-1.62.1-cp312-cp312-win_amd64.whl", hash = "sha256:6696ffe440333a19d8d128e88d440f91fb92c75a80ce4b44d55800e656a3ef1d"}, - {file = "grpcio-1.62.1-cp37-cp37m-linux_armv7l.whl", hash = "sha256:e3393b0823f938253370ebef033c9fd23d27f3eae8eb9a8f6264900c7ea3fb5a"}, - {file = "grpcio-1.62.1-cp37-cp37m-macosx_10_10_universal2.whl", hash = "sha256:83e7ccb85a74beaeae2634f10eb858a0ed1a63081172649ff4261f929bacfd22"}, - {file = "grpcio-1.62.1-cp37-cp37m-manylinux_2_17_aarch64.whl", hash = "sha256:882020c87999d54667a284c7ddf065b359bd00251fcd70279ac486776dbf84ec"}, - {file = "grpcio-1.62.1-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a10383035e864f386fe096fed5c47d27a2bf7173c56a6e26cffaaa5a361addb1"}, - {file = "grpcio-1.62.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:960edebedc6b9ada1ef58e1c71156f28689978188cd8cff3b646b57288a927d9"}, - {file = "grpcio-1.62.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:23e2e04b83f347d0aadde0c9b616f4726c3d76db04b438fd3904b289a725267f"}, - {file = "grpcio-1.62.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:978121758711916d34fe57c1f75b79cdfc73952f1481bb9583399331682d36f7"}, - {file = "grpcio-1.62.1-cp37-cp37m-win_amd64.whl", hash = "sha256:9084086190cc6d628f282e5615f987288b95457292e969b9205e45b442276407"}, - {file = "grpcio-1.62.1-cp38-cp38-linux_armv7l.whl", hash = "sha256:22bccdd7b23c420a27fd28540fb5dcbc97dc6be105f7698cb0e7d7a420d0e362"}, - {file = "grpcio-1.62.1-cp38-cp38-macosx_10_10_universal2.whl", hash = "sha256:8999bf1b57172dbc7c3e4bb3c732658e918f5c333b2942243f10d0d653953ba9"}, - {file = "grpcio-1.62.1-cp38-cp38-manylinux_2_17_aarch64.whl", hash = "sha256:d9e52558b8b8c2f4ac05ac86344a7417ccdd2b460a59616de49eb6933b07a0bd"}, - {file = "grpcio-1.62.1-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1714e7bc935780bc3de1b3fcbc7674209adf5208ff825799d579ffd6cd0bd505"}, - {file = "grpcio-1.62.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c8842ccbd8c0e253c1f189088228f9b433f7a93b7196b9e5b6f87dba393f5d5d"}, - {file = "grpcio-1.62.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:1f1e7b36bdff50103af95a80923bf1853f6823dd62f2d2a2524b66ed74103e49"}, - {file = "grpcio-1.62.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:bba97b8e8883a8038606480d6b6772289f4c907f6ba780fa1f7b7da7dfd76f06"}, - {file = "grpcio-1.62.1-cp38-cp38-win32.whl", hash = "sha256:a7f615270fe534548112a74e790cd9d4f5509d744dd718cd442bf016626c22e4"}, - {file = "grpcio-1.62.1-cp38-cp38-win_amd64.whl", hash = "sha256:e6c8c8693df718c5ecbc7babb12c69a4e3677fd11de8886f05ab22d4e6b1c43b"}, - {file = "grpcio-1.62.1-cp39-cp39-linux_armv7l.whl", hash = "sha256:73db2dc1b201d20ab7083e7041946910bb991e7e9761a0394bbc3c2632326483"}, - {file = "grpcio-1.62.1-cp39-cp39-macosx_10_10_universal2.whl", hash = "sha256:407b26b7f7bbd4f4751dbc9767a1f0716f9fe72d3d7e96bb3ccfc4aace07c8de"}, - {file = "grpcio-1.62.1-cp39-cp39-manylinux_2_17_aarch64.whl", hash = "sha256:f8de7c8cef9261a2d0a62edf2ccea3d741a523c6b8a6477a340a1f2e417658de"}, - {file = "grpcio-1.62.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9bd5c8a1af40ec305d001c60236308a67e25419003e9bb3ebfab5695a8d0b369"}, - {file = "grpcio-1.62.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:be0477cb31da67846a33b1a75c611f88bfbcd427fe17701b6317aefceee1b96f"}, - {file = "grpcio-1.62.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:60dcd824df166ba266ee0cfaf35a31406cd16ef602b49f5d4dfb21f014b0dedd"}, - {file = "grpcio-1.62.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:973c49086cabab773525f6077f95e5a993bfc03ba8fc32e32f2c279497780585"}, - {file = "grpcio-1.62.1-cp39-cp39-win32.whl", hash = "sha256:12859468e8918d3bd243d213cd6fd6ab07208195dc140763c00dfe901ce1e1b4"}, - {file = "grpcio-1.62.1-cp39-cp39-win_amd64.whl", hash = "sha256:b7209117bbeebdfa5d898205cc55153a51285757902dd73c47de498ad4d11332"}, - {file = "grpcio-1.62.1.tar.gz", hash = "sha256:6c455e008fa86d9e9a9d85bb76da4277c0d7d9668a3bfa70dbe86e9f3c759947"}, + {file = "grpcio-1.64.0-cp310-cp310-linux_armv7l.whl", hash = "sha256:3b09c3d9de95461214a11d82cc0e6a46a6f4e1f91834b50782f932895215e5db"}, + {file = "grpcio-1.64.0-cp310-cp310-macosx_12_0_universal2.whl", hash = "sha256:7e013428ab472892830287dd082b7d129f4d8afef49227a28223a77337555eaa"}, + {file = "grpcio-1.64.0-cp310-cp310-manylinux_2_17_aarch64.whl", hash = "sha256:02cc9cc3f816d30f7993d0d408043b4a7d6a02346d251694d8ab1f78cc723e7e"}, + {file = "grpcio-1.64.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1f5de082d936e0208ce8db9095821361dfa97af8767a6607ae71425ac8ace15c"}, + {file = "grpcio-1.64.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d7b7bf346391dffa182fba42506adf3a84f4a718a05e445b37824136047686a1"}, + {file = "grpcio-1.64.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:b2cbdfba18408389a1371f8c2af1659119e1831e5ed24c240cae9e27b4abc38d"}, + {file = "grpcio-1.64.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:aca4f15427d2df592e0c8f3d38847e25135e4092d7f70f02452c0e90d6a02d6d"}, + {file = "grpcio-1.64.0-cp310-cp310-win32.whl", hash = "sha256:7c1f5b2298244472bcda49b599be04579f26425af0fd80d3f2eb5fd8bc84d106"}, + {file = "grpcio-1.64.0-cp310-cp310-win_amd64.whl", hash = "sha256:73f84f9e5985a532e47880b3924867de16fa1aa513fff9b26106220c253c70c5"}, + {file = "grpcio-1.64.0-cp311-cp311-linux_armv7l.whl", hash = "sha256:2a18090371d138a57714ee9bffd6c9c9cb2e02ce42c681aac093ae1e7189ed21"}, + {file = "grpcio-1.64.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:59c68df3a934a586c3473d15956d23a618b8f05b5e7a3a904d40300e9c69cbf0"}, + {file = "grpcio-1.64.0-cp311-cp311-manylinux_2_17_aarch64.whl", hash = "sha256:b52e1ec7185512103dd47d41cf34ea78e7a7361ba460187ddd2416b480e0938c"}, + {file = "grpcio-1.64.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8d598b5d5e2c9115d7fb7e2cb5508d14286af506a75950762aa1372d60e41851"}, + {file = "grpcio-1.64.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:01615bbcae6875eee8091e6b9414072f4e4b00d8b7e141f89635bdae7cf784e5"}, + {file = "grpcio-1.64.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:0b2dfe6dcace264807d9123d483d4c43274e3f8c39f90ff51de538245d7a4145"}, + {file = "grpcio-1.64.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:7f17572dc9acd5e6dfd3014d10c0b533e9f79cd9517fc10b0225746f4c24b58e"}, + {file = "grpcio-1.64.0-cp311-cp311-win32.whl", hash = "sha256:6ec5ed15b4ffe56e2c6bc76af45e6b591c9be0224b3fb090adfb205c9012367d"}, + {file = "grpcio-1.64.0-cp311-cp311-win_amd64.whl", hash = "sha256:597191370951b477b7a1441e1aaa5cacebeb46a3b0bd240ec3bb2f28298c7553"}, + {file = "grpcio-1.64.0-cp312-cp312-linux_armv7l.whl", hash = "sha256:1ce4cd5a61d4532651079e7aae0fedf9a80e613eed895d5b9743e66b52d15812"}, + {file = "grpcio-1.64.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:650a8150a9b288f40d5b7c1d5400cc11724eae50bd1f501a66e1ea949173649b"}, + {file = "grpcio-1.64.0-cp312-cp312-manylinux_2_17_aarch64.whl", hash = "sha256:8de0399b983f8676a7ccfdd45e5b2caec74a7e3cc576c6b1eecf3b3680deda5e"}, + {file = "grpcio-1.64.0-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:46b8b43ba6a2a8f3103f103f97996cad507bcfd72359af6516363c48793d5a7b"}, + {file = "grpcio-1.64.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a54362f03d4dcfae63be455d0a7d4c1403673498b92c6bfe22157d935b57c7a9"}, + {file = "grpcio-1.64.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:1f8ea18b928e539046bb5f9c124d717fbf00cc4b2d960ae0b8468562846f5aa1"}, + {file = "grpcio-1.64.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:c56c91bd2923ddb6e7ed28ebb66d15633b03e0df22206f22dfcdde08047e0a48"}, + {file = "grpcio-1.64.0-cp312-cp312-win32.whl", hash = "sha256:874c741c8a66f0834f653a69e7e64b4e67fcd4a8d40296919b93bab2ccc780ba"}, + {file = "grpcio-1.64.0-cp312-cp312-win_amd64.whl", hash = "sha256:0da1d921f8e4bcee307aeef6c7095eb26e617c471f8cb1c454fd389c5c296d1e"}, + {file = "grpcio-1.64.0-cp38-cp38-linux_armv7l.whl", hash = "sha256:c46fb6bfca17bfc49f011eb53416e61472fa96caa0979b4329176bdd38cbbf2a"}, + {file = "grpcio-1.64.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:3d2004e85cf5213995d09408501f82c8534700d2babeb81dfdba2a3bff0bb396"}, + {file = "grpcio-1.64.0-cp38-cp38-manylinux_2_17_aarch64.whl", hash = "sha256:6d5541eb460d73a07418524fb64dcfe0adfbcd32e2dac0f8f90ce5b9dd6c046c"}, + {file = "grpcio-1.64.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1f279ad72dd7d64412e10f2443f9f34872a938c67387863c4cd2fb837f53e7d2"}, + {file = "grpcio-1.64.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:85fda90b81da25993aa47fae66cae747b921f8f6777550895fb62375b776a231"}, + {file = "grpcio-1.64.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a053584079b793a54bece4a7d1d1b5c0645bdbee729215cd433703dc2532f72b"}, + {file = "grpcio-1.64.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:579dd9fb11bc73f0de061cab5f8b2def21480fd99eb3743ed041ad6a1913ee2f"}, + {file = "grpcio-1.64.0-cp38-cp38-win32.whl", hash = "sha256:23b6887bb21d77649d022fa1859e05853fdc2e60682fd86c3db652a555a282e0"}, + {file = "grpcio-1.64.0-cp38-cp38-win_amd64.whl", hash = "sha256:753cb58683ba0c545306f4e17dabf468d29cb6f6b11832e1e432160bb3f8403c"}, + {file = "grpcio-1.64.0-cp39-cp39-linux_armv7l.whl", hash = "sha256:2186d76a7e383e1466e0ea2b0febc343ffeae13928c63c6ec6826533c2d69590"}, + {file = "grpcio-1.64.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:0f30596cdcbed3c98024fb4f1d91745146385b3f9fd10c9f2270cbfe2ed7ed91"}, + {file = "grpcio-1.64.0-cp39-cp39-manylinux_2_17_aarch64.whl", hash = "sha256:d9171f025a196f5bcfec7e8e7ffb7c3535f7d60aecd3503f9e250296c7cfc150"}, + {file = "grpcio-1.64.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cf4c8daed18ae2be2f1fc7d613a76ee2a2e28fdf2412d5c128be23144d28283d"}, + {file = "grpcio-1.64.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3550493ac1d23198d46dc9c9b24b411cef613798dc31160c7138568ec26bc9b4"}, + {file = "grpcio-1.64.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:3161a8f8bb38077a6470508c1a7301cd54301c53b8a34bb83e3c9764874ecabd"}, + {file = "grpcio-1.64.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:2e8fabe2cc57a369638ab1ad8e6043721014fdf9a13baa7c0e35995d3a4a7618"}, + {file = "grpcio-1.64.0-cp39-cp39-win32.whl", hash = "sha256:31890b24d47b62cc27da49a462efe3d02f3c120edb0e6c46dcc0025506acf004"}, + {file = "grpcio-1.64.0-cp39-cp39-win_amd64.whl", hash = "sha256:5a56797dea8c02e7d3a85dfea879f286175cf4d14fbd9ab3ef2477277b927baa"}, + {file = "grpcio-1.64.0.tar.gz", hash = "sha256:257baf07f53a571c215eebe9679c3058a313fd1d1f7c4eede5a8660108c52d9c"}, ] [package.extras] -protobuf = ["grpcio-tools (>=1.62.1)"] +protobuf = ["grpcio-tools (>=1.64.0)"] [[package]] name = "grpcio-status" -version = "1.62.1" +version = "1.62.2" description = "Status proto mapping for gRPC" optional = false python-versions = ">=3.6" files = [ - {file = "grpcio-status-1.62.1.tar.gz", hash = "sha256:3431c8abbab0054912c41df5c72f03ddf3b7a67be8a287bb3c18a3456f96ff77"}, - {file = "grpcio_status-1.62.1-py3-none-any.whl", hash = "sha256:af0c3ab85da31669f21749e8d53d669c061ebc6ce5637be49a46edcb7aa8ab17"}, + {file = "grpcio-status-1.62.2.tar.gz", hash = "sha256:62e1bfcb02025a1cd73732a2d33672d3e9d0df4d21c12c51e0bbcaf09bab742a"}, + {file = "grpcio_status-1.62.2-py3-none-any.whl", hash = "sha256:206ddf0eb36bc99b033f03b2c8e95d319f0044defae9b41ae21408e7e0cda48f"}, ] [package.dependencies] googleapis-common-protos = ">=1.5.5" -grpcio = ">=1.62.1" +grpcio = ">=1.62.2" protobuf = ">=4.21.6" [[package]] @@ -1309,28 +1335,26 @@ urllib3 = ">=1.26.0,<3" [[package]] name = "launchdarkly-server-sdk" -version = "9.2.2" +version = "8.2.1" description = "LaunchDarkly SDK for Python" optional = false -python-versions = ">=3.8" +python-versions = "*" files = [ - {file = "launchdarkly_server_sdk-9.2.2-py3-none-any.whl", hash = "sha256:d7b544c60c7c2b431c8976dda472c68f910c7c0061b90c8c2ef0397d8f05c519"}, - {file = "launchdarkly_server_sdk-9.2.2.tar.gz", hash = "sha256:3785d0159c2a74434cd85c16dd88e41ac94bb5cd7563def4d781d99e59c4eba0"}, + {file = "launchdarkly-server-sdk-8.2.1.tar.gz", hash = "sha256:94adbd52f635ad2f1a8b4a835cbbe4ce77919a6915136b303eaca3e2a54903be"}, + {file = "launchdarkly_server_sdk-8.2.1-py3-none-any.whl", hash = "sha256:b7680a4d5856da133b0dad8eca820e48bb5f2fb6dc34ebbf7f1a3a681033b426"}, ] [package.dependencies] certifi = ">=2018.4.16" expiringdict = ">=1.1.4" -launchdarkly-eventsource = ">=1.1.0,<2.0.0" pyRFC3339 = ">=1.0" semver = ">=2.10.2" -urllib3 = ">=1.26.0,<3" +urllib3 = ">=1.22.0,<3" [package.extras] consul = ["python-consul (>=1.0.1)"] dynamodb = ["boto3 (>=1.9.71)"] redis = ["redis (>=2.10.5)"] -test-filesource = ["pyyaml (>=5.3.1)", "watchdog (>=3.0.0)"] [[package]] name = "lovely-pytest-docker" @@ -1486,13 +1510,13 @@ files = [ [[package]] name = "minio" -version = "7.2.5" +version = "7.2.7" description = "MinIO Python SDK for Amazon S3 Compatible Cloud Storage" optional = false python-versions = "*" files = [ - {file = "minio-7.2.5-py3-none-any.whl", hash = "sha256:ed9176c96d4271cb1022b9ecb8a538b1e55b32ae06add6de16425cab99ef2304"}, - {file = "minio-7.2.5.tar.gz", hash = "sha256:59d8906e2da248a9caac34d4958a859cc3a44abbe6447910c82b5abfa9d6a2e1"}, + {file = "minio-7.2.7-py3-none-any.whl", hash = "sha256:59d1f255d852fe7104018db75b3bebbd987e538690e680f7c5de835e422de837"}, + {file = "minio-7.2.7.tar.gz", hash = "sha256:473d5d53d79f340f3cd632054d0c82d2f93177ce1af2eac34a235bea55708d98"}, ] [package.dependencies] @@ -1548,52 +1572,91 @@ gssapi = ["gssapi (>=1.4.1)", "pyasn1 (>=0.1.7)", "pywin32 (>=2.1.8)"] invoke = ["invoke (>=2.0)"] [[package]] -name = "pay_api" -version = "0.0.0" -description = "A short description of the project" +name = "pay-api" +version = "0.1.0" +description = "" optional = false -python-versions = ">=3.12" +python-versions = "^3.12" files = [] develop = false [package.dependencies] -cattrs = "*" -croniter = "*" -cryptography = "*" -dpath = "*" -Flask = "*" -Flask-Caching = "*" -Flask-Cors = "*" -flask-jwt-oidc = "*" -flask-marshmallow = "*" -Flask-Migrate = "*" -Flask-Moment = "*" -Flask-Script = "*" -Flask-SQLAlchemy = "*" -google-auth = "2.28.1" -google-cloud-pubsub = "2.20.0" -gunicorn = "*" +alembic = "1.13.1" +attrs = "23.2.0" +blinker = "1.7.0" +cachelib = "0.9.0" +cachetools = "5.3.3" +cattrs = "23.2.3" +certifi = "2024.2.2" +cffi = "1.16.0" +charset-normalizer = "3.3.2" +click = "8.1.7" +croniter = "2.0.2" +cryptography = "42.0.5" +dpath = "2.1.6" +ecdsa = "0.18.0" +expiringdict = "1.2.2" +flask = "3.0.2" +flask-caching = "2.3.0" +flask-cors = "4.0.0" +flask-jwt-oidc = {git = "https://github.com/seeker25/flask-jwt-oidc.git"} +flask-marshmallow = "1.2.0" +flask-migrate = "4.0.7" +flask-moment = "1.0.5" +flask-script = "2.0.6" +flask-sqlalchemy = "3.1.1" +gcp-queue = {git = "https://github.com/seeker25/sbc-connect-common.git", branch = "main", subdirectory = "python/gcp-queue"} +greenlet = "3.0.3" +gunicorn = "21.2.0" holidays = "0.37" -itsdangerous = "*" -jaeger-client = "*" -Jinja2 = "*" +idna = "3.6" +itsdangerous = "2.1.2" +jaeger-client = "4.8.0" +jinja2 = "3.1.3" jsonschema = "4.17.3" -launchdarkly-server-sdk = "*" -marshmallow-sqlalchemy = "*" -psycopg2-binary = "*" -pyhumps = "*" -python-dotenv = "*" -requests = "*" -sentry-sdk = {version = "*", extras = ["flask"]} -sqlalchemy = "*" -sqlalchemy_utils = "*" -Werkzeug = "*" +launchdarkly-eventsource = "1.1.1" +launchdarkly-server-sdk = "8.2.1" +mako = "1.3.2" +markupsafe = "2.1.5" +marshmallow = "3.21.1" +marshmallow-sqlalchemy = "1.0.0" +opentracing = "2.4.0" +packaging = "24.0" +pg8000 = "^1.30.5" +proto-plus = "1.23.0" +protobuf = "4.25.3" +psycopg2-binary = "2.9.9" +pyasn1 = "0.5.1" +pyasn1-modules = "0.3.0" +pycparser = "2.21" +pyhumps = "3.8.0" +pyrfc3339 = "1.1" +pyrsistent = "0.20.0" +python-dateutil = "2.9.0.post0" +python-dotenv = "1.0.1" +python-jose = "3.3.0" +pytz = "2024.1" +requests = "2.31.0" +rsa = "4.9" +sbc-common-components = {git = "https://github.com/bcgov/sbc-common-components.git", subdirectory = "python"} +semver = "3.0.2" +sentry-sdk = "1.41.0" +six = "1.16.0" +sql-versioning = {git = "https://github.com/bcgov/lear.git", branch = "feature-legal-name", subdirectory = "python/common/sql-versioning"} +sqlalchemy = "2.0.28" +sqlalchemy-utils = "0.41.1" +threadloop = "1.0.2" +thrift = "0.16.0" +tornado = "6.4" +typing-extensions = "4.10.0" +urllib3 = "2.2.1" +werkzeug = "3.0.1" [package.source] type = "git" url = "https://github.com/seeker25/sbc-pay.git" -reference = "18263" -resolved_reference = "fe42bf81c86c77946a1df238f69f12ad6b83d804" +reference = "sync-python-to-main" +resolved_reference = "522ed4997b03f8bb5d88864e739815548aa606be" subdirectory = "pay-api" [[package]] @@ -1610,30 +1673,46 @@ files = [ [package.dependencies] flake8 = ">=5.0.0" +[[package]] +name = "pg8000" +version = "1.31.2" +description = "PostgreSQL interface library" +optional = false +python-versions = ">=3.8" +files = [ + {file = "pg8000-1.31.2-py3-none-any.whl", hash = "sha256:436c771ede71af4d4c22ba867a30add0bc5c942d7ab27fadbb6934a487ecc8f6"}, + {file = "pg8000-1.31.2.tar.gz", hash = "sha256:1ea46cf09d8eca07fe7eaadefd7951e37bee7fabe675df164f1a572ffb300876"}, +] + +[package.dependencies] +python-dateutil = ">=2.8.2" +scramp = ">=1.4.5" + [[package]] name = "platformdirs" -version = "4.2.0" -description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." +version = "4.2.2" +description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." optional = false python-versions = ">=3.8" files = [ - {file = "platformdirs-4.2.0-py3-none-any.whl", hash = "sha256:0614df2a2f37e1a662acbd8e2b25b92ccf8632929bc6d43467e17fe89c75e068"}, - {file = "platformdirs-4.2.0.tar.gz", hash = "sha256:ef0cc731df711022c174543cb70a9b5bd22e5a9337c8624ef2c2ceb8ddad8768"}, + {file = "platformdirs-4.2.2-py3-none-any.whl", hash = "sha256:2d7a1657e36a80ea911db832a8a6ece5ee53d8de21edd5cc5879af6530b1bfee"}, + {file = "platformdirs-4.2.2.tar.gz", hash = "sha256:38b7b51f512eed9e84a22788b4bce1de17c0adb134d6becb09836e37d8654cd3"}, ] [package.extras] docs = ["furo (>=2023.9.10)", "proselint (>=0.13)", "sphinx (>=7.2.6)", "sphinx-autodoc-typehints (>=1.25.2)"] test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4.3)", "pytest-cov (>=4.1)", "pytest-mock (>=3.12)"] +type = ["mypy (>=1.8)"] [[package]] name = "pluggy" -version = "1.4.0" +version = "1.5.0" description = "plugin and hook calling mechanisms for python" optional = false python-versions = ">=3.8" files = [ - {file = "pluggy-1.4.0-py3-none-any.whl", hash = "sha256:7db9f7b503d67d1c5b95f59773ebb58a8c1c288129a88665838012cfb07b8981"}, - {file = "pluggy-1.4.0.tar.gz", hash = "sha256:8c85c2876142a764e5b7548e7d9a0e0ddb46f5185161049a79b7e974454223be"}, + {file = "pluggy-1.5.0-py3-none-any.whl", hash = "sha256:44e1ad92c8ca002de6377e165f3e0f1be63266ab4d554740532335b9d75ea669"}, + {file = "pluggy-1.5.0.tar.gz", hash = "sha256:2cffa88e94fdc978c4c574f15f9e59b7f4201d439195c3715ca9e2486f1d0cf1"}, ] [package.extras] @@ -1904,17 +1983,17 @@ files = [ [[package]] name = "pylint" -version = "3.1.0" +version = "3.2.2" description = "python code static checker" optional = false python-versions = ">=3.8.0" files = [ - {file = "pylint-3.1.0-py3-none-any.whl", hash = "sha256:507a5b60953874766d8a366e8e8c7af63e058b26345cfcb5f91f89d987fd6b74"}, - {file = "pylint-3.1.0.tar.gz", hash = "sha256:6a69beb4a6f63debebaab0a3477ecd0f559aa726af4954fc948c51f7a2549e23"}, + {file = "pylint-3.2.2-py3-none-any.whl", hash = "sha256:3f8788ab20bb8383e06dd2233e50f8e08949cfd9574804564803441a4946eab4"}, + {file = "pylint-3.2.2.tar.gz", hash = "sha256:d068ca1dfd735fb92a07d33cb8f288adc0f6bc1287a139ca2425366f7cbe38f8"}, ] [package.dependencies] -astroid = ">=3.1.0,<=3.2.0-dev0" +astroid = ">=3.2.2,<=3.3.0-dev0" colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} dill = {version = ">=0.3.7", markers = "python_version >= \"3.12\""} isort = ">=4.2.5,<5.13.0 || >5.13.0,<6" @@ -2049,33 +2128,33 @@ paramiko = ">=1.17" [[package]] name = "pytest" -version = "8.1.1" +version = "8.2.1" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" files = [ - {file = "pytest-8.1.1-py3-none-any.whl", hash = "sha256:2a8386cfc11fa9d2c50ee7b2a57e7d898ef90470a7a34c4b949ff59662bb78b7"}, - {file = "pytest-8.1.1.tar.gz", hash = "sha256:ac978141a75948948817d360297b7aae0fcb9d6ff6bc9ec6d514b85d5a65c044"}, + {file = "pytest-8.2.1-py3-none-any.whl", hash = "sha256:faccc5d332b8c3719f40283d0d44aa5cf101cec36f88cde9ed8f2bc0538612b1"}, + {file = "pytest-8.2.1.tar.gz", hash = "sha256:5046e5b46d8e4cac199c373041f26be56fdb81eb4e67dc11d4e10811fc3408fd"}, ] [package.dependencies] colorama = {version = "*", markers = "sys_platform == \"win32\""} iniconfig = "*" packaging = "*" -pluggy = ">=1.4,<2.0" +pluggy = ">=1.5,<2.0" [package.extras] -testing = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" -version = "0.23.5.post1" +version = "0.23.7" description = "Pytest support for asyncio" optional = false python-versions = ">=3.8" files = [ - {file = "pytest-asyncio-0.23.5.post1.tar.gz", hash = "sha256:b9a8806bea78c21276bc34321bbf234ba1b2ea5b30d9f0ce0f2dea45e4685813"}, - {file = "pytest_asyncio-0.23.5.post1-py3-none-any.whl", hash = "sha256:30f54d27774e79ac409778889880242b0403d09cabd65b727ce90fe92dd5d80e"}, + {file = "pytest_asyncio-0.23.7-py3-none-any.whl", hash = "sha256:009b48127fbe44518a547bddd25611551b0e43ccdbf1e67d12479f569832c20b"}, + {file = "pytest_asyncio-0.23.7.tar.gz", hash = "sha256:5f5c72948f4c49e7db4f29f2521d4031f1c27f86e57b046126654083d4770268"}, ] [package.dependencies] @@ -2105,17 +2184,17 @@ testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtuale [[package]] name = "pytest-mock" -version = "3.12.0" +version = "3.14.0" description = "Thin-wrapper around the mock package for easier use with pytest" optional = false python-versions = ">=3.8" files = [ - {file = "pytest-mock-3.12.0.tar.gz", hash = "sha256:31a40f038c22cad32287bb43932054451ff5583ff094bca6f675df2f8bc1a6e9"}, - {file = "pytest_mock-3.12.0-py3-none-any.whl", hash = "sha256:0972719a7263072da3a21c7f4773069bcc7486027d7e8e1f81d98a47e701bc4f"}, + {file = "pytest-mock-3.14.0.tar.gz", hash = "sha256:2719255a1efeceadbc056d6bf3df3d1c5015530fb40cf347c0f9afac88410bd0"}, + {file = "pytest_mock-3.14.0-py3-none-any.whl", hash = "sha256:0b72c38033392a5f4621342fe11e9219ac11ec9d375f8e2a0c164539e0d70f6f"}, ] [package.dependencies] -pytest = ">=5.0" +pytest = ">=6.2.5" [package.extras] dev = ["pre-commit", "pytest-asyncio", "tox"] @@ -2235,9 +2314,23 @@ jaeger-client = "*" type = "git" url = "https://github.com/bcgov/sbc-common-components.git" reference = "HEAD" -resolved_reference = "94986110a7f6c7ba4f57ed8b038101ba7d864a94" +resolved_reference = "e770b4ab496e044d292500e62bc19a17079a73ec" subdirectory = "python" +[[package]] +name = "scramp" +version = "1.4.5" +description = "An implementation of the SCRAM protocol." +optional = false +python-versions = ">=3.8" +files = [ + {file = "scramp-1.4.5-py3-none-any.whl", hash = "sha256:50e37c464fc67f37994e35bee4151e3d8f9320e9c204fca83a5d313c121bbbe7"}, + {file = "scramp-1.4.5.tar.gz", hash = "sha256:be3fbe774ca577a7a658117dca014e5d254d158cecae3dd60332dfe33ce6d78e"}, +] + +[package.dependencies] +asn1crypto = ">=1.5.1" + [[package]] name = "semver" version = "3.0.2" @@ -2251,20 +2344,17 @@ files = [ [[package]] name = "sentry-sdk" -version = "1.42.0" +version = "1.41.0" description = "Python client for Sentry (https://sentry.io)" optional = false python-versions = "*" files = [ - {file = "sentry-sdk-1.42.0.tar.gz", hash = "sha256:4a8364b8f7edbf47f95f7163e48334c96100d9c098f0ae6606e2e18183c223e6"}, - {file = "sentry_sdk-1.42.0-py2.py3-none-any.whl", hash = "sha256:a654ee7e497a3f5f6368b36d4f04baeab1fe92b3105f7f6965d6ef0de35a9ba4"}, + {file = "sentry-sdk-1.41.0.tar.gz", hash = "sha256:4f2d6c43c07925d8cd10dfbd0970ea7cb784f70e79523cca9dbcd72df38e5a46"}, + {file = "sentry_sdk-1.41.0-py2.py3-none-any.whl", hash = "sha256:be4f8f4b29a80b6a3b71f0f31487beb9e296391da20af8504498a328befed53f"}, ] [package.dependencies] -blinker = {version = ">=1.1", optional = true, markers = "extra == \"flask\""} certifi = "*" -flask = {version = ">=0.11", optional = true, markers = "extra == \"flask\""} -markupsafe = {version = "*", optional = true, markers = "extra == \"flask\""} urllib3 = {version = ">=1.26.11", markers = "python_version >= \"3.6\""} [package.extras] @@ -2284,7 +2374,6 @@ grpcio = ["grpcio (>=1.21.1)"] httpx = ["httpx (>=0.16.0)"] huey = ["huey (>=2)"] loguru = ["loguru (>=0.5)"] -openai = ["openai (>=1.0.0)", "tiktoken (>=0.3.0)"] opentelemetry = ["opentelemetry-distro (>=0.35b0)"] opentelemetry-experimental = ["opentelemetry-distro (>=0.40b0,<1.0)", "opentelemetry-instrumentation-aiohttp-client (>=0.40b0,<1.0)", "opentelemetry-instrumentation-django (>=0.40b0,<1.0)", "opentelemetry-instrumentation-fastapi (>=0.40b0,<1.0)", "opentelemetry-instrumentation-flask (>=0.40b0,<1.0)", "opentelemetry-instrumentation-requests (>=0.40b0,<1.0)", "opentelemetry-instrumentation-sqlite3 (>=0.40b0,<1.0)", "opentelemetry-instrumentation-urllib (>=0.40b0,<1.0)"] pure-eval = ["asttokens", "executing", "pure-eval"] @@ -2300,19 +2389,18 @@ tornado = ["tornado (>=5)"] [[package]] name = "setuptools" -version = "69.2.0" +version = "70.0.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "setuptools-69.2.0-py3-none-any.whl", hash = "sha256:c21c49fb1042386df081cb5d86759792ab89efca84cf114889191cd09aacc80c"}, - {file = "setuptools-69.2.0.tar.gz", hash = "sha256:0ff4183f8f42cd8fa3acea16c45205521a4ef28f73c6391d8a25e92893134f2e"}, + {file = "setuptools-70.0.0-py3-none-any.whl", hash = "sha256:54faa7f2e8d2d11bcd2c07bed282eef1046b5c080d1c32add737d7b5817b1ad4"}, + {file = "setuptools-70.0.0.tar.gz", hash = "sha256:f211a66637b8fa059bb28183da127d4e86396c991a942b028c6650d4319c3fd0"}, ] [package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] -testing = ["build[virtualenv]", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "mypy (==1.9)", "packaging (>=23.2)", "pip (>=19.1)", "pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy (>=0.9.1)", "pytest-perf", "pytest-ruff (>=0.2.1)", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] -testing-integration = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "packaging (>=23.2)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] +testing = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "mypy (==1.9)", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.1)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (>=0.2.1)", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] [[package]] name = "simple-cloudevent" @@ -2354,6 +2442,22 @@ files = [ {file = "snowballstemmer-2.2.0.tar.gz", hash = "sha256:09b16deb8547d3412ad7b590689584cd0fe25ec8db3be37788be3810cbf19cb1"}, ] +[[package]] +name = "sql-versioning" +version = "0.1.0" +description = "" +optional = false +python-versions = "^3.10" +files = [] +develop = false + +[package.source] +type = "git" +url = "https://github.com/bcgov/lear.git" +reference = "feature-legal-name" +resolved_reference = "e5a432d1460dc84208465ef35c0c81ab02e66f51" +subdirectory = "python/common/sql-versioning" + [[package]] name = "sqlalchemy" version = "2.0.28" @@ -2513,13 +2617,13 @@ twisted = ["twisted"] [[package]] name = "tomlkit" -version = "0.12.4" +version = "0.12.5" description = "Style preserving TOML library" optional = false python-versions = ">=3.7" files = [ - {file = "tomlkit-0.12.4-py3-none-any.whl", hash = "sha256:5cd82d48a3dd89dee1f9d64420aa20ae65cfbd00668d6f094d7578a78efbb77b"}, - {file = "tomlkit-0.12.4.tar.gz", hash = "sha256:7ca1cfc12232806517a8515047ba66a19369e71edf2439d0f5824f91032b6cc3"}, + {file = "tomlkit-0.12.5-py3-none-any.whl", hash = "sha256:af914f5a9c59ed9d0762c7b64d3b5d5df007448eb9cd2edc8a46b1eafead172f"}, + {file = "tomlkit-0.12.5.tar.gz", hash = "sha256:eef34fba39834d4d6b73c9ba7f3e4d1c417a4e56f89a7e96e090dd0d24b8fb3c"}, ] [[package]] @@ -2590,4 +2694,4 @@ watchdog = ["watchdog (>=2.3)"] [metadata] lock-version = "2.0" python-versions = "^3.12" -content-hash = "f048f3fd232a6fb3c61c8d1f8651e55f81e6c283799dfde0ed451cea62a6e3a6" +content-hash = "3aeb528030f868f3ab60ec2d31aab0dd38f09872fe7ba62082c45715aaeed206" diff --git a/jobs/ftp-poller/pyproject.toml b/jobs/ftp-poller/pyproject.toml index cf312a280..34ecaccca 100644 --- a/jobs/ftp-poller/pyproject.toml +++ b/jobs/ftp-poller/pyproject.toml @@ -21,11 +21,9 @@ jaeger-client = "^4.8.0" itsdangerous = "^2.1.2" jinja2 = "^3.1.3" protobuf = "4.25.3" -launchdarkly-server-sdk = "^9.2.2" +launchdarkly-server-sdk = "^8.2.1" sbc-common-components = {git = "https://github.com/bcgov/sbc-common-components.git", subdirectory = "python"} -simple-cloudevent = {git = "https://github.com/daxiom/simple-cloudevent.py.git"} -flask-jwt-oidc = {git = "https://github.com/thorwolpert/flask-jwt-oidc.git"} -pay-api = {git = "https://github.com/seeker25/sbc-pay.git", rev = "18263", subdirectory = "pay-api"} +pay-api = {git = "https://github.com/seeker25/sbc-pay.git", rev = "sync-python-to-main", subdirectory = "pay-api"} [tool.poetry.group.dev.dependencies] From ff882e5d28c46ea0a0466b7bf3bf11ff0853855f Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Thu, 30 May 2024 21:24:54 -0700 Subject: [PATCH 4/8] pay-queue lint, ci passing --- jobs/ftp-poller/Makefile | 2 +- pay-queue/Makefile | 2 +- pay-queue/poetry.lock | 97 +++++++++++-------- pay-queue/pyproject.toml | 6 +- .../pay_queue/services/cgi_reconciliations.py | 6 +- pay-queue/tests/conftest.py | 5 +- .../integration/test_cgi_reconciliations.py | 19 ++-- .../integration/test_eft_reconciliation.py | 5 +- .../test_payment_reconciliations.py | 3 +- 9 files changed, 77 insertions(+), 68 deletions(-) diff --git a/jobs/ftp-poller/Makefile b/jobs/ftp-poller/Makefile index 46dd918d4..715e83f48 100644 --- a/jobs/ftp-poller/Makefile +++ b/jobs/ftp-poller/Makefile @@ -115,7 +115,7 @@ tag: push ## tag image ################################################################################# run: ## Run the project in local - . venv/bin/activate && python app.py + echo "unimplememted use docker" ################################################################################# # Self Documenting Commands # diff --git a/pay-queue/Makefile b/pay-queue/Makefile index 101a2de04..55b54a7d7 100644 --- a/pay-queue/Makefile +++ b/pay-queue/Makefile @@ -115,7 +115,7 @@ tag: push ## tag image ################################################################################# run: ## Run the project in local - . venv/bin/activate && python app.py + poetry run flask run -p 5001 ################################################################################# # Self Documenting Commands # diff --git a/pay-queue/poetry.lock b/pay-queue/poetry.lock index 28dfadd78..a5e397b91 100644 --- a/pay-queue/poetry.lock +++ b/pay-queue/poetry.lock @@ -709,13 +709,13 @@ dotenv = ["python-dotenv"] [[package]] name = "flask-caching" -version = "2.1.0" +version = "2.3.0" description = "Adds caching support to Flask applications." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "Flask-Caching-2.1.0.tar.gz", hash = "sha256:b7500c145135836a952e3de3a80881d9654e327a29c852c9265607f5c449235c"}, - {file = "Flask_Caching-2.1.0-py3-none-any.whl", hash = "sha256:f02645a629a8c89800d96dc8f690a574a0d49dcd66c7536badc6d362ba46b716"}, + {file = "Flask_Caching-2.3.0-py3-none-any.whl", hash = "sha256:51771c75682e5abc1483b78b96d9131d7941dc669b073852edfa319dd4e29b6e"}, + {file = "flask_caching-2.3.0.tar.gz", hash = "sha256:d7e4ca64a33b49feb339fcdd17e6ba25f5e01168cf885e53790e885f83a4d2cf"}, ] [package.dependencies] @@ -737,25 +737,25 @@ files = [ Flask = ">=0.9" [[package]] -name = "flask_jwt_oidc" -version = "0.5.0" -description = "Flask JWT OIDC" +name = "flask-jwt-oidc" +version = "0.7.0" +description = "Opinionated flask oidc client" optional = false -python-versions = "*" +python-versions = "^3.9" files = [] develop = false [package.dependencies] -cachelib = "*" -flask = "*" -python-jose = "*" -six = "*" +cachelib = "0.*" +Flask = ">=2" +python-jose = "^3.3.0" +six = "^1.16.0" [package.source] type = "git" -url = "https://github.com/thorwolpert/flask-jwt-oidc.git" +url = "https://github.com/seeker25/flask-jwt-oidc.git" reference = "HEAD" -resolved_reference = "fc60d430a69e0d59e1d659d01aff78151ba498d0" +resolved_reference = "d208d4643e3b17358f7295bee0f955e67ba6ac88" [[package]] name = "flask-marshmallow" @@ -868,6 +868,28 @@ files = [ [package.dependencies] python-dateutil = ">=2.7" +[[package]] +name = "gcp-queue" +version = "0.3.0" +description = "" +optional = false +python-versions = "^3.9" +files = [] +develop = false + +[package.dependencies] +flask = ">=1" +google-auth = "^2.28.2" +google-cloud-pubsub = "^2.20.2" +simple-cloudevent = {git = "https://github.com/daxiom/simple-cloudevent.py.git"} + +[package.source] +type = "git" +url = "https://github.com/seeker25/sbc-connect-common.git" +reference = "main" +resolved_reference = "c0d1dea449ac6332510841caee5400ff8f550159" +subdirectory = "python/gcp-queue" + [[package]] name = "google-api-core" version = "2.17.1" @@ -894,13 +916,13 @@ grpcio-gcp = ["grpcio-gcp (>=0.2.2,<1.0.dev0)"] [[package]] name = "google-auth" -version = "2.28.1" +version = "2.29.0" description = "Google Authentication Library" optional = false python-versions = ">=3.7" files = [ - {file = "google-auth-2.28.1.tar.gz", hash = "sha256:34fc3046c257cedcf1622fc4b31fc2be7923d9b4d44973d481125ecc50d83885"}, - {file = "google_auth-2.28.1-py2.py3-none-any.whl", hash = "sha256:25141e2d7a14bfcba945f5e9827f98092716e99482562f15306e5b026e21aa72"}, + {file = "google-auth-2.29.0.tar.gz", hash = "sha256:672dff332d073227550ffc7457868ac4218d6c500b155fe6cc17d2b13602c360"}, + {file = "google_auth-2.29.0-py2.py3-none-any.whl", hash = "sha256:d452ad095688cd52bae0ad6fafe027f6a6d6f560e810fec20914e17a09526415"}, ] [package.dependencies] @@ -917,13 +939,13 @@ requests = ["requests (>=2.20.0,<3.0.0.dev0)"] [[package]] name = "google-cloud-pubsub" -version = "2.20.0" +version = "2.21.2" description = "Google Cloud Pub/Sub API client library" optional = false python-versions = ">=3.7" files = [ - {file = "google-cloud-pubsub-2.20.0.tar.gz", hash = "sha256:48c8e17a8168c43e3188635cbd9e07fbe3004120433712ce84b3a04bbf18c188"}, - {file = "google_cloud_pubsub-2.20.0-py2.py3-none-any.whl", hash = "sha256:8c69ed04800f4f552cdf3b9028f06d9271ac6e60443b2308c984def442e69684"}, + {file = "google-cloud-pubsub-2.21.2.tar.gz", hash = "sha256:fc72226b14731db2873f7c4031cc757e274bbcdabcac7523b2cd6e46130d6096"}, + {file = "google_cloud_pubsub-2.21.2-py2.py3-none-any.whl", hash = "sha256:05a6b01e5bda6f4a4858700e3e9a12e3080589718d648b2383e5818131db9ce4"}, ] [package.dependencies] @@ -1277,28 +1299,26 @@ urllib3 = ">=1.26.0,<3" [[package]] name = "launchdarkly-server-sdk" -version = "9.2.2" +version = "8.2.1" description = "LaunchDarkly SDK for Python" optional = false -python-versions = ">=3.8" +python-versions = "*" files = [ - {file = "launchdarkly_server_sdk-9.2.2-py3-none-any.whl", hash = "sha256:d7b544c60c7c2b431c8976dda472c68f910c7c0061b90c8c2ef0397d8f05c519"}, - {file = "launchdarkly_server_sdk-9.2.2.tar.gz", hash = "sha256:3785d0159c2a74434cd85c16dd88e41ac94bb5cd7563def4d781d99e59c4eba0"}, + {file = "launchdarkly-server-sdk-8.2.1.tar.gz", hash = "sha256:94adbd52f635ad2f1a8b4a835cbbe4ce77919a6915136b303eaca3e2a54903be"}, + {file = "launchdarkly_server_sdk-8.2.1-py3-none-any.whl", hash = "sha256:b7680a4d5856da133b0dad8eca820e48bb5f2fb6dc34ebbf7f1a3a681033b426"}, ] [package.dependencies] certifi = ">=2018.4.16" expiringdict = ">=1.1.4" -launchdarkly-eventsource = ">=1.1.0,<2.0.0" pyRFC3339 = ">=1.0" semver = ">=2.10.2" -urllib3 = ">=1.26.0,<3" +urllib3 = ">=1.22.0,<3" [package.extras] consul = ["python-consul (>=1.0.1)"] dynamodb = ["boto3 (>=1.9.71)"] redis = ["redis (>=2.10.5)"] -test-filesource = ["pyyaml (>=5.3.1)", "watchdog (>=3.0.0)"] [[package]] name = "lovely-pytest-docker" @@ -1585,22 +1605,16 @@ dpath = "2.1.6" ecdsa = "0.18.0" expiringdict = "1.2.2" flask = "3.0.2" -flask-caching = "2.1.0" +flask-caching = "2.3.0" flask-cors = "4.0.0" -flask-jwt-oidc = {git = "https://github.com/thorwolpert/flask-jwt-oidc.git"} +flask-jwt-oidc = {git = "https://github.com/seeker25/flask-jwt-oidc.git"} flask-marshmallow = "1.2.0" flask-migrate = "4.0.7" flask-moment = "1.0.5" flask-script = "2.0.6" flask-sqlalchemy = "3.1.1" -google-api-core = "2.17.1" -google-auth = "2.28.1" -google-cloud-pubsub = "2.20.0" -googleapis-common-protos = "1.63.0" +gcp-queue = {git = "https://github.com/seeker25/sbc-connect-common.git", branch = "main", subdirectory = "python/gcp-queue"} greenlet = "3.0.3" -grpc-google-iam-v1 = "0.13.0" -grpcio = "1.62.1" -grpcio-status = "1.62.1" gunicorn = "21.2.0" holidays = "0.37" idna = "3.6" @@ -1609,7 +1623,7 @@ jaeger-client = "4.8.0" jinja2 = "3.1.3" jsonschema = "4.17.3" launchdarkly-eventsource = "1.1.1" -launchdarkly-server-sdk = "9.2.2" +launchdarkly-server-sdk = "8.2.1" mako = "1.3.2" markupsafe = "2.1.5" marshmallow = "3.21.1" @@ -1635,7 +1649,6 @@ rsa = "4.9" sbc-common-components = {git = "https://github.com/bcgov/sbc-common-components.git", subdirectory = "python"} semver = "3.0.2" sentry-sdk = "1.41.0" -simple-cloudevent = {git = "https://github.com/daxiom/simple-cloudevent.py.git"} six = "1.16.0" sql-versioning = {git = "https://github.com/bcgov/lear.git", branch = "feature-legal-name", subdirectory = "python/common/sql-versioning"} sqlalchemy = "2.0.28" @@ -1649,9 +1662,9 @@ werkzeug = "3.0.1" [package.source] type = "git" -url = "https://github.com/bcgov/sbc-pay.git" -reference = "feature-queue-python-upgrade" -resolved_reference = "031104546edc3c471f0d00bdbbf9c2025d468557" +url = "https://github.com/seeker25/sbc-pay.git" +reference = "sync-python-to-main" +resolved_reference = "7411bde70b1664887bbced197999d53379ba1213" subdirectory = "pay-api" [[package]] @@ -2665,4 +2678,4 @@ watchdog = ["watchdog (>=2.3)"] [metadata] lock-version = "2.0" python-versions = "^3.12" -content-hash = "f7e978de8d7c39e508ff106d26b6a9fedac7896203b705955ed5b3a5d481c775" +content-hash = "8969f66a8435f9818257f133cecc641bc0cf33a3ba2712da06aae3b6453cc0b5" diff --git a/pay-queue/pyproject.toml b/pay-queue/pyproject.toml index 299044c9d..5a3688840 100644 --- a/pay-queue/pyproject.toml +++ b/pay-queue/pyproject.toml @@ -19,12 +19,10 @@ sqlalchemy = "^2.0.28" itsdangerous = "^2.1.2" jinja2 = "^3.1.3" protobuf = "4.25.3" -launchdarkly-server-sdk = "^9.2.2" +launchdarkly-server-sdk = "^8.2.1" cachecontrol = "^0.14.0" sbc-common-components = {git = "https://github.com/bcgov/sbc-common-components.git", subdirectory = "python"} -pay-api = {git = "https://github.com/bcgov/sbc-pay.git", branch = "feature-queue-python-upgrade", subdirectory = "pay-api"} -flask-jwt-oidc = {git = "https://github.com/thorwolpert/flask-jwt-oidc.git"} -simple-cloudevent = {git = "https://github.com/daxiom/simple-cloudevent.py.git"} +pay-api = {git = "https://github.com/seeker25/sbc-pay.git", branch = "sync-python-to-main", subdirectory = "pay-api"} pg8000 = "^1.30.5" diff --git a/pay-queue/src/pay_queue/services/cgi_reconciliations.py b/pay-queue/src/pay_queue/services/cgi_reconciliations.py index e47945b69..7ec308a8d 100644 --- a/pay-queue/src/pay_queue/services/cgi_reconciliations.py +++ b/pay-queue/src/pay_queue/services/cgi_reconciliations.py @@ -32,8 +32,9 @@ from pay_api.services import gcp_queue_publisher from pay_api.services.gcp_queue_publisher import QueueMessage from pay_api.utils.enums import ( - DisbursementStatus, EjvFileType, EJVLinkType, InvoiceReferenceStatus, InvoiceStatus, PaymentMethod, - PaymentStatus, PaymentSystem, QueueSources, RoutingSlipStatus) + DisbursementStatus, EjvFileType, EJVLinkType, InvoiceReferenceStatus, InvoiceStatus, PaymentMethod, PaymentStatus, + PaymentSystem, QueueSources, RoutingSlipStatus) +from sbc_common_components.utils.enums import QueueMessageTypes from sentry_sdk import capture_message from pay_queue import config @@ -188,7 +189,6 @@ def _process_jv_details_feedback(ejv_file, has_errors, line, receipt_number): # invoice_return_message = line[319:469] # If the JV process failed, then mark the GL code against the invoice to be stopped # for further JV process for the credit GL. - logger.info('Is Credit or Debit %s - %s', line[104:105], ejv_file.file_type) current_app.logger.info('Is Credit or Debit %s - %s', line[104:105], ejv_file.file_type) if line[104:105] == 'C' and ejv_file.file_type == EjvFileType.DISBURSEMENT.value: disbursement_status = _get_disbursement_status(invoice_return_code) diff --git a/pay-queue/tests/conftest.py b/pay-queue/tests/conftest.py index dd9dfd3f3..8c5fdebba 100644 --- a/pay-queue/tests/conftest.py +++ b/pay-queue/tests/conftest.py @@ -13,6 +13,7 @@ # limitations under the License. """Common setup and fixtures for the pytest suite used by this service.""" import os +from concurrent.futures import CancelledError import pytest from flask_migrate import Migrate, upgrade @@ -142,7 +143,7 @@ def initialize_pubsub(app): except NotFound: pass publisher.create_topic(name=topic_path) - subscription_path = subscriber.subscription_path(project, f'{topic}_subscription') + subscription_path = subscriber.subscription_path(project, f'{topic}_subscription') try: subscriber.delete_subscription(subscription=subscription_path) except NotFound: @@ -169,4 +170,4 @@ def publish(self, *args, **kwargs): """Publish mock.""" raise CancelledError('This is a mock') - mocker.patch('google.cloud.pubsub_v1.PublisherClient', PublisherMock) \ No newline at end of file + mocker.patch('google.cloud.pubsub_v1.PublisherClient', PublisherMock) diff --git a/pay-queue/tests/integration/test_cgi_reconciliations.py b/pay-queue/tests/integration/test_cgi_reconciliations.py index 61ab286ac..19ac6a16e 100644 --- a/pay-queue/tests/integration/test_cgi_reconciliations.py +++ b/pay-queue/tests/integration/test_cgi_reconciliations.py @@ -33,7 +33,7 @@ from pay_api.models import RoutingSlip as RoutingSlipModel from pay_api.models import db from pay_api.utils.enums import ( - CfsAccountStatus, DisbursementStatus, EjvFileType, EJVLinkType, InvoiceReferenceStatus, InvoiceStatus, MessageType, + CfsAccountStatus, DisbursementStatus, EjvFileType, EJVLinkType, InvoiceReferenceStatus, InvoiceStatus, PaymentMethod, PaymentStatus, RoutingSlipStatus) from sbc_common_components.utils.enums import QueueMessageTypes @@ -462,10 +462,9 @@ def test_succesful_payment_ejv_reconciliations(session, app, client): ejv_header: EjvHeaderModel = EjvHeaderModel(disbursement_status_code=DisbursementStatus.UPLOADED.value, ejv_file_id=ejv_file.id, payment_account_id=jv_acc.id).save() - EjvLinkModel( - link_id=inv.id, link_type=EJVLinkType.INVOICE.value, - ejv_header_id=ejv_header.id, disbursement_status_code=DisbursementStatus.UPLOADED.value - ).save() + EjvLinkModel(link_id=inv.id, link_type=EJVLinkType.INVOICE.value, + ejv_header_id=ejv_header.id, disbursement_status_code=DisbursementStatus.UPLOADED.value + ).save() inv_total = f'{inv.total:.2f}'.zfill(15) pay_line_amount = f'{line.total:.2f}'.zfill(15) service_fee_amount = f'{line.service_fees:.2f}'.zfill(15) @@ -622,8 +621,8 @@ def test_succesful_payment_reversal_ejv_reconciliations(session, app, client): ejv_file_id=ejv_file.id, payment_account_id=jv_acc.id).save() EjvLinkModel( - link_id=inv.id, link_type=EJVLinkType.INVOICE.value, - ejv_header_id=ejv_header.id, disbursement_status_code=DisbursementStatus.UPLOADED.value + link_id=inv.id, link_type=EJVLinkType.INVOICE.value, + ejv_header_id=ejv_header.id, disbursement_status_code=DisbursementStatus.UPLOADED.value ).save() inv_total = f'{inv.total:.2f}'.zfill(15) pay_line_amount = f'{line.total:.2f}'.zfill(15) @@ -1049,12 +1048,12 @@ def test_successful_ap_disbursement(session, app, client): ejv_file_id=ejv_file.id, payment_account_id=account.id).save() EjvLinkModel( - link_id=invoice.id, link_type=EJVLinkType.INVOICE.value, - ejv_header_id=ejv_header.id, disbursement_status_code=DisbursementStatus.UPLOADED.value + link_id=invoice.id, link_type=EJVLinkType.INVOICE.value, + ejv_header_id=ejv_header.id, disbursement_status_code=DisbursementStatus.UPLOADED.value ).save() EjvLinkModel( - link_id=refund_invoice.id, link_type=EJVLinkType.INVOICE.value, ejv_header_id=ejv_header.id, + link_id=refund_invoice.id, link_type=EJVLinkType.INVOICE.value, ejv_header_id=ejv_header.id, disbursement_status_code=DisbursementStatus.UPLOADED.value ).save() diff --git a/pay-queue/tests/integration/test_eft_reconciliation.py b/pay-queue/tests/integration/test_eft_reconciliation.py index 64ba097c7..97fb9520c 100644 --- a/pay-queue/tests/integration/test_eft_reconciliation.py +++ b/pay-queue/tests/integration/test_eft_reconciliation.py @@ -19,7 +19,6 @@ from datetime import datetime from typing import List -from flask import current_app from pay_api import db from pay_api.models import EFTCredit as EFTCreditModel from pay_api.models import EFTCreditInvoiceLink as EFTCreditInvoiceLinkModel @@ -29,7 +28,7 @@ from pay_api.models import EFTTransaction as EFTTransactionModel from pay_api.models import Invoice as InvoiceModel from pay_api.models import PaymentAccount as PaymentAccountModel -from pay_api.utils.enums import EFTFileLineType, EFTProcessStatus, EFTShortnameStatus, MessageType, PaymentMethod +from pay_api.utils.enums import EFTFileLineType, EFTProcessStatus, EFTShortnameStatus, PaymentMethod from sbc_common_components.utils.enums import QueueMessageTypes from pay_queue.services.eft.eft_enums import EFTConstants @@ -356,7 +355,7 @@ def test_eft_tdi17_process(session, app, client): assert eft_shortnames[1].short_name == 'ABC123' # NOTE THIS NEEDS TO BE RE-WRITTEN INSIDE OF THE JOB. - today = datetime.now().date() + # today = datetime.now().date() # # Assert Invoice is paid # invoice: InvoiceModel = InvoiceModel.find_by_id(invoice.id) # expected_amount = 100 diff --git a/pay-queue/tests/integration/test_payment_reconciliations.py b/pay-queue/tests/integration/test_payment_reconciliations.py index ff12a1f6e..d63a3d4aa 100644 --- a/pay-queue/tests/integration/test_payment_reconciliations.py +++ b/pay-queue/tests/integration/test_payment_reconciliations.py @@ -26,8 +26,7 @@ from pay_api.models import Payment as PaymentModel from pay_api.models import PaymentAccount as PaymentAccountModel from pay_api.models import Receipt as ReceiptModel -from pay_api.utils.enums import ( - CfsAccountStatus, InvoiceReferenceStatus, InvoiceStatus, MessageType, PaymentMethod, PaymentStatus) +from pay_api.utils.enums import CfsAccountStatus, InvoiceReferenceStatus, InvoiceStatus, PaymentMethod, PaymentStatus from sbc_common_components.utils.enums import QueueMessageTypes from pay_queue.enums import RecordType, SourceTransaction, Status, TargetTransaction From 1dae0d28e241a7bcdfc43dcaee1a36e35e77c31c Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Thu, 30 May 2024 21:28:40 -0700 Subject: [PATCH 5/8] update sbc-common-components, also remove because pay-api already includes it. --- pay-queue/poetry.lock | 306 +++++++++++++++++++-------------------- pay-queue/pyproject.toml | 1 - 2 files changed, 149 insertions(+), 158 deletions(-) diff --git a/pay-queue/poetry.lock b/pay-queue/poetry.lock index a5e397b91..ba45aacf1 100644 --- a/pay-queue/poetry.lock +++ b/pay-queue/poetry.lock @@ -89,13 +89,13 @@ files = [ [[package]] name = "astroid" -version = "3.1.0" +version = "3.2.2" description = "An abstract syntax tree for Python with inference support." optional = false python-versions = ">=3.8.0" files = [ - {file = "astroid-3.1.0-py3-none-any.whl", hash = "sha256:951798f922990137ac090c53af473db7ab4e70c770e6d7fae0cec59f74411819"}, - {file = "astroid-3.1.0.tar.gz", hash = "sha256:ac248253bfa4bd924a0de213707e7ebeeb3138abeb48d798784ead1e56d419d4"}, + {file = "astroid-3.2.2-py3-none-any.whl", hash = "sha256:e8a0083b4bb28fcffb6207a3bfc9e5d0a68be951dd7e336d5dcf639c682388c0"}, + {file = "astroid-3.2.2.tar.gz", hash = "sha256:8ead48e31b92b2e217b6c9733a21afafe479d52d6e164dd25fb1a770c7c3cf94"}, ] [[package]] @@ -119,13 +119,13 @@ tests-no-zope = ["attrs[tests-mypy]", "cloudpickle", "hypothesis", "pympler", "p [[package]] name = "autopep8" -version = "2.1.0" +version = "2.2.0" description = "A tool that automatically formats Python code to conform to the PEP 8 style guide" optional = false python-versions = ">=3.8" files = [ - {file = "autopep8-2.1.0-py2.py3-none-any.whl", hash = "sha256:2bb76888c5edbcafe6aabab3c47ba534f5a2c2d245c2eddced4a30c4b4946357"}, - {file = "autopep8-2.1.0.tar.gz", hash = "sha256:1fa8964e4618929488f4ec36795c7ff12924a68b8bf01366c094fc52f770b6e7"}, + {file = "autopep8-2.2.0-py2.py3-none-any.whl", hash = "sha256:05418a981f038969d8bdcd5636bf15948db7555ae944b9f79b5a34b35f1370d4"}, + {file = "autopep8-2.2.0.tar.gz", hash = "sha256:d306a0581163ac29908280ad557773a95a9bede072c0fafed6f141f5311f43c1"}, ] [package.dependencies] @@ -408,63 +408,63 @@ files = [ [[package]] name = "coverage" -version = "7.5.0" +version = "7.5.3" description = "Code coverage measurement for Python" optional = false python-versions = ">=3.8" files = [ - {file = "coverage-7.5.0-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:432949a32c3e3f820af808db1833d6d1631664d53dd3ce487aa25d574e18ad1c"}, - {file = "coverage-7.5.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:2bd7065249703cbeb6d4ce679c734bef0ee69baa7bff9724361ada04a15b7e3b"}, - {file = "coverage-7.5.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bbfe6389c5522b99768a93d89aca52ef92310a96b99782973b9d11e80511f932"}, - {file = "coverage-7.5.0-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:39793731182c4be939b4be0cdecde074b833f6171313cf53481f869937129ed3"}, - {file = "coverage-7.5.0-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:85a5dbe1ba1bf38d6c63b6d2c42132d45cbee6d9f0c51b52c59aa4afba057517"}, - {file = "coverage-7.5.0-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:357754dcdfd811462a725e7501a9b4556388e8ecf66e79df6f4b988fa3d0b39a"}, - {file = "coverage-7.5.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:a81eb64feded34f40c8986869a2f764f0fe2db58c0530d3a4afbcde50f314880"}, - {file = "coverage-7.5.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:51431d0abbed3a868e967f8257c5faf283d41ec882f58413cf295a389bb22e58"}, - {file = "coverage-7.5.0-cp310-cp310-win32.whl", hash = "sha256:f609ebcb0242d84b7adeee2b06c11a2ddaec5464d21888b2c8255f5fd6a98ae4"}, - {file = "coverage-7.5.0-cp310-cp310-win_amd64.whl", hash = "sha256:6782cd6216fab5a83216cc39f13ebe30adfac2fa72688c5a4d8d180cd52e8f6a"}, - {file = "coverage-7.5.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:e768d870801f68c74c2b669fc909839660180c366501d4cc4b87efd6b0eee375"}, - {file = "coverage-7.5.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:84921b10aeb2dd453247fd10de22907984eaf80901b578a5cf0bb1e279a587cb"}, - {file = "coverage-7.5.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:710c62b6e35a9a766b99b15cdc56d5aeda0914edae8bb467e9c355f75d14ee95"}, - {file = "coverage-7.5.0-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c379cdd3efc0658e652a14112d51a7668f6bfca7445c5a10dee7eabecabba19d"}, - {file = "coverage-7.5.0-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fea9d3ca80bcf17edb2c08a4704259dadac196fe5e9274067e7a20511fad1743"}, - {file = "coverage-7.5.0-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:41327143c5b1d715f5f98a397608f90ab9ebba606ae4e6f3389c2145410c52b1"}, - {file = "coverage-7.5.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:565b2e82d0968c977e0b0f7cbf25fd06d78d4856289abc79694c8edcce6eb2de"}, - {file = "coverage-7.5.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:cf3539007202ebfe03923128fedfdd245db5860a36810136ad95a564a2fdffff"}, - {file = "coverage-7.5.0-cp311-cp311-win32.whl", hash = "sha256:bf0b4b8d9caa8d64df838e0f8dcf68fb570c5733b726d1494b87f3da85db3a2d"}, - {file = "coverage-7.5.0-cp311-cp311-win_amd64.whl", hash = "sha256:9c6384cc90e37cfb60435bbbe0488444e54b98700f727f16f64d8bfda0b84656"}, - {file = "coverage-7.5.0-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:fed7a72d54bd52f4aeb6c6e951f363903bd7d70bc1cad64dd1f087980d309ab9"}, - {file = "coverage-7.5.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:cbe6581fcff7c8e262eb574244f81f5faaea539e712a058e6707a9d272fe5b64"}, - {file = "coverage-7.5.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ad97ec0da94b378e593ef532b980c15e377df9b9608c7c6da3506953182398af"}, - {file = "coverage-7.5.0-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:bd4bacd62aa2f1a1627352fe68885d6ee694bdaebb16038b6e680f2924a9b2cc"}, - {file = "coverage-7.5.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:adf032b6c105881f9d77fa17d9eebe0ad1f9bfb2ad25777811f97c5362aa07f2"}, - {file = "coverage-7.5.0-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:4ba01d9ba112b55bfa4b24808ec431197bb34f09f66f7cb4fd0258ff9d3711b1"}, - {file = "coverage-7.5.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:f0bfe42523893c188e9616d853c47685e1c575fe25f737adf473d0405dcfa7eb"}, - {file = "coverage-7.5.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:a9a7ef30a1b02547c1b23fa9a5564f03c9982fc71eb2ecb7f98c96d7a0db5cf2"}, - {file = "coverage-7.5.0-cp312-cp312-win32.whl", hash = "sha256:3c2b77f295edb9fcdb6a250f83e6481c679335ca7e6e4a955e4290350f2d22a4"}, - {file = "coverage-7.5.0-cp312-cp312-win_amd64.whl", hash = "sha256:427e1e627b0963ac02d7c8730ca6d935df10280d230508c0ba059505e9233475"}, - {file = "coverage-7.5.0-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:9dd88fce54abbdbf4c42fb1fea0e498973d07816f24c0e27a1ecaf91883ce69e"}, - {file = "coverage-7.5.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:a898c11dca8f8c97b467138004a30133974aacd572818c383596f8d5b2eb04a9"}, - {file = "coverage-7.5.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:07dfdd492d645eea1bd70fb1d6febdcf47db178b0d99161d8e4eed18e7f62fe7"}, - {file = "coverage-7.5.0-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:d3d117890b6eee85887b1eed41eefe2e598ad6e40523d9f94c4c4b213258e4a4"}, - {file = "coverage-7.5.0-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:6afd2e84e7da40fe23ca588379f815fb6dbbb1b757c883935ed11647205111cb"}, - {file = "coverage-7.5.0-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:a9960dd1891b2ddf13a7fe45339cd59ecee3abb6b8326d8b932d0c5da208104f"}, - {file = "coverage-7.5.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:ced268e82af993d7801a9db2dbc1d2322e786c5dc76295d8e89473d46c6b84d4"}, - {file = "coverage-7.5.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:e7c211f25777746d468d76f11719e64acb40eed410d81c26cefac641975beb88"}, - {file = "coverage-7.5.0-cp38-cp38-win32.whl", hash = "sha256:262fffc1f6c1a26125d5d573e1ec379285a3723363f3bd9c83923c9593a2ac25"}, - {file = "coverage-7.5.0-cp38-cp38-win_amd64.whl", hash = "sha256:eed462b4541c540d63ab57b3fc69e7d8c84d5957668854ee4e408b50e92ce26a"}, - {file = "coverage-7.5.0-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:d0194d654e360b3e6cc9b774e83235bae6b9b2cac3be09040880bb0e8a88f4a1"}, - {file = "coverage-7.5.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:33c020d3322662e74bc507fb11488773a96894aa82a622c35a5a28673c0c26f5"}, - {file = "coverage-7.5.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:0cbdf2cae14a06827bec50bd58e49249452d211d9caddd8bd80e35b53cb04631"}, - {file = "coverage-7.5.0-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:3235d7c781232e525b0761730e052388a01548bd7f67d0067a253887c6e8df46"}, - {file = "coverage-7.5.0-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:db2de4e546f0ec4b2787d625e0b16b78e99c3e21bc1722b4977c0dddf11ca84e"}, - {file = "coverage-7.5.0-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:4d0e206259b73af35c4ec1319fd04003776e11e859936658cb6ceffdeba0f5be"}, - {file = "coverage-7.5.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:2055c4fb9a6ff624253d432aa471a37202cd8f458c033d6d989be4499aed037b"}, - {file = "coverage-7.5.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:075299460948cd12722a970c7eae43d25d37989da682997687b34ae6b87c0ef0"}, - {file = "coverage-7.5.0-cp39-cp39-win32.whl", hash = "sha256:280132aada3bc2f0fac939a5771db4fbb84f245cb35b94fae4994d4c1f80dae7"}, - {file = "coverage-7.5.0-cp39-cp39-win_amd64.whl", hash = "sha256:c58536f6892559e030e6924896a44098bc1290663ea12532c78cef71d0df8493"}, - {file = "coverage-7.5.0-pp38.pp39.pp310-none-any.whl", hash = "sha256:2b57780b51084d5223eee7b59f0d4911c31c16ee5aa12737c7a02455829ff067"}, - {file = "coverage-7.5.0.tar.gz", hash = "sha256:cf62d17310f34084c59c01e027259076479128d11e4661bb6c9acb38c5e19bb8"}, + {file = "coverage-7.5.3-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:a6519d917abb15e12380406d721e37613e2a67d166f9fb7e5a8ce0375744cd45"}, + {file = "coverage-7.5.3-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:aea7da970f1feccf48be7335f8b2ca64baf9b589d79e05b9397a06696ce1a1ec"}, + {file = "coverage-7.5.3-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:923b7b1c717bd0f0f92d862d1ff51d9b2b55dbbd133e05680204465f454bb286"}, + {file = "coverage-7.5.3-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:62bda40da1e68898186f274f832ef3e759ce929da9a9fd9fcf265956de269dbc"}, + {file = "coverage-7.5.3-cp310-cp310-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d8b7339180d00de83e930358223c617cc343dd08e1aa5ec7b06c3a121aec4e1d"}, + {file = "coverage-7.5.3-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:25a5caf742c6195e08002d3b6c2dd6947e50efc5fc2c2205f61ecb47592d2d83"}, + {file = "coverage-7.5.3-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:05ac5f60faa0c704c0f7e6a5cbfd6f02101ed05e0aee4d2822637a9e672c998d"}, + {file = "coverage-7.5.3-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:239a4e75e09c2b12ea478d28815acf83334d32e722e7433471fbf641c606344c"}, + {file = "coverage-7.5.3-cp310-cp310-win32.whl", hash = "sha256:a5812840d1d00eafae6585aba38021f90a705a25b8216ec7f66aebe5b619fb84"}, + {file = "coverage-7.5.3-cp310-cp310-win_amd64.whl", hash = "sha256:33ca90a0eb29225f195e30684ba4a6db05dbef03c2ccd50b9077714c48153cac"}, + {file = "coverage-7.5.3-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:f81bc26d609bf0fbc622c7122ba6307993c83c795d2d6f6f6fd8c000a770d974"}, + {file = "coverage-7.5.3-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:7cec2af81f9e7569280822be68bd57e51b86d42e59ea30d10ebdbb22d2cb7232"}, + {file = "coverage-7.5.3-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:55f689f846661e3f26efa535071775d0483388a1ccfab899df72924805e9e7cd"}, + {file = "coverage-7.5.3-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:50084d3516aa263791198913a17354bd1dc627d3c1639209640b9cac3fef5807"}, + {file = "coverage-7.5.3-cp311-cp311-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:341dd8f61c26337c37988345ca5c8ccabeff33093a26953a1ac72e7d0103c4fb"}, + {file = "coverage-7.5.3-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:ab0b028165eea880af12f66086694768f2c3139b2c31ad5e032c8edbafca6ffc"}, + {file = "coverage-7.5.3-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:5bc5a8c87714b0c67cfeb4c7caa82b2d71e8864d1a46aa990b5588fa953673b8"}, + {file = "coverage-7.5.3-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:38a3b98dae8a7c9057bd91fbf3415c05e700a5114c5f1b5b0ea5f8f429ba6614"}, + {file = "coverage-7.5.3-cp311-cp311-win32.whl", hash = "sha256:fcf7d1d6f5da887ca04302db8e0e0cf56ce9a5e05f202720e49b3e8157ddb9a9"}, + {file = "coverage-7.5.3-cp311-cp311-win_amd64.whl", hash = "sha256:8c836309931839cca658a78a888dab9676b5c988d0dd34ca247f5f3e679f4e7a"}, + {file = "coverage-7.5.3-cp312-cp312-macosx_10_9_x86_64.whl", hash = "sha256:296a7d9bbc598e8744c00f7a6cecf1da9b30ae9ad51c566291ff1314e6cbbed8"}, + {file = "coverage-7.5.3-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:34d6d21d8795a97b14d503dcaf74226ae51eb1f2bd41015d3ef332a24d0a17b3"}, + {file = "coverage-7.5.3-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8e317953bb4c074c06c798a11dbdd2cf9979dbcaa8ccc0fa4701d80042d4ebf1"}, + {file = "coverage-7.5.3-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:705f3d7c2b098c40f5b81790a5fedb274113373d4d1a69e65f8b68b0cc26f6db"}, + {file = "coverage-7.5.3-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b1196e13c45e327d6cd0b6e471530a1882f1017eb83c6229fc613cd1a11b53cd"}, + {file = "coverage-7.5.3-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:015eddc5ccd5364dcb902eaecf9515636806fa1e0d5bef5769d06d0f31b54523"}, + {file = "coverage-7.5.3-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:fd27d8b49e574e50caa65196d908f80e4dff64d7e592d0c59788b45aad7e8b35"}, + {file = "coverage-7.5.3-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:33fc65740267222fc02975c061eb7167185fef4cc8f2770267ee8bf7d6a42f84"}, + {file = "coverage-7.5.3-cp312-cp312-win32.whl", hash = "sha256:7b2a19e13dfb5c8e145c7a6ea959485ee8e2204699903c88c7d25283584bfc08"}, + {file = "coverage-7.5.3-cp312-cp312-win_amd64.whl", hash = "sha256:0bbddc54bbacfc09b3edaec644d4ac90c08ee8ed4844b0f86227dcda2d428fcb"}, + {file = "coverage-7.5.3-cp38-cp38-macosx_10_9_x86_64.whl", hash = "sha256:f78300789a708ac1f17e134593f577407d52d0417305435b134805c4fb135adb"}, + {file = "coverage-7.5.3-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:b368e1aee1b9b75757942d44d7598dcd22a9dbb126affcbba82d15917f0cc155"}, + {file = "coverage-7.5.3-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:f836c174c3a7f639bded48ec913f348c4761cbf49de4a20a956d3431a7c9cb24"}, + {file = "coverage-7.5.3-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:244f509f126dc71369393ce5fea17c0592c40ee44e607b6d855e9c4ac57aac98"}, + {file = "coverage-7.5.3-cp38-cp38-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c4c2872b3c91f9baa836147ca33650dc5c172e9273c808c3c3199c75490e709d"}, + {file = "coverage-7.5.3-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:dd4b3355b01273a56b20c219e74e7549e14370b31a4ffe42706a8cda91f19f6d"}, + {file = "coverage-7.5.3-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:f542287b1489c7a860d43a7d8883e27ca62ab84ca53c965d11dac1d3a1fab7ce"}, + {file = "coverage-7.5.3-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:75e3f4e86804023e991096b29e147e635f5e2568f77883a1e6eed74512659ab0"}, + {file = "coverage-7.5.3-cp38-cp38-win32.whl", hash = "sha256:c59d2ad092dc0551d9f79d9d44d005c945ba95832a6798f98f9216ede3d5f485"}, + {file = "coverage-7.5.3-cp38-cp38-win_amd64.whl", hash = "sha256:fa21a04112c59ad54f69d80e376f7f9d0f5f9123ab87ecd18fbb9ec3a2beed56"}, + {file = "coverage-7.5.3-cp39-cp39-macosx_10_9_x86_64.whl", hash = "sha256:f5102a92855d518b0996eb197772f5ac2a527c0ec617124ad5242a3af5e25f85"}, + {file = "coverage-7.5.3-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:d1da0a2e3b37b745a2b2a678a4c796462cf753aebf94edcc87dcc6b8641eae31"}, + {file = "coverage-7.5.3-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:8383a6c8cefba1b7cecc0149415046b6fc38836295bc4c84e820872eb5478b3d"}, + {file = "coverage-7.5.3-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9aad68c3f2566dfae84bf46295a79e79d904e1c21ccfc66de88cd446f8686341"}, + {file = "coverage-7.5.3-cp39-cp39-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:2e079c9ec772fedbade9d7ebc36202a1d9ef7291bc9b3a024ca395c4d52853d7"}, + {file = "coverage-7.5.3-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:bde997cac85fcac227b27d4fb2c7608a2c5f6558469b0eb704c5726ae49e1c52"}, + {file = "coverage-7.5.3-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:990fb20b32990b2ce2c5f974c3e738c9358b2735bc05075d50a6f36721b8f303"}, + {file = "coverage-7.5.3-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:3d5a67f0da401e105753d474369ab034c7bae51a4c31c77d94030d59e41df5bd"}, + {file = "coverage-7.5.3-cp39-cp39-win32.whl", hash = "sha256:e08c470c2eb01977d221fd87495b44867a56d4d594f43739a8028f8646a51e0d"}, + {file = "coverage-7.5.3-cp39-cp39-win_amd64.whl", hash = "sha256:1d2a830ade66d3563bb61d1e3c77c8def97b30ed91e166c67d0632c018f380f0"}, + {file = "coverage-7.5.3-pp38.pp39.pp310-none-any.whl", hash = "sha256:3538d8fb1ee9bdd2e2692b3b18c22bb1c19ffbefd06880f5ac496e42d7bb3884"}, + {file = "coverage-7.5.3.tar.gz", hash = "sha256:04aefca5190d1dc7a53a4c1a5a7f8568811306d7a8ee231c42fb69215571944f"}, ] [package.extras] @@ -856,13 +856,13 @@ sqlalchemy = ">=2.0.16" [[package]] name = "freezegun" -version = "1.5.0" +version = "1.5.1" description = "Let your Python tests travel through time" optional = false python-versions = ">=3.7" files = [ - {file = "freezegun-1.5.0-py3-none-any.whl", hash = "sha256:ec3f4ba030e34eb6cf7e1e257308aee2c60c3d038ff35996d7475760c9ff3719"}, - {file = "freezegun-1.5.0.tar.gz", hash = "sha256:200a64359b363aa3653d8aac289584078386c7c3da77339d257e46a01fb5c77c"}, + {file = "freezegun-1.5.1-py3-none-any.whl", hash = "sha256:bf111d7138a8abe55ab48a71755673dbaa4ab87f4cff5634a4442dfec34c15f1"}, + {file = "freezegun-1.5.1.tar.gz", hash = "sha256:b29dedfcda6d5e8e083ce71b2b542753ad48cfec44037b3fc79702e2980a89e9"}, ] [package.dependencies] @@ -892,13 +892,13 @@ subdirectory = "python/gcp-queue" [[package]] name = "google-api-core" -version = "2.17.1" +version = "2.19.0" description = "Google API client core library" optional = false python-versions = ">=3.7" files = [ - {file = "google-api-core-2.17.1.tar.gz", hash = "sha256:9df18a1f87ee0df0bc4eea2770ebc4228392d8cc4066655b320e2cfccb15db95"}, - {file = "google_api_core-2.17.1-py3-none-any.whl", hash = "sha256:610c5b90092c360736baccf17bd3efbcb30dd380e7a6dc28a71059edb8bd0d8e"}, + {file = "google-api-core-2.19.0.tar.gz", hash = "sha256:cf1b7c2694047886d2af1128a03ae99e391108a08804f87cfd35970e49c9cd10"}, + {file = "google_api_core-2.19.0-py3-none-any.whl", hash = "sha256:8661eec4078c35428fd3f69a2c7ee29e342896b70f01d1a1cbcb334372dd6251"}, ] [package.dependencies] @@ -906,6 +906,7 @@ google-auth = ">=2.14.1,<3.0.dev0" googleapis-common-protos = ">=1.56.2,<2.0.dev0" grpcio = {version = ">=1.49.1,<2.0dev", optional = true, markers = "python_version >= \"3.11\" and extra == \"grpc\""} grpcio-status = {version = ">=1.49.1,<2.0.dev0", optional = true, markers = "python_version >= \"3.11\" and extra == \"grpc\""} +proto-plus = ">=1.22.3,<2.0.0dev" protobuf = ">=3.19.5,<3.20.0 || >3.20.0,<3.20.1 || >3.20.1,<4.21.0 || >4.21.0,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<5.0.0.dev0" requests = ">=2.18.0,<3.0.0.dev0" @@ -1067,84 +1068,76 @@ protobuf = ">=3.19.5,<3.20.0 || >3.20.0,<3.20.1 || >3.20.1,<4.21.1 || >4.21.1,<4 [[package]] name = "grpcio" -version = "1.62.1" +version = "1.64.0" description = "HTTP/2-based RPC framework" optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "grpcio-1.62.1-cp310-cp310-linux_armv7l.whl", hash = "sha256:179bee6f5ed7b5f618844f760b6acf7e910988de77a4f75b95bbfaa8106f3c1e"}, - {file = "grpcio-1.62.1-cp310-cp310-macosx_12_0_universal2.whl", hash = "sha256:48611e4fa010e823ba2de8fd3f77c1322dd60cb0d180dc6630a7e157b205f7ea"}, - {file = "grpcio-1.62.1-cp310-cp310-manylinux_2_17_aarch64.whl", hash = "sha256:b2a0e71b0a2158aa4bce48be9f8f9eb45cbd17c78c7443616d00abbe2a509f6d"}, - {file = "grpcio-1.62.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:fbe80577c7880911d3ad65e5ecc997416c98f354efeba2f8d0f9112a67ed65a5"}, - {file = "grpcio-1.62.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:58f6c693d446964e3292425e1d16e21a97a48ba9172f2d0df9d7b640acb99243"}, - {file = "grpcio-1.62.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:77c339403db5a20ef4fed02e4d1a9a3d9866bf9c0afc77a42234677313ea22f3"}, - {file = "grpcio-1.62.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:b5a4ea906db7dec694098435d84bf2854fe158eb3cd51e1107e571246d4d1d70"}, - {file = "grpcio-1.62.1-cp310-cp310-win32.whl", hash = "sha256:4187201a53f8561c015bc745b81a1b2d278967b8de35f3399b84b0695e281d5f"}, - {file = "grpcio-1.62.1-cp310-cp310-win_amd64.whl", hash = "sha256:844d1f3fb11bd1ed362d3fdc495d0770cfab75761836193af166fee113421d66"}, - {file = "grpcio-1.62.1-cp311-cp311-linux_armv7l.whl", hash = "sha256:833379943d1728a005e44103f17ecd73d058d37d95783eb8f0b28ddc1f54d7b2"}, - {file = "grpcio-1.62.1-cp311-cp311-macosx_10_10_universal2.whl", hash = "sha256:c7fcc6a32e7b7b58f5a7d27530669337a5d587d4066060bcb9dee7a8c833dfb7"}, - {file = "grpcio-1.62.1-cp311-cp311-manylinux_2_17_aarch64.whl", hash = "sha256:fa7d28eb4d50b7cbe75bb8b45ed0da9a1dc5b219a0af59449676a29c2eed9698"}, - {file = "grpcio-1.62.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:48f7135c3de2f298b833be8b4ae20cafe37091634e91f61f5a7eb3d61ec6f660"}, - {file = "grpcio-1.62.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:71f11fd63365ade276c9d4a7b7df5c136f9030e3457107e1791b3737a9b9ed6a"}, - {file = "grpcio-1.62.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:4b49fd8fe9f9ac23b78437da94c54aa7e9996fbb220bac024a67469ce5d0825f"}, - {file = "grpcio-1.62.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:482ae2ae78679ba9ed5752099b32e5fe580443b4f798e1b71df412abf43375db"}, - {file = "grpcio-1.62.1-cp311-cp311-win32.whl", hash = "sha256:1faa02530b6c7426404372515fe5ddf66e199c2ee613f88f025c6f3bd816450c"}, - {file = "grpcio-1.62.1-cp311-cp311-win_amd64.whl", hash = "sha256:5bd90b8c395f39bc82a5fb32a0173e220e3f401ff697840f4003e15b96d1befc"}, - {file = "grpcio-1.62.1-cp312-cp312-linux_armv7l.whl", hash = "sha256:b134d5d71b4e0837fff574c00e49176051a1c532d26c052a1e43231f252d813b"}, - {file = "grpcio-1.62.1-cp312-cp312-macosx_10_10_universal2.whl", hash = "sha256:d1f6c96573dc09d50dbcbd91dbf71d5cf97640c9427c32584010fbbd4c0e0037"}, - {file = "grpcio-1.62.1-cp312-cp312-manylinux_2_17_aarch64.whl", hash = "sha256:359f821d4578f80f41909b9ee9b76fb249a21035a061a327f91c953493782c31"}, - {file = "grpcio-1.62.1-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a485f0c2010c696be269184bdb5ae72781344cb4e60db976c59d84dd6354fac9"}, - {file = "grpcio-1.62.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b50b09b4dc01767163d67e1532f948264167cd27f49e9377e3556c3cba1268e1"}, - {file = "grpcio-1.62.1-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:3227c667dccbe38f2c4d943238b887bac588d97c104815aecc62d2fd976e014b"}, - {file = "grpcio-1.62.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:3952b581eb121324853ce2b191dae08badb75cd493cb4e0243368aa9e61cfd41"}, - {file = "grpcio-1.62.1-cp312-cp312-win32.whl", hash = "sha256:83a17b303425104d6329c10eb34bba186ffa67161e63fa6cdae7776ff76df73f"}, - {file = "grpcio-1.62.1-cp312-cp312-win_amd64.whl", hash = "sha256:6696ffe440333a19d8d128e88d440f91fb92c75a80ce4b44d55800e656a3ef1d"}, - {file = "grpcio-1.62.1-cp37-cp37m-linux_armv7l.whl", hash = "sha256:e3393b0823f938253370ebef033c9fd23d27f3eae8eb9a8f6264900c7ea3fb5a"}, - {file = "grpcio-1.62.1-cp37-cp37m-macosx_10_10_universal2.whl", hash = "sha256:83e7ccb85a74beaeae2634f10eb858a0ed1a63081172649ff4261f929bacfd22"}, - {file = "grpcio-1.62.1-cp37-cp37m-manylinux_2_17_aarch64.whl", hash = "sha256:882020c87999d54667a284c7ddf065b359bd00251fcd70279ac486776dbf84ec"}, - {file = "grpcio-1.62.1-cp37-cp37m-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:a10383035e864f386fe096fed5c47d27a2bf7173c56a6e26cffaaa5a361addb1"}, - {file = "grpcio-1.62.1-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:960edebedc6b9ada1ef58e1c71156f28689978188cd8cff3b646b57288a927d9"}, - {file = "grpcio-1.62.1-cp37-cp37m-musllinux_1_1_i686.whl", hash = "sha256:23e2e04b83f347d0aadde0c9b616f4726c3d76db04b438fd3904b289a725267f"}, - {file = "grpcio-1.62.1-cp37-cp37m-musllinux_1_1_x86_64.whl", hash = "sha256:978121758711916d34fe57c1f75b79cdfc73952f1481bb9583399331682d36f7"}, - {file = "grpcio-1.62.1-cp37-cp37m-win_amd64.whl", hash = "sha256:9084086190cc6d628f282e5615f987288b95457292e969b9205e45b442276407"}, - {file = "grpcio-1.62.1-cp38-cp38-linux_armv7l.whl", hash = "sha256:22bccdd7b23c420a27fd28540fb5dcbc97dc6be105f7698cb0e7d7a420d0e362"}, - {file = "grpcio-1.62.1-cp38-cp38-macosx_10_10_universal2.whl", hash = "sha256:8999bf1b57172dbc7c3e4bb3c732658e918f5c333b2942243f10d0d653953ba9"}, - {file = "grpcio-1.62.1-cp38-cp38-manylinux_2_17_aarch64.whl", hash = "sha256:d9e52558b8b8c2f4ac05ac86344a7417ccdd2b460a59616de49eb6933b07a0bd"}, - {file = "grpcio-1.62.1-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1714e7bc935780bc3de1b3fcbc7674209adf5208ff825799d579ffd6cd0bd505"}, - {file = "grpcio-1.62.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:c8842ccbd8c0e253c1f189088228f9b433f7a93b7196b9e5b6f87dba393f5d5d"}, - {file = "grpcio-1.62.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:1f1e7b36bdff50103af95a80923bf1853f6823dd62f2d2a2524b66ed74103e49"}, - {file = "grpcio-1.62.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:bba97b8e8883a8038606480d6b6772289f4c907f6ba780fa1f7b7da7dfd76f06"}, - {file = "grpcio-1.62.1-cp38-cp38-win32.whl", hash = "sha256:a7f615270fe534548112a74e790cd9d4f5509d744dd718cd442bf016626c22e4"}, - {file = "grpcio-1.62.1-cp38-cp38-win_amd64.whl", hash = "sha256:e6c8c8693df718c5ecbc7babb12c69a4e3677fd11de8886f05ab22d4e6b1c43b"}, - {file = "grpcio-1.62.1-cp39-cp39-linux_armv7l.whl", hash = "sha256:73db2dc1b201d20ab7083e7041946910bb991e7e9761a0394bbc3c2632326483"}, - {file = "grpcio-1.62.1-cp39-cp39-macosx_10_10_universal2.whl", hash = "sha256:407b26b7f7bbd4f4751dbc9767a1f0716f9fe72d3d7e96bb3ccfc4aace07c8de"}, - {file = "grpcio-1.62.1-cp39-cp39-manylinux_2_17_aarch64.whl", hash = "sha256:f8de7c8cef9261a2d0a62edf2ccea3d741a523c6b8a6477a340a1f2e417658de"}, - {file = "grpcio-1.62.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:9bd5c8a1af40ec305d001c60236308a67e25419003e9bb3ebfab5695a8d0b369"}, - {file = "grpcio-1.62.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:be0477cb31da67846a33b1a75c611f88bfbcd427fe17701b6317aefceee1b96f"}, - {file = "grpcio-1.62.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:60dcd824df166ba266ee0cfaf35a31406cd16ef602b49f5d4dfb21f014b0dedd"}, - {file = "grpcio-1.62.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:973c49086cabab773525f6077f95e5a993bfc03ba8fc32e32f2c279497780585"}, - {file = "grpcio-1.62.1-cp39-cp39-win32.whl", hash = "sha256:12859468e8918d3bd243d213cd6fd6ab07208195dc140763c00dfe901ce1e1b4"}, - {file = "grpcio-1.62.1-cp39-cp39-win_amd64.whl", hash = "sha256:b7209117bbeebdfa5d898205cc55153a51285757902dd73c47de498ad4d11332"}, - {file = "grpcio-1.62.1.tar.gz", hash = "sha256:6c455e008fa86d9e9a9d85bb76da4277c0d7d9668a3bfa70dbe86e9f3c759947"}, + {file = "grpcio-1.64.0-cp310-cp310-linux_armv7l.whl", hash = "sha256:3b09c3d9de95461214a11d82cc0e6a46a6f4e1f91834b50782f932895215e5db"}, + {file = "grpcio-1.64.0-cp310-cp310-macosx_12_0_universal2.whl", hash = "sha256:7e013428ab472892830287dd082b7d129f4d8afef49227a28223a77337555eaa"}, + {file = "grpcio-1.64.0-cp310-cp310-manylinux_2_17_aarch64.whl", hash = "sha256:02cc9cc3f816d30f7993d0d408043b4a7d6a02346d251694d8ab1f78cc723e7e"}, + {file = "grpcio-1.64.0-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1f5de082d936e0208ce8db9095821361dfa97af8767a6607ae71425ac8ace15c"}, + {file = "grpcio-1.64.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d7b7bf346391dffa182fba42506adf3a84f4a718a05e445b37824136047686a1"}, + {file = "grpcio-1.64.0-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:b2cbdfba18408389a1371f8c2af1659119e1831e5ed24c240cae9e27b4abc38d"}, + {file = "grpcio-1.64.0-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:aca4f15427d2df592e0c8f3d38847e25135e4092d7f70f02452c0e90d6a02d6d"}, + {file = "grpcio-1.64.0-cp310-cp310-win32.whl", hash = "sha256:7c1f5b2298244472bcda49b599be04579f26425af0fd80d3f2eb5fd8bc84d106"}, + {file = "grpcio-1.64.0-cp310-cp310-win_amd64.whl", hash = "sha256:73f84f9e5985a532e47880b3924867de16fa1aa513fff9b26106220c253c70c5"}, + {file = "grpcio-1.64.0-cp311-cp311-linux_armv7l.whl", hash = "sha256:2a18090371d138a57714ee9bffd6c9c9cb2e02ce42c681aac093ae1e7189ed21"}, + {file = "grpcio-1.64.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:59c68df3a934a586c3473d15956d23a618b8f05b5e7a3a904d40300e9c69cbf0"}, + {file = "grpcio-1.64.0-cp311-cp311-manylinux_2_17_aarch64.whl", hash = "sha256:b52e1ec7185512103dd47d41cf34ea78e7a7361ba460187ddd2416b480e0938c"}, + {file = "grpcio-1.64.0-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8d598b5d5e2c9115d7fb7e2cb5508d14286af506a75950762aa1372d60e41851"}, + {file = "grpcio-1.64.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:01615bbcae6875eee8091e6b9414072f4e4b00d8b7e141f89635bdae7cf784e5"}, + {file = "grpcio-1.64.0-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:0b2dfe6dcace264807d9123d483d4c43274e3f8c39f90ff51de538245d7a4145"}, + {file = "grpcio-1.64.0-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:7f17572dc9acd5e6dfd3014d10c0b533e9f79cd9517fc10b0225746f4c24b58e"}, + {file = "grpcio-1.64.0-cp311-cp311-win32.whl", hash = "sha256:6ec5ed15b4ffe56e2c6bc76af45e6b591c9be0224b3fb090adfb205c9012367d"}, + {file = "grpcio-1.64.0-cp311-cp311-win_amd64.whl", hash = "sha256:597191370951b477b7a1441e1aaa5cacebeb46a3b0bd240ec3bb2f28298c7553"}, + {file = "grpcio-1.64.0-cp312-cp312-linux_armv7l.whl", hash = "sha256:1ce4cd5a61d4532651079e7aae0fedf9a80e613eed895d5b9743e66b52d15812"}, + {file = "grpcio-1.64.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:650a8150a9b288f40d5b7c1d5400cc11724eae50bd1f501a66e1ea949173649b"}, + {file = "grpcio-1.64.0-cp312-cp312-manylinux_2_17_aarch64.whl", hash = "sha256:8de0399b983f8676a7ccfdd45e5b2caec74a7e3cc576c6b1eecf3b3680deda5e"}, + {file = "grpcio-1.64.0-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:46b8b43ba6a2a8f3103f103f97996cad507bcfd72359af6516363c48793d5a7b"}, + {file = "grpcio-1.64.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a54362f03d4dcfae63be455d0a7d4c1403673498b92c6bfe22157d935b57c7a9"}, + {file = "grpcio-1.64.0-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:1f8ea18b928e539046bb5f9c124d717fbf00cc4b2d960ae0b8468562846f5aa1"}, + {file = "grpcio-1.64.0-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:c56c91bd2923ddb6e7ed28ebb66d15633b03e0df22206f22dfcdde08047e0a48"}, + {file = "grpcio-1.64.0-cp312-cp312-win32.whl", hash = "sha256:874c741c8a66f0834f653a69e7e64b4e67fcd4a8d40296919b93bab2ccc780ba"}, + {file = "grpcio-1.64.0-cp312-cp312-win_amd64.whl", hash = "sha256:0da1d921f8e4bcee307aeef6c7095eb26e617c471f8cb1c454fd389c5c296d1e"}, + {file = "grpcio-1.64.0-cp38-cp38-linux_armv7l.whl", hash = "sha256:c46fb6bfca17bfc49f011eb53416e61472fa96caa0979b4329176bdd38cbbf2a"}, + {file = "grpcio-1.64.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:3d2004e85cf5213995d09408501f82c8534700d2babeb81dfdba2a3bff0bb396"}, + {file = "grpcio-1.64.0-cp38-cp38-manylinux_2_17_aarch64.whl", hash = "sha256:6d5541eb460d73a07418524fb64dcfe0adfbcd32e2dac0f8f90ce5b9dd6c046c"}, + {file = "grpcio-1.64.0-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:1f279ad72dd7d64412e10f2443f9f34872a938c67387863c4cd2fb837f53e7d2"}, + {file = "grpcio-1.64.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:85fda90b81da25993aa47fae66cae747b921f8f6777550895fb62375b776a231"}, + {file = "grpcio-1.64.0-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:a053584079b793a54bece4a7d1d1b5c0645bdbee729215cd433703dc2532f72b"}, + {file = "grpcio-1.64.0-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:579dd9fb11bc73f0de061cab5f8b2def21480fd99eb3743ed041ad6a1913ee2f"}, + {file = "grpcio-1.64.0-cp38-cp38-win32.whl", hash = "sha256:23b6887bb21d77649d022fa1859e05853fdc2e60682fd86c3db652a555a282e0"}, + {file = "grpcio-1.64.0-cp38-cp38-win_amd64.whl", hash = "sha256:753cb58683ba0c545306f4e17dabf468d29cb6f6b11832e1e432160bb3f8403c"}, + {file = "grpcio-1.64.0-cp39-cp39-linux_armv7l.whl", hash = "sha256:2186d76a7e383e1466e0ea2b0febc343ffeae13928c63c6ec6826533c2d69590"}, + {file = "grpcio-1.64.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:0f30596cdcbed3c98024fb4f1d91745146385b3f9fd10c9f2270cbfe2ed7ed91"}, + {file = "grpcio-1.64.0-cp39-cp39-manylinux_2_17_aarch64.whl", hash = "sha256:d9171f025a196f5bcfec7e8e7ffb7c3535f7d60aecd3503f9e250296c7cfc150"}, + {file = "grpcio-1.64.0-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:cf4c8daed18ae2be2f1fc7d613a76ee2a2e28fdf2412d5c128be23144d28283d"}, + {file = "grpcio-1.64.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3550493ac1d23198d46dc9c9b24b411cef613798dc31160c7138568ec26bc9b4"}, + {file = "grpcio-1.64.0-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:3161a8f8bb38077a6470508c1a7301cd54301c53b8a34bb83e3c9764874ecabd"}, + {file = "grpcio-1.64.0-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:2e8fabe2cc57a369638ab1ad8e6043721014fdf9a13baa7c0e35995d3a4a7618"}, + {file = "grpcio-1.64.0-cp39-cp39-win32.whl", hash = "sha256:31890b24d47b62cc27da49a462efe3d02f3c120edb0e6c46dcc0025506acf004"}, + {file = "grpcio-1.64.0-cp39-cp39-win_amd64.whl", hash = "sha256:5a56797dea8c02e7d3a85dfea879f286175cf4d14fbd9ab3ef2477277b927baa"}, + {file = "grpcio-1.64.0.tar.gz", hash = "sha256:257baf07f53a571c215eebe9679c3058a313fd1d1f7c4eede5a8660108c52d9c"}, ] [package.extras] -protobuf = ["grpcio-tools (>=1.62.1)"] +protobuf = ["grpcio-tools (>=1.64.0)"] [[package]] name = "grpcio-status" -version = "1.62.1" +version = "1.62.2" description = "Status proto mapping for gRPC" optional = false python-versions = ">=3.6" files = [ - {file = "grpcio-status-1.62.1.tar.gz", hash = "sha256:3431c8abbab0054912c41df5c72f03ddf3b7a67be8a287bb3c18a3456f96ff77"}, - {file = "grpcio_status-1.62.1-py3-none-any.whl", hash = "sha256:af0c3ab85da31669f21749e8d53d669c061ebc6ce5637be49a46edcb7aa8ab17"}, + {file = "grpcio-status-1.62.2.tar.gz", hash = "sha256:62e1bfcb02025a1cd73732a2d33672d3e9d0df4d21c12c51e0bbcaf09bab742a"}, + {file = "grpcio_status-1.62.2-py3-none-any.whl", hash = "sha256:206ddf0eb36bc99b033f03b2c8e95d319f0044defae9b41ae21408e7e0cda48f"}, ] [package.dependencies] googleapis-common-protos = ">=1.5.5" -grpcio = ">=1.62.1" +grpcio = ">=1.62.2" protobuf = ">=4.21.6" [[package]] @@ -1474,13 +1467,13 @@ files = [ [[package]] name = "minio" -version = "7.2.5" +version = "7.2.7" description = "MinIO Python SDK for Amazon S3 Compatible Cloud Storage" optional = false python-versions = "*" files = [ - {file = "minio-7.2.5-py3-none-any.whl", hash = "sha256:ed9176c96d4271cb1022b9ecb8a538b1e55b32ae06add6de16425cab99ef2304"}, - {file = "minio-7.2.5.tar.gz", hash = "sha256:59d8906e2da248a9caac34d4958a859cc3a44abbe6447910c82b5abfa9d6a2e1"}, + {file = "minio-7.2.7-py3-none-any.whl", hash = "sha256:59d1f255d852fe7104018db75b3bebbd987e538690e680f7c5de835e422de837"}, + {file = "minio-7.2.7.tar.gz", hash = "sha256:473d5d53d79f340f3cd632054d0c82d2f93177ce1af2eac34a235bea55708d98"}, ] [package.dependencies] @@ -1664,7 +1657,7 @@ werkzeug = "3.0.1" type = "git" url = "https://github.com/seeker25/sbc-pay.git" reference = "sync-python-to-main" -resolved_reference = "7411bde70b1664887bbced197999d53379ba1213" +resolved_reference = "ff882e5d28c46ea0a0466b7bf3bf11ff0853855f" subdirectory = "pay-api" [[package]] @@ -1683,28 +1676,28 @@ flake8 = ">=5.0.0" [[package]] name = "pg8000" -version = "1.31.1" +version = "1.31.2" description = "PostgreSQL interface library" optional = false python-versions = ">=3.8" files = [ - {file = "pg8000-1.31.1-py3-none-any.whl", hash = "sha256:69aac9dba4114c9c8d0408232d54eaf7d06d271df7765caeed39960e057800e4"}, - {file = "pg8000-1.31.1.tar.gz", hash = "sha256:b11130d4c615dd3062ea8fed8143064a7978b7fe6d44f14b72261d43c8e27087"}, + {file = "pg8000-1.31.2-py3-none-any.whl", hash = "sha256:436c771ede71af4d4c22ba867a30add0bc5c942d7ab27fadbb6934a487ecc8f6"}, + {file = "pg8000-1.31.2.tar.gz", hash = "sha256:1ea46cf09d8eca07fe7eaadefd7951e37bee7fabe675df164f1a572ffb300876"}, ] [package.dependencies] python-dateutil = ">=2.8.2" -scramp = ">=1.4.4" +scramp = ">=1.4.5" [[package]] name = "platformdirs" -version = "4.2.1" +version = "4.2.2" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a `user data dir`." optional = false python-versions = ">=3.8" files = [ - {file = "platformdirs-4.2.1-py3-none-any.whl", hash = "sha256:17d5a1161b3fd67b390023cb2d3b026bbd40abde6fdb052dfbd3a29c3ba22ee1"}, - {file = "platformdirs-4.2.1.tar.gz", hash = "sha256:031cd18d4ec63ec53e82dceaac0417d218a6863f7745dfcc9efe7793b7039bdf"}, + {file = "platformdirs-4.2.2-py3-none-any.whl", hash = "sha256:2d7a1657e36a80ea911db832a8a6ece5ee53d8de21edd5cc5879af6530b1bfee"}, + {file = "platformdirs-4.2.2.tar.gz", hash = "sha256:38b7b51f512eed9e84a22788b4bce1de17c0adb134d6becb09836e37d8654cd3"}, ] [package.extras] @@ -2002,17 +1995,17 @@ files = [ [[package]] name = "pylint" -version = "3.1.0" +version = "3.2.2" description = "python code static checker" optional = false python-versions = ">=3.8.0" files = [ - {file = "pylint-3.1.0-py3-none-any.whl", hash = "sha256:507a5b60953874766d8a366e8e8c7af63e058b26345cfcb5f91f89d987fd6b74"}, - {file = "pylint-3.1.0.tar.gz", hash = "sha256:6a69beb4a6f63debebaab0a3477ecd0f559aa726af4954fc948c51f7a2549e23"}, + {file = "pylint-3.2.2-py3-none-any.whl", hash = "sha256:3f8788ab20bb8383e06dd2233e50f8e08949cfd9574804564803441a4946eab4"}, + {file = "pylint-3.2.2.tar.gz", hash = "sha256:d068ca1dfd735fb92a07d33cb8f288adc0f6bc1287a139ca2425366f7cbe38f8"}, ] [package.dependencies] -astroid = ">=3.1.0,<=3.2.0-dev0" +astroid = ">=3.2.2,<=3.3.0-dev0" colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""} dill = {version = ">=0.3.7", markers = "python_version >= \"3.12\""} isort = ">=4.2.5,<5.13.0 || >5.13.0,<6" @@ -2108,23 +2101,23 @@ files = [ [[package]] name = "pytest" -version = "8.1.1" +version = "8.2.1" description = "pytest: simple powerful testing with Python" optional = false python-versions = ">=3.8" files = [ - {file = "pytest-8.1.1-py3-none-any.whl", hash = "sha256:2a8386cfc11fa9d2c50ee7b2a57e7d898ef90470a7a34c4b949ff59662bb78b7"}, - {file = "pytest-8.1.1.tar.gz", hash = "sha256:ac978141a75948948817d360297b7aae0fcb9d6ff6bc9ec6d514b85d5a65c044"}, + {file = "pytest-8.2.1-py3-none-any.whl", hash = "sha256:faccc5d332b8c3719f40283d0d44aa5cf101cec36f88cde9ed8f2bc0538612b1"}, + {file = "pytest-8.2.1.tar.gz", hash = "sha256:5046e5b46d8e4cac199c373041f26be56fdb81eb4e67dc11d4e10811fc3408fd"}, ] [package.dependencies] colorama = {version = "*", markers = "sys_platform == \"win32\""} iniconfig = "*" packaging = "*" -pluggy = ">=1.4,<2.0" +pluggy = ">=1.5,<2.0" [package.extras] -testing = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] +dev = ["argcomplete", "attrs (>=19.2)", "hypothesis (>=3.56)", "mock", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-asyncio" @@ -2294,7 +2287,7 @@ jaeger-client = "*" type = "git" url = "https://github.com/bcgov/sbc-common-components.git" reference = "HEAD" -resolved_reference = "8871ffcce8cc2232a5d7a3adb6103dfaf0d7689f" +resolved_reference = "e770b4ab496e044d292500e62bc19a17079a73ec" subdirectory = "python" [[package]] @@ -2372,19 +2365,18 @@ tornado = ["tornado (>=5)"] [[package]] name = "setuptools" -version = "69.5.1" +version = "70.0.0" description = "Easily download, build, install, upgrade, and uninstall Python packages" optional = false python-versions = ">=3.8" files = [ - {file = "setuptools-69.5.1-py3-none-any.whl", hash = "sha256:c636ac361bc47580504644275c9ad802c50415c7522212252c033bd15f301f32"}, - {file = "setuptools-69.5.1.tar.gz", hash = "sha256:6c1fccdac05a97e598fb0ae3bbed5904ccb317337a51139dcd51453611bbb987"}, + {file = "setuptools-70.0.0-py3-none-any.whl", hash = "sha256:54faa7f2e8d2d11bcd2c07bed282eef1046b5c080d1c32add737d7b5817b1ad4"}, + {file = "setuptools-70.0.0.tar.gz", hash = "sha256:f211a66637b8fa059bb28183da127d4e86396c991a942b028c6650d4319c3fd0"}, ] [package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] -testing = ["build[virtualenv]", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.9)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "mypy (==1.9)", "packaging (>=23.2)", "pip (>=19.1)", "pytest (>=6,!=8.1.1)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (>=0.2.1)", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] -testing-integration = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "packaging (>=23.2)", "pytest", "pytest-enabler", "pytest-xdist", "tomli", "virtualenv (>=13.0.0)", "wheel"] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier"] +testing = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "importlib-metadata", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.2.0)", "mypy (==1.9)", "packaging (>=23.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.1)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-home (>=0.5)", "pytest-mypy", "pytest-perf", "pytest-ruff (>=0.2.1)", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel"] [[package]] name = "simple-cloudevent" @@ -2601,13 +2593,13 @@ twisted = ["twisted"] [[package]] name = "tomlkit" -version = "0.12.4" +version = "0.12.5" description = "Style preserving TOML library" optional = false python-versions = ">=3.7" files = [ - {file = "tomlkit-0.12.4-py3-none-any.whl", hash = "sha256:5cd82d48a3dd89dee1f9d64420aa20ae65cfbd00668d6f094d7578a78efbb77b"}, - {file = "tomlkit-0.12.4.tar.gz", hash = "sha256:7ca1cfc12232806517a8515047ba66a19369e71edf2439d0f5824f91032b6cc3"}, + {file = "tomlkit-0.12.5-py3-none-any.whl", hash = "sha256:af914f5a9c59ed9d0762c7b64d3b5d5df007448eb9cd2edc8a46b1eafead172f"}, + {file = "tomlkit-0.12.5.tar.gz", hash = "sha256:eef34fba39834d4d6b73c9ba7f3e4d1c417a4e56f89a7e96e090dd0d24b8fb3c"}, ] [[package]] @@ -2678,4 +2670,4 @@ watchdog = ["watchdog (>=2.3)"] [metadata] lock-version = "2.0" python-versions = "^3.12" -content-hash = "8969f66a8435f9818257f133cecc641bc0cf33a3ba2712da06aae3b6453cc0b5" +content-hash = "91f9fa21463afa27ba2b73d8efcd0b07bac434743792659ba832a588fc331d50" diff --git a/pay-queue/pyproject.toml b/pay-queue/pyproject.toml index 5a3688840..21af5378e 100644 --- a/pay-queue/pyproject.toml +++ b/pay-queue/pyproject.toml @@ -21,7 +21,6 @@ jinja2 = "^3.1.3" protobuf = "4.25.3" launchdarkly-server-sdk = "^8.2.1" cachecontrol = "^0.14.0" -sbc-common-components = {git = "https://github.com/bcgov/sbc-common-components.git", subdirectory = "python"} pay-api = {git = "https://github.com/seeker25/sbc-pay.git", branch = "sync-python-to-main", subdirectory = "pay-api"} pg8000 = "^1.30.5" From 3bc8b6a16558665d50b3afb69dc8f2a95da0b72b Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Thu, 30 May 2024 21:29:48 -0700 Subject: [PATCH 6/8] remove requirements.txt for pay-admin --- pay-admin/requirements.txt | 34 ---------------------------------- 1 file changed, 34 deletions(-) delete mode 100644 pay-admin/requirements.txt diff --git a/pay-admin/requirements.txt b/pay-admin/requirements.txt deleted file mode 100644 index a0d4f1ac5..000000000 --- a/pay-admin/requirements.txt +++ /dev/null @@ -1,34 +0,0 @@ -Authlib==1.3.0 -Flask-Admin==1.6.1 -Flask-SQLAlchemy==3.1.1 -Flask==3.0.2 -Jinja2==3.1.3 -MarkupSafe==2.1.5 -SQLAlchemy==2.0.28 -WTForms==3.1.2 -Werkzeug==3.0.1 -blinker==1.7.0 -certifi==2024.2.2 -cffi==1.16.0 -charset-normalizer==3.3.2 -click==8.1.7 -cryptography==42.0.5 -flask-oidc==2.1.1 -greenlet==3.0.3 -gunicorn==21.2.0 -httplib2==0.22.0 -idna==3.6 -itsdangerous==2.1.2 -packaging==23.2 -psycopg2-binary==2.9.9 -pycparser==2.21 -pyparsing==3.1.2 -python-dotenv==1.0.1 -requests-futures==1.0.1 -requests==2.31.0 -typing_extensions==4.10.0 -urllib3==2.2.1 --e git+https://github.com/bcgov/sbc-pay.git@feature-queue-python-upgrade#egg=pay-api&subdirectory=pay-api --e git+https://github.com/bcgov/sbc-common-components.git#egg=sbc-common-components&subdirectory=python -git+https://github.com/daxiom/simple-cloudevent.py.git -git+https://github.com/thorwolpert/flask-jwt-oidc.git From 3cc0024430f298a460f4780bf8a55f6c84e1ec8e Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Thu, 30 May 2024 21:31:22 -0700 Subject: [PATCH 7/8] poetry update pay-api --- pay-queue/poetry.lock | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pay-queue/poetry.lock b/pay-queue/poetry.lock index ba45aacf1..f9715fdb2 100644 --- a/pay-queue/poetry.lock +++ b/pay-queue/poetry.lock @@ -1657,7 +1657,7 @@ werkzeug = "3.0.1" type = "git" url = "https://github.com/seeker25/sbc-pay.git" reference = "sync-python-to-main" -resolved_reference = "ff882e5d28c46ea0a0466b7bf3bf11ff0853855f" +resolved_reference = "1dae0d28e241a7bcdfc43dcaee1a36e35e77c31c" subdirectory = "pay-api" [[package]] From 34c905b46cd5922cf19cddf8a1c809edd1484c30 Mon Sep 17 00:00:00 2001 From: Travis Semple Date: Thu, 30 May 2024 21:46:14 -0700 Subject: [PATCH 8/8] Fix lint plus unit tests for payment-jobs --- jobs/payment-jobs/config.py | 1 + jobs/payment-jobs/poetry.lock | 101 ++++++++++-------- jobs/payment-jobs/pyproject.toml | 7 +- .../tasks/cfs_create_account_task.py | 2 +- .../tasks/cfs_create_invoice_task.py | 4 +- jobs/payment-jobs/tests/jobs/conftest.py | 26 +++++ 6 files changed, 89 insertions(+), 52 deletions(-) diff --git a/jobs/payment-jobs/config.py b/jobs/payment-jobs/config.py index 891a99927..a18c89791 100644 --- a/jobs/payment-jobs/config.py +++ b/jobs/payment-jobs/config.py @@ -248,6 +248,7 @@ class TestConfig(_Config): # pylint: disable=too-few-public-methods CGI_SFTP_PORT = 2222 CGI_SFTP_DIRECTORY = '/data/' CGI_SFTP_HOST = 'localhost' + GCP_AUTH_KEY = None class ProdConfig(_Config): # pylint: disable=too-few-public-methods diff --git a/jobs/payment-jobs/poetry.lock b/jobs/payment-jobs/poetry.lock index ff1195ca7..0a123832e 100644 --- a/jobs/payment-jobs/poetry.lock +++ b/jobs/payment-jobs/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.2 and should not be changed by hand. [[package]] name = "alembic" @@ -784,13 +784,13 @@ dotenv = ["python-dotenv"] [[package]] name = "flask-caching" -version = "2.1.0" +version = "2.3.0" description = "Adds caching support to Flask applications." optional = false -python-versions = ">=3.7" +python-versions = ">=3.8" files = [ - {file = "Flask-Caching-2.1.0.tar.gz", hash = "sha256:b7500c145135836a952e3de3a80881d9654e327a29c852c9265607f5c449235c"}, - {file = "Flask_Caching-2.1.0-py3-none-any.whl", hash = "sha256:f02645a629a8c89800d96dc8f690a574a0d49dcd66c7536badc6d362ba46b716"}, + {file = "Flask_Caching-2.3.0-py3-none-any.whl", hash = "sha256:51771c75682e5abc1483b78b96d9131d7941dc669b073852edfa319dd4e29b6e"}, + {file = "flask_caching-2.3.0.tar.gz", hash = "sha256:d7e4ca64a33b49feb339fcdd17e6ba25f5e01168cf885e53790e885f83a4d2cf"}, ] [package.dependencies] @@ -812,25 +812,25 @@ files = [ Flask = ">=0.9" [[package]] -name = "flask_jwt_oidc" -version = "0.3.0" -description = "Flask JWT OIDC" +name = "flask-jwt-oidc" +version = "0.7.0" +description = "Opinionated flask oidc client" optional = false -python-versions = "*" +python-versions = "^3.9" files = [] develop = false [package.dependencies] -cachelib = "*" -flask = "*" -python-jose = "*" -six = "*" +cachelib = "0.*" +Flask = ">=2" +python-jose = "^3.3.0" +six = "^1.16.0" [package.source] type = "git" -url = "https://github.com/thorwolpert/flask-jwt-oidc.git" +url = "https://github.com/seeker25/flask-jwt-oidc.git" reference = "HEAD" -resolved_reference = "40cc811ccf70e838c5f7522fe8d83b7e58853539" +resolved_reference = "d208d4643e3b17358f7295bee0f955e67ba6ac88" [[package]] name = "flask-marshmallow" @@ -943,6 +943,28 @@ files = [ [package.dependencies] python-dateutil = ">=2.7" +[[package]] +name = "gcp-queue" +version = "0.3.0" +description = "" +optional = false +python-versions = "^3.9" +files = [] +develop = false + +[package.dependencies] +flask = ">=1" +google-auth = "^2.28.2" +google-cloud-pubsub = "^2.20.2" +simple-cloudevent = {git = "https://github.com/daxiom/simple-cloudevent.py.git"} + +[package.source] +type = "git" +url = "https://github.com/seeker25/sbc-connect-common.git" +reference = "main" +resolved_reference = "c0d1dea449ac6332510841caee5400ff8f550159" +subdirectory = "python/gcp-queue" + [[package]] name = "google-api-core" version = "2.17.1" @@ -969,13 +991,13 @@ grpcio-gcp = ["grpcio-gcp (>=0.2.2,<1.0.dev0)"] [[package]] name = "google-auth" -version = "2.28.1" +version = "2.29.0" description = "Google Authentication Library" optional = false python-versions = ">=3.7" files = [ - {file = "google-auth-2.28.1.tar.gz", hash = "sha256:34fc3046c257cedcf1622fc4b31fc2be7923d9b4d44973d481125ecc50d83885"}, - {file = "google_auth-2.28.1-py2.py3-none-any.whl", hash = "sha256:25141e2d7a14bfcba945f5e9827f98092716e99482562f15306e5b026e21aa72"}, + {file = "google-auth-2.29.0.tar.gz", hash = "sha256:672dff332d073227550ffc7457868ac4218d6c500b155fe6cc17d2b13602c360"}, + {file = "google_auth-2.29.0-py2.py3-none-any.whl", hash = "sha256:d452ad095688cd52bae0ad6fafe027f6a6d6f560e810fec20914e17a09526415"}, ] [package.dependencies] @@ -992,13 +1014,13 @@ requests = ["requests (>=2.20.0,<3.0.0.dev0)"] [[package]] name = "google-cloud-pubsub" -version = "2.20.0" +version = "2.21.2" description = "Google Cloud Pub/Sub API client library" optional = false python-versions = ">=3.7" files = [ - {file = "google-cloud-pubsub-2.20.0.tar.gz", hash = "sha256:48c8e17a8168c43e3188635cbd9e07fbe3004120433712ce84b3a04bbf18c188"}, - {file = "google_cloud_pubsub-2.20.0-py2.py3-none-any.whl", hash = "sha256:8c69ed04800f4f552cdf3b9028f06d9271ac6e60443b2308c984def442e69684"}, + {file = "google-cloud-pubsub-2.21.2.tar.gz", hash = "sha256:fc72226b14731db2873f7c4031cc757e274bbcdabcac7523b2cd6e46130d6096"}, + {file = "google_cloud_pubsub-2.21.2-py2.py3-none-any.whl", hash = "sha256:05a6b01e5bda6f4a4858700e3e9a12e3080589718d648b2383e5818131db9ce4"}, ] [package.dependencies] @@ -1352,28 +1374,26 @@ urllib3 = ">=1.26.0,<3" [[package]] name = "launchdarkly-server-sdk" -version = "9.2.2" +version = "8.2.1" description = "LaunchDarkly SDK for Python" optional = false -python-versions = ">=3.8" +python-versions = "*" files = [ - {file = "launchdarkly_server_sdk-9.2.2-py3-none-any.whl", hash = "sha256:d7b544c60c7c2b431c8976dda472c68f910c7c0061b90c8c2ef0397d8f05c519"}, - {file = "launchdarkly_server_sdk-9.2.2.tar.gz", hash = "sha256:3785d0159c2a74434cd85c16dd88e41ac94bb5cd7563def4d781d99e59c4eba0"}, + {file = "launchdarkly-server-sdk-8.2.1.tar.gz", hash = "sha256:94adbd52f635ad2f1a8b4a835cbbe4ce77919a6915136b303eaca3e2a54903be"}, + {file = "launchdarkly_server_sdk-8.2.1-py3-none-any.whl", hash = "sha256:b7680a4d5856da133b0dad8eca820e48bb5f2fb6dc34ebbf7f1a3a681033b426"}, ] [package.dependencies] certifi = ">=2018.4.16" expiringdict = ">=1.1.4" -launchdarkly-eventsource = ">=1.1.0,<2.0.0" pyRFC3339 = ">=1.0" semver = ">=2.10.2" -urllib3 = ">=1.26.0,<3" +urllib3 = ">=1.22.0,<3" [package.extras] consul = ["python-consul (>=1.0.1)"] dynamodb = ["boto3 (>=1.9.71)"] redis = ["redis (>=2.10.5)"] -test-filesource = ["pyyaml (>=5.3.1)", "watchdog (>=3.0.0)"] [[package]] name = "lovely-pytest-docker" @@ -1627,22 +1647,16 @@ dpath = "2.1.6" ecdsa = "0.18.0" expiringdict = "1.2.2" flask = "3.0.2" -flask-caching = "2.1.0" +flask-caching = "2.3.0" flask-cors = "4.0.0" -flask-jwt-oidc = {git = "https://github.com/thorwolpert/flask-jwt-oidc.git"} +flask-jwt-oidc = {git = "https://github.com/seeker25/flask-jwt-oidc.git"} flask-marshmallow = "1.2.0" flask-migrate = "4.0.7" flask-moment = "1.0.5" flask-script = "2.0.6" flask-sqlalchemy = "3.1.1" -google-api-core = "2.17.1" -google-auth = "2.28.1" -google-cloud-pubsub = "2.20.0" -googleapis-common-protos = "1.63.0" +gcp-queue = {git = "https://github.com/seeker25/sbc-connect-common.git", branch = "main", subdirectory = "python/gcp-queue"} greenlet = "3.0.3" -grpc-google-iam-v1 = "0.13.0" -grpcio = "1.62.1" -grpcio-status = "1.62.1" gunicorn = "21.2.0" holidays = "0.37" idna = "3.6" @@ -1651,7 +1665,7 @@ jaeger-client = "4.8.0" jinja2 = "3.1.3" jsonschema = "4.17.3" launchdarkly-eventsource = "1.1.1" -launchdarkly-server-sdk = "9.2.2" +launchdarkly-server-sdk = "8.2.1" mako = "1.3.2" markupsafe = "2.1.5" marshmallow = "3.21.1" @@ -1677,7 +1691,6 @@ rsa = "4.9" sbc-common-components = {git = "https://github.com/bcgov/sbc-common-components.git", subdirectory = "python"} semver = "3.0.2" sentry-sdk = "1.41.0" -simple-cloudevent = {git = "https://github.com/daxiom/simple-cloudevent.py.git"} six = "1.16.0" sql-versioning = {git = "https://github.com/bcgov/lear.git", branch = "feature-legal-name", subdirectory = "python/common/sql-versioning"} sqlalchemy = "2.0.28" @@ -1691,9 +1704,9 @@ werkzeug = "3.0.1" [package.source] type = "git" -url = "https://github.com/bcgov/sbc-pay.git" -reference = "feature-queue-python-upgrade" -resolved_reference = "ba20cecf7e65065fa22dbfedb0f0bb5c1ee7ec94" +url = "https://github.com/seeker25/sbc-pay.git" +reference = "sync-python-to-main" +resolved_reference = "3cc0024430f298a460f4780bf8a55f6c84e1ec8e" subdirectory = "pay-api" [[package]] @@ -2350,7 +2363,7 @@ jaeger-client = "*" type = "git" url = "https://github.com/bcgov/sbc-common-components.git" reference = "HEAD" -resolved_reference = "5f99e135214ae949c9af951d4aa0b88b1067d853" +resolved_reference = "22978d810dc4e85c51c3129936686b0a17124e64" subdirectory = "python" [[package]] @@ -2731,4 +2744,4 @@ watchdog = ["watchdog (>=2.3)"] [metadata] lock-version = "2.0" python-versions = "^3.12" -content-hash = "eaa76036fa004456010050a8138aa7b147b9f3f8f614708710e146224d71b8a4" +content-hash = "b16efd0364fcd29610e0eae102b66eda5771f66116953175e2d4e54550537cfa" diff --git a/jobs/payment-jobs/pyproject.toml b/jobs/payment-jobs/pyproject.toml index 91f347013..402cfb107 100644 --- a/jobs/payment-jobs/pyproject.toml +++ b/jobs/payment-jobs/pyproject.toml @@ -7,10 +7,7 @@ readme = "README.md" [tool.poetry.dependencies] python = "^3.12" -sbc-common-components = {git = "https://github.com/bcgov/sbc-common-components.git", subdirectory = "python"} -pay-api = {git = "https://github.com/bcgov/sbc-pay.git", branch = "feature-queue-python-upgrade", subdirectory = "pay-api"} -flask-jwt-oidc = {git = "https://github.com/thorwolpert/flask-jwt-oidc.git"} -simple-cloudevent = {git = "https://github.com/daxiom/simple-cloudevent.py.git"} +pay-api = {git = "https://github.com/seeker25/sbc-pay.git", branch = "sync-python-to-main", subdirectory = "pay-api"} gunicorn = "^21.2.0" flask = "^3.0.2" flask-sqlalchemy = "^3.1.1" @@ -28,7 +25,7 @@ pysftp = "^0.2.9" flask-migrate = "^4.0.7" itsdangerous = "^2.1.2" dataclass-wizard = "^0.22.3" -launchdarkly-server-sdk = "^9.2.2" +launchdarkly-server-sdk = "^8.2.1" cx-oracle = "^8.3.0" more-itertools = "^10.2.0" pg8000 = "^1.30.5" diff --git a/jobs/payment-jobs/tasks/cfs_create_account_task.py b/jobs/payment-jobs/tasks/cfs_create_account_task.py index d19682ed1..55dbf497e 100644 --- a/jobs/payment-jobs/tasks/cfs_create_account_task.py +++ b/jobs/payment-jobs/tasks/cfs_create_account_task.py @@ -22,7 +22,7 @@ from pay_api.services.cfs_service import CFSService from pay_api.services.oauth_service import OAuthService from pay_api.utils.constants import RECEIPT_METHOD_EFT_MONTHLY, RECEIPT_METHOD_PAD_DAILY -from pay_api.utils.enums import AuthHeaderType, CfsAccountStatus, ContentType, MessageType, PaymentMethod +from pay_api.utils.enums import AuthHeaderType, CfsAccountStatus, ContentType, PaymentMethod from sbc_common_components.utils.enums import QueueMessageTypes from sentry_sdk import capture_message from services import routing_slip diff --git a/jobs/payment-jobs/tasks/cfs_create_invoice_task.py b/jobs/payment-jobs/tasks/cfs_create_invoice_task.py index 052b69ea0..862d2fce7 100644 --- a/jobs/payment-jobs/tasks/cfs_create_invoice_task.py +++ b/jobs/payment-jobs/tasks/cfs_create_invoice_task.py @@ -32,7 +32,7 @@ from pay_api.services.payment import Payment from pay_api.services.payment_account import PaymentAccount as PaymentAccountService from pay_api.utils.enums import ( - CfsAccountStatus, InvoiceReferenceStatus, InvoiceStatus, MessageType, PaymentMethod, PaymentStatus, PaymentSystem) + CfsAccountStatus, InvoiceReferenceStatus, InvoiceStatus, PaymentMethod, PaymentStatus, PaymentSystem) from pay_api.utils.util import generate_transaction_number from sbc_common_components.utils.enums import QueueMessageTypes from sentry_sdk import capture_message @@ -454,7 +454,7 @@ def _create_eft_invoices(cls): current_app.logger.error(e) continue - mailer.publish_mailer_events(MessageType.EFT_INVOICE_CREATED, payment_account, { + mailer.publish_mailer_events(QueueMessageTypes.EFT_INVOICE_CREATED.value, payment_account, { 'invoice_total': float(invoice_total), 'invoice_process_date': f'{datetime.now(tz=timezone.utc)}' }) diff --git a/jobs/payment-jobs/tests/jobs/conftest.py b/jobs/payment-jobs/tests/jobs/conftest.py index 7287b03ce..832ed837f 100644 --- a/jobs/payment-jobs/tests/jobs/conftest.py +++ b/jobs/payment-jobs/tests/jobs/conftest.py @@ -27,16 +27,42 @@ from utils.logger import setup_logging +@pytest.fixture(autouse=True) +def mock_pub_sub_call(mocker): + """Mock pub sub call.""" + class Expando(object): + """Expando class.""" + + class PublisherMock: + """Publisher Mock.""" + + def __init__(self, *args, **kwargs): + def result(): + """Return true for mock.""" + return True + self.result = result + + def publish(self, *args, **kwargs): + """Publish mock.""" + ex = Expando() + ex.result = self.result + return ex + + mocker.patch('google.cloud.pubsub_v1.PublisherClient', PublisherMock) + + @pytest.fixture(scope='session') def app(): """Return a session-wide application configured in TEST mode.""" return create_app('testing') + @pytest.fixture(scope='function') def app_request(): """Return a session-wide application configured in TEST mode.""" return create_app('testing') + @pytest.fixture(scope='session') def client(app): # pylint: disable=redefined-outer-name """Return a session-wide Flask test client."""