-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
8b43b8b
commit 0317b49
Showing
20 changed files
with
135 additions
and
167 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,93 @@ | ||
name: Python / Django | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
push: | ||
branches: | ||
- master | ||
|
||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
|
||
jobs: | ||
format: | ||
name: Check formatting | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
toxenv: [fmt, lint, mypy] | ||
env: | ||
TOXENV: ${{ matrix.toxenv }} | ||
|
||
steps: | ||
- name: Check out the repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python 3.11 | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Install and run tox | ||
run: | | ||
pip install tox | ||
tox | ||
test: | ||
name: Run tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python: ["3.9", "3.10", "3.11"] | ||
django: [32,41,main] | ||
|
||
env: | ||
TOXENV: py${{ matrix.python }}-django${{ matrix.django }} | ||
|
||
steps: | ||
- name: Check out the repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Set up Python ${{ matrix.python }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Install and run tox | ||
run: | | ||
pip install tox | ||
tox | ||
format: | ||
name: Check formatting | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
toxenv: [fmt, lint, mypy] | ||
env: | ||
TOXENV: ${{ matrix.toxenv }} | ||
|
||
steps: | ||
- name: Check out the repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python (3.11) | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Install and run tox | ||
run: | | ||
pip install tox | ||
tox | ||
checks: | ||
name: Run Django checks | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
toxenv: ["django-checks"] | ||
env: | ||
TOXENV: ${{ matrix.toxenv }} | ||
|
||
steps: | ||
- name: Check out the repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python (3.11) | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.11" | ||
|
||
- name: Install and run tox | ||
run: | | ||
pip install tox | ||
tox | ||
test: | ||
name: Run tests | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python: ["3.9", "3.10", "3.11", "3.12"] | ||
# build LTS version, next version, HEAD | ||
django: ["32", "42", "50", "main"] | ||
exclude: | ||
- python: "3.9" | ||
django: "50" | ||
- python: "3.9" | ||
django: "main" | ||
- python: "3.10" | ||
django: "main" | ||
- python: "3.11" | ||
django: "32" | ||
- python: "3.12" | ||
django: "32" | ||
|
||
env: | ||
TOXENV: django${{ matrix.django }}-py${{ matrix.python }} | ||
|
||
steps: | ||
- name: Check out the repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Python ${{ matrix.python }} | ||
uses: actions/setup-python@v4 | ||
with: | ||
python-version: ${{ matrix.python }} | ||
|
||
- name: Install and run tox | ||
run: | | ||
pip install tox | ||
tox |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,44 +1,26 @@ | ||
repos: | ||
# python import sorting - will amend files | ||
- repo: https://github.com/pre-commit/mirrors-isort | ||
rev: v5.10.1 | ||
hooks: | ||
- id: isort | ||
|
||
# python code formatting - will amend files | ||
- repo: https://github.com/ambv/black | ||
rev: 22.10.0 | ||
rev: 23.10.1 | ||
hooks: | ||
- id: black | ||
|
||
- repo: https://github.com/asottile/pyupgrade | ||
rev: v3.2.0 | ||
hooks: | ||
- id: pyupgrade | ||
|
||
# Flake8 includes pyflakes, pycodestyle, mccabe, pydocstyle, bandit | ||
- repo: https://gitlab.com/pycqa/flake8 | ||
rev: 3.9.2 | ||
- repo: https://github.com/charliermarsh/ruff-pre-commit | ||
# Ruff version. | ||
rev: "v0.1.5" | ||
hooks: | ||
- id: flake8 | ||
additional_dependencies: | ||
- flake8-bandit | ||
- flake8-blind-except | ||
- flake8-docstrings | ||
- flake8-logging-format | ||
- flake8-print | ||
- id: ruff | ||
args: [--fix, --exit-non-zero-on-fix] | ||
|
||
# python static type checking | ||
- repo: https://github.com/pre-commit/mirrors-mypy | ||
rev: v0.990 | ||
rev: v1.7.0 | ||
hooks: | ||
- id: mypy | ||
# additional_dependencies: | ||
args: | ||
- --disallow-untyped-defs | ||
- --disallow-incomplete-defs | ||
- --check-untyped-defs | ||
- --no-implicit-optional | ||
- --ignore-missing-imports | ||
- --follow-imports=silent | ||
exclude: ^tests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[tool.poetry] | ||
name = "django-request-profiler" | ||
version = "1.0" | ||
version = "1.1" | ||
description = "A simple Django project profiler for timing HTTP requests." | ||
authors = ["YunoJuno <[email protected]>"] | ||
license = "MIT" | ||
|
@@ -16,35 +16,30 @@ classifiers = [ | |
"Framework :: Django :: 3.2", | ||
"Framework :: Django :: 4.0", | ||
"Framework :: Django :: 4.1", | ||
"Framework :: Django :: 5.0", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
] | ||
packages = [ | ||
{ include = "request_profiler" } | ||
] | ||
|
||
[tool.poetry.dependencies] | ||
python = "^3.9" | ||
django = "^3.2 || ^4.0" | ||
django = "^3.2 || ^4.0 || ^5.0" | ||
|
||
[tool.poetry.dev-dependencies] | ||
black = "*" | ||
coverage = "*" | ||
flake8 = "*" | ||
flake8-bandit = "*" | ||
flake8-blind-except = "*" | ||
flake8-docstrings = "*" | ||
flake8-logging-format = "*" | ||
flake8-print = "*" | ||
freezegun = "*" | ||
isort = "*" | ||
mypy = "*" | ||
pre-commit = "*" | ||
pytest = "*" | ||
pytest-cov = "*" | ||
pytest-django = "*" | ||
ruff = "*" | ||
tox = "*" | ||
|
||
[build-system] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,6 @@ | |
|
||
|
||
class CustomUserManager(BaseUserManager): | ||
|
||
# override this method | ||
def _create_user( | ||
self, | ||
|
Oops, something went wrong.