From 46300ff97ef6ce78d9a7e2af99c737ba89032f9f Mon Sep 17 00:00:00 2001 From: Shreyas Singh <125031481+shreyas3156@users.noreply.github.com> Date: Thu, 10 Aug 2023 20:42:40 +0530 Subject: [PATCH] Log the NNDC data source used for parsing (#359) --- carsus/io/nuclear/nndc.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/carsus/io/nuclear/nndc.py b/carsus/io/nuclear/nndc.py index 62285998e..c4beb8e89 100644 --- a/carsus/io/nuclear/nndc.py +++ b/carsus/io/nuclear/nndc.py @@ -1,3 +1,5 @@ +import logging + import pandas as pd from pathlib import Path import subprocess @@ -8,6 +10,8 @@ NNDC_SOURCE_URL = "https://github.com/tardis-sn/carsus-data-nndc" +logger = logging.getLogger(__name__) + class NNDCReader: """ @@ -34,10 +38,13 @@ def __init__(self, dirname=None, remote=False): if dirname is None: if remote: subprocess.run(['git', 'clone', NNDC_SOURCE_URL, DECAY_DATA_SOURCE_DIR]) + logger.info(f"Downloading NNDC decay data from {NNDC_SOURCE_URL}") self.dirname = Path().joinpath(DECAY_DATA_SOURCE_DIR, "csv") else: self.dirname = dirname + logger.info(f"Parsing decay data from: {DECAY_DATA_SOURCE_DIR}/csv") + self._decay_data = None @property