Merge pull request #164 from Nebucatnetzer/poetry

Poetry
This commit is contained in:
Andreas Zweili 2023-09-27 20:37:04 +02:00 committed by GitHub
commit d3e8f9e9f5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 80 additions and 245 deletions

8
.envrc
View File

@ -20,6 +20,7 @@ layout_poetry() {
if [[ -d ".venv" ]]; then
VIRTUAL_ENV="$(pwd)/.venv"
poetry install
else
VIRTUAL_ENV=$(
poetry env info --path 2>/dev/null
@ -38,11 +39,10 @@ layout_poetry() {
export VIRTUAL_ENV
}
if ! has nix; then
layout poetry
fi
layout poetry
export PROJECT_DIR=$(pwd)
export WEBPORT=$(($RANDOM + 1100))
export PGPORT=$(($WEBPORT + 100))
watch_file "$PGDATA/postgresql.conf"
watch_file ./dev.sh
watch_file ./pyproject.toml

View File

@ -13,6 +13,8 @@ jobs:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Environment setup
run: nix develop --command bash -c "poetry install"
- name: Test
run: nix develop --command bash -c "dev test"
env:

20
dev.sh
View File

@ -89,7 +89,7 @@ descriptions["venv"]="Build a pseudo venv that editors like VS Code can use."
tasks["venv"]=venv
build-container() {
nix build && docker load <result
nix build && docker load <result && docker run --rm -ti network-inventory:latest
}
descriptions["build-container"]="Build and load OCI container."
tasks["build-container"]=build-container
@ -118,18 +118,21 @@ tasks["debug"]=debug
lint() {
echo "Running pylint"
pylint \
poetry run \
pylint \
--rc-file="$PROJECT_DIR/pyproject.toml" \
-j 0 \
-E "$PROJECT_DIR/src"
echo "Running mypy"
mypy --config-file="$PROJECT_DIR/pyproject.toml" "$PROJECT_DIR/src"
poetry run \
mypy --config-file="$PROJECT_DIR/pyproject.toml" "$PROJECT_DIR/src"
}
descriptions["lint"]="Run the linters against the src directory."
tasks["lint"]=lint
test() {
DJANGO_SETTINGS_MODULE=network_inventory.settings.ram_test pytest \
DJANGO_SETTINGS_MODULE=network_inventory.settings.ram_test poetry run \
pytest \
-nauto \
--nomigrations \
--cov-config="$PROJECT_DIR/.coveragerc" \
@ -139,8 +142,15 @@ test() {
descriptions["test"]="Run the tests in the RAM DB and write a coverage report."
tasks["test"]=test
check() {
lint
test
}
descriptions["check"]="Run lint and test in one session"
tasks["check"]=check
update() {
poetry update --lock
poetry update
}
descriptions["update"]="Update the dependencies."
tasks["update"]=update

View File

@ -18,45 +18,6 @@
"type": "github"
}
},
"flake-utils_2": {
"inputs": {
"systems": "systems_2"
},
"locked": {
"lastModified": 1689068808,
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
},
"nix-github-actions": {
"inputs": {
"nixpkgs": [
"poetry2nix",
"nixpkgs"
]
},
"locked": {
"lastModified": 1688870561,
"narHash": "sha256-4UYkifnPEw1nAzqqPOTL2MvWtm3sNGw1UTYTalkTcGY=",
"owner": "nix-community",
"repo": "nix-github-actions",
"rev": "165b1650b753316aa7f1787f3005a8d2da0f5301",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "nix-github-actions",
"type": "github"
}
},
"nixpkgs": {
"locked": {
"lastModified": 1688918189,
@ -73,33 +34,10 @@
"type": "github"
}
},
"poetry2nix": {
"inputs": {
"flake-utils": "flake-utils_2",
"nix-github-actions": "nix-github-actions",
"nixpkgs": [
"nixpkgs"
]
},
"locked": {
"lastModified": 1693051011,
"narHash": "sha256-HNbuVCS/Fnl1YZOjBk9/MlIem+wM8fvIzTH0CVQrLSQ=",
"owner": "nix-community",
"repo": "poetry2nix",
"rev": "5b3a5151cf212021ff8d424f215fb030e4ff2837",
"type": "github"
},
"original": {
"owner": "nix-community",
"repo": "poetry2nix",
"type": "github"
}
},
"root": {
"inputs": {
"flake-utils": "flake-utils",
"nixpkgs": "nixpkgs",
"poetry2nix": "poetry2nix"
"nixpkgs": "nixpkgs"
}
},
"systems": {
@ -116,21 +54,6 @@
"repo": "default",
"type": "github"
}
},
"systems_2": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
}
},
"root": "root",

110
flake.nix
View File

@ -3,34 +3,12 @@
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
poetry2nix = {
url = "github:nix-community/poetry2nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, flake-utils, poetry2nix }:
{
overlays.default = nixpkgs.lib.composeManyExtensions [
poetry2nix.overlay
(final: prev: rec {
inventoryDevEnv = prev.poetry2nix.mkPoetryEnv
{
projectDir = ./.;
groups = [ "main" "dev" ];
};
inventoryPackage = prev.poetry2nix.mkPoetryApplication {
projectDir = ./.;
groups = [ "main" ];
};
inventoryEnv = inventoryPackage.dependencyEnv;
})
];
} // (flake-utils.lib.eachDefaultSystem (system:
outputs = { self, nixpkgs, flake-utils }:
(flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ self.overlays.default ];
};
inventory = pkgs.stdenv.mkDerivation {
src = ./.;
@ -45,40 +23,29 @@
rec {
devShells.default = pkgs.mkShell {
buildInputs = [
pkgs.inventoryDevEnv
pkgs.poetry
pkgs.python310Packages.pip
pkgs.python310
pkgs.overmind
pkgs.postgresql_15
(pkgs.writeScriptBin "dev" "${builtins.readFile ./dev.sh}")
];
# Put the venv on the repo, so direnv can access it
POETRY_VIRTUALENVS_IN_PROJECT = "true";
# Use python from path, so you can use a different version to the one
# bundled with poetry
POETRY_VIRTUALENVS_PREFER_ACTIVE_PYTHON = "true";
PYTHON_KEYRING_BACKEND = "keyring.backends.fail.Keyring";
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
pkgs.stdenv.cc.cc
# Add any missing library needed You can use the nix-index package
# to locate them, e.g.
# nix-locate -w --top-level --at-root /lib/libudev.so.1
];
shellHook = ''
export DJANGO_SETTINGS_MODULE=network_inventory.settings.local
'';
};
checks = {
tests = pkgs.stdenv.mkDerivation {
dontPatch = true;
dontConfigure = true;
dontBuild = true;
dontInstall = true;
doCheck = true;
name = "test";
src = ./.;
checkInputs = [ pkgs.inventoryDevEnv ];
checkPhase = ''
mkdir -p $out
pytest --ds=network_inventory.settings.ram_test \
-nauto \
--nomigrations \
--cov=./src \
./src
'';
};
};
packages = {
venv = pkgs.inventoryEnv;
container = pkgs.dockerTools.buildImage {
name = "network-inventory";
tag = "latest";
@ -86,38 +53,39 @@
copyToRoot = pkgs.buildEnv {
name = "image-root";
paths = [
inventory
pkgs.bashInteractive
pkgs.coreutils
inventory
pkgs.poetry
(pkgs.writeShellScriptBin "start-inventory" ''
if [ -f .first_run ]; then
sleep 2
${pkgs.inventoryEnv}/bin/django-admin collectstatic --noinput
${pkgs.inventoryEnv}/bin/django-admin makemigrations
${pkgs.inventoryEnv}/bin/django-admin migrate
django-admin collectstatic --noinput
django-admin makemigrations
django-admin migrate
else
${pkgs.inventoryEnv}/bin/django-admin collectstatic --noinput
${pkgs.inventoryEnv}/bin/django-admin makemigrations backups
${pkgs.inventoryEnv}/bin/django-admin makemigrations computers
${pkgs.inventoryEnv}/bin/django-admin makemigrations core
${pkgs.inventoryEnv}/bin/django-admin makemigrations customers
${pkgs.inventoryEnv}/bin/django-admin makemigrations devices
${pkgs.inventoryEnv}/bin/django-admin makemigrations licenses
${pkgs.inventoryEnv}/bin/django-admin makemigrations nets
${pkgs.inventoryEnv}/bin/django-admin makemigrations softwares
${pkgs.inventoryEnv}/bin/django-admin makemigrations users
${pkgs.inventoryEnv}/bin/django-admin makemigrations
${pkgs.inventoryEnv}/bin/django-admin migrate
${pkgs.inventoryEnv}/bin/django-admin loaddata backups
${pkgs.inventoryEnv}/bin/django-admin loaddata computers
${pkgs.inventoryEnv}/bin/django-admin loaddata core
${pkgs.inventoryEnv}/bin/django-admin loaddata devices
${pkgs.inventoryEnv}/bin/django-admin loaddata nets
${pkgs.inventoryEnv}/bin/django-admin loaddata softwares
${pkgs.inventoryEnv}/bin/django-admin shell -c "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('admin', 'admin@example.com', 'password')"
django-admin collectstatic --noinput
django-admin makemigrations backups
django-admin makemigrations computers
django-admin makemigrations core
django-admin makemigrations customers
django-admin makemigrations devices
django-admin makemigrations licenses
django-admin makemigrations nets
django-admin makemigrations softwares
django-admin makemigrations users
django-admin makemigrations
django-admin migrate
django-admin loaddata backups
django-admin loaddata computers
django-admin loaddata core
django-admin loaddata devices
django-admin loaddata nets
django-admin loaddata softwares
django-admin shell -c "from django.contrib.auth import get_user_model; User = get_user_model(); User.objects.create_superuser('admin', 'admin@example.com', 'password')"
touch .first_run
fi
${pkgs.inventoryEnv}/bin/gunicorn network_inventory.wsgi:application --reload --bind 0.0.0.0:8000 --workers 3
gunicorn network_inventory.wsgi:application --reload --bind 0.0.0.0:8000 --workers 3
'')
];
};

97
poetry.lock generated
View File

@ -1,10 +1,9 @@
# This file is automatically @generated by Poetry and should not be changed by hand.
# This file is automatically @generated by Poetry 1.5.1 and should not be changed by hand.
[[package]]
name = "asgiref"
version = "3.7.2"
description = "ASGI specs, helper code, and adapters"
category = "main"
optional = false
python-versions = ">=3.7"
files = [
@ -20,14 +19,13 @@ tests = ["mypy (>=0.800)", "pytest", "pytest-asyncio"]
[[package]]
name = "astroid"
version = "2.15.6"
version = "2.15.8"
description = "An abstract syntax tree for Python with inference support."
category = "dev"
optional = false
python-versions = ">=3.7.2"
files = [
{file = "astroid-2.15.6-py3-none-any.whl", hash = "sha256:389656ca57b6108f939cf5d2f9a2a825a3be50ba9d589670f393236e0a03b91c"},
{file = "astroid-2.15.6.tar.gz", hash = "sha256:903f024859b7c7687d7a7f3a3f73b17301f8e42dfd9cc9df9d4418172d3e2dbd"},
{file = "astroid-2.15.8-py3-none-any.whl", hash = "sha256:1aa149fc5c6589e3d0ece885b4491acd80af4f087baafa3fb5203b113e68cd3c"},
{file = "astroid-2.15.8.tar.gz", hash = "sha256:6c107453dffee9055899705de3c9ead36e74119cee151e5a9aaf7f0b0e020a6a"},
]
[package.dependencies]
@ -42,7 +40,6 @@ wrapt = [
name = "black"
version = "22.12.0"
description = "The uncompromising code formatter."
category = "dev"
optional = false
python-versions = ">=3.7"
files = [
@ -78,7 +75,6 @@ uvloop = ["uvloop (>=0.15.2)"]
name = "click"
version = "8.1.7"
description = "Composable command line interface toolkit"
category = "dev"
optional = false
python-versions = ">=3.7"
files = [
@ -93,7 +89,6 @@ colorama = {version = "*", markers = "platform_system == \"Windows\""}
name = "colorama"
version = "0.4.6"
description = "Cross-platform colored terminal text."
category = "dev"
optional = false
python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7"
files = [
@ -105,7 +100,6 @@ files = [
name = "coverage"
version = "7.3.1"
description = "Code coverage measurement for Python"
category = "dev"
optional = false
python-versions = ">=3.8"
files = [
@ -173,7 +167,6 @@ toml = ["tomli"]
name = "dill"
version = "0.3.7"
description = "serialize all of Python"
category = "dev"
optional = false
python-versions = ">=3.7"
files = [
@ -188,7 +181,6 @@ graph = ["objgraph (>=1.7.2)"]
name = "django"
version = "4.2.5"
description = "A high-level Python web framework that encourages rapid development and clean, pragmatic design."
category = "main"
optional = false
python-versions = ">=3.8"
files = [
@ -209,7 +201,6 @@ bcrypt = ["bcrypt"]
name = "django-crispy-forms"
version = "1.14.0"
description = "Best way to have Django DRY forms"
category = "main"
optional = false
python-versions = ">=3.7"
files = [
@ -221,7 +212,6 @@ files = [
name = "django-filter"
version = "23.3"
description = "Django-filter is a reusable Django application for allowing users to filter querysets dynamically."
category = "main"
optional = false
python-versions = ">=3.7"
files = [
@ -236,7 +226,6 @@ Django = ">=3.2"
name = "django-floppyforms"
version = "1.9.0"
description = "Full control of form rendering in the templates"
category = "main"
optional = false
python-versions = "*"
files = [
@ -248,7 +237,6 @@ files = [
name = "django-guardian"
version = "2.4.0"
description = "Implementation of per object permissions for Django."
category = "main"
optional = false
python-versions = ">=3.5"
files = [
@ -263,7 +251,6 @@ Django = ">=2.2"
name = "django-htmx"
version = "1.16.0"
description = "Extensions for using Django with htmx."
category = "main"
optional = false
python-versions = ">=3.8"
files = [
@ -278,7 +265,6 @@ Django = ">=3.2"
name = "django-model-utils"
version = "4.3.1"
description = "Django model mixins and utilities"
category = "main"
optional = false
python-versions = ">=3.7"
files = [
@ -293,7 +279,6 @@ Django = ">=3.2"
name = "django-nested-admin"
version = "4.0.2"
description = "Django admin classes that allow for nested inlines"
category = "main"
optional = false
python-versions = ">=3.6"
files = [
@ -312,7 +297,6 @@ test = ["Pillow", "dj-database-url", "django-selenosis", "pytest", "pytest-cov",
name = "django-stubs"
version = "4.2.4"
description = "Mypy stubs for Django"
category = "dev"
optional = false
python-versions = ">=3.8"
files = [
@ -330,13 +314,12 @@ types-PyYAML = "*"
typing-extensions = "*"
[package.extras]
compatible-mypy = ["mypy (>=1.5.0,<1.6.0)"]
compatible-mypy = ["mypy (==1.5.*)"]
[[package]]
name = "django-stubs-ext"
version = "4.2.2"
description = "Monkey-patching and extensions for django-stubs"
category = "dev"
optional = false
python-versions = ">=3.8"
files = [
@ -352,7 +335,6 @@ typing-extensions = "*"
name = "django-tables2"
version = "2.5.3"
description = "Table/data-grid framework for Django"
category = "main"
optional = false
python-versions = "*"
files = [
@ -370,7 +352,6 @@ tablib = ["tablib"]
name = "docstring-to-markdown"
version = "0.12"
description = "On the fly conversion of Python docstrings to markdown"
category = "dev"
optional = false
python-versions = ">=3.6"
files = [
@ -382,7 +363,6 @@ files = [
name = "exceptiongroup"
version = "1.1.3"
description = "Backport of PEP 654 (exception groups)"
category = "dev"
optional = false
python-versions = ">=3.7"
files = [
@ -397,7 +377,6 @@ test = ["pytest (>=6)"]
name = "execnet"
version = "2.0.2"
description = "execnet: rapid multi-Python deployment"
category = "dev"
optional = false
python-versions = ">=3.7"
files = [
@ -412,7 +391,6 @@ testing = ["hatch", "pre-commit", "pytest", "tox"]
name = "faker"
version = "12.0.1"
description = "Faker is a Python package that generates fake data for you."
category = "dev"
optional = false
python-versions = ">=3.6"
files = [
@ -427,7 +405,6 @@ python-dateutil = ">=2.4"
name = "gunicorn"
version = "21.2.0"
description = "WSGI HTTP Server for UNIX"
category = "main"
optional = false
python-versions = ">=3.5"
files = [
@ -448,7 +425,6 @@ tornado = ["tornado (>=0.2)"]
name = "importlib-metadata"
version = "6.8.0"
description = "Read metadata from Python packages"
category = "dev"
optional = false
python-versions = ">=3.8"
files = [
@ -468,7 +444,6 @@ testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs
name = "iniconfig"
version = "2.0.0"
description = "brain-dead simple config-ini parsing"
category = "dev"
optional = false
python-versions = ">=3.7"
files = [
@ -480,7 +455,6 @@ files = [
name = "isort"
version = "5.12.0"
description = "A Python utility / library to sort Python imports."
category = "dev"
optional = false
python-versions = ">=3.8.0"
files = [
@ -498,7 +472,6 @@ requirements-deprecated-finder = ["pip-api", "pipreqs"]
name = "jedi"
version = "0.19.0"
description = "An autocompletion tool for Python that can be used for text editors."
category = "dev"
optional = false
python-versions = ">=3.6"
files = [
@ -518,7 +491,6 @@ testing = ["Django (<3.1)", "attrs", "colorama", "docopt", "pytest (<7.0.0)"]
name = "lazy-object-proxy"
version = "1.9.0"
description = "A fast and thorough lazy object proxy."
category = "dev"
optional = false
python-versions = ">=3.7"
files = [
@ -564,7 +536,6 @@ files = [
name = "mccabe"
version = "0.7.0"
description = "McCabe checker, plugin for flake8"
category = "dev"
optional = false
python-versions = ">=3.6"
files = [
@ -576,7 +547,6 @@ files = [
name = "mixer"
version = "7.2.2"
description = "Mixer -- Is a fixtures replacement. Supported Django ORM, SqlAlchemy ORM, Mongoengine ODM and custom python objects."
category = "dev"
optional = false
python-versions = ">=3.7"
files = [
@ -594,7 +564,6 @@ tests = ["Django (>=3.0)", "Flask (>=1.0)", "Marshmallow (>=3.9)", "SQLAlchemy (
name = "mypy"
version = "1.5.1"
description = "Optional static typing for Python"
category = "dev"
optional = false
python-versions = ">=3.8"
files = [
@ -641,7 +610,6 @@ reports = ["lxml"]
name = "mypy-extensions"
version = "1.0.0"
description = "Type system extensions for programs checked with the mypy type checker."
category = "dev"
optional = false
python-versions = ">=3.5"
files = [
@ -653,7 +621,6 @@ files = [
name = "packaging"
version = "23.1"
description = "Core utilities for Python packages"
category = "main"
optional = false
python-versions = ">=3.7"
files = [
@ -665,7 +632,6 @@ files = [
name = "parso"
version = "0.8.3"
description = "A Python Parser"
category = "dev"
optional = false
python-versions = ">=3.6"
files = [
@ -681,7 +647,6 @@ testing = ["docopt", "pytest (<6.0.0)"]
name = "pathspec"
version = "0.11.2"
description = "Utility library for gitignore style pattern matching of file paths."
category = "dev"
optional = false
python-versions = ">=3.7"
files = [
@ -693,7 +658,6 @@ files = [
name = "platformdirs"
version = "3.10.0"
description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"."
category = "dev"
optional = false
python-versions = ">=3.7"
files = [
@ -709,7 +673,6 @@ test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4)", "pytest-co
name = "pluggy"
version = "1.3.0"
description = "plugin and hook calling mechanisms for python"
category = "dev"
optional = false
python-versions = ">=3.8"
files = [
@ -725,7 +688,6 @@ testing = ["pytest", "pytest-benchmark"]
name = "psycopg2-binary"
version = "2.9.7"
description = "psycopg2 - Python-PostgreSQL Database Adapter"
category = "main"
optional = false
python-versions = ">=3.6"
files = [
@ -793,18 +755,17 @@ files = [
[[package]]
name = "pylint"
version = "2.17.5"
version = "2.17.6"
description = "python code static checker"
category = "dev"
optional = false
python-versions = ">=3.7.2"
files = [
{file = "pylint-2.17.5-py3-none-any.whl", hash = "sha256:73995fb8216d3bed149c8d51bba25b2c52a8251a2c8ac846ec668ce38fab5413"},
{file = "pylint-2.17.5.tar.gz", hash = "sha256:f7b601cbc06fef7e62a754e2b41294c2aa31f1cb659624b9a85bcba29eaf8252"},
{file = "pylint-2.17.6-py3-none-any.whl", hash = "sha256:18a1412e873caf8ffb56b760ce1b5643675af23e6173a247b502406b24c716af"},
{file = "pylint-2.17.6.tar.gz", hash = "sha256:be928cce5c76bf9acdc65ad01447a1e0b1a7bccffc609fb7fc40f2513045bd05"},
]
[package.dependencies]
astroid = ">=2.15.6,<=2.17.0-dev0"
astroid = ">=2.15.7,<=2.17.0-dev0"
colorama = {version = ">=0.4.5", markers = "sys_platform == \"win32\""}
dill = [
{version = ">=0.2", markers = "python_version < \"3.11\""},
@ -825,7 +786,6 @@ testutils = ["gitpython (>3)"]
name = "pylint-django"
version = "2.5.3"
description = "A Pylint plugin to help Pylint understand the Django web framework"
category = "dev"
optional = false
python-versions = "*"
files = [
@ -845,7 +805,6 @@ with-django = ["Django"]
name = "pylint-plugin-utils"
version = "0.8.2"
description = "Utilities and helpers for writing Pylint plugins"
category = "dev"
optional = false
python-versions = ">=3.7,<4.0"
files = [
@ -860,7 +819,6 @@ pylint = ">=1.7"
name = "pytest"
version = "7.4.2"
description = "pytest: simple powerful testing with Python"
category = "dev"
optional = false
python-versions = ">=3.7"
files = [
@ -883,7 +841,6 @@ testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "no
name = "pytest-cov"
version = "4.1.0"
description = "Pytest plugin for measuring coverage."
category = "dev"
optional = false
python-versions = ">=3.7"
files = [
@ -902,7 +859,6 @@ testing = ["fields", "hunter", "process-tests", "pytest-xdist", "six", "virtuale
name = "pytest-django"
version = "4.5.2"
description = "A Django plugin for pytest."
category = "dev"
optional = false
python-versions = ">=3.5"
files = [
@ -921,7 +877,6 @@ testing = ["Django", "django-configurations (>=2.0)"]
name = "pytest-xdist"
version = "3.3.1"
description = "pytest xdist plugin for distributed testing, most importantly across multiple CPUs"
category = "dev"
optional = false
python-versions = ">=3.7"
files = [
@ -942,7 +897,6 @@ testing = ["filelock"]
name = "python-dateutil"
version = "2.8.2"
description = "Extensions to the standard Python datetime module"
category = "dev"
optional = false
python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7"
files = [
@ -955,14 +909,13 @@ six = ">=1.5"
[[package]]
name = "python-lsp-jsonrpc"
version = "1.1.1"
version = "1.1.2"
description = "JSON RPC 2.0 server library"
category = "dev"
optional = false
python-versions = ">=3.8"
files = [
{file = "python-lsp-jsonrpc-1.1.1.tar.gz", hash = "sha256:05cc914aa5ee2e7f52eb762014ba4996a8cc52459bfddb81fb96c56ace927908"},
{file = "python_lsp_jsonrpc-1.1.1-py3-none-any.whl", hash = "sha256:2bd7771bd5e23ba2edb17101432c5fd680bbacedb8dddeb472a8250ca8d936d6"},
{file = "python-lsp-jsonrpc-1.1.2.tar.gz", hash = "sha256:4688e453eef55cd952bff762c705cedefa12055c0aec17a06f595bcc002cc912"},
{file = "python_lsp_jsonrpc-1.1.2-py3-none-any.whl", hash = "sha256:7339c2e9630ae98903fdaea1ace8c47fba0484983794d6aafd0bd8989be2b03c"},
]
[package.dependencies]
@ -975,7 +928,6 @@ test = ["coverage", "pycodestyle", "pyflakes", "pylint", "pytest", "pytest-cov"]
name = "python-lsp-server"
version = "1.8.0"
description = "Python Language Server for the Language Server Protocol"
category = "dev"
optional = false
python-versions = ">=3.8"
files = [
@ -1009,7 +961,6 @@ yapf = ["whatthepatch (>=1.0.2,<2.0.0)", "yapf (>=0.33.0)"]
name = "python-monkey-business"
version = "1.0.0"
description = "Utility functions for monkey-patching python code"
category = "main"
optional = false
python-versions = "*"
files = [
@ -1024,7 +975,6 @@ six = ">=1.7.0"
name = "pyyaml"
version = "6.0.1"
description = "YAML parser and emitter for Python"
category = "main"
optional = false
python-versions = ">=3.6"
files = [
@ -1084,7 +1034,6 @@ files = [
name = "six"
version = "1.16.0"
description = "Python 2 and 3 compatibility utilities"
category = "main"
optional = false
python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*"
files = [
@ -1096,7 +1045,6 @@ files = [
name = "sqlparse"
version = "0.4.4"
description = "A non-validating SQL parser."
category = "main"
optional = false
python-versions = ">=3.5"
files = [
@ -1113,7 +1061,6 @@ test = ["pytest", "pytest-cov"]
name = "tomli"
version = "2.0.1"
description = "A lil' TOML parser"
category = "dev"
optional = false
python-versions = ">=3.7"
files = [
@ -1125,7 +1072,6 @@ files = [
name = "tomlkit"
version = "0.12.1"
description = "Style preserving TOML library"
category = "dev"
optional = false
python-versions = ">=3.7"
files = [
@ -1135,33 +1081,30 @@ files = [
[[package]]
name = "types-pytz"
version = "2023.3.1.0"
version = "2023.3.1.1"
description = "Typing stubs for pytz"
category = "dev"
optional = false
python-versions = "*"
files = [
{file = "types-pytz-2023.3.1.0.tar.gz", hash = "sha256:8e7d2198cba44a72df7628887c90f68a568e1445f14db64631af50c3cab8c090"},
{file = "types_pytz-2023.3.1.0-py3-none-any.whl", hash = "sha256:a660a38ed86d45970603e4f3b4877c7ba947668386a896fb5d9589c17e7b8407"},
{file = "types-pytz-2023.3.1.1.tar.gz", hash = "sha256:cc23d0192cd49c8f6bba44ee0c81e4586a8f30204970fc0894d209a6b08dab9a"},
{file = "types_pytz-2023.3.1.1-py3-none-any.whl", hash = "sha256:1999a123a3dc0e39a2ef6d19f3f8584211de9e6a77fe7a0259f04a524e90a5cf"},
]
[[package]]
name = "types-pyyaml"
version = "6.0.12.11"
version = "6.0.12.12"
description = "Typing stubs for PyYAML"
category = "dev"
optional = false
python-versions = "*"
files = [
{file = "types-PyYAML-6.0.12.11.tar.gz", hash = "sha256:7d340b19ca28cddfdba438ee638cd4084bde213e501a3978738543e27094775b"},
{file = "types_PyYAML-6.0.12.11-py3-none-any.whl", hash = "sha256:a461508f3096d1d5810ec5ab95d7eeecb651f3a15b71959999988942063bf01d"},
{file = "types-PyYAML-6.0.12.12.tar.gz", hash = "sha256:334373d392fde0fdf95af5c3f1661885fa10c52167b14593eb856289e1855062"},
{file = "types_PyYAML-6.0.12.12-py3-none-any.whl", hash = "sha256:c05bc6c158facb0676674b7f11fe3960db4f389718e19e62bd2b84d6205cfd24"},
]
[[package]]
name = "typing-extensions"
version = "4.8.0"
description = "Backported and Experimental Type Hints for Python 3.8+"
category = "main"
optional = false
python-versions = ">=3.8"
files = [
@ -1173,7 +1116,6 @@ files = [
name = "tzdata"
version = "2023.3"
description = "Provider of IANA time zone data"
category = "main"
optional = false
python-versions = ">=2"
files = [
@ -1185,7 +1127,6 @@ files = [
name = "ujson"
version = "5.8.0"
description = "Ultra fast JSON encoder and decoder for Python"
category = "dev"
optional = false
python-versions = ">=3.8"
files = [
@ -1256,7 +1197,6 @@ files = [
name = "wrapt"
version = "1.15.0"
description = "Module for decorators, wrappers and monkey patching."
category = "dev"
optional = false
python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,>=2.7"
files = [
@ -1341,7 +1281,6 @@ files = [
name = "zipp"
version = "3.17.0"
description = "Backport of pathlib-compatible object wrapper for zip files"
category = "dev"
optional = false
python-versions = ">=3.8"
files = [

View File

@ -7,14 +7,7 @@ import os
from .base import *
ALLOWED_HOSTS = [
"localhost",
"127.0.0.1",
"0.0.0.0",
getfqdn(),
gethostname(),
gethostbyname(gethostname()),
]
ALLOWED_HOSTS = ["*"]
CSRF_TRUSTED_ORIGINS = [
"http://localhost:8000",