Tests pour le BDS #816

Open
thubrecht wants to merge 40 commits from thubrecht/bds-tests into master
3 changed files with 20 additions and 12 deletions
Showing only changes of commit 157165a7c9 - Show all commits

View file

@ -3,6 +3,6 @@ django-debug-toolbar
ipython
# Tools
black
black==22.3.0
flake8
isort

View file

@ -1,7 +1,7 @@
-r requirements.txt
# Postgresql bindings
psycopg2<2.8
psycopg2==2.9.*
# Redis
django-redis-cache==3.0.*

View file

@ -1,6 +1,12 @@
{ pkgs ? (import <nixpkgs>) { } }:
{ pkgs ? (import <nixpkgs>) { }, lib ? pkgs.lib }:
let
mkRequirements = file:
builtins.concatStringsSep "\n"
(builtins.filter
(s: !(lib.hasPrefix "-r" s || lib.hasPrefix "#" s || s == ""))
(lib.splitString "\n" (builtins.readFile file)));
pypiDataRev = "2505eb53d85cd727c87611ee4aa35152821a12b2";
pypiDataSha256 = "0nhl0rzlp4fgzxb15pmnq14d0rzcwhvwn40vx7fnk41z9gwxcp4c";
@ -21,17 +27,19 @@ let
python = "python39";
};
requirements = builtins.readFile ./requirements.txt;
requirements = mkRequirements ./requirements.txt;
requirements-dev = ''
django-debug-toolbar
ipython
black==22.3.0
isort
flake8
'';
requirements-prod = mkRequirements ./requirements-prod.txt;
pyEnv = mach-nix.mkPython { requirements = requirements + requirements-dev; };
requirements-dev = mkRequirements ./requirements-devel.txt;
pyEnv = mach-nix.mkPython {
requirements = builtins.concatStringsSep "\n" [
requirements
requirements-dev
requirements-prod
];
};
in
pkgs.mkShell {