diff --git a/Pipfile b/Pipfile deleted file mode 100644 index f97c10f..0000000 --- a/Pipfile +++ /dev/null @@ -1,21 +0,0 @@ -[[source]] -name = "pypi" -url = "https://pypi.org/simple" -verify_ssl = true - -[dev-packages] -pylint = "*" -pylint-django = "*" -flake8 = "*" -pre-commit= "*" -skjold = "*" - -[packages] -django = ">=4.0.4" -gunicorn = ">=20.1.0" -psycopg2 = ">=2.8.6" -django-filter = ">=2.4.0" -django-guardian = ">=2.4.0" - -[requires] -python_version = "3.9" diff --git a/makefile b/makefile index b410f0e..4075295 100644 --- a/makefile +++ b/makefile @@ -9,27 +9,23 @@ help: ## Show this help .PHONY: install install: ## Make venv and install requirements - @pipenv lock - @pipenv install --dev - @pipenv run pre-commit install + @poetry lock + @poetry install + @poetry run pre-commit install @pre-commit autoupdate migrate: ## Make and run migrations - @pipenv run python manage.py makemigrations - @pipenv run python manage.py migrate - @pipenv run python manage.py collectstatic --noinput + @poetry run python manage.py makemigrations + @poetry run python manage.py migrate + @poetry run python manage.py collectstatic --noinput .PHONY: test test: ## Run tests - @pipenv run skjold -v audit Pipfile.lock - @pipenv run python manage.py test --verbosity=0 --parallel --failfast + @poetry run skjold -v audit Pipfile.lock + @poetry run python manage.py test --verbosity=0 --parallel --failfast .PHONY: run run: ## Run the Django server - @pipenv run python manage.py runserver + @poetry 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 b8c3ec9..906331a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -15,9 +15,23 @@ exclude = ''' )/ ''' -[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. +[tool.flake8] +# Check that this is aligned with your other tools like Black +max-line-length = 120 +max-complexity = 18 +exclude = [".git", "*migrations*", ".tox", ".venv"] +# Use extend-ignore to add to already ignored checks which are anti-patterns like W503. +extend-ignore = ["E501", "W503", "F403", "C901", "B904"] + + +[tool.poetry.dependencies] +python = "^3.12" +django = "*" + +[tool.poetry.group.dev.dependencies] +pylint = "*" +pylint-django = "*" +flake8 = "*" +pre-commit = "*" +skjold = "*" +flake8-pyproject = "*"