python3Packages.hepdata-lib: init at 0.21.0 (#543620)
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
setuptools,
|
||||
hepdata-validator,
|
||||
root,
|
||||
yoda,
|
||||
pytestCheckHook,
|
||||
coverage,
|
||||
}:
|
||||
|
||||
buildPythonPackage (finalAttrs: {
|
||||
pname = "hepdata-converter";
|
||||
version = "0.3.3";
|
||||
pyproject = true;
|
||||
__structuredAttrs = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "HEPData";
|
||||
repo = "hepdata-converter";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-1aq+7JM/4J5gfnzkYTOdhXoXm8KJEB5xuqLTCeKSBsE=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [
|
||||
hepdata-validator
|
||||
# ROOT and yoda writers are loaded unconditionally at import time.
|
||||
root
|
||||
yoda
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
coverage
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
disabledTestPaths = [
|
||||
# Fails with newer ROOT due to a mismatch in produced histogram names.
|
||||
"hepdata_converter/testsuite/test_rootwriter.py::ROOTWriterTestSuite::test_simple_parse"
|
||||
# yoda in nixpkgs is not built with HDF5 support.
|
||||
"hepdata_converter/testsuite/test_yodawriter.py::YODAWriterTestSuite::test_parse_h5"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "hepdata_converter" ];
|
||||
|
||||
meta = {
|
||||
description = "Library providing means of conversion between oldhepdata format and the new one, and the new one to csv / yoda / root etc";
|
||||
homepage = "https://github.com/HEPData/hepdata-converter";
|
||||
changelog = "https://github.com/HEPData/hepdata-converter/releases/tag/${finalAttrs.version}";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
maintainers = with lib.maintainers; [ veprbl ];
|
||||
mainProgram = "hepdata-converter";
|
||||
};
|
||||
})
|
||||
@@ -0,0 +1,63 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
setuptools,
|
||||
numpy,
|
||||
pyyaml,
|
||||
hist,
|
||||
scipy,
|
||||
hepdata-validator,
|
||||
root,
|
||||
imagemagick,
|
||||
pytestCheckHook,
|
||||
pytest-cov,
|
||||
withRootSupport ? false,
|
||||
}:
|
||||
|
||||
buildPythonPackage (finalAttrs: {
|
||||
pname = "hepdata_lib";
|
||||
version = "0.21.0";
|
||||
pyproject = true;
|
||||
__structuredAttrs = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "HEPData";
|
||||
repo = "hepdata_lib";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-+RoiH0yFfR2dJxstk4JWUHWNk5TQH6fgEl7f78Ej2KI=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [
|
||||
numpy
|
||||
pyyaml
|
||||
hist
|
||||
scipy
|
||||
hepdata-validator
|
||||
]
|
||||
++ lib.optionals withRootSupport [ root ];
|
||||
|
||||
nativeCheckInputs = [
|
||||
(imagemagick.override { ghostscriptSupport = true; })
|
||||
pytest-cov
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
disabledTestMarks = lib.optionals (!withRootSupport) [ "needs_root" ];
|
||||
|
||||
# These execute example Jupyter notebooks via papermill, requiring extra
|
||||
# test-only dependencies (papermill, ipykernel) that are not packaged here.
|
||||
disabledTestPaths = [ "tests/test_notebooks.py" ];
|
||||
|
||||
pythonImportsCheck = [ "hepdata_lib" ];
|
||||
|
||||
meta = {
|
||||
description = "Library for getting your data into HEPData";
|
||||
homepage = "https://github.com/HEPData/hepdata_lib";
|
||||
changelog = "https://github.com/HEPData/hepdata_lib/releases/tag/v${finalAttrs.version}";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ veprbl ];
|
||||
};
|
||||
})
|
||||
@@ -0,0 +1,69 @@
|
||||
{
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchFromGitHub,
|
||||
setuptools,
|
||||
click,
|
||||
jsonschema,
|
||||
packaging,
|
||||
pyyaml,
|
||||
requests,
|
||||
pytestCheckHook,
|
||||
pytest-cov,
|
||||
mock,
|
||||
}:
|
||||
|
||||
buildPythonPackage (finalAttrs: {
|
||||
pname = "hepdata-validator";
|
||||
version = "0.3.6";
|
||||
pyproject = true;
|
||||
__structuredAttrs = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "HEPData";
|
||||
repo = "hepdata-validator";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-Cp5UF6ULnZhebwOuVKImwtz3ceL2iXFyDNH3RQPgpIA=";
|
||||
};
|
||||
|
||||
build-system = [ setuptools ];
|
||||
|
||||
dependencies = [
|
||||
click
|
||||
jsonschema
|
||||
packaging
|
||||
pyyaml
|
||||
requests
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
mock
|
||||
pytest-cov
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
# These tests require network access to download or resolve schemas.
|
||||
disabledTestPaths = [
|
||||
"testsuite/test_schema_downloader.py"
|
||||
"testsuite/test_schema_resolver.py"
|
||||
];
|
||||
|
||||
disabledTests = [
|
||||
# These require network access.
|
||||
"test_valid_schema_with_no_local_copy"
|
||||
"test_valid_submission_dir_remote_schema"
|
||||
"test_valid_submission_dir_remote_schema_no_autoloading"
|
||||
"test_valid_submission_dir_remote_schema_multiple_loads"
|
||||
"test_invalid_remote_schema"
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "hepdata_validator" ];
|
||||
|
||||
meta = {
|
||||
description = "JSON schema and validation code for HEPData submissions";
|
||||
homepage = "https://github.com/HEPData/hepdata-validator";
|
||||
changelog = "https://github.com/HEPData/hepdata-validator/releases/tag/${finalAttrs.version}";
|
||||
license = lib.licenses.gpl2Plus;
|
||||
maintainers = with lib.maintainers; [ veprbl ];
|
||||
};
|
||||
})
|
||||
@@ -7471,6 +7471,12 @@ self: super: with self; {
|
||||
|
||||
helper = callPackage ../development/python-modules/helper { };
|
||||
|
||||
hepdata-converter = callPackage ../development/python-modules/hepdata-converter { };
|
||||
|
||||
hepdata-lib = callPackage ../development/python-modules/hepdata-lib { };
|
||||
|
||||
hepdata-validator = callPackage ../development/python-modules/hepdata-validator { };
|
||||
|
||||
hepmc3 = toPythonModule (pkgs.hepmc3.override { inherit python; });
|
||||
|
||||
hepunits = callPackage ../development/python-modules/hepunits { };
|
||||
|
||||
Reference in New Issue
Block a user