Compare commits

..

No commits in common. "77512fc73cc890c78864efc7246f10e9e4d2bab7" and "00be7b7ff5bb5f6fab6f4df50c9b5e4122aa970f" have entirely different histories.

12 changed files with 1 additions and 120 deletions

5
.envrc
View file

@ -1,5 +0,0 @@
export PYTHONDEVMODE=1
export VIRTUAL_ENV=.venv
layout python3
export DJANGO_SETTINGS_MODULE=dx.settings
export DJANGO_CONFIGURATION=Local

View file

@ -1,4 +0,0 @@
- repo: https://github.com/peterdemin/pip-compile-multi
rev: v2.6.2
hooks:
- id: pip-compile-multi-verify

View file

@ -1,24 +0,0 @@
default: test
alias tc := test-coverage
alias l := lint
alias lf := lint-fix
alias c := compile-dependencies
test:
# pytest options can be found in pyproject.toml
# look for [tool.pytest.ini_options]
python -m pytest
test-coverage:
# here we allow extra arguments to be passed to pytest
python -m pytest --cov=src --cov-config=pyproject.toml
lint:
ruff check .
lint-fix:
ruff check --fix .
compile-dependencies:
pip-compile-multi

View file

@ -13,16 +13,3 @@ build-backend = "hatchling.build"
[tool.pytest.ini_options]
pythonpath = ["src"]
testpaths = ["tests"]
[tool.coverage.run]
branch = true
data_file = "coverage/.coverage"
source = ["src"]
omit = ["*/migrations/*"]
[tool.coverage.html]
directory = "coverage/htmlcov"
[tool.coverage.report]
skip_empty = true

View file

@ -1,3 +1,2 @@
django-configurations
django>=5.1,<5.2
pip-lock

View file

@ -1,4 +1,4 @@
# SHA1:78e037786a8e05baa81b92ef0373bd8fc1069bd9
# SHA1:e1677d1f2cf78dc26b96c6f8b02f0a0192f1d402
#
# This file is autogenerated by pip-compile-multi
# To update, run:
@ -8,10 +8,6 @@
asgiref==3.8.1
# via django
django==5.1.3
# via
# -r requirements/base.in
# django-configurations
django-configurations==2.5.1
# via -r requirements/base.in
pip-lock==2.12.0
# via -r requirements/base.in

View file

View file

@ -1,39 +0,0 @@
from pathlib import Path
from configurations import Configuration
BASE_DIR = Path(__file__).resolve().parent.parent
class Base(Configuration):
DEBUG = False
DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField"
INSTALLED_APPS = [
"dx",
]
ROOT_URLCONF = "dx.urls"
SECRET_KEY = "django-insecure-cbgvn=orgh$&6l-w91pp2=(b#hjwe1z&ijwiafgt(py1lq5i85"
TEMPLATES = [
{
"BACKEND": "django.template.backends.django.DjangoTemplates",
"DIRS": [BASE_DIR / "templates"],
"APP_DIRS": True,
},
]
USE_TZ = True
class Dev(Base):
# Dangerous: disable host header validation
ALLOWED_HOSTS = ["*"]
DATABASES = {
"default": {
"ENGINE": "django.db.backends.sqlite3",
"NAME": "db.sqlite3",
},
}
DEBUG = True
INSTALLED_APPS = Base.INSTALLED_APPS + ["django_extensions"]
class Local(Dev):
pass

View file

@ -1 +0,0 @@
urlpatterns = []

View file

@ -1,2 +0,0 @@
def dummy():
return (1, 1, 1)

View file

@ -1,18 +0,0 @@
#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
import os
import sys
def main():
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "dx.settings")
os.environ.setdefault("DJANGO_CONFIGURATION", "Base")
from configurations.management import execute_from_command_line
execute_from_command_line(sys.argv)
if __name__ == "__main__":
main()

View file

@ -1,8 +0,0 @@
def test_always_true():
assert True
def test_something_in_src():
from foo import dummy
assert dummy() == (1, 1, 1)