Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 0 additions & 4 deletions .flake8

This file was deleted.

2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ matrix.python-version }}-v1-${{ hashFiles('**/poetry.lock') }}
key: ${{ matrix.python-version }}-v1-${{ hashFiles('**/uv.lock') }}
restore-keys: |
${{ matrix.python-version }}-v1-

Expand Down
17 changes: 6 additions & 11 deletions .github/workflows/python-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,11 @@ jobs:
steps:
- name: Checkout
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Setup
uses: descope/.github/.github/actions/python/poetry/setup@main
with:
python-version: "3.9"
- name: Autobump version
run: |
poetry version $(git describe --tags --abbrev=0)
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v7
- name: Build
uses: descope/.github/.github/actions/python/poetry/build@main
run: |
uv build
- name: Publish
uses: descope/.github/.github/actions/python/poetry/publish@main
with:
token: ${{ secrets.PYPI_TOKEN }}
run: |
uv publish --token ${{ secrets.PYPI_TOKEN }}
41 changes: 11 additions & 30 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,40 +16,21 @@ repos:
types: [python]
entry: "print"
language: pygrep
- repo: https://github.com/PyCQA/isort
rev: 5.12.0
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.6
hooks:
- id: isort
args: ["--profile", "black"]
- repo: https://github.com/psf/black
rev: 23.1.0
- id: ruff
args: [--fix]
- id: ruff-format
- repo: https://github.com/astral-sh/uv-pre-commit
rev: 0.5.11
hooks:
- id: black
- repo: https://github.com/asottile/pyupgrade
rev: v3.3.1
hooks:
- id: pyupgrade
args: [--py37-plus]
- repo: https://github.com/pycqa/flake8
rev: 6.0.0
hooks:
- id: flake8
- repo: https://github.com/python-poetry/poetry
rev: 1.4.0
hooks:
- id: poetry-check
files: pyproject.toml
- id: poetry-lock
files: pyproject.toml
- id: poetry-export
args: ["-f", "requirements.txt", "-o", "requirements.txt"]
- id: uv-lock
files: pyproject.toml
- repo: https://github.com/dhatim/python-license-check
rev: 0.8.3
- repo: https://github.com/FHPythonUtils/LicenseCheck
rev: 2025.1.0
hooks:
- id: liccheck
language: system
args: ["--level", "paranoid"]
- id: licensecheck
- repo: https://github.com/compilerla/conventional-pre-commit
rev: v4.3.0
hooks:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ _The names of these roles can be customized in the settings below._
2. Install "django-descope" and add to your INSTALLED_APPS setting like this:

```bash
poetry add django-descope
uv add django-descope
OR
pip install django-descope
```
Expand Down
1,233 changes: 0 additions & 1,233 deletions poetry.lock

This file was deleted.

136 changes: 71 additions & 65 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
[build-system]
requires = ["poetry>=2,<3"]
build-backend = "poetry.core.masonry.api"
requires = ["uv_build>=0.9.25,<0.10.0"]
build-backend = "uv_build"

[tool.poetry]
[project]
name = "django_descope"
version = "0.0.dev0"
description = "Descope plugin for Django"
authors = [{ name = "Descope", email = "info@descope.com" }]
requires-python = ">=3.9,<4.0"
readme = "README.md"
authors = ["Descope <info@descope.com>"]
repository = "https://github.com/descope/django-descope"
documentation = "https://docs.descope.com"
keywords = ["descope", "jwt", "authentication", "django"]
license = "MIT"
include = ["LICENSE", "README.md", "src/django_descope/**"]
keywords = [
"descope",
"jwt",
"authentication",
"django",
]
classifiers = [
"Environment :: Web Environment",
"Framework :: Django",
Expand All @@ -36,70 +39,73 @@ classifiers = [
"Programming Language :: Python :: 3.13",
"Topic :: Internet :: WWW/HTTP",
"Topic :: Internet :: WWW/HTTP :: Dynamic Content",

"Programming Language :: Python :: 3.14",
]
dependencies = [
"Django>=3.2.25,<5.3",
"descope>=1.5.1,<2",
]

[tool.poetry.dependencies]
python = ">=3.9,<4.0"
Django = ">=3.2.19,<5.3"
descope = "^1.5.1"
[project.urls]
Repository = "https://github.com/descope/django-descope"
Documentation = "https://docs.descope.com"

[tool.poetry.group.dev.dependencies]
flake8 = "7.3.0"
black = "25.11.0"
pre-commit = { version = "4.4.0", python = ">=3.9" }
liccheck = "0.9.2"
isort = "6.1.0"
python-dotenv = "1.2.0"
tox = "4.31.0"
django-debug-toolbar = "5.2.0"
django-stubs = {version = "5.2.8", python = ">=3.10"}
[dependency-groups]
dev = [
"ruff==0.8.6",
"pre-commit==4.3.0 ; python_full_version >= '3.9'",
"liccheck==0.9.2",
"python-dotenv==1.1.1",
"tox==4.31.0 ; python_full_version >= '3.10'",
"tox<4.31.0 ; python_full_version < '3.10'",
"django-debug-toolbar==5.2.0",
"django-stubs==5.2.7 ; python_full_version >= '3.10'",
"licensecheck==2025.1.0",
]

# Authorized and unauthorized licenses in LOWER CASE
[tool.liccheck]
authorized_licenses = [
"bsd",
"new bsd",
"bsd license",
"new bsd license",
"simplified bsd",
"apache",
"apache 2.0",
"apache software",
"apache software license",
"isc",
"isc license",
"isc license (iscl)",
"mit",
"mit license",
"python software foundation",
"python software foundation license",
[tool.uv.build-backend]
module-root = ""
source-include = [
"LICENSE",
"README.md",
"src/django_descope/**",
]

unauthorized_licenses = [
"gpl v3",
"gnu lgpl",
"lgpl with exceptions or zpl",
"zpl 2.1",
# Authorized and unauthorized licenses in LOWER CASE
[tool.licensecheck]
show_only_failing = true

[tool.ruff]
line-length = 120
target-version = "py39"

[tool.ruff.lint]
select = [
"E", # pycodestyle errors
"W", # pycodestyle warnings
"F", # pyflakes
"I", # isort
"UP", # pyupgrade
"DJ", # django-specific rules
]
ignore = [
"E402", # module level import not at top of file
"E501", # line too long (handled by formatter)
]

[tool.ruff.lint.per-file-ignores]
"**/migrations/*.py" = ["E501", "DJ"]
"**/settings.py" = ["E501"]

[tool.liccheck.authorized_packages]
# Apache-2.0 license
coverage = "6.3.3"
# CC0 1.0 Universal (CC0 1.0) Public Domain Dedication license
email-validator = ">=1.3.0"
#Public Domain (filelock package is dependency of filelock << virtualenv << pre-commit)
filelock = ">=3.4.1"
#Mozilla Public License 2.0 (MPL 2.0) (certifi package is dependency of requests
certifi = ">=2021.10.8"
[tool.ruff.lint.isort]
known-first-party = ["config", "django_descope"]
section-order = ["future", "standard-library", "django", "third-party", "first-party", "local-folder"]

[tool.black]
line-length = 119
[tool.ruff.lint.isort.sections]
django = ["django"]

[tool.isort]
profile = "django"
combine_as_imports = true
include_trailing_comma = true
line_length = 88
multi_line_output = 3
known_first_party = ["config"]
[tool.ruff.format]
quote-style = "double"
indent-style = "space"
skip-magic-trailing-comma = false
line-ending = "auto"
Loading
Loading