Skip to content

Commit e8e0148

Browse files
committed
Merge branch 'master' into cors-header-middleware
2 parents cafd471 + 025cd1b commit e8e0148

File tree

174 files changed

+15802
-5258
lines changed

Some content is hidden

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

174 files changed

+15802
-5258
lines changed

.coveragerc

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

.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

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
<!-- A clear and concise description of what the bug is. -->
12+
13+
**To Reproduce**
14+
<!-- Steps to reproduce the behavior -->
15+
16+
**Expected behavior**
17+
<!-- A clear and concise description of what you expected to happen. -->
18+
19+
**Version**
20+
<!-- Version of django-oauth-toolkit -->
21+
22+
<!-- Have you tested with the latest version and/or master branch? -->
23+
<!-- Replace '[ ]' with '[x]' to indicate that. -->
24+
- [ ] I have tested with the latest published release and it's still a problem.
25+
- [ ] I have tested with the master branch and it's still a problem.
26+
27+
**Additional context**
28+
<!-- Add any other context about the problem here. -->
29+
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: enhancement
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
<!-- A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] -->
12+
13+
**Describe the solution you'd like**
14+
<!-- A clear and concise description of what you want to happen. -->
15+
16+
**Describe alternatives you've considered**
17+
<!-- A clear and concise description of any alternative solutions or features you've considered. -->
18+
19+
**Additional context**
20+
<!-- Add any other context or screenshots about the feature request here. -->
21+

.github/ISSUE_TEMPLATE/question.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
name: Question
3+
about: Ask a question about using django-oauth-toolkit
4+
title: ''
5+
labels: question
6+
assignees: ''
7+
8+
---
9+
10+
<!-- What is your question? -->
11+
12+

.github/pull_request_template.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
<!-- See https://django-oauth-toolkit.readthedocs.io/en/latest/contributing.html#pull-requests -->
2+
<!-- If there's already an issue that this PR fixes, add that issue number below after 'Fixes #' -->
3+
Fixes #
4+
5+
## Description of the Change
6+
7+
## Checklist
8+
9+
<!-- Replace '[ ]' with '[x]' to indicate that the checklist item is completed. -->
10+
<!-- You can check the boxes now or later by just clicking on them. -->
11+
12+
- [ ] PR only contains one change (considered splitting up PR)
13+
- [ ] unit-test added
14+
- [ ] documentation updated
15+
- [ ] `CHANGELOG.md` updated (only for user relevant changes)
16+
- [ ] author name in `AUTHORS`

.github/workflows/release.yml

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
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@v2
15+
with:
16+
fetch-depth: 0
17+
18+
- name: Set up Python
19+
uses: actions/setup-python@v2
20+
with:
21+
python-version: 3.8
22+
23+
- name: Install dependencies
24+
run: |
25+
python -m pip install -U pip
26+
python -m pip install -U setuptools twine wheel
27+
28+
- name: Build package
29+
run: |
30+
python setup.py --version
31+
python setup.py sdist --format=gztar bdist_wheel
32+
twine check dist/*
33+
34+
- name: Upload packages to Jazzband
35+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
36+
uses: pypa/gh-action-pypi-publish@master
37+
with:
38+
user: jazzband
39+
password: ${{ secrets.JAZZBAND_RELEASE_KEY }}
40+
repository_url: https://jazzband.co/projects/django-oauth-toolkit/upload

.github/workflows/test.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Test
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: ubuntu-latest
8+
strategy:
9+
fail-fast: false
10+
max-parallel: 5
11+
matrix:
12+
python-version: ['3.7', '3.8', '3.9', '3.10']
13+
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- name: Set up Python ${{ matrix.python-version }}
18+
uses: actions/setup-python@v2
19+
with:
20+
python-version: ${{ matrix.python-version }}
21+
22+
23+
- name: Get pip cache dir
24+
id: pip-cache
25+
run: |
26+
echo "::set-output name=dir::$(pip cache dir)"
27+
28+
- name: Cache
29+
uses: actions/cache@v2
30+
with:
31+
path: ${{ steps.pip-cache.outputs.dir }}
32+
key:
33+
${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/tox.ini') }}
34+
restore-keys: |
35+
${{ matrix.python-version }}-v1-
36+
37+
- name: Install Python dependencies
38+
run: |
39+
python -m pip install --upgrade pip
40+
python -m pip install --upgrade tox tox-gh-actions
41+
42+
- name: Tox tests
43+
run: |
44+
tox -v
45+
46+
- name: Upload coverage
47+
uses: codecov/codecov-action@v1
48+
with:
49+
name: Python ${{ matrix.python-version }}

.gitignore

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

2727
# Unit test / coverage reports
2828
.cache
29+
.pytest_cache
2930
.coverage
3031
.tox
32+
.pytest_cache/
3133
nosetests.xml
3234

3335
# Translations
@@ -46,3 +48,6 @@ _build
4648

4749
# Sqlite database files
4850
*.sqlite
51+
52+
/venv/
53+
/coverage.xml

.pre-commit-config.yaml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
repos:
2+
- repo: https://github.com/psf/black
3+
rev: 22.3.0
4+
hooks:
5+
- id: black
6+
exclude: ^(oauth2_provider/migrations/|tests/migrations/)
7+
- repo: https://github.com/pre-commit/pre-commit-hooks
8+
rev: v4.2.0
9+
hooks:
10+
- id: check-ast
11+
- id: trailing-whitespace
12+
- id: check-merge-conflict
13+
- id: check-json
14+
- id: check-xml
15+
- id: check-yaml
16+
- id: mixed-line-ending
17+
args: ['--fix=lf']
18+
- repo: https://github.com/PyCQA/isort
19+
rev: 5.10.1
20+
hooks:
21+
- id: isort
22+
exclude: ^(oauth2_provider/migrations/|tests/migrations/)
23+
- repo: https://github.com/PyCQA/flake8
24+
rev: 4.0.1
25+
hooks:
26+
- id: flake8
27+
exclude: ^(oauth2_provider/migrations/|tests/migrations/)
28+
- repo: https://github.com/sphinx-contrib/sphinx-lint
29+
rev: v0.3
30+
hooks:
31+
- id: sphinx-lint

0 commit comments

Comments
 (0)