Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deploy to prod #831

Merged
merged 159 commits into from
Nov 8, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
159 commits
Select commit Hold shift + click to select a range
4d82885
Bump django-htmx from 1.18.0 to 1.19.0
dependabot[bot] Aug 6, 2024
fd2a03d
Bump ruff from 0.5.6 to 0.5.7
dependabot[bot] Aug 9, 2024
e40dcbf
Merge dependabot/pip/ruff-0.5.7 into combined-prs-branch
github-actions[bot] Aug 12, 2024
dc5e7d9
Merge dependabot/pip/django-htmx-1.19.0 into combined-prs-branch
github-actions[bot] Aug 12, 2024
4d0cfda
Merge branch 'main' into combined-prs-branch
github-actions[bot] Aug 12, 2024
5fed71c
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Aug 12, 2024
6d29c68
Merge pull request #708 from UW-GAC/combined-prs-branch
amstilp Aug 12, 2024
efd3058
Merge pull request #709 from UW-GAC/pre-commit-ci-update-config
amstilp Aug 12, 2024
df1c1ae
Bump ruff from 0.5.7 to 0.6.1
dependabot[bot] Aug 19, 2024
540761b
Bump factory-boy from 3.3.0 to 3.3.1
dependabot[bot] Aug 19, 2024
4415c7c
Merge dependabot/pip/factory-boy-3.3.1 into combined-prs-branch
github-actions[bot] Aug 19, 2024
b543ce0
Merge dependabot/pip/ruff-0.6.1 into combined-prs-branch
github-actions[bot] Aug 19, 2024
bd261a4
Merge branch 'main' into combined-prs-branch
github-actions[bot] Aug 19, 2024
431bb1d
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Aug 19, 2024
d1d8149
Merge pull request #713 from UW-GAC/combined-prs-branch
amstilp Aug 20, 2024
df75dbf
Merge pull request #714 from UW-GAC/pre-commit-ci-update-config
amstilp Aug 20, 2024
7ec46de
Bump werkzeug from 3.0.3 to 3.0.4
dependabot[bot] Aug 22, 2024
42b7149
Do not schedule combine-prs workflows
amstilp Aug 23, 2024
69c5519
Merge pull request #718 from UW-GAC/maint/do-not-schedule-combine-prs…
amstilp Aug 23, 2024
1041fea
Bump django-constance from 3.1.0 to 4.0.1
dependabot[bot] Aug 26, 2024
42cf9bc
Bump mypy from 1.11.1 to 1.11.2
dependabot[bot] Aug 26, 2024
de7b91e
Bump django-dbbackup from 4.1.0 to 4.2.1
dependabot[bot] Aug 26, 2024
f330145
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Aug 26, 2024
cf9be2b
Bump ruff from 0.6.1 to 0.6.3
dependabot[bot] Aug 30, 2024
918b3b7
Merge dependabot/pip/ruff-0.6.3 into combined-prs-branch
github-actions[bot] Aug 30, 2024
ddf422a
Merge dependabot/pip/django-dbbackup-4.2.1 into combined-prs-branch
github-actions[bot] Aug 30, 2024
5bf58f3
Merge dependabot/pip/mypy-1.11.2 into combined-prs-branch
github-actions[bot] Aug 30, 2024
70789d0
Merge dependabot/pip/django-constance-4.0.1 into combined-prs-branch
github-actions[bot] Aug 30, 2024
87c8f90
Merge dependabot/pip/werkzeug-3.0.4 into combined-prs-branch
github-actions[bot] Aug 30, 2024
eb0c301
Merge branch 'main' into combined-prs-branch
github-actions[bot] Aug 30, 2024
1c401ec
Merge pull request #724 from UW-GAC/combined-prs-branch
amstilp Aug 30, 2024
19f6ae2
Merge pull request #722 from UW-GAC/pre-commit-ci-update-config
amstilp Aug 30, 2024
5d5654d
Use Sequence for unique model fields in factories
amstilp Aug 30, 2024
3a2797c
Merge pull request #725 from UW-GAC/maint/robust-factories
amstilp Aug 30, 2024
0803e98
Remove extra/unused classes in StudyList view
amstilp Aug 30, 2024
2feaa88
Merge pull request #726 from UW-GAC/feature/study-list-more-records
amstilp Aug 30, 2024
3a90af3
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Sep 2, 2024
923a1cc
Fix CI for upload-artifact breaking change
amstilp Sep 3, 2024
18aa12d
Pin actions in github workflows to specific versions
amstilp Sep 3, 2024
f238e9f
Add debugging statement for coverage artifacts
amstilp Sep 3, 2024
18a236f
Fix --cov path after copying from primed-django repo
amstilp Sep 3, 2024
7935be7
Merge pull request #729 from UW-GAC/maint/fix-ci-for-upload-artifact-…
amstilp Sep 3, 2024
74d4cf1
Bump cryptography from 42.0.5 to 43.0.1 in /requirements
dependabot[bot] Sep 3, 2024
110c459
Compile requirements files
dependabot[bot] Sep 3, 2024
b79ac3a
Bump django from 4.2.15 to 4.2.16
dependabot[bot] Sep 4, 2024
0dd8289
Bump sphinx-autobuild from 2024.4.16 to 2024.9.3
dependabot[bot] Sep 4, 2024
54eacd8
Merge pull request #731 from UW-GAC/pip-tools/update-requirements-fil…
amstilp Sep 4, 2024
f83f83f
Merge pull request #727 from UW-GAC/pre-commit-ci-update-config
amstilp Sep 4, 2024
95819e2
Bump pytest-django from 4.8.0 to 4.9.0
dependabot[bot] Sep 4, 2024
df89f8b
Merge dependabot/pip/sphinx-autobuild-2024.9.3 into combined-prs-branch
github-actions[bot] Sep 4, 2024
c80594f
Merge dependabot/pip/django-4.2.16 into combined-prs-branch
github-actions[bot] Sep 4, 2024
9eb9c9b
Merge dependabot/pip/requirements/cryptography-43.0.1 into combined-p…
github-actions[bot] Sep 4, 2024
be36f4f
Merge dependabot/pip/pytest-django-4.9.0 into combined-prs-branch
github-actions[bot] Sep 4, 2024
54f6cb1
Merge branch 'main' into combined-prs-branch
github-actions[bot] Sep 4, 2024
8283742
Merge pull request #734 from UW-GAC/combined-prs-branch
amstilp Sep 4, 2024
978bdaf
Bump django-model-utils from 4.5.1 to 5.0.0
dependabot[bot] Sep 5, 2024
cd97661
Bump django-constance from 4.0.1 to 4.1.1
dependabot[bot] Sep 6, 2024
6d9a81c
Bump pytest from 8.3.2 to 8.3.3
dependabot[bot] Sep 11, 2024
7f46be4
Bump ruff from 0.6.3 to 0.6.5
dependabot[bot] Sep 16, 2024
67993de
Bump pronto from 2.5.7 to 2.5.8
dependabot[bot] Sep 16, 2024
68cbf18
Bump types-requests from 2.32.0.20240712 to 2.32.0.20240914
dependabot[bot] Sep 16, 2024
747ebc8
Merge dependabot/pip/types-requests-2.32.0.20240914 into combined-prs…
github-actions[bot] Sep 17, 2024
f33d9aa
Merge dependabot/pip/pronto-2.5.8 into combined-prs-branch
github-actions[bot] Sep 17, 2024
a91246c
Merge dependabot/pip/ruff-0.6.5 into combined-prs-branch
github-actions[bot] Sep 17, 2024
1182e32
Merge dependabot/pip/pytest-8.3.3 into combined-prs-branch
github-actions[bot] Sep 17, 2024
ea1b404
Merge dependabot/pip/django-constance-4.1.1 into combined-prs-branch
github-actions[bot] Sep 17, 2024
3c5e48c
Merge dependabot/pip/django-model-utils-5.0.0 into combined-prs-branch
github-actions[bot] Sep 17, 2024
0eb1109
Merge branch 'main' into combined-prs-branch
github-actions[bot] Sep 17, 2024
36d7c77
Merge pull request #749 from UW-GAC/combined-prs-branch
amstilp Sep 17, 2024
75fd450
Add auth cycle error logging to our social account adapter and update…
jmcarson Sep 27, 2024
fe6d5b1
Merge pull request #761 from UW-GAC/maint/capture-social-login-errors
jmcarson Sep 27, 2024
c55134c
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Oct 7, 2024
d335900
Fix default_stages incorrect update
amstilp Oct 7, 2024
2b39b03
Merge pull request #744 from UW-GAC/pre-commit-ci-update-config
amstilp Oct 7, 2024
1b5a694
Bump actions/checkout from 4.1.7 to 4.2.1
dependabot[bot] Oct 7, 2024
00ac388
Bump sphinx-autobuild from 2024.9.3 to 2024.10.3
dependabot[bot] Oct 7, 2024
fdbe736
Bump django-constance from 4.1.1 to 4.1.2
dependabot[bot] Oct 7, 2024
ee50ef2
Bump ruff from 0.6.5 to 0.6.9
dependabot[bot] Oct 7, 2024
c79e38a
Bump pandas from 2.2.2 to 2.2.3
dependabot[bot] Oct 7, 2024
87a24bb
Bump pre-commit from 3.8.0 to 4.0.0
dependabot[bot] Oct 7, 2024
668cc41
Bump crispy-bootstrap5 from 2024.2 to 2024.10
dependabot[bot] Oct 7, 2024
a6c95f5
Merge dependabot/github_actions/actions/checkout-4.2.1 into combined-…
github-actions[bot] Oct 7, 2024
0fff91e
Merge dependabot/pip/pre-commit-4.0.0 into combined-prs-branch
github-actions[bot] Oct 7, 2024
922bea1
Merge dependabot/pip/crispy-bootstrap5-2024.10 into combined-prs-branch
github-actions[bot] Oct 7, 2024
9593015
Merge dependabot/pip/ruff-0.6.9 into combined-prs-branch
github-actions[bot] Oct 7, 2024
3dd9507
Merge dependabot/pip/sphinx-autobuild-2024.10.3 into combined-prs-branch
github-actions[bot] Oct 7, 2024
df8cb8c
Merge dependabot/pip/django-constance-4.1.2 into combined-prs-branch
github-actions[bot] Oct 7, 2024
2a54f3f
Merge dependabot/pip/pandas-2.2.3 into combined-prs-branch
github-actions[bot] Oct 7, 2024
2c2adfb
Merge pull request #768 from UW-GAC/combined-prs-branch
amstilp Oct 7, 2024
07f0f6e
Bump codecov/codecov-action from 4.5.0 to 4.6.0
dependabot[bot] Oct 7, 2024
b78b63e
Merge pull request #762 from UW-GAC/dependabot/github_actions/codecov…
amstilp Oct 7, 2024
f5f0465
Bump tablib from 3.6.1 to 3.7.0
dependabot[bot] Oct 9, 2024
485c113
Bump pre-commit from 4.0.0 to 4.0.1
dependabot[bot] Oct 9, 2024
cacb716
Bump actions/upload-artifact from 4.4.0 to 4.4.3
dependabot[bot] Oct 10, 2024
ed6a1d4
Bump github/combine-prs from 5.1.0 to 5.2.0
dependabot[bot] Oct 11, 2024
356e6f5
Bump gitleaks/gitleaks-action from 2.3.6 to 2.3.7
dependabot[bot] Oct 14, 2024
60f453d
Bump mypy from 1.11.2 to 1.12.0
dependabot[bot] Oct 15, 2024
d7a34a7
Merge pull request #775 from UW-GAC/dependabot/github_actions/gitleak…
amstilp Oct 15, 2024
92a0dc8
Bump starlette from 0.38.2 to 0.40.0 in /requirements
dependabot[bot] Oct 15, 2024
7cf1c9c
Compile requirements files
dependabot[bot] Oct 15, 2024
e52b23d
Merge pull request #779 from UW-GAC/pip-tools/update-requirements-fil…
amstilp Oct 15, 2024
afae184
Merge dependabot/pip/requirements/starlette-0.40.0 into combined-prs-…
github-actions[bot] Oct 15, 2024
a04e783
Merge dependabot/pip/mypy-1.12.0 into combined-prs-branch
github-actions[bot] Oct 15, 2024
9e2348b
Merge dependabot/github_actions/github/combine-prs-5.2.0 into combine…
github-actions[bot] Oct 15, 2024
1972b25
Merge dependabot/github_actions/actions/upload-artifact-4.4.3 into co…
github-actions[bot] Oct 15, 2024
660f7ee
Merge dependabot/pip/pre-commit-4.0.1 into combined-prs-branch
github-actions[bot] Oct 15, 2024
975a5db
Merge dependabot/pip/tablib-3.7.0 into combined-prs-branch
github-actions[bot] Oct 15, 2024
005222d
Merge pull request #780 from UW-GAC/combined-prs-branch
amstilp Oct 15, 2024
b58898b
Bump types-requests from 2.32.0.20240914 to 2.32.0.20241016
dependabot[bot] Oct 16, 2024
8e3b12c
Bump ruff from 0.6.9 to 0.7.0
dependabot[bot] Oct 18, 2024
8eb630d
Bump mysqlclient from 2.2.4 to 2.2.5
dependabot[bot] Oct 21, 2024
b483c48
Bump mypy from 1.12.0 to 1.12.1
dependabot[bot] Oct 21, 2024
4d141a3
[pre-commit.ci] pre-commit autoupdate
pre-commit-ci[bot] Oct 21, 2024
17569bb
Merge dependabot/pip/mypy-1.12.1 into combined-prs-branch
github-actions[bot] Oct 22, 2024
1c62132
Merge dependabot/pip/mysqlclient-2.2.5 into combined-prs-branch
github-actions[bot] Oct 22, 2024
494f6e7
Merge dependabot/pip/ruff-0.7.0 into combined-prs-branch
github-actions[bot] Oct 22, 2024
1346fc4
Merge dependabot/pip/types-requests-2.32.0.20241016 into combined-prs…
github-actions[bot] Oct 22, 2024
043b2ab
Merge pull request #785 from UW-GAC/combined-prs-branch
amstilp Oct 22, 2024
7c5df7a
Merge pull request #776 from UW-GAC/pre-commit-ci-update-config
amstilp Oct 22, 2024
30b2ea3
Bump mypy from 1.12.1 to 1.13.0
dependabot[bot] Oct 23, 2024
1dfa108
Bump actions/checkout from 4.2.1 to 4.2.2
dependabot[bot] Oct 24, 2024
2bdf530
Changes to adapters, custom provider and tests to support allauth upg…
jmcarson Oct 24, 2024
44e74b3
Compile requirements files
jmcarson Oct 24, 2024
3f02ba8
Merge pull request #789 from UW-GAC/pip-tools/update-requirements-fil…
jmcarson Oct 24, 2024
85bf746
Bump actions/setup-python from 5.2.0 to 5.3.0
dependabot[bot] Oct 25, 2024
32da68c
Add coverage for invalid token code paths
jmcarson Oct 25, 2024
7277245
Fix missing coverage for login page and auth_error
jmcarson Oct 25, 2024
b590c2a
Merge pull request #788 from UW-GAC/maint/allauth-upgrade
jmcarson Oct 25, 2024
cbc5e41
Pin pip to a specific version
amstilp Nov 7, 2024
63168a5
Try using a new version of the pip-tools-actions repo
amstilp Nov 7, 2024
e6d3d6a
Use new release of pip-tools-actions
amstilp Nov 7, 2024
afcee2c
Merge pull request #825 from UW-GAC/maint/fix-pip-compile-absolute-paths
amstilp Nov 7, 2024
4217df8
Bump pytest-cov from 5.0.0 to 6.0.0
dependabot[bot] Nov 7, 2024
63c8120
Bump django-htmx from 1.19.0 to 1.21.0
dependabot[bot] Nov 7, 2024
be117c2
Bump ruff from 0.7.0 to 0.7.2
dependabot[bot] Nov 7, 2024
17bc816
Bump werkzeug from 3.0.4 to 3.1.2
dependabot[bot] Nov 7, 2024
f568435
Bump pyjwt from 2.4.0 to 2.9.0
dependabot[bot] Nov 7, 2024
2b0676d
Bump requests-oauthlib from 1.3.1 to 2.0.0
dependabot[bot] Nov 7, 2024
e279acc
Bump cryptography from 43.0.1 to 43.0.3
dependabot[bot] Nov 7, 2024
a2313e6
Bump whitenoise from 6.7.0 to 6.8.2
dependabot[bot] Nov 7, 2024
3dbd0e8
Bump django-allauth from 65.0.2 to 65.1.0
dependabot[bot] Nov 7, 2024
d422f10
Bump django-constance from 4.1.2 to 4.1.3
dependabot[bot] Nov 7, 2024
e25252a
Compile requirements files
dependabot[bot] Nov 7, 2024
c05ee7c
Merge pull request #828 from UW-GAC/pip-tools/update-requirements-fil…
amstilp Nov 7, 2024
19f2bee
Merge dependabot/pip/django-constance-4.1.3 into combined-prs-branch
github-actions[bot] Nov 7, 2024
dc92ba3
Merge dependabot/pip/werkzeug-3.1.2 into combined-prs-branch
github-actions[bot] Nov 7, 2024
a57da3b
Merge dependabot/pip/ruff-0.7.2 into combined-prs-branch
github-actions[bot] Nov 7, 2024
704a375
Merge dependabot/pip/pytest-cov-6.0.0 into combined-prs-branch
github-actions[bot] Nov 7, 2024
6b5f216
Merge dependabot/pip/whitenoise-6.8.2 into combined-prs-branch
github-actions[bot] Nov 7, 2024
715a3b2
Merge dependabot/pip/django-allauth-65.1.0 into combined-prs-branch
github-actions[bot] Nov 7, 2024
51c3212
Merge dependabot/pip/pyjwt-2.9.0 into combined-prs-branch
github-actions[bot] Nov 7, 2024
9f2131d
Merge dependabot/pip/cryptography-43.0.3 into combined-prs-branch
github-actions[bot] Nov 7, 2024
d3ab919
Merge dependabot/pip/requests-oauthlib-2.0.0 into combined-prs-branch
github-actions[bot] Nov 7, 2024
983d28a
Merge dependabot/pip/django-htmx-1.21.0 into combined-prs-branch
github-actions[bot] Nov 7, 2024
10bf984
Merge dependabot/pip/mypy-1.13.0 into combined-prs-branch
github-actions[bot] Nov 7, 2024
e7ef885
Merge pull request #829 from UW-GAC/combined-prs-branch
amstilp Nov 7, 2024
26372b7
Merge pull request #791 from UW-GAC/dependabot/github_actions/actions…
amstilp Nov 7, 2024
d637f51
Merge pull request #787 from UW-GAC/dependabot/github_actions/actions…
amstilp Nov 7, 2024
8d1889b
Merge pull request #830 from UW-GAC/main
amstilp Nov 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 12 additions & 10 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ jobs:
steps:

- name: Checkout Code Repository
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
uses: actions/setup-python@v5.3.0
with:
python-version: ${{ matrix.python-version }}
cache: pip
Expand Down Expand Up @@ -93,27 +93,28 @@ jobs:
- name: Run tests
run: |
pytest --cov=primed -n auto
mv .coverage .coverage-${{ strategy.job-index }}
mv .coverage coverage-${{ strategy.job-index }}

- name: List files for debugging purposes
run: ls -lhta

- name: Upload coverage data
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v4.4.3
with:
name: coverage-data-${{ strategy.job-index }}
path: .coverage-${{ strategy.job-index }}
path: coverage-${{ strategy.job-index }}
if-no-files-found: error

coverage:
needs:
- test
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v5.3.0
with:
python-version: '3.10'

Expand All @@ -123,13 +124,14 @@ jobs:
pip install --upgrade coverage "django<4" django-coverage-plugin

- name: Download coverage data
uses: actions/download-artifact@v4
uses: actions/download-artifact@v4.1.8
with:
path: ./artifacts/

- name: Merge coverage files
run: |
python -m coverage combine ./artifacts/coverage-data*/.coverage-*
ls -la ./artifacts/coverage-data*
python -m coverage combine ./artifacts/coverage-data*/coverage-*
python -m coverage xml
ls -la .coverage*

Expand All @@ -138,6 +140,6 @@ jobs:
python -m coverage report

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v4.6.0
with:
token: ${{ secrets.CODECOV_TOKEN }}
4 changes: 1 addition & 3 deletions .github/workflows/combine-prs.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Combine PRs

on:
schedule:
- cron: '0 8 * * 1' # Monday at 08:00 UTC
workflow_dispatch: # allows you to manually trigger the workflow

# The minimum permissions required to run this Action
Expand All @@ -18,7 +16,7 @@ jobs:
steps:
- name: combine-prs
id: combine-prs
uses: github/combine-prs@v5.1.0
uses: github/combine-prs@v5.2.0
with:
labels: combined-pr # Optional: add a label to the combined PR
ci_required: true # require all checks to pass before combining
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/gitleaks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ jobs:
name: gitleaks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4.2.2
with:
fetch-depth: 0
- uses: gitleaks/gitleaks-action@v2
- uses: gitleaks/gitleaks-action@v2.3.7
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITLEAKS_LICENSE: ${{ secrets.GITLEAKS_LICENSE}} # Only required for Organizations, not personal accounts.
6 changes: 3 additions & 3 deletions .github/workflows/pip-compile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,17 @@ jobs:

steps:
- name: Checkout Code Repository
uses: actions/checkout@v4
uses: actions/checkout@v4.2.2
with:
ref: ${{ github.head_ref }}

- name: Set up Python
uses: actions/setup-python@v5
uses: actions/setup-python@v5.3.0
with:
python-version: "3.10"

- name: Update requirements files
uses: UW-GAC/pip-tools-actions/update-requirements-files@v0.1
uses: UW-GAC/pip-tools-actions/update-requirements-files@v0.2
with:
requirements_files: |-
requirements/requirements.in
Expand Down
8 changes: 4 additions & 4 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
exclude: 'docs|node_modules|migrations|.git|.tox'
default_stages: [commit]
default_stages: [pre-commit]
fail_fast: true

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
rev: v5.0.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-yaml

- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.5.6
rev: v0.7.0
hooks:
# Run the linter.
- id: ruff
Expand All @@ -21,7 +21,7 @@ repos:
- id: ruff-format

- repo: https://github.com/gitleaks/gitleaks
rev: v8.18.4
rev: v8.21.1
hooks:
- id: gitleaks

Expand Down
1 change: 1 addition & 0 deletions config/settings/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,7 @@
"maintenance_mode.middleware.MaintenanceModeMiddleware",
"simple_history.middleware.HistoryRequestMiddleware",
"django_htmx.middleware.HtmxMiddleware",
"allauth.account.middleware.AccountMiddleware",
]

# STATIC
Expand Down
2 changes: 1 addition & 1 deletion primed/cdsa/tests/factories.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ class Meta:
model = models.AgreementMajorVersion
django_get_or_create = ("version",)

version = Faker("random_int", min=1)
version = Sequence(lambda n: n + 1)


class AgreementVersionFactory(DjangoModelFactory):
Expand Down
12 changes: 11 additions & 1 deletion primed/drupal_oauth_provider/provider.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@

from allauth.account.models import EmailAddress
from allauth.socialaccount import app_settings, providers
from allauth.socialaccount.adapter import get_adapter
from allauth.socialaccount.providers.base import ProviderAccount
from allauth.socialaccount.providers.oauth2.provider import OAuth2Provider
from django.conf import settings
from django.core.exceptions import ImproperlyConfigured

from .views import CustomAdapter

logger = logging.getLogger(__name__)

DRUPAL_PROVIDER_ID = "drupal_oauth_provider"
Expand All @@ -24,9 +27,16 @@ class CustomAccount(ProviderAccount):


class CustomProvider(OAuth2Provider):
id = "drupal_oauth_provider"
id = DRUPAL_PROVIDER_ID
name = OVERRIDE_NAME
account_class = CustomAccount
oauth2_adapter_class = CustomAdapter
supports_token_authentication = True

def __init__(self, request, app=None):
if app is None:
app = get_adapter().get_app(request, self.id)
super().__init__(request, app=app)

def extract_uid(self, data):
return str(data["sub"])
Expand Down
Loading