py-lightning-uq-box: add v0.2.0 (#48305)

This commit is contained in:
Adam J. Stewart 2025-01-13 12:22:04 +01:00 committed by GitHub
parent 1022527923
commit 04baad90f5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 51 additions and 1 deletions

View File

@ -13,6 +13,7 @@ class PyHydraCore(PythonPackage):
license("MIT")
version("1.3.2", sha256="8a878ed67216997c3e9d88a8e72e7b4767e81af37afb4ea3334b269a4390a824")
version("1.3.1", sha256="8dd42d551befc43dfca0c612cbd58c4f3e273dbd97a87214c1a030ba557d238b")
depends_on("py-setuptools", type="build")

View File

@ -9,15 +9,18 @@ class PyLightningUqBox(PythonPackage):
"""Lighning-UQ-Box: A toolbox for uncertainty quantification in deep learning."""
homepage = "https://github.com/lightning-uq-box/lightning-uq-box"
pypi = "lightning-uq-box/lightning-uq-box-0.1.0.tar.gz"
pypi = "lightning-uq-box/lightning_uq_box-0.1.0.tar.gz"
git = "https://github.com/lightning-uq-box/lightning-uq-box.git"
license("Apache-2.0")
maintainers("nilsleh", "adamjstewart")
version("main", branch="main")
version("0.2.0", sha256="97d994ac5ecdfc5a31e8d256b827115664d615a7623a1eea024754a8d7c3187e")
version("0.1.0", sha256="ce44860db75b4fbe487a009bee91c886be2e1835edee93479a6a8633ef2152b1")
variant("tests", default=False, description="Build test dependencies")
depends_on("py-setuptools@61:", type="build")
with default_args(type=("build", "run")):
@ -44,3 +47,21 @@ class PyLightningUqBox(PythonPackage):
depends_on("py-torchseg@0.0.1:")
depends_on("py-h5py@3.12.1:", when="@0.2:")
depends_on("py-ema-pytorch@0.7:", when="@0.2:")
with default_args(type="run"):
with when("+tests"):
depends_on("py-pytest@7.3:")
depends_on("py-pytest-cov@4:")
depends_on("py-pytest-lazy-fixture@0.6:")
depends_on("py-hydra-core@1.3.2:")
depends_on("py-omegaconf@2.3:")
depends_on("py-jsonargparse@4.28:+signatures")
depends_on("py-ruff@0.2:")
def url_for_version(self, version):
url = "https://files.pythonhosted.org/packages/source/l/lightning-uq-box/{}-{}.tar.gz"
if version >= Version("0.2.0"):
name = "lightning_uq_box"
else:
name = "lightning-uq-box"
return url.format(name, version)

View File

@ -0,0 +1,22 @@
# Copyright Spack Project Developers. See COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class PyPytestLazyFixture(PythonPackage):
"""It helps to use fixtures in pytest.mark.parametrize."""
homepage = "https://github.com/tvorog/pytest-lazy-fixture"
pypi = "pytest-lazy-fixture/pytest-lazy-fixture-0.6.3.tar.gz"
license("MIT")
version("0.6.3", sha256="0e7d0c7f74ba33e6e80905e9bfd81f9d15ef9a790de97993e34213deb5ad10ac")
depends_on("py-setuptools", type="build")
depends_on("py-pytest@3.2.5:", type=("build", "run"))
# https://github.com/TvoroG/pytest-lazy-fixture/issues/65
depends_on("py-pytest@:7", type=("build", "run"))

View File

@ -13,12 +13,18 @@ class PyUnfoldnd(PythonPackage):
license("MIT")
version("0.2.3", sha256="f5b5121d05dafdd70e873ac64a3ecdadfc4c0e8840a0facc86986ede664ab188")
version("0.2.2", sha256="e8fdffeb68bc1b393ddc1b1c87056e0e4616db992e95c7dbc3dc90d564599397")
# https://github.com/f-dangel/unfoldNd/pull/39
depends_on("python@:3.11", when="@0.2.2", type=("build", "run"))
with default_args(type="build"):
depends_on("py-packaging", when="@0.2.3:")
depends_on("py-setuptools@38.3:")
depends_on("py-setuptools-scm")
with default_args(type=("build", "run")):
depends_on("py-packaging", when="@0.2.3:")
depends_on("py-torch")
depends_on("py-numpy")