From d891ccb5a839e45e11666ea6d13c353f65c4cd48 Mon Sep 17 00:00:00 2001 From: rdimaio Date: Tue, 12 Nov 2024 14:58:18 +0100 Subject: [PATCH] Import algorithms as part of get_algorithms to avoid circular import --- pyproject.toml | 2 +- src/belleii_rucio_policy_package/__init__.py | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 8e0ccd4..2ddf0bb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "belleii_rucio_policy_package" -version = "0.0.4" +version = "0.0.5" authors = [ { name="Belle II", email="placeholder@placeholder.com" }, ] diff --git a/src/belleii_rucio_policy_package/__init__.py b/src/belleii_rucio_policy_package/__init__.py index 04304ee..24f9b1e 100644 --- a/src/belleii_rucio_policy_package/__init__.py +++ b/src/belleii_rucio_policy_package/__init__.py @@ -1,10 +1,9 @@ -from belleii_rucio_policy_package.non_deterministic_pfn import BelleIINonDeterministicPFNAlgorithm -from belleii_rucio_policy_package.scope import BelleIIScopeExtractionAlgorithm -from belleii_rucio_policy_package.lfn2pfn import BelleIIRSEDeterministicTranslation - SUPPORTED_VERSION = ["35"] # Only use with Rucio >=35.1.0 - pending https://github.com/rucio/rucio/issues/7082 def get_algorithms(): + from belleii_rucio_policy_package.non_deterministic_pfn import BelleIINonDeterministicPFNAlgorithm + from belleii_rucio_policy_package.scope import BelleIIScopeExtractionAlgorithm + from belleii_rucio_policy_package.lfn2pfn import BelleIIRSEDeterministicTranslation return { 'non_deterministic_pfn': { 'belleii_non_deterministic_pfn': BelleIINonDeterministicPFNAlgorithm.construct_non_deterministic_pfn_belleii