about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorBruno BELANYI <bruno@belanyi.fr>2024-04-10 15:15:46 +0100
committerGitHub <noreply@github.com>2024-04-10 15:15:46 +0100
commit9a017de7c781238813f10b8e01c1707475868246 (patch)
treef12079a3f32c3c2b683a7d2af2e96a7d13d639a1 /pkgs/applications
parent152a0677dcaddc654389149671766cd1cff725e5 (diff)
parent0b854fe73926b31f1f14c7d7bdffd6377887b7e7 (diff)
Merge pull request #302129 from sinavir/update_tandoor_recipes
tandoor-recipes: 1.5.12 -> 1.5.16
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/misc/tandoor-recipes/common.nix6
-rw-r--r--pkgs/applications/misc/tandoor-recipes/default.nix19
-rw-r--r--pkgs/applications/misc/tandoor-recipes/pytest-xdist.patch12
3 files changed, 27 insertions, 10 deletions
diff --git a/pkgs/applications/misc/tandoor-recipes/common.nix b/pkgs/applications/misc/tandoor-recipes/common.nix
index 8461ed816eb9a..7b0c1f3897d4a 100644
--- a/pkgs/applications/misc/tandoor-recipes/common.nix
+++ b/pkgs/applications/misc/tandoor-recipes/common.nix
@@ -1,15 +1,15 @@
 { lib, fetchFromGitHub }:
 rec {
-  version = "1.5.12";
+  version = "1.5.16";
 
   src = fetchFromGitHub {
     owner = "TandoorRecipes";
     repo = "recipes";
     rev = version;
-    hash = "sha256-5UslXRoiq9cipGCOiqpf+rv7OPTsW4qpVTjakNeg4ug=";
+    hash = "sha256-A5cPO3uybTmAV8zWY90S9vtU/tLgbh1Iqhi+ty0RLhM=";
   };
 
-  yarnHash = "sha256-CresovsRh+dLHGnv49fCi/i66QXOS3SnzfFNvkVUfd8=";
+  yarnHash = "sha256-OAgVaXWTVlKqIgDgKNT1MWN3dYzTqrAGgNAnXLDHE+I=";
 
   meta = with lib; {
     homepage = "https://tandoor.dev/";
diff --git a/pkgs/applications/misc/tandoor-recipes/default.nix b/pkgs/applications/misc/tandoor-recipes/default.nix
index dc36156ff4a1b..dbf5500494c45 100644
--- a/pkgs/applications/misc/tandoor-recipes/default.nix
+++ b/pkgs/applications/misc/tandoor-recipes/default.nix
@@ -32,15 +32,15 @@ python.pkgs.pythonPackages.buildPythonPackage rec {
   format = "other";
 
   patches = [
-    # Allow setting MEDIA_ROOT through environment variable
-    # https://github.com/TandoorRecipes/recipes/pull/2931
-    (fetchpatch {
-      url = "https://github.com/TandoorRecipes/recipes/commit/abf981792057481f1d5b7473eb1090b3901ef8fa.patch";
-      hash = "sha256-3AFf0K/BpVwPQ2NGLUsefj6HvW7ej3szd3WaxFoqMiQ=";
-    })
+    ./pytest-xdist.patch # adapt pytest.ini the use $NIX_BUILD_CORES
   ];
 
+  postPatch = ''
+    substituteInPlace pytest.ini --subst-var NIX_BUILD_CORES
+  '';
+
   propagatedBuildInputs = with python.pkgs; [
+    aiohttp
     beautifulsoup4
     bleach
     bleach-allowlist
@@ -50,7 +50,6 @@ python.pkgs.pythonPackages.buildPythonPackage rec {
     django-allauth
     django-annoying
     django-auth-ldap
-    django-autocomplete-light
     django-cleanup
     django-cors-headers
     django-crispy-forms
@@ -132,15 +131,21 @@ python.pkgs.pythonPackages.buildPythonPackage rec {
   '';
 
   nativeCheckInputs = with python.pkgs; [
+    mock
     pytestCheckHook
+    pytest-asyncio
+    pytest-cov
     pytest-django
     pytest-factoryboy
+    pytest-html
+    pytest-xdist
   ];
 
   # flaky
   disabledTests = [
     "test_search_count"
     "test_url_import_regex_replace"
+    "test_delete"
   ];
 
   passthru = {
diff --git a/pkgs/applications/misc/tandoor-recipes/pytest-xdist.patch b/pkgs/applications/misc/tandoor-recipes/pytest-xdist.patch
new file mode 100644
index 0000000000000..39b5acf00dea4
--- /dev/null
+++ b/pkgs/applications/misc/tandoor-recipes/pytest-xdist.patch
@@ -0,0 +1,12 @@
+diff --git a/pytest.ini b/pytest.ini
+index a3d26ec4..8bdf12fb 100644
+--- a/pytest.ini
++++ b/pytest.ini
+@@ -3,5 +3,5 @@ DJANGO_SETTINGS_MODULE = recipes.test_settings
+ testpaths = cookbook/tests
+ python_files = tests.py test_*.py *_tests.py
+ # uncomment to run coverage reports
+-addopts = -n auto --cov=. --cov-report=html:docs/reports/coverage --cov-report=xml:docs/reports/coverage/coverage.xml --junitxml=docs/reports/tests/pytest.xml --html=docs/reports/tests/tests.html
++addopts = -n @NIX_BUILD_CORES@ --cov=. --cov-report=html:docs/reports/coverage --cov-report=xml:docs/reports/coverage/coverage.xml --junitxml=docs/reports/tests/pytest.xml --html=docs/reports/tests/tests.html
+ # addopts = -n auto --junitxml=docs/reports/tests/pytest.xml --html=docs/reports/tests/tests.html
+\ No newline at end of file