VTDA-Group / superphot-plus

Superphot+, upgraded version of Superphot that uses nested sampling
MIT License
10 stars 0 forks source link

Improve code coverage #24

Closed delucchi-cmu closed 1 year ago

delucchi-cmu commented 1 year ago

First pass can focus on reducing the total number of lines of code:

With existing unit test cases, we can likely get coverage up to around 40-50 percent just by shrinking the denominator (and should have tighter code organization as a result).

delucchi-cmu commented 1 year ago

This morning's inspection:

Seems unused

utils.get_sn_ra_dec
format_data_ztf
   .import_features_and_labels
   .return_names_from_med_arrays
   .divide_into_training_test_set
   .generate_two_class_labels
   .oversample_minority_classes
   .summarize_misc_classification
   .generate_csv_subset
   .generate_csv_subset2
   .add_snr_to_prob_csv

Potential duplicates

ztf_transient_fit.import_data very similar to similar to fit_numpyro.import_data

import_ztf_from_alerce.get_band_extinctions same as utils.get_band_extinctions

ztf_transient_fit.run_mcmc similar plotting.plot_lc_fit

ztf_transient_fit.run_mcmc.flux_model same as utils.flux_model:

OliviaLynn commented 1 year ago

This looks great! I went through my notes and reviewed the things I'd flagged, and what isn't captured here turned out to be not explicitly obsolete.

delucchi-cmu commented 1 year ago

Thanks! I was also playing around with possibly moving the string/int stuff into an enumeration, and I've opened issue #25 to continue that conversation.