Skip to content

Commit

Permalink
python312Packages.nutpie: init at 0.13.2
Browse files Browse the repository at this point in the history
  • Loading branch information
GaetanLepage committed Sep 30, 2024
1 parent 5140208 commit 0161117
Show file tree
Hide file tree
Showing 2 changed files with 95 additions and 0 deletions.
93 changes: 93 additions & 0 deletions pkgs/development/python-modules/nutpie/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
{
lib,
buildPythonPackage,
fetchFromGitHub,
rustPlatform,

# build-system
cargo,
rustc,

# dependencies
arviz,
pandas,
pyarrow,
xarray,

# optional-dependencies
# bridgestan,
jax,
numba,
pymc,

# tests
pytestCheckHook
}:

buildPythonPackage rec {
pname = "nutpie";
version = "0.13.2";
pyproject = true;

src = fetchFromGitHub {
owner = "pymc-devs";
repo = "nutpie";
rev = "refs/tags/v${version}";
hash = "sha256-XyUMCnHm5V7oFaf3W+nGpcHfq1ZFppeGMIMCU5OB87s=";
};

cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-9lM1S42Bmnlb0opstZN2aOKYhBnP87Frq+fQxk0ez+c=";
};

build-system = [
cargo
rustPlatform.bindgenHook
rustPlatform.cargoSetupHook
rustPlatform.maturinBuildHook
rustc
];

dependencies = [
arviz
pandas
pyarrow
xarray
];

# optional-dependencies = {
# all = [
# bridgestan
# jax
# numba
# pymc
# ];
# pymc = [
# numba
# pymc
# ];
# pymc-jax = [
# jax
# pymc
# ];
# stan = [
# bridgestan
# ];
# };
#
pythonImportsCheck = [ "nutpie" ];

nativeCheckInputs = [
pytestCheckHook
];

meta = {
description = "Python wrapper for nuts-rs";
homepage = "https://github.com/pymc-devs/nutpie";
changelog = "https://github.com/pymc-devs/nutpie/blob/${src.rev}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ GaetanLepage ];
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/python-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9077,6 +9077,8 @@ self: super: with self; {

nutils-poly = callPackage ../development/python-modules/nutils-poly { };

nutpie = callPackage ../development/python-modules/nutpie { };

nvchecker = callPackage ../development/python-modules/nvchecker { };

nvdlib = callPackage ../development/python-modules/nvdlib { };
Expand Down

0 comments on commit 0161117

Please sign in to comment.