update dev deps

This commit is contained in:
Abel Luck 2024-04-17 10:43:19 +02:00
parent 90b54a601e
commit 4ab05c9000
3 changed files with 1586 additions and 3 deletions

1527
poetry.lock generated Normal file

File diff suppressed because it is too large Load diff

View file

@ -8,8 +8,56 @@ packages = [{include = "republisher", from = "src"}]
[tool.poetry.dependencies]
python = "^3.11"
scrapy = "^2.11.1"
prometheus-client = "^0.20.0"
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.dev-dependencies]
pytest = "^8.1.1"
black = "^24.4.0"
flake8 = "^7.0.0"
mypy = "^1.9.0"
bandit = "^1.7.8"
types-PyYAML = "^6.0.12.20240311"
isort = "^5.13.2"
flake8-black = "^0.3.6"
[tool.isort]
py_version = 310
profile = "black"
src_paths = ["src", "tests"]
[tool.black]
line-length = 88
target-version = ['py310']
[tool.mypy]
files = "gm,tests"
ignore_missing_imports = true
follow_imports = "normal"
# Ensure full coverage
disallow_untyped_calls = true
#disallow_untyped_defs = true
#disallow_incomplete_defs = true
#disallow_untyped_decorators = true
#check_untyped_defs = true
# Restrict dynamic typing
disallow_any_generics = true
disallow_subclassing_any = true
warn_return_any = true
# Know exactly what you're doing
warn_redundant_casts = true
warn_unused_ignores = true
warn_unused_configs = true
warn_unreachable = true
show_error_codes = true
# Explicit is better than implici
no_implicit_optional = true

View file

@ -1,10 +1,16 @@
{ system ? "x86_64-linux", pkgs ? import <nixpkgs> { inherit system; } }:
{ system ? "x86_64-linux", pkgs ? import <nixpkgs> { inherit system; }, dev ? true, }:
let
pyCurrent = pkgs.python311;
poetryExtras = if dev then ["dev"] else [];
poetryInstallExtras = (
if poetryExtras == [] then ""
else pkgs.lib.concatStrings [ " --with=" (pkgs.lib.concatStringsSep "," poetryExtras) ]
);
packages = [
pkgs.python311
pkgs.poetry
pyCurrent
pkgs.zsh
(pkgs.poetry.withPlugins(ps: with ps; [poetry-plugin-up]))
];
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
@ -29,5 +35,7 @@ in
export POETRY_VIRTUALENVS_PATH="${POETRY_VIRTUALENVS_PATH}"
export POETRY_VIRTUALENVS_PREFER_ACTIVE_PYTHON="${POETRY_VIRTUALENVS_PREFER_ACTIVE_PYTHON}"
export PYTHON_KEYRING_BACKEND=keyring.backends.null.Keyring
poetry env use "${pyCurrent}/bin/python"
poetry install -vv --sync${poetryInstallExtras}
'';
}