Merge remote-tracking branch 'origin/master'
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
# https://editorconfig.org/
|
||||
# http://editorconfig.org
|
||||
|
||||
root = true
|
||||
|
||||
@@ -12,7 +12,7 @@ charset = utf-8
|
||||
|
||||
# Docstrings and comments use max_line_length = 79
|
||||
[*.py]
|
||||
max_line_length = 119
|
||||
max_line_length = 80
|
||||
|
||||
# Use 2 spaces for the HTML files
|
||||
[*.html]
|
||||
@@ -21,16 +21,16 @@ indent_size = 2
|
||||
# The JSON files contain newlines inconsistently
|
||||
[*.json]
|
||||
indent_size = 2
|
||||
insert_final_newline = ignore
|
||||
insert_final_newline = unset
|
||||
|
||||
[**/admin/js/vendor/**]
|
||||
indent_style = ignore
|
||||
indent_size = ignore
|
||||
indent_style = unset
|
||||
indent_size = unset
|
||||
|
||||
# Minified JavaScript files shouldn't be changed
|
||||
[**.min.js]
|
||||
indent_style = ignore
|
||||
insert_final_newline = ignore
|
||||
indent_style = unset
|
||||
insert_final_newline = unset
|
||||
|
||||
# Makefiles always use tabs for indentation
|
||||
[Makefile]
|
||||
@@ -39,9 +39,3 @@ indent_style = tab
|
||||
# Batch files use tabs for indentation
|
||||
[*.bat]
|
||||
indent_style = tab
|
||||
|
||||
[docs/**.txt]
|
||||
max_line_length = 79
|
||||
|
||||
[makefile]
|
||||
indent_style = tab
|
||||
|
||||
18
.github/workflows/main.yml
vendored
18
.github/workflows/main.yml
vendored
@@ -1,18 +0,0 @@
|
||||
name: Run Django tests
|
||||
|
||||
on: push
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python
|
||||
uses: actions/setup-python@v2
|
||||
with:
|
||||
python-version: "3.8"
|
||||
- name: Install dependencies
|
||||
run: make install
|
||||
- name: Run tests
|
||||
run: make test
|
||||
@@ -1,20 +1,32 @@
|
||||
fail_fast: true
|
||||
repos:
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v3.2.0
|
||||
- repo: https://github.com/twu/skjold
|
||||
rev: v0.1.6
|
||||
hooks:
|
||||
- id: skjold
|
||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||
rev: v3.4.0
|
||||
hooks:
|
||||
- id: check-merge-conflict
|
||||
- id: check-symlinks
|
||||
- id: check-toml
|
||||
- id: check-xml
|
||||
- id: check-yaml
|
||||
- id: fix-encoding-pragma
|
||||
- id: forbid-new-submodules
|
||||
- id: mixed-line-ending
|
||||
- id: trailing-whitespace
|
||||
language: python
|
||||
- repo: https://github.com/ambv/black
|
||||
rev: stable
|
||||
rev: 20.8b1
|
||||
hooks:
|
||||
- id: black
|
||||
language_version: python3.8
|
||||
- repo: https://gitlab.com/pycqa/flake8
|
||||
rev: 3.7.9
|
||||
rev: 3.8.4
|
||||
hooks:
|
||||
- id: flake8
|
||||
- repo: https://github.com/asottile/blacken-docs
|
||||
rev: v1.8.0
|
||||
rev: v1.9.1
|
||||
hooks:
|
||||
- id: blacken-docs
|
||||
|
||||
7
Pipfile
7
Pipfile
@@ -6,11 +6,9 @@ verify_ssl = true
|
||||
[dev-packages]
|
||||
pylint = "*"
|
||||
pylint-django = "*"
|
||||
autopep8 = "*"
|
||||
rope = "*"
|
||||
safety = "*"
|
||||
flake8 = "*"
|
||||
pre-commit= "*"
|
||||
skjold = "*"
|
||||
|
||||
[packages]
|
||||
django = ">=3.1.0"
|
||||
@@ -21,6 +19,3 @@ django-guardian = ">=2.3.0"
|
||||
|
||||
[requires]
|
||||
python_version = "3.9"
|
||||
|
||||
[pipenv]
|
||||
allow_prereleases = true
|
||||
|
||||
7
makefile
7
makefile
@@ -23,10 +23,15 @@ migrate: ## Make and run migrations
|
||||
|
||||
.PHONY: test
|
||||
test: ## Run tests
|
||||
pipenv run python manage.py test application --verbosity=0 --parallel --failfast
|
||||
pipenv run skjold -v audit Pipfile.lock
|
||||
pipenv run python manage.py test --verbosity=0 --parallel --failfast
|
||||
|
||||
.PHONY: run
|
||||
run: ## Run the Django server
|
||||
pipenv run python manage.py runserver
|
||||
|
||||
start: install migrate run ## Install requirements, apply migrations, then start development server
|
||||
|
||||
.PHONY: check
|
||||
check: ## Run checks on the packages
|
||||
pipenv run skjold -v audit Pipfile.lock
|
||||
|
||||
@@ -14,3 +14,10 @@ exclude = '''
|
||||
| dist
|
||||
)/
|
||||
'''
|
||||
|
||||
[tool.skjold]
|
||||
sources = ["github", "pyup", "gemnasium"] # Sources to check against.
|
||||
report_only = true # Report only, always exit with zero.
|
||||
cache_dir = '.skylt_cache' # Cache location (default: `~/.skjold/cache`).
|
||||
cache_expires = 86400 # Cache max. age.
|
||||
verbose = true # Be verbose.
|
||||
|
||||
Reference in New Issue
Block a user