From ec988a139bea0b9cd3a01f5b0d88659606267eda Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 10 Jan 2021 13:56:16 +0100 Subject: [PATCH] python3Packages.dnachisel: switch to GitHub as source and enable tests --- .../python-modules/dnachisel/default.nix | 35 +++++++++++++++---- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/dnachisel/default.nix b/pkgs/development/python-modules/dnachisel/default.nix index 72d52d82c53..50ba05aca6f 100644 --- a/pkgs/development/python-modules/dnachisel/default.nix +++ b/pkgs/development/python-modules/dnachisel/default.nix @@ -1,21 +1,27 @@ { lib , buildPythonPackage -, fetchPypi +, fetchFromGitHub , biopython , docopt , flametree , numpy , proglog +, pytestCheckHook , python-codon-tables - }: +, primer3 +, genome-collector +, matplotlib +}: buildPythonPackage rec { pname = "dnachisel"; version = "3.2.6"; - src = fetchPypi { - inherit pname version; - sha256 = "1i49cfpvjvf9610gg4jz06dl5clc8vmcpjmhnm2d1j7lhpp1ksbb"; + src = fetchFromGitHub { + owner = "Edinburgh-Genome-Foundry"; + repo = "DnaChisel"; + rev = "v${version}"; + sha256 = "0m88biw7sycjwsmncdybj9n3yf4n9cyvifv9zv7irm8ha3scchji"; }; propagatedBuildInputs = [ @@ -27,9 +33,24 @@ buildPythonPackage rec { python-codon-tables ]; - # no tests in tarball - doCheck = false; + checkInputs = [ + primer3 + genome-collector + matplotlib + pytestCheckHook + ]; + # Disable tests which requires network access + disabledTests = [ + "test_circular_sequence_optimize_with_report" + "test_constraints_reports" + "test_optimize_with_report" + "test_optimize_with_report_no_solution" + "test_avoid_blast_matches_with_list" + "test_avoid_phage_blast_matches" + "test_avoid_matches_with_list" + "test_avoid_matches_with_phage" + ]; pythonImportsCheck = [ "dnachisel" ]; meta = with lib; {