Skip to content

Commit

Permalink
avoid circular imports
Browse files Browse the repository at this point in the history
  • Loading branch information
mlincett committed Oct 10, 2022
1 parent cdd3ecc commit 3267e68
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions flarestack/data/dataset_index.py
Expand Up @@ -4,6 +4,10 @@
import logging
from typing import List
from flarestack.data import Dataset
from flarestack.data.icecube.gfu import gfu_v002_p04

import flarestack.data.public
import flarestack.data.icecube

logger = logging.getLogger(__name__)

Expand Down Expand Up @@ -61,6 +65,10 @@ def get_dataset_list(self):

dataset_index = DatasetIndex()

# Datasets will in turn import dataset_index and register themselves in the index.
import flarestack.data.public
import flarestack.data.icecube
############################
# Register datasets to index
############################

dataset_index.add_dataset("icecube." + ps_v004_p00.sample_name, ps_v004_p00)
dataset_index.add_dataset("icecube." + nt_v005_p00.sample_name, nt_v005_p00)
dataset_index.add_dataset("icecube." + gfu_v002_p04.sample_name, gfu_v002_p04)

0 comments on commit 3267e68

Please sign in to comment.