From 9b33e3b3d1fc7b5bbd424f71c2543a092a9f77ea Mon Sep 17 00:00:00 2001 From: Jonas Eschle Date: Thu, 7 Nov 2024 18:58:43 -0500 Subject: [PATCH] build: remove the tfpwa dependency explicitly, as it's not on pypi --- .github/workflows/ci.yml | 2 +- pyproject.toml | 3 +-- src/zfit_physics/tfpwa/__init__.py | 4 ++++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 92f95cb..9772f45 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,7 +49,7 @@ jobs: run: | which python python -V - uv pip install -e ".[dev]" + uv pip install -e ".[dev]" tfpwa@git+https://github.com/jiangyi15/tf-pwa uv pip install zfit@git+https://github.com/zfit/zfit - name: Test with pytest run: | diff --git a/pyproject.toml b/pyproject.toml index 2126215..641d659 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -37,7 +37,6 @@ dynamic = ["version"] [project.optional-dependencies] -tfpwa = ["tfpwa@git+https://github.com/jiangyi15/tf-pwa"] compwa = [ "qrules", "ampform", @@ -46,7 +45,7 @@ compwa = [ pyhf = [ "pyhf", ] -all = ["zfit-physics[tfpwa,pyhf,compwa]"] +all = ["zfit-physics[pyhf,compwa]"] test = [ "pytest", "pytest-cov", diff --git a/src/zfit_physics/tfpwa/__init__.py b/src/zfit_physics/tfpwa/__init__.py index c0be90e..605fd55 100644 --- a/src/zfit_physics/tfpwa/__init__.py +++ b/src/zfit_physics/tfpwa/__init__.py @@ -1,3 +1,7 @@ +try: + import tf_pwa +except ImportError: + raise ImportError("tf-pwa is required to use zfit-physics-tfpwa. This can currently only be installed from source, i.e. via `pip install git+https://github.com/jiangyi15/tf-pwa`") from . import loss, variables __all__ = ["loss", "variables"]