-
Notifications
You must be signed in to change notification settings - Fork 1
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
16e8be3
commit 35440c6
Showing
11 changed files
with
264 additions
and
80 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
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,23 +1,122 @@ | ||
# Apply to all files without committing: | ||
# pre-commit run --all-files | ||
# Update this file: | ||
# pre-commit autoupdate | ||
|
||
repos: | ||
# Code Upgrades | ||
# - repo: https://github.com/asottile/pyupgrade | ||
# rev: v3.17.0 | ||
# hooks: | ||
# - id: pyupgrade | ||
# args: [--py38-plus] | ||
- repo: https://github.com/adamchainz/django-upgrade | ||
rev: 1.20.0 | ||
hooks: | ||
- id: django-upgrade | ||
args: [--target-version=4.0] | ||
# Code Logic | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.13.2 | ||
hooks: | ||
- id: isort | ||
name: isort (python) | ||
- repo: https://github.com/pre-commit/pygrep-hooks | ||
rev: v1.10.0 | ||
hooks: | ||
- id: python-check-mock-methods | ||
- id: python-no-log-warn | ||
- id: python-use-type-annotations | ||
- id: text-unicode-replacement-char | ||
# Formatting | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
rev: v4.6.0 | ||
hooks: | ||
# Identify invalid files | ||
- id: check-ast | ||
- id: check-yaml | ||
- id: check-json | ||
- id: check-toml | ||
- id: check-xml | ||
# git checks | ||
- id: check-merge-conflict | ||
- id: check-added-large-files | ||
args: [--maxkb=10000] | ||
- id: detect-private-key | ||
- id: check-case-conflict | ||
# Python checks | ||
# - id: check-docstring-first | ||
- id: debug-statements | ||
# - id: requirements-txt-fixer | ||
- id: fix-encoding-pragma | ||
args: [--remove] | ||
- id: fix-byte-order-marker | ||
# General quality checks | ||
- id: mixed-line-ending | ||
args: [--fix=lf] | ||
- id: trailing-whitespace | ||
args: [--markdown-linebreak-ext=md] | ||
exclude: | | ||
(?x)( | ||
\.min\.css| | ||
\.min\.js| | ||
\.po| | ||
\.mo| | ||
swagger\.json | ||
) | ||
- id: check-executables-have-shebangs | ||
- id: end-of-file-fixer | ||
exclude: \.min\.css$ | ||
- repo: https://github.com/pre-commit/mirrors-autopep8 | ||
rev: "v2.0.2" | ||
exclude: | | ||
(?x)( | ||
\.min\.css| | ||
\.min\.js| | ||
\.po| | ||
\.mo| | ||
swagger\.json | ||
) | ||
- repo: https://github.com/editorconfig-checker/editorconfig-checker.python | ||
rev: 3.0.3 | ||
hooks: | ||
- id: editorconfig-checker | ||
exclude: | | ||
(?x)( | ||
LICENSE| | ||
allianceauth\/static\/allianceauth\/css\/themes\/bootstrap-locals.less| | ||
\.po| | ||
\.mo| | ||
swagger\.json | ||
) | ||
- repo: https://github.com/pycqa/flake8 | ||
rev: 7.1.1 | ||
hooks: | ||
- id: autopep8 | ||
- id: flake8 | ||
additional_dependencies: [Flake8-pyproject] | ||
- repo: https://github.com/asottile/yesqa | ||
rev: v1.5.0 | ||
hooks: | ||
- id: yesqa | ||
- repo: https://github.com/pre-commit/mirrors-prettier | ||
rev: "v3.0.0-alpha.9-for-vscode" | ||
rev: "v4.0.0-alpha.8" | ||
hooks: | ||
- id: prettier | ||
additional_dependencies: | ||
- "[email protected]" | ||
- "@trivago/[email protected]" | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.12.0 | ||
# Infrastructure | ||
- repo: https://github.com/tox-dev/pyproject-fmt | ||
rev: 2.2.1 | ||
hooks: | ||
- id: isort | ||
name: isort (python) | ||
- id: pyproject-fmt | ||
name: pyproject.toml formatter | ||
description: "Format the pyproject.toml file." | ||
args: | ||
- --indent=4 | ||
additional_dependencies: | ||
- tox==4.18.0 # https://github.com/tox-dev/tox/releases/latest | ||
|
||
- repo: https://github.com/abravalheri/validate-pyproject | ||
rev: v0.19 | ||
hooks: | ||
- id: validate-pyproject | ||
name: Validate pyproject.toml | ||
description: "Validate the pyproject.toml file." |
File renamed without changes.
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
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 |
---|---|---|
@@ -0,0 +1,76 @@ | ||
[build-system] | ||
build-backend = "flit_core.buildapi" | ||
|
||
requires = [ "flit-core>=3.2,<4" ] | ||
|
||
[project] | ||
name = "allianceauth-auth-stats" | ||
readme = "README.md" | ||
keywords = [ | ||
"allianceauth", | ||
"eveonline", | ||
] | ||
license = { file = "LICENSE" } | ||
authors = [ | ||
{ name = "AaronKable", email = "[email protected]" }, | ||
] | ||
requires-python = ">=3.8" | ||
classifiers = [ | ||
"Environment :: Web Environment", | ||
"Framework :: Celery", | ||
"Framework :: Django", | ||
"Framework :: Django :: 4.0", | ||
"Framework :: Django :: 4.2", | ||
"Intended Audience :: Developers", | ||
"License :: OSI Approved :: MIT License", | ||
"Operating System :: OS Independent", | ||
"Programming Language :: Python", | ||
"Programming Language :: Python :: 3 :: Only", | ||
"Programming Language :: Python :: 3.8", | ||
"Programming Language :: Python :: 3.9", | ||
"Programming Language :: Python :: 3.10", | ||
"Programming Language :: Python :: 3.11", | ||
"Programming Language :: Python :: 3.12", | ||
"Programming Language :: Python :: Implementation :: CPython", | ||
"Topic :: Internet :: WWW/HTTP", | ||
"Topic :: Internet :: WWW/HTTP :: Dynamic Content", | ||
] | ||
dynamic = [ "description", "version" ] | ||
dependencies = [ | ||
"allianceauth<5,>=3", | ||
"django-ninja>=1.0.1,<2.0.0", | ||
"django-solo>=2.1.0" | ||
] | ||
|
||
urls.Homepage = "https://github.com/Solar-Helix-Independent-Transport/allianceauth-auth-stats" | ||
urls.Source = "https://github.com/Solar-Helix-Independent-Transport/allianceauth-auth-stats" | ||
urls.Tracker = "https://github.com/Solar-Helix-Independent-Transport/allianceauth-auth-stats/issues" | ||
|
||
[tool.flit.module] | ||
name = "authstats" | ||
|
||
[tool.isort] | ||
profile = "django" | ||
sections = [ | ||
"FUTURE", | ||
"STDLIB", | ||
"THIRDPARTY", | ||
"DJANGO", | ||
"ALLIANCEAUTH", | ||
"FIRSTPARTY", | ||
"LOCALFOLDER", | ||
] | ||
known_allianceauth = [ "allianceauth", "esi" ] | ||
known_django = [ "django" ] | ||
skip_gitignore = true | ||
|
||
[tool.flake8] | ||
exclude = [ ".git", "*migrations*", ".tox", "dist", "htmlcov" ] | ||
max-line-length = 119 | ||
select = [ "C", "E", "F", "W", "B", "B950" ] | ||
ignore = [ 'E203', 'E231', 'E501', 'W503', 'W291', 'W293' ] | ||
|
||
[tool.djlint] | ||
max_attribute_length = 119 | ||
max_line_length = 119 | ||
max_blank_lines = 1 |
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 |
---|---|---|
@@ -0,0 +1,54 @@ | ||
""" | ||
Alliance Auth Test Suite Django settings. | ||
""" | ||
|
||
from allianceauth.project_template.project_name.settings.base import * # noqa | ||
|
||
SITE_URL = "https://example.com" | ||
CSRF_TRUSTED_ORIGINS = [SITE_URL] | ||
|
||
# Celery configuration | ||
CELERY_ALWAYS_EAGER = True # Forces celery to run locally for testing | ||
|
||
INSTALLED_APPS += [ | ||
'authstats' | ||
] | ||
|
||
ROOT_URLCONF = 'tests.urls' | ||
|
||
NOSE_ARGS = [ | ||
# '--with-coverage', | ||
# '--cover-package=', | ||
# '--exe', # If your tests need this to be found/run, check they py files are not chmodded +x | ||
] | ||
|
||
|
||
PASSWORD_HASHERS = [ | ||
'django.contrib.auth.hashers.MD5PasswordHasher', | ||
] | ||
|
||
# LOGGING = None # Comment out to enable logging for debugging | ||
|
||
# Register an application at https://developers.eveonline.com for Authentication | ||
# & API Access and fill out these settings. Be sure to set the callback URL | ||
# to https://example.com/sso/callback substituting your domain for example.com | ||
# Logging in to auth requires the publicData scope (can be overridden through the | ||
# LOGIN_TOKEN_SCOPES setting). Other apps may require more (see their docs). | ||
ESI_SSO_CLIENT_ID = '123' | ||
ESI_SSO_CLIENT_SECRET = '123' | ||
ESI_SSO_CALLBACK_URL = '123' | ||
|
||
CACHES = { | ||
"default": { | ||
# "BACKEND": "redis_cache.RedisCache", | ||
# "LOCATION": "localhost:6379", | ||
# "OPTIONS": { | ||
# "DB": 1, | ||
# } | ||
"BACKEND": "django_redis.cache.RedisCache", | ||
"LOCATION": "redis://localhost:6379/1", | ||
"OPTIONS": { | ||
"COMPRESSOR": "django_redis.compressors.lzma.LzmaCompressor", | ||
} | ||
} | ||
} |
Oops, something went wrong.