diff --git a/.editorconfig b/.editorconfig index b8fc407..ed9a8ec 100644 --- a/.editorconfig +++ b/.editorconfig @@ -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 diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index b372ddb..0000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -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 diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c25c948..df2dda0 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -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 diff --git a/Pipfile b/Pipfile index 19bd1d4..da0b4e6 100644 --- a/Pipfile +++ b/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 diff --git a/makefile b/makefile index 775b4c0..2a1d03b 100644 --- a/makefile +++ b/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 diff --git a/pyproject.toml b/pyproject.toml index dfab025..b8c3ec9 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -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.