From 56b812de309c1cd3bfb4a0b7ad06b42d7652376f Mon Sep 17 00:00:00 2001 From: FusRoman <46221629+FusRoman@users.noreply.github.com> Date: Tue, 30 Jan 2024 17:26:47 +0100 Subject: [PATCH] Issue/107/pandera import bug (#108) * remove the observatory import leading to a pandera import, spark issue * bump to 0.16.13 * pep8 --- fink_mm/__init__.py | 2 +- fink_mm/utils/fun_utils.py | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/fink_mm/__init__.py b/fink_mm/__init__.py index 338734d1..b2c0f6cf 100644 --- a/fink_mm/__init__.py +++ b/fink_mm/__init__.py @@ -12,6 +12,6 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -__version__ = "0.16.12" +__version__ = "0.16.13" __distribution_schema_version__ = "1.3" __observatory_schema_version__ = "1.1" diff --git a/fink_mm/utils/fun_utils.py b/fink_mm/utils/fun_utils.py index 6dd99302..fc9a3a13 100644 --- a/fink_mm/utils/fun_utils.py +++ b/fink_mm/utils/fun_utils.py @@ -14,11 +14,16 @@ from fink_utils.spark.utils import concat_col from fink_mm.observatory import obsname_to_class, INSTR_FORMAT -from fink_mm.observatory.observatory import Observatory from fink_mm.gcn_stream.gcn_reader import load_voevent_from_file, load_json_from_file from fink_mm.init import init_logging from enum import Enum +# FIXME +# commented due to a chaining import leading to a pandera import +# pandera break the spark jobs by adding the SPARK_LOCAL_IP env variable into the environment +# link to the issue: https://github.com/FusRoman/fink-mm/issues/107#issue-2108208253 +# from fink_mm.observatory.observatory import Observatory + # from fink_broker.tracklet_identification import add_tracklet_information @@ -265,7 +270,7 @@ def sub_compute_rate( return abs_rate, norm_rate, first_variation_time, diff_start_hist, from_upper -def get_observatory(obsname: str, rawEvent: str) -> Observatory: +def get_observatory(obsname: str, rawEvent: str): # -> Observatory """ Get the observatory class from an observatory name and a raw voevent