Skip to content

Commit

Permalink
remove unused dashboard imports
Browse files Browse the repository at this point in the history
  • Loading branch information
akremin committed Oct 28, 2024
1 parent c2dea61 commit 1de4781
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 44 deletions.
32 changes: 8 additions & 24 deletions py/desispec/scripts/procdashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,18 @@
"""
import argparse
import os, glob
import sys
import re
from astropy.io import fits, ascii
from astropy.table import Table, vstack
import time, datetime
from astropy.table import Table
import numpy as np
from os import listdir
import json

# import desispec.io.util
from desispec.workflow.exptable import get_exposure_table_pathname, \
default_obstypes_for_exptable, \
get_exposure_table_column_types, \
get_exposure_table_column_defaults

from desispec.workflow.proc_dashboard_funcs import get_skipped_ids, \
return_color_profile, find_new_exps, _hyperlink, _str_frac, \
_hyperlink, _str_frac, \
get_output_dir, make_html_page, read_json, write_json, \
get_terminal_steps, get_tables, populate_monthly_tables, get_nights
from desispec.workflow.proctable import get_processing_table_pathname, \
table_row_to_dict
from desispec.workflow.proctable import table_row_to_dict
from desispec.workflow.queue import update_from_queue, get_non_final_states
from desispec.workflow.tableio import load_table
from desispec.io.meta import specprod_root, rawdata_root
from desispec.io.meta import specprod_root
from desispec.io.util import decode_camword, camword_to_spectros, \
difference_camwords, parse_badamps, create_camword, camword_intersection, \
erow_to_goodcamword
difference_camwords, erow_to_goodcamword
from desiutil.log import get_logger


Expand Down Expand Up @@ -132,11 +118,9 @@ def populate_night_info_wrapper(night_to_submit):
night_json_info=night_json_info,
skipd_expids=skipd_expids)

if len(night_info) == 0:
return {}

## write out the night_info to json file
write_json(output_data=night_info, filename_json=filename_json)
if len(night_info) > 0:
write_json(output_data=night_info, filename_json=filename_json)

return night_info.copy()

Expand Down
27 changes: 7 additions & 20 deletions py/desispec/scripts/zprocdashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,32 +5,19 @@
"""
import argparse
import os, glob
import sys
import re
from astropy.io import fits, ascii
from astropy.table import Table, vstack
import time, datetime

import numpy as np
from os import listdir
import json

from desispec.workflow.queue import update_from_queue, get_non_final_states
# import desispec.io.util
from desiutil.log import get_logger
from desispec.workflow.exptable import get_exposure_table_pathname, \
default_obstypes_for_exptable, \
get_exposure_table_column_types, \
get_exposure_table_column_defaults, read_minimal_science_exptab_cols
from desispec.workflow.exptable import read_minimal_science_exptab_cols
from desispec.workflow.proc_dashboard_funcs import get_skipped_ids, \
return_color_profile, find_new_exps, _hyperlink, _str_frac, \
_hyperlink, _str_frac, \
get_output_dir, make_html_page, read_json, write_json, \
get_terminal_steps, get_tables, get_nights, populate_monthly_tables
from desispec.workflow.proctable import get_processing_table_pathname, \
erow_to_prow, instantiate_processing_table
from desispec.workflow.tableio import load_table
from desispec.io.meta import specprod_root, rawdata_root, findfile
from desispec.io.util import decode_camword, camword_to_spectros, \
difference_camwords, parse_badamps, create_camword, camword_union, \
from desispec.workflow.proctable import erow_to_prow, instantiate_processing_table
from desispec.io.meta import specprod_root, findfile
from desispec.io.util import camword_to_spectros, camword_union, \
columns_to_goodcamword, spectros_to_camword


Expand Down Expand Up @@ -146,8 +133,8 @@ def populate_night_zinfo_wrapper(night_to_submit):
night_json_zinfo=night_json_zinfo,
skipd_tileids=skipd_tileids)

## write out the night_info to json file
if len(night_zinfo) > 0:
## write out the night_info to json file
write_json(output_data=night_zinfo, filename_json=filename_json)

return night_zinfo
Expand Down

0 comments on commit 1de4781

Please sign in to comment.