Merge pull request #64692 from costrouc/python-starfish-init

pythonPackages.starfish: init at 0.1.3
This commit is contained in:
worldofpeace 2019-07-16 18:00:49 -04:00 committed by GitHub
commit 568395c28f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 391 additions and 0 deletions

View File

@ -0,0 +1,32 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytest
}:
buildPythonPackage rec {
pname = "asciitree";
version = "0.3.3";
src = fetchFromGitHub {
owner = "mbr";
repo = pname;
rev = version;
sha256 = "071wlpyi8pa262sj9xdy0zbj163z84dasxad363z3sfndqxw78h1";
};
checkInputs = [
pytest
];
checkPhase = ''
pytest
'';
meta = with lib; {
description = "Draws ASCII trees";
homepage = https://github.com/mbr/asciitree;
license = licenses.mit;
maintainers = [ maintainers.costrouc ];
};
}

View File

@ -0,0 +1,26 @@
{ lib
, buildPythonPackage
, fetchPypi
, tox
}:
buildPythonPackage rec {
pname = "diskcache";
version = "4.0.0";
src = fetchPypi {
inherit pname version;
sha256 = "7c20b58ed07d03bbfba793f823d1fc27a61e590371fe6011fa1319a25c028cd1";
};
checkInputs = [
tox
];
meta = with lib; {
description = "Disk and file backed persistent cache";
homepage = https://www.grantjenks.com/docs/diskcache/;
license = licenses.asl20;
maintainers = [ maintainers.costrouc ];
};
}

View File

@ -0,0 +1,41 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, numpy
, scipy
, matplotlib
, pytest
}:
buildPythonPackage rec {
pname = "regional";
version = "1.1.2";
src = fetchFromGitHub {
owner = "freeman-lab";
repo = pname;
rev = "e3a29c58982e5cd3d5700131ac96e5e0b84fb981"; # no tags in repo
sha256 = "03qgm35q9sa5cy0kkw4bj60zfylw0isfzb96nlhdfrsigzs2zkxv";
};
propagatedBuildInputs = [
numpy
scipy
matplotlib
];
checkInputs = [
pytest
];
checkPhase = ''
pytest
'';
meta = with lib; {
description = "Simple manipualtion and display of spatial regions";
homepage = https://github.com/freeman-lab/regional;
license = licenses.mit;
maintainers = [ maintainers.costrouc ];
};
}

View File

@ -0,0 +1,39 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, numpy
, matplotlib
, pytest
}:
buildPythonPackage rec {
pname = "showit";
version = "1.1.4";
src = fetchFromGitHub {
owner = "freeman-lab";
repo = pname;
rev = "ef76425797c71fbe3795b4302c49ab5be6b0bacb"; # no tags in repo
sha256 = "0xd8isrlwwxlgji90lly1sq4l2a37rqvhsmyhv7bd3aj1dyjmdr6";
};
propagatedBuildInputs = [
numpy
matplotlib
];
checkInputs = [
pytest
];
checkPhase = ''
pytest test
'';
meta = with lib; {
description = "simple and sensible display of images";
homepage = https://github.com/freeman-lab/showit;
license = licenses.mit;
maintainers = [ maintainers.costrouc ];
};
}

View File

@ -0,0 +1,50 @@
{ lib
, buildPythonPackage
, fetchPypi
, boto3
, diskcache
, enum34
, packaging
, pathlib
, numpy
, requests
, scikitimage
, six
, pytest
, isPy27
}:
buildPythonPackage rec {
pname = "slicedimage";
version = "3.2.0";
src = fetchPypi {
inherit pname version;
sha256 = "adab09457e22465f05998fdcf8ea14179185f8e780a4021526ba163dd476cd02";
};
propagatedBuildInputs = [
boto3
diskcache
packaging
numpy
requests
scikitimage
six
] ++ lib.optionals isPy27 [ pathlib enum34 ];
checkInputs = [
pytest
];
checkPhase = ''
pytest
'';
meta = with lib; {
description = "Library to access sliced imaging data";
homepage = https://github.com/spacetx/slicedimage;
license = licenses.mit;
maintainers = [ maintainers.costrouc ];
};
}

View File

@ -0,0 +1,89 @@
{ lib
, buildPythonPackage
, fetchPypi
, click
, dataclasses
, jsonschema
, matplotlib
, numpy
, pandas
, regional
, semantic-version
, scikitimage
, scikitlearn
, scipy
, showit
, slicedimage
, sympy
, tqdm
, trackpy
, validators
, xarray
, ipywidgets
, pytest
, pythonOlder
}:
buildPythonPackage rec {
pname = "starfish";
version = "0.1.3";
src = fetchPypi {
inherit pname version;
sha256 = "19bec2a869affbca0a7e3fc0aee1b9978ff7f0f1a2a8551c2d4ae148a7ddc251";
};
propagatedBuildInputs = [
click
jsonschema
matplotlib
numpy
pandas
regional
semantic-version
scikitimage
scikitlearn
scipy
showit
slicedimage
sympy
tqdm
trackpy
validators
xarray
ipywidgets
] ++ lib.optionals (pythonOlder "3.7") [ dataclasses ];
checkInputs = [
pytest
];
postConfigure = ''
substituteInPlace REQUIREMENTS.txt \
--replace "slicedimage==3.1.1" "slicedimage"
'';
checkPhase = ''
# a few tests < 5% require
rm -rf starfish/test/full_pipelines/*
pytest starfish \
--ignore starfish/core/config/test/test_config.py \
--ignore starfish/core/experiment/builder/test/test_build.py \
--ignore starfish/core/experiment/test/test_experiment.py \
--ignore starfish/core/image/_filter/test/test_reduce.py \
--ignore starfish/core/image/_registration/_apply_transform/test/test_warp.py \
--ignore starfish/core/image/_registration/_learn_transform/test/test_translation.py \
--ignore starfish/core/image/_registration/test/test_transforms_list.py \
--ignore starfish/core/imagestack/test/test_max_proj.py \
--ignore starfish/core/recipe/test/test_recipe.py \
--ignore starfish/core/recipe/test/test_runnable.py \
--ignore starfish/core/test/test_profiler.py
'';
meta = with lib; {
description = "Pipelines and pipeline components for the analysis of image-based transcriptomics data";
homepage = https://spacetx-starfish.readthedocs.io/en/latest/;
license = licenses.mit;
maintainers = [ maintainers.costrouc ];
};
}

View File

@ -0,0 +1,57 @@
{ stdenv
, buildPythonPackage
, fetchFromGitHub
, numpy
, scipy
, six
, pandas
, pyyaml
, matplotlib
, pytest
}:
buildPythonPackage rec {
pname = "trackpy";
version = "0.4.1";
src = fetchFromGitHub {
owner = "soft-matter";
repo = pname;
rev = "v${version}";
sha256 = "01fdv93f6z16gypmvqnlbjmcih7dmr7a63n5w9swmp11x3if4iyq";
};
propagatedBuildInputs = [
numpy
scipy
six
pandas
pyyaml
matplotlib
];
checkInputs = [
pytest
];
checkPhase = ''
${stdenv.lib.optionalString (stdenv.isDarwin) ''
# specifically needed for darwin
export HOME=$(mktemp -d)
mkdir -p $HOME/.matplotlib
echo "backend: ps" > $HOME/.matplotlib/matplotlibrc
''}
pytest trackpy --ignore trackpy/tests/test_motion.py \
--ignore trackpy/tests/test_feature_saving.py \
--ignore trackpy/tests/test_feature.py \
--ignore trackpy/tests/test_legacy_linking.py
'';
meta = with stdenv.lib; {
description = "Particle-tracking toolkit";
homepage = https://github.com/soft-matter/trackpy;
license = licenses.bsd3;
maintainers = [ maintainers.costrouc ];
};
}

View File

@ -0,0 +1,41 @@
{ lib
, buildPythonPackage
, fetchPypi
, six
, decorator
, pytest
, isort
, flake8
}:
buildPythonPackage rec {
pname = "validators";
version = "0.13.0";
src = fetchPypi {
inherit pname version;
sha256 = "ea9bf8bf22aa692c205e12830d90b3b93950e5122d22bed9eb2f2fece0bba298";
};
propagatedBuildInputs = [
six
decorator
];
checkInputs = [
pytest
flake8
isort
];
checkPhase = ''
pytest
'';
meta = with lib; {
description = "Python Data Validation for Humans";
homepage = https://github.com/kvesteri/validators;
license = licenses.bsd3;
maintainers = [ maintainers.costrouc ];
};
}

View File

@ -177,6 +177,8 @@ in {
asciimatics = callPackage ../development/python-modules/asciimatics { };
asciitree = callPackage ../development/python-modules/asciitree { };
ase = callPackage ../development/python-modules/ase { };
asn1crypto = callPackage ../development/python-modules/asn1crypto { };
@ -957,6 +959,8 @@ in {
slackclient = callPackage ../development/python-modules/slackclient { };
slicedimage = callPackage ../development/python-modules/slicedimage { };
slicerator = callPackage ../development/python-modules/slicerator { };
slither-analyzer = callPackage ../development/python-modules/slither-analyzer { };
@ -2459,6 +2463,8 @@ in {
regex = callPackage ../development/python-modules/regex { };
regional = callPackage ../development/python-modules/regional { };
ratelimiter = callPackage ../development/python-modules/ratelimiter { };
pywatchman = callPackage ../development/python-modules/pywatchman { };
@ -2493,6 +2499,8 @@ in {
statsd = callPackage ../development/python-modules/statsd { };
starfish = callPackage ../development/python-modules/starfish { };
multi_key_dict = callPackage ../development/python-modules/multi_key_dict { };
random2 = callPackage ../development/python-modules/random2 { };
@ -2511,6 +2519,8 @@ in {
zope_deprecation = callPackage ../development/python-modules/zope_deprecation { };
validators = callPackage ../development/python-modules/validators { };
validictory = callPackage ../development/python-modules/validictory { };
validate-email = callPackage ../development/python-modules/validate-email { };
@ -4459,6 +4469,8 @@ in {
should-dsl = callPackage ../development/python-modules/should-dsl { };
showit = callPackage ../development/python-modules/showit { };
simplejson = callPackage ../development/python-modules/simplejson { };
simplekml = callPackage ../development/python-modules/simplekml { };
@ -4978,6 +4990,8 @@ in {
traceback2 = callPackage ../development/python-modules/traceback2 { };
trackpy = callPackage ../development/python-modules/trackpy { };
linecache2 = callPackage ../development/python-modules/linecache2 { };
upass = callPackage ../development/python-modules/upass { };
@ -5611,6 +5625,8 @@ in {
node-semver = callPackage ../development/python-modules/node-semver { };
diskcache = callPackage ../development/python-modules/diskcache { };
distro = callPackage ../development/python-modules/distro { };
bz2file = callPackage ../development/python-modules/bz2file { };