diff --git a/fink_mm/observatory/LVK/LVK.py b/fink_mm/observatory/LVK/LVK.py index 4173e957..e8e411b0 100644 --- a/fink_mm/observatory/LVK/LVK.py +++ b/fink_mm/observatory/LVK/LVK.py @@ -20,7 +20,7 @@ from datetime import datetime -def gcn_from_hdfs(client: InsecureClient, root_path: str, triggerId: str, triggerTime: datetime, gcn_status: str)->pd.DataFrame: +def gcn_from_hdfs(client: InsecureClient, root_path: str, triggerId: str, triggerTime: datetime, gcn_status: str) -> pd.DataFrame: path_date = os.path.join( root_path, f"year={triggerTime.year:04d}/month={triggerTime.month:02d}/day={triggerTime.day:02d}", diff --git a/fink_mm/utils/application.py b/fink_mm/utils/application.py index dde6d260..c927f313 100644 --- a/fink_mm/utils/application.py +++ b/fink_mm/utils/application.py @@ -13,7 +13,9 @@ class Application(Flag): JOIN = auto() DISTRIBUTION = auto() - def build_application(self, logger: LoggerNewLine, data_mode: DataMode = None, **kwargs) -> str: + def build_application( + self, logger: LoggerNewLine, data_mode: DataMode = None, **kwargs + ) -> str: """ Return the command line application diff --git a/fink_mm/utils/fun_utils.py b/fink_mm/utils/fun_utils.py index 192fc1fb..e3f4e1de 100644 --- a/fink_mm/utils/fun_utils.py +++ b/fink_mm/utils/fun_utils.py @@ -345,7 +345,7 @@ def get_association_proba( jdstarthist: pd.Series, hdfs_adress: pd.Series, gcn_status: pd.Series, - root_path: pd.Series + root_path: pd.Series, ) -> pd.Series: """ Compute the association probability between the ztf alerts and the gcn events. @@ -431,7 +431,7 @@ def get_association_proba( z_trigger_time, hdfs_adress=hdfs_adress.values[0], gcn_status=status, - root_path=root + root_path=root, ) for obs, event, z_ra, z_dec, z_trigger_time, status, root in zip( obsname, rawEvent, ztf_ra, ztf_dec, jdstarthist, gcn_status, root_path @@ -726,11 +726,7 @@ def format_rate_results(spark_df, rate_column): ) -def join_post_process( - df_grb: DataFrame, - hdfs_adress: str, - root_path: str -) -> DataFrame: +def join_post_process(df_grb: DataFrame, hdfs_adress: str, root_path: str) -> DataFrame: """ Post processing after the join, used by offline and online @@ -807,7 +803,7 @@ def join_post_process( df_grb["start_vartime"], F.lit(hdfs_adress), df_grb["gcn_status"], - F.lit(root_path) + F.lit(root_path), ), ) diff --git a/fink_mm/ztf_join_gcn.py b/fink_mm/ztf_join_gcn.py index e9685b1f..30734b97 100644 --- a/fink_mm/ztf_join_gcn.py +++ b/fink_mm/ztf_join_gcn.py @@ -321,7 +321,7 @@ def print_logs(): df_join["rb"], df_join["gcn_loc_error"], df_join["p_assoc"], - df_join["rate"] + df_join["rate"], ), )