Skip to content

Commit 8ab455f

Browse files
committed
Merge remote-tracking branch 'upstream/master' into oauth-toolkit-auth-service-django5
2 parents 7a140bc + 121abd4 commit 8ab455f

File tree

189 files changed

+16511
-2157
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

189 files changed

+16511
-2157
lines changed

.dockerignore

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
venv
2+
__pycache__
3+
.tox
4+
.github
5+
.vscode
6+
.django_oauth_toolkit.egg-info
7+
.coverage
8+
coverage.xml
9+
10+
# every time we change this we need to do the COPY . /code and
11+
# RUN pip install -r requirements.txt again
12+
# so don't include the Dockerfile in the context.
13+
Dockerfile
14+
docker-compose.yml
15+
16+
17+
# from .gitignore
18+
*.py[cod]
19+
20+
*.swp
21+
22+
# C extensions
23+
*.so
24+
25+
# Packages
26+
*.egg
27+
*.egg-info
28+
dist
29+
build
30+
eggs
31+
parts
32+
bin
33+
var
34+
sdist
35+
develop-eggs
36+
.installed.cfg
37+
lib
38+
lib64
39+
__pycache__
40+
41+
# Installer logs
42+
pip-log.txt
43+
44+
# Unit test / coverage reports
45+
.cache
46+
.pytest_cache
47+
.coverage
48+
.tox
49+
.pytest_cache/
50+
nosetests.xml
51+
52+
# Translations
53+
*.mo
54+
55+
# Mr Developer
56+
.mr.developer.cfg
57+
.project
58+
.pydevproject
59+
60+
# PyCharm stuff
61+
.idea
62+
63+
# Sphinx build dir
64+
_build
65+
66+
# Sqlite database files
67+
*.sqlite
68+
69+
/venv/
70+
/coverage.xml
71+
72+
db.sqlite3
73+
venv/

.editorconfig

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
root = true
2+
3+
[*]
4+
charset = utf-8
5+
end_of_line = lf
6+
indent_style = space
7+
indent_size = 4
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[{Makefile,setup.cfg}]
12+
indent_style = tab
13+
14+
[*.{yml,yaml}]
15+
indent_size = 2

.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# required for vscode testing activity to discover tests
2+
DJANGO_SETTINGS_MODULE=tests.settings

.github/workflows/release.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*'
7+
8+
jobs:
9+
build:
10+
if: github.repository == 'jazzband/django-oauth-toolkit'
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v5
20+
with:
21+
python-version: '3.12'
22+
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install -U pip build twine
26+
27+
- name: Build package
28+
run: |
29+
python -m build
30+
twine check dist/*
31+
32+
- name: Upload packages to Jazzband
33+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
34+
uses: pypa/gh-action-pypi-publish@master
35+
with:
36+
user: jazzband
37+
password: ${{ secrets.JAZZBAND_RELEASE_KEY }}
38+
repository_url: https://jazzband.co/projects/django-oauth-toolkit/upload

.github/workflows/test.yml

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
1+
name: Test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
test-package:
7+
name: Test Package (Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }})
8+
runs-on: ubuntu-latest
9+
permissions:
10+
id-token: write # Required for Codecov OIDC token
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
python-version:
15+
- '3.10'
16+
- '3.11'
17+
- '3.12'
18+
django-version:
19+
- '4.2'
20+
- '5.0'
21+
- '5.1'
22+
- 'main'
23+
include:
24+
# https://docs.djangoproject.com/en/dev/faq/install/#what-python-version-can-i-use-with-django
25+
- python-version: '3.8'
26+
django-version: '4.2'
27+
- python-version: '3.9'
28+
django-version: '4.2'
29+
30+
steps:
31+
- uses: actions/checkout@v4
32+
33+
- name: Set up Python ${{ matrix.python-version }}
34+
uses: actions/setup-python@v5
35+
with:
36+
python-version: ${{ matrix.python-version }}
37+
38+
39+
- name: Get pip cache dir
40+
id: pip-cache
41+
run: |
42+
echo "::set-output name=dir::$(pip cache dir)"
43+
44+
- name: Cache
45+
uses: actions/cache@v4
46+
with:
47+
path: ${{ steps.pip-cache.outputs.dir }}
48+
key:
49+
${{ matrix.python-version }}-v1-${{ hashFiles('**/pyproject.toml') }}-${{ hashFiles('**/tox.ini') }}
50+
restore-keys: |
51+
${{ matrix.python-version }}-v1-
52+
53+
- name: Install Python dependencies
54+
run: |
55+
python -m pip install --upgrade pip
56+
python -m pip install --upgrade tox tox-gh-actions
57+
58+
- name: Tox tests
59+
run: |
60+
tox -v
61+
env:
62+
DJANGO: ${{ matrix.django-version }}
63+
64+
- name: Upload coverage
65+
uses: codecov/codecov-action@v5
66+
with:
67+
name: Python ${{ matrix.python-version }}
68+
use_oidc: true
69+
70+
test-demo-rp:
71+
name: Test Demo Relying Party
72+
runs-on: ubuntu-latest
73+
strategy:
74+
fail-fast: false
75+
matrix:
76+
node-version:
77+
- "18.x"
78+
- "20.x"
79+
steps:
80+
- name: Checkout
81+
uses: actions/checkout@v4
82+
83+
- name: Set up NodeJS
84+
uses: actions/setup-node@v4
85+
with:
86+
node-version: ${{ matrix.node-version }}
87+
88+
- name: Install dependencies
89+
run: npm install
90+
working-directory: tests/app/rp
91+
92+
- name: Run Lint
93+
run: npm run lint
94+
working-directory: tests/app/rp
95+
96+
- name: Run build
97+
run: npm run build
98+
working-directory: tests/app/rp
99+
100+
success:
101+
needs:
102+
- test-package
103+
- test-demo-rp
104+
runs-on: ubuntu-latest
105+
name: Test successful
106+
steps:
107+
- name: Success
108+
run: echo Test successful

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,11 @@ pip-log.txt
2626

2727
# Unit test / coverage reports
2828
.cache
29+
.pytest_cache
2930
.coverage
3031
.tox
3132
.pytest_cache/
33+
.ruff_cache/
3234
nosetests.xml
3335

3436
# Translations
@@ -47,3 +49,11 @@ _build
4749

4850
# Sqlite database files
4951
*.sqlite
52+
53+
/venv/
54+
/coverage.xml
55+
56+
db.sqlite3
57+
venv/
58+
59+
/tests/app/idp/static

.pre-commit-config.yaml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
repos:
2+
- repo: https://github.com/astral-sh/ruff-pre-commit
3+
rev: v0.12.7
4+
hooks:
5+
- id: ruff
6+
args: [ --fix ]
7+
- id: ruff-format
8+
- repo: https://github.com/pre-commit/pre-commit-hooks
9+
rev: v5.0.0
10+
hooks:
11+
- id: check-ast
12+
- id: trailing-whitespace
13+
- id: check-merge-conflict
14+
- id: check-json
15+
- id: check-xml
16+
- id: check-yaml
17+
- id: mixed-line-ending
18+
args: ['--fix=lf']
19+
- repo: https://github.com/sphinx-contrib/sphinx-lint
20+
rev: v1.0.0
21+
hooks:
22+
- id: sphinx-lint
23+
# Configuration for codespell is in pyproject.toml
24+
- repo: https://github.com/codespell-project/codespell
25+
rev: v2.4.1
26+
hooks:
27+
- id: codespell
28+
exclude: (package-lock.json|/locale/)
29+
additional_dependencies:
30+
- tomli

.readthedocs.yml

Lines changed: 19 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,29 @@
1-
# .readthedocs.yml
1+
# .readthedocs.yaml
22
# Read the Docs configuration file
33
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
44

55
# Required
66
version: 2
77

8+
# Set the version of Python and other tools you might need
9+
build:
10+
os: ubuntu-20.04
11+
tools:
12+
python: "3.9"
13+
# You can also specify other tool versions:
14+
# nodejs: "16"
15+
# rust: "1.55"
16+
# golang: "1.17"
17+
818
# Build documentation in the docs/ directory with Sphinx
919
sphinx:
10-
configuration: docs/conf.py
20+
configuration: docs/conf.py
21+
22+
# If using Sphinx, optionally build your docs in additional formats such as PDF
23+
# formats:
24+
# - pdf
1125

26+
# Optionally declare the Python requirements required to build your docs
1227
python:
13-
version: 3.7
14-
install:
15-
- requirements: docs/requirements.txt
28+
install:
29+
- requirements: docs/requirements.txt

.travis.yml

Lines changed: 0 additions & 67 deletions
This file was deleted.

0 commit comments

Comments
 (0)