diff --git a/.github/workflows/.python-version b/.github/workflows/.python-version index c8cfe3959..2c0733315 100644 --- a/.github/workflows/.python-version +++ b/.github/workflows/.python-version @@ -1 +1 @@ -3.10 +3.11 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index af8660add..747a33f70 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -30,7 +30,7 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Initialize CodeQL uses: github/codeql-action/init@v2 diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index d092cc308..e9625fb06 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -20,13 +20,13 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Write commit SHA to file run: echo "${{ github.sha }}" >> benefits/static/sha.txt - name: Docker Login to GitHub Container Registry - uses: docker/login-action@v2 + uses: docker/login-action@v3 with: registry: ghcr.io username: ${{ github.actor }} @@ -34,10 +34,10 @@ jobs: - name: Set up Docker Buildx id: buildx - uses: docker/setup-buildx-action@v2 + uses: docker/setup-buildx-action@v3 - name: Build, tag, and push image to GitHub Container Registry - uses: docker/build-push-action@v4 + uses: docker/build-push-action@v5 with: builder: ${{ steps.buildx.outputs.name }} build-args: GIT-SHA=${{ github.sha }} diff --git a/.github/workflows/mkdocs.yml b/.github/workflows/mkdocs.yml index c6c525d0b..0da72978b 100644 --- a/.github/workflows/mkdocs.yml +++ b/.github/workflows/mkdocs.yml @@ -23,7 +23,7 @@ jobs: if: github.event.workflow_run == null || github.event.workflow_run.conclusion == 'success' steps: - name: Checkout - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Download coverage report uses: dawidd6/action-download-artifact@v2 diff --git a/.github/workflows/tests-cypress.yml b/.github/workflows/tests-cypress.yml index 1b12a9ad2..d412423a2 100644 --- a/.github/workflows/tests-cypress.yml +++ b/.github/workflows/tests-cypress.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Start app run: | @@ -19,7 +19,7 @@ jobs: docker compose up --detach client server - name: Run Cypress tests - uses: cypress-io/github-action@v5 + uses: cypress-io/github-action@v6 env: CYPRESS_baseUrl: http://localhost:8000 with: diff --git a/.github/workflows/tests-pytest.yml b/.github/workflows/tests-pytest.yml index 84b4a9f58..0817edf99 100644 --- a/.github/workflows/tests-pytest.yml +++ b/.github/workflows/tests-pytest.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Install system packages run: | diff --git a/.github/workflows/tests-ui.yml b/.github/workflows/tests-ui.yml index d4a5de97f..98bcf58c5 100644 --- a/.github/workflows/tests-ui.yml +++ b/.github/workflows/tests-ui.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Check out code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Start app run: | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index ac70fafc8..e73768a6b 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -15,7 +15,7 @@ default_stages: repos: - repo: https://github.com/compilerla/conventional-pre-commit - rev: v2.3.0 + rev: v2.4.0 hooks: - id: conventional-pre-commit stages: [commit-msg] @@ -34,7 +34,7 @@ repos: args: ["--maxkb=1500"] - repo: https://github.com/psf/black - rev: 23.7.0 + rev: 23.9.1 hooks: - id: black types: @@ -55,7 +55,7 @@ repos: files: .py$ - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.0.1 + rev: v3.0.3 hooks: - id: prettier types_or: [javascript, css] diff --git a/benefits/__init__.py b/benefits/__init__.py index 024e2c4d0..cf19a7403 100644 --- a/benefits/__init__.py +++ b/benefits/__init__.py @@ -1,3 +1,10 @@ -__version__ = "2023.04.2" +from importlib.metadata import version, PackageNotFoundError + +try: + __version__ = version("benefits") +except PackageNotFoundError: + # package is not installed + pass + VERSION = __version__ diff --git a/benefits/core/migrations/0002_data.py b/benefits/core/migrations/0002_data.py index af8a8b4e8..e95b5c781 100644 --- a/benefits/core/migrations/0002_data.py +++ b/benefits/core/migrations/0002_data.py @@ -144,8 +144,8 @@ def load_data(app, *args, **kwargs): AuthProvider = app.get_model("core", "AuthProvider") senior_auth_provider = AuthProvider.objects.create( - sign_out_button_template="core/includes/button--sign-out--senior.html", - sign_out_link_template="core/includes/link--sign-out--senior.html", + sign_out_button_template="core/includes/button--sign-out--login-gov.html", + sign_out_link_template="core/includes/link--sign-out--login-gov.html", client_name=os.environ.get("SENIOR_AUTH_PROVIDER_CLIENT_NAME", "senior-benefits-oauth-client-name"), client_id=os.environ.get("AUTH_PROVIDER_CLIENT_ID", "benefits-oauth-client-id"), authority=os.environ.get("AUTH_PROVIDER_AUTHORITY", "https://example.com"), @@ -155,6 +155,8 @@ def load_data(app, *args, **kwargs): ) veteran_auth_provider = AuthProvider.objects.create( + sign_out_button_template="core/includes/button--sign-out--login-gov.html", + sign_out_link_template="core/includes/link--sign-out--login-gov.html", client_name=os.environ.get("VETERAN_AUTH_PROVIDER_CLIENT_NAME", "veteran-benefits-oauth-client-name"), client_id=os.environ.get("AUTH_PROVIDER_CLIENT_ID", "benefits-oauth-client-id"), authority=os.environ.get("AUTH_PROVIDER_AUTHORITY", "https://example.com"), diff --git a/benefits/core/templates/core/base.html b/benefits/core/templates/core/base.html index f42cc04eb..5de0488d0 100644 --- a/benefits/core/templates/core/base.html +++ b/benefits/core/templates/core/base.html @@ -87,11 +87,7 @@ {% endblock inner-content %} {% block call-to-action %} -
-
- {% block call-to-action-text %} - {% endblock call-to-action-text %} -
+
{% block call-to-action-button %} {% endblock call-to-action-button %} diff --git a/benefits/core/templates/core/includes/button--sign-out--senior.html b/benefits/core/templates/core/includes/button--sign-out--login-gov.html similarity index 68% rename from benefits/core/templates/core/includes/button--sign-out--senior.html rename to benefits/core/templates/core/includes/button--sign-out--login-gov.html index 93d7e8afa..e3bb56340 100644 --- a/benefits/core/templates/core/includes/button--sign-out--senior.html +++ b/benefits/core/templates/core/includes/button--sign-out--login-gov.html @@ -2,7 +2,7 @@ {% if authentication.logged_in %} {% url "oauth:logout" as sign_out_url %} - + {% endif %} diff --git a/benefits/core/templates/core/includes/form.html b/benefits/core/templates/core/includes/form.html index ea861a1dc..ae7c89057 100644 --- a/benefits/core/templates/core/includes/form.html +++ b/benefits/core/templates/core/includes/form.html @@ -28,12 +28,7 @@
{% if form.submit_value %} -
- {% if help_text %} -
-

{{ help_text }}

-
- {% endif %} +