From cf04f689a55d96df96b3f84fb9e957d262ab38b3 Mon Sep 17 00:00:00 2001 From: FusRoman Date: Wed, 31 Aug 2022 13:17:03 +0000 Subject: [PATCH] pep8 requirements --- .flake8 | 4 +++- fink_grb/init.py | 2 ++ fink_grb/online/gcn_stream.py | 2 -- fink_grb/online/ztf_join_gcn.py | 10 +++++----- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/.flake8 b/.flake8 index b869b4cae..095dcf23a 100644 --- a/.flake8 +++ b/.flake8 @@ -8,4 +8,6 @@ exclude = docs/source/conf.py, old, build, - dist \ No newline at end of file + dist +per-file-ignores = + ../Fink_GRB/fink_grb/online/ztf_join_gcn.py:W503 \ No newline at end of file diff --git a/fink_grb/init.py b/fink_grb/init.py index f7567e283..1fa285250 100644 --- a/fink_grb/init.py +++ b/fink_grb/init.py @@ -3,6 +3,8 @@ from importlib.resources import files import logging +from fink_grb import __name__ + def init_fink_grb(arguments): """ diff --git a/fink_grb/online/gcn_stream.py b/fink_grb/online/gcn_stream.py index 106269ff1..87c99f18d 100644 --- a/fink_grb/online/gcn_stream.py +++ b/fink_grb/online/gcn_stream.py @@ -11,8 +11,6 @@ import fink_grb.online.gcn_reader as gr from fink_grb.init import get_config, init_logging -from fink_grb import __name__ - def signal_handler(signal, frame): """ diff --git a/fink_grb/online/ztf_join_gcn.py b/fink_grb/online/ztf_join_gcn.py index be3e67d4a..a5ec12cd1 100644 --- a/fink_grb/online/ztf_join_gcn.py +++ b/fink_grb/online/ztf_join_gcn.py @@ -7,7 +7,7 @@ from astropy.time import Time from pyspark.sql import functions as F -from pyspark.sql.functions import pandas_udf, current_timestamp, expr, col +from pyspark.sql.functions import pandas_udf from pyspark.sql.types import DoubleType from fink_broker.sparkUtils import init_sparksession, connect_to_raw_database @@ -90,7 +90,7 @@ def ztf_join_gcn_stream(arguments): config = get_config(arguments) logger = init_logging() - spark = init_sparksession("fink_grb") + _ = init_sparksession("fink_grb") NSIDE = 4 @@ -98,9 +98,9 @@ def ztf_join_gcn_stream(arguments): exit_after = arguments["--exit_after"] ztf_datapath_prefix = config["PATH"]["online_ztf_data_prefix"] - ztf_rawdatapath = ztf_datapath_prefix + '/raw' - scitmpdatapath = ztf_datapath_prefix + '/science' - checkpointpath_sci_tmp = ztf_datapath_prefix + '/science_checkpoint' + ztf_rawdatapath = ztf_datapath_prefix + "/raw" + scitmpdatapath = ztf_datapath_prefix + "/science" + checkpointpath_sci_tmp = ztf_datapath_prefix + "/science_checkpoint" df_ztf_stream = connect_to_raw_database( ztf_rawdatapath