-
Notifications
You must be signed in to change notification settings - Fork 0
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
48d8122
commit 941b671
Showing
2 changed files
with
41 additions
and
52 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,51 +1,39 @@ | ||
default_stages: [commit] | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v3.2.0 | ||
hooks: | ||
- id: requirements-txt-fixer | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
|
||
- repo: https://github.com/psf/black | ||
rev: 22.8.0 | ||
hooks: | ||
- id: black | ||
args: [".", "--check"] | ||
files: $(git diff --name-only --cached --diff-filter=ACMR) | ||
|
||
# hooks: | ||
# - id: changes-files | ||
# language: bash | ||
|
||
# - repo: https://github.com/pre-commit/pre-commit-hooks | ||
# rev: v3.2.0 | ||
# hooks: | ||
# - id: requirements-txt-fixer | ||
# - id: check-yaml | ||
# - id: end-of-file-fixer | ||
# - id: trailing-whitespace | ||
|
||
# - repo: https://github.com/psf/black | ||
# rev: 22.8.0 | ||
# hooks: | ||
# - id: black | ||
# args: ['.', "--check"] | ||
# # files: | ||
name: black formatting | ||
entry: bash -c 'black $(git diff --name-only --cached --diff-filter=ACMR | grep .py)' | ||
|
||
# - repo: https://github.com/pycqa/isort | ||
# rev: 5.10.1 | ||
# hooks: | ||
# - id: isort | ||
# name: isort (python) | ||
# args: ['--filter-files', '.'] | ||
# entry: isort | ||
|
||
# - repo: https://github.com/pycqa/flake8 | ||
# rev: 5.0.4 | ||
# hooks: | ||
# - id: flake8 | ||
# args: ['--config=.flake8', '.'] | ||
- repo: https://github.com/pycqa/isort | ||
rev: 5.10.1 | ||
hooks: | ||
- id: isort | ||
name: isort (python) | ||
entry: bash -c 'isort $(git diff --name-only --cached --diff-filter=ACMR | grep .py)' | ||
|
||
- repo: https://github.com/pycqa/flake8 | ||
rev: 5.0.4 | ||
hooks: | ||
- id: flake8 | ||
name: flake8 format check | ||
entry: bash -c 'flake8 --config=.flake8 $(git diff --name-only --cached --diff-filter=ACMR | grep .py)' | ||
|
||
# - repo: local | ||
# hooks: | ||
# - id: jira-ticket | ||
# name: check for jira ticket | ||
# language: pygrep | ||
# entry: '\A(?!ANPL+-[0-9]+)' | ||
# args: [--multiline] | ||
# stages: [commit-msg] | ||
- repo: local | ||
hooks: | ||
- id: jira-ticket | ||
name: check for jira ticket | ||
language: pygrep | ||
entry: '\A(?!ANPL+-[0-9]+)' | ||
args: [--multiline] | ||
stages: [commit-msg] |
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,33 +1,34 @@ | ||
# First-party/Local | ||
from controlpanel.settings.common import * | ||
|
||
ENV = 'test' | ||
ENV = "test" | ||
|
||
AWS_COMPUTE_ACCOUNT_ID = "test_compute_account_id" | ||
AWS_DATA_ACCOUNT_ID = "123456789012" # XXX DO NOT CHANGE - it will break moto tests | ||
K8S_WORKER_ROLE_NAME = "nodes.example.com" | ||
SAML_PROVIDER = "test-saml" | ||
|
||
LOGGING["loggers"]["django_structlog"]["level"] = "WARNING" | ||
LOGGING["loggers"]["controlpanel"]["level"] = "WARNING" | ||
LOGGING["loggers"]["django_structlog"]["level"] = "WARNING" # noqa: F405 | ||
LOGGING["loggers"]["controlpanel"]["level"] = "WARNING" # noqa: F405 | ||
|
||
AUTHENTICATION_BACKENDS = [ | ||
'rules.permissions.ObjectPermissionBackend', | ||
'django.contrib.auth.backends.ModelBackend', | ||
"rules.permissions.ObjectPermissionBackend", | ||
"django.contrib.auth.backends.ModelBackend", | ||
] | ||
MIDDLEWARE.remove('mozilla_django_oidc.middleware.SessionRefresh') | ||
REST_FRAMEWORK['DEFAULT_AUTHENTICATION_CLASSES'].remove( | ||
'mozilla_django_oidc.contrib.drf.OIDCAuthentication', | ||
MIDDLEWARE.remove("mozilla_django_oidc.middleware.SessionRefresh") # noqa: F405 | ||
REST_FRAMEWORK["DEFAULT_AUTHENTICATION_CLASSES"].remove( # noqa: F405 | ||
"mozilla_django_oidc.contrib.drf.OIDCAuthentication", | ||
) | ||
OIDC_OP_JWKS_ENDPOINT = "https://example.com/.well-known/jwks.json" | ||
OIDC_ALLOW_UNSECURED_JWT = True | ||
OIDC_DOMAIN = "oidc.idp.example.com" | ||
|
||
TOOLS_DOMAIN = 'example.com' | ||
TOOLS_DOMAIN = "example.com" | ||
|
||
CSRF_COOKIE_SECURE = False | ||
SESSION_COOKIE_SECURE = False | ||
|
||
SLACK = { | ||
"api_token": "test-slack-api-token", | ||
"channel": "test-slack-channel", | ||
} | ||
} |