python312Packages.pandera: init at 0.20.4 (#354391)
This commit is contained in:
@@ -0,0 +1,132 @@
|
||||
{
|
||||
stdenv,
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
setuptools,
|
||||
multimethod,
|
||||
numpy,
|
||||
packaging,
|
||||
pandas,
|
||||
pydantic,
|
||||
typeguard,
|
||||
typing-inspect,
|
||||
wrapt,
|
||||
# test
|
||||
joblib,
|
||||
pyarrow,
|
||||
pytestCheckHook,
|
||||
pytest-asyncio,
|
||||
# optional dependencies
|
||||
black,
|
||||
dask,
|
||||
fastapi,
|
||||
geopandas,
|
||||
hypothesis,
|
||||
pandas-stubs,
|
||||
polars,
|
||||
pyyaml,
|
||||
scipy,
|
||||
shapely,
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "pandera";
|
||||
version = "0.20.4";
|
||||
pyproject = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "unionai-oss";
|
||||
repo = "pandera";
|
||||
tag = "v${version}";
|
||||
hash = "sha256-VetLfZlBWok7Mr1jxlHHjDH/D5xEsPFWQtX/hrvobgQ=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [
|
||||
multimethod
|
||||
numpy
|
||||
packaging
|
||||
pandas
|
||||
pydantic
|
||||
typeguard
|
||||
typing-inspect
|
||||
wrapt
|
||||
];
|
||||
|
||||
optional-dependencies =
|
||||
let
|
||||
dask-dataframe = [ dask ] ++ dask.optional-dependencies.dataframe;
|
||||
extras = {
|
||||
strategies = [ hypothesis ];
|
||||
hypotheses = [ scipy ];
|
||||
io = [
|
||||
pyyaml
|
||||
black
|
||||
#frictionless # not in nixpkgs
|
||||
];
|
||||
# pyspark expression does not define optional-dependencies.connect:
|
||||
#pyspark = [ pyspark ] ++ pyspark.optional-dependencies.connect;
|
||||
# modin not in nixpkgs:
|
||||
#modin = [
|
||||
# modin
|
||||
# ray
|
||||
#] ++ dask-dataframe;
|
||||
#modin-ray = [
|
||||
# modin
|
||||
# ray
|
||||
#];
|
||||
#modin-dask = [
|
||||
# modin
|
||||
#] ++ dask-dataframe;
|
||||
dask = dask-dataframe;
|
||||
mypy = [ pandas-stubs ];
|
||||
fastapi = [ fastapi ];
|
||||
geopandas = [
|
||||
geopandas
|
||||
shapely
|
||||
];
|
||||
polars = [ polars ];
|
||||
};
|
||||
in
|
||||
extras // { all = lib.concatLists (lib.attrValues extras); };
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
pytest-asyncio
|
||||
joblib
|
||||
pyarrow
|
||||
] ++ optional-dependencies.all;
|
||||
|
||||
disabledTestPaths = [
|
||||
"tests/fastapi/test_app.py" # tries to access network
|
||||
"tests/core/test_docs_setting_column_widths.py" # tests doc generation, requires sphinx
|
||||
"tests/modin" # requires modin, not in nixpkgs
|
||||
"tests/mypy/test_static_type_checking.py" # some typing failures
|
||||
"tests/pyspark" # requires spark
|
||||
];
|
||||
|
||||
disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
# OOM error on ofborg:
|
||||
"test_engine_geometry_coerce_crs"
|
||||
# pandera.errors.SchemaError: Error while coercing 'geometry' to type geometry
|
||||
"test_schema_dtype_crs_with_coerce"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [
|
||||
"pandera"
|
||||
"pandera.api"
|
||||
"pandera.config"
|
||||
"pandera.dtypes"
|
||||
"pandera.engines"
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Light-weight, flexible, and expressive statistical data testing library";
|
||||
homepage = "https://pandera.readthedocs.io";
|
||||
changelog = "https://github.com/unionai-oss/pandera/releases/tag/v${version}";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ bcdarwin ];
|
||||
};
|
||||
}
|
||||
@@ -9981,6 +9981,8 @@ self: super: with self; {
|
||||
|
||||
pandas-datareader = callPackage ../development/python-modules/pandas-datareader { };
|
||||
|
||||
pandera = callPackage ../development/python-modules/pandera { };
|
||||
|
||||
pandoc-attributes = callPackage ../development/python-modules/pandoc-attributes { };
|
||||
|
||||
pandoc-latex-environment = callPackage ../development/python-modules/pandoc-latex-environment { };
|
||||
|
||||
Reference in New Issue
Block a user