From 5b332ca77b4baf74016b9bb3641f7db50c56e20e Mon Sep 17 00:00:00 2001 From: Krzysztof Rusek Date: Thu, 14 Sep 2023 17:35:47 +0200 Subject: [PATCH] Switch hatch --- pyproject.toml | 41 +++++++++++++++++++++++++++-------------- src/gsd/__init__.py | 11 ++++------- 2 files changed, 31 insertions(+), 21 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index fe74bce..ed2b11f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,13 @@ -[tool.poetry] +[build-system] +requires = ["hatchling"] +build-backend = "hatchling.build" + +[project] name = "ref_gsd" -version = "0.0.2" +dynamic = ["version"] description = "Reference implementation of generalised score distribution in python" -authors = ["Krzysztof Rusek "] -license = "Apache License 2.0" +authors = [{ name = "Krzysztof Rusek", email = "krussek@gmail.com" }] +license = {file = "LICENSE"} readme = "README.md" keywords = ["jax", "distribution", "QoE", "test"] @@ -20,17 +24,26 @@ classifiers = [ "Topic :: Scientific/Engineering :: Information Analysis", "Topic :: Scientific/Engineering :: Mathematics", ] +requires-python = ">=3.9" +dependencies=["jax>=0.4.6"] -packages=[{include="gsd", from="src"}] +[project.urls] +Homepage = "https://github.com/krzysztofrusek/queuinx" -[tool.poetry.dependencies] -python = "^3.9" -jax = "^0.4.6" +[tool.hatch.version] +path = "src/gsd/__init__.py" -[tool.poetry.group.dev.dependencies] -pytest = "^7.1.3" -jaxlib = "^0.4.6" +[tool.hatch.build] +sources = ["src"] + +[tool.hatch.build.targets] +include = [ + "/src/*", +] + +[tool.hatch.envs.default] +dependencies=["pytest","jaxlib>=0.4.6"] + +[tool.hatch.envs.default.scripts] +test = "pytest {args:tests}" -[build-system] -requires = ["poetry-core"] -build-backend = "poetry.core.masonry.api" diff --git a/src/gsd/__init__.py b/src/gsd/__init__.py index 48c8423..ece2f7d 100644 --- a/src/gsd/__init__.py +++ b/src/gsd/__init__.py @@ -1,7 +1,4 @@ -from gsd.gsd import ( - log_prob, - sample, - mean, - variance -) -from gsd.ref_prob import gsd_prob \ No newline at end of file +__version__ = '0.0.3' + +from gsd.gsd import (log_prob, sample, mean, variance) +from gsd.ref_prob import gsd_prob