Open pannarale opened 4 months ago
I personally like to automatically clean up Python code using
black --skip-string-normalization --line-length 79
This should go a long way in terms of fixing codeclimate issues.
I started this process on pycbc_multi_inspiral
in PR #4710.
new_snr_chisq
in pycbc_pygrb_plot_chisq_veto
returns the chi-square value needed to weight SNR into new SNR. Should it be moved to pycbc/events/coherent.py
or pycbc/events/ranking.py
eventually? It basically inverts get_new_snr
from ranking.py
with the caveat that the chi-square is set to a small non-zero number, when it should be zero, because pycbc_pygrb_plot_chisq_veto
produces log-log plots so we are staying away from zeros. If anyone were to use new_snr_chisq in another context, this could be a problem, but I can always add a keyword argument to get around this. [from issue #4430]
Once a "complete" pygrb workflow has gone through, we need to run pylint or an equivalent on all PyGRB executables, pygrb_plotting_utils.py, pygrb_postprocessing_utils.py, and grb_utils.py and respond to what it raises. And lets remember to make sure there are no unwanted pylal and/or glue traces left.
bin/pycbc_multi_inspiral
bin/pygrb/pycbc_pygrb_plot_snr_timeseries
bin/pygrb/pycbc_pygrb_plot_coh_ifosnr
bin/pygrb/pycbc_pygrb_grb_info_table
bin/pygrb/pycbc_pygrb_efficiency
bin/pygrb/pycbc_pygrb_page_tables
bin/pygrb/pycbc_grb_inj_finder
bin/pygrb/pycbc_pygrb_plot_null_stats
bin/pygrb/pycbc_pygrb_pp_workflow
bin/pygrb/pycbc_pygrb_plot_injs_results
bin/pygrb/pycbc_pygrb_plot_stats_distribution
bin/pygrb/pycbc_pygrb_minifollowups
bin/pygrb/pycbc_make_offline_grb_workflow
bin/pygrb/pycbc_grb_trig_combiner
bin/pygrb/pycbc_pygrb_plot_chisq_veto
bin/pygrb/pycbc_pygrb_plot_skygrid
bin/pygrb/pycbc_grb_trig_cluster
bin/pygrb/pycbc_grb_inj_combiner
pycbc/results/pygrb_plotting_utils.py
pycbc/results/pygrb_postprocessing_utils.py
(which notably has some imports in a try-except, e.g.,glue
lsctables
)pycbc/workflow/grb_utils.py
pycbc/events/coherent.py