Skip to content

Commit

Permalink
Final version using rich argparse
Browse files Browse the repository at this point in the history
  • Loading branch information
Benito Marcote committed Dec 8, 2022
1 parent fa32881 commit 79eb0a4
Show file tree
Hide file tree
Showing 2 changed files with 296 additions and 180 deletions.
82 changes: 41 additions & 41 deletions app_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,47 +36,47 @@
'pipeline': sch.pipeline, # TODO: sch.protect_archive_data
'postpipe': sch.after_pipeline,
'last': sch.final_steps}
# all_exec_command = {'dirs': Command(env.create_all_dirs, "Creates the required folders (in eee and jop83): " \
# "eee:/data0/{supsci}/{EXP}, jop83:$IN/{exp}, $OUT/{exp}", "$IN/{supsci}/{exp}"),
# 'copyfiles': Command(env.copy_files, "Copies the .vix, .expsum, .piletter, .key/sum to eee."),
# '': Command(eee.set_credentials, "Sets/recovers the credentials for this experiment."),
# '': Command(pipe.get_files_from_vlbeer, ""),
# 'createlis': Command(ccs.create_lis_files, "Create the .lis files in ccs."),
# 'getlis': Command(ccs.get_lis_files, "Copies the .lis files from ccs to eee."),
# 'modlis': Command(eee._get_passes_from_lisfiles, "Reads the correlator passes from the lis files" \
# " and updates the header."),
# 'checklis': Command(env.check_lisfiles, "Runs checklis.py in all .lis files."),
# 'getdata': Command(eee.getdata, "Runs getdata.pl."),
# 'j2ms2': Command(eee.j2ms2, "Runs j2ms2 with the specified params (modify them with the 'edit'" \
# "command)."),
# 'expname': Command(eee.update_ms_expname, "Runs expname.py (for e-EVN experiments)."),
# 'metadata': Command(eee.get_metadata_from_ms, "Retrieves the observational metadata from the MS."),
# 'standardplots': Command(eee.standardplots, "Runs standardplots."),
# 'gv': Command(eee.open_standardplot_files, "Opens the standardplots files with gv."),
# 'ysfocus': Command(eee.ysfocus, "Runs ysfocus.py"),
# 'polswap': Command(eee.polswap, "Runs polswap.py"),
# 'flag_weights': Command(eee.flag_weights, "Runs flag_weights.py"),
# 'onebit': Command(eee.onebit, "Runs onebit.py"),
# 'piletter': Command(eee.update_piletter, "Updates the PI letter with info on MS and PolConvert."),
# 'tconvert': Command(eee.tconvert, "Runs tConvert"),
# 'polconvert': Command(eee.polconvert, "Runs PolConvert (or prepares files to run it manually)."),
# 'postpolconvert': Command(eee.post_polconvert, "Runs all required steps after run PolConvert."),
# 'archive': Command(eee.archive, "Runs archive in eee"),
# '': Command(pipe.run_antab_editor, ""),
# '': Command(pipe.create_uvflg, ""),
# '': Command(pipe.create_input_file, ""),
# '': Command(pipe.run_pipeline, ""),
# '': Command(pipe.comment_tasav_files, ""),
# '': Command(pipe.pipeline_feedback, ""),
# '': Command(pipe.archive, ""),
# '': Command(eee.append_antab, ""),
# '': Command(pipe.ampcal, ""),
# '': Command(eee.create_pipelet, ""),
# '': Command(eee.send_letter, ""),
# '': Command(eee.antenna_feedback, ""),
# '': Command(eee.nme_report, "")}
# supsciers = ('agudo', 'bayandina', 'blanchard', 'burns', 'immer', 'marcote', 'minnie', 'murthy', 'nair', 'oh',
# 'orosz', 'paragi', 'rmc', 'surcis', 'yang')
all_exec_command = {'dirs': Command(env.create_all_dirs, "Creates the required folders (in eee and jop83): " \
"eee:/data0/{supsci}/{EXP}, jop83:$IN/{exp}, $OUT/{exp}", "$IN/{supsci}/{exp}"),
'copyfiles': Command(env.copy_files, "Copies the .vix, .expsum, .piletter, .key/sum to eee."),
'': Command(eee.set_credentials, "Sets/recovers the credentials for this experiment."),
'': Command(pipe.get_files_from_vlbeer, ""),
'createlis': Command(ccs.create_lis_files, "Create the .lis files in ccs."),
'getlis': Command(ccs.get_lis_files, "Copies the .lis files from ccs to eee."),
'modlis': Command(eee._get_passes_from_lisfiles, "Reads the correlator passes from the lis files" \
" and updates the header."),
'checklis': Command(env.check_lisfiles, "Runs checklis.py in all .lis files."),
'getdata': Command(eee.getdata, "Runs getdata.pl."),
'j2ms2': Command(eee.j2ms2, "Runs j2ms2 with the specified params (modify them with the 'edit'" \
"command)."),
'expname': Command(eee.update_ms_expname, "Runs expname.py (for e-EVN experiments)."),
'metadata': Command(eee.get_metadata_from_ms, "Retrieves the observational metadata from the MS."),
'standardplots': Command(eee.standardplots, "Runs standardplots."),
'gv': Command(eee.open_standardplot_files, "Opens the standardplots files with gv."),
'ysfocus': Command(eee.ysfocus, "Runs ysfocus.py"),
'polswap': Command(eee.polswap, "Runs polswap.py"),
'flag_weights': Command(eee.flag_weights, "Runs flag_weights.py"),
'onebit': Command(eee.onebit, "Runs onebit.py"),
'piletter': Command(eee.update_piletter, "Updates the PI letter with info on MS and PolConvert."),
'tconvert': Command(eee.tconvert, "Runs tConvert"),
'polconvert': Command(eee.polconvert, "Runs PolConvert (or prepares files to run it manually)."),
'postpolconvert': Command(eee.post_polconvert, "Runs all required steps after run PolConvert."),
'archive': Command(eee.archive, "Runs archive in eee"),
'': Command(pipe.run_antab_editor, ""),
'': Command(pipe.create_uvflg, ""),
'': Command(pipe.create_input_file, ""),
'': Command(pipe.run_pipeline, ""),
'': Command(pipe.comment_tasav_files, ""),
'': Command(pipe.pipeline_feedback, ""),
'': Command(pipe.archive, ""),
'': Command(eee.append_antab, ""),
'': Command(pipe.ampcal, ""),
'': Command(eee.create_pipelet, ""),
'': Command(eee.send_letter, ""),
'': Command(eee.antenna_feedback, ""),
'': Command(eee.nme_report, "")}
supsciers = ('agudo', 'bayandina', 'blanchard', 'burns', 'immer', 'marcote', 'minnie', 'murthy', 'nair', 'oh',
'orosz', 'paragi', 'rmc', 'surcis', 'yang')

exp = None
app = typer.Typer(help="Runs the full post-processing of an EVN experiment.", rich_markup_mode='rich')
Expand Down
Loading

0 comments on commit 79eb0a4

Please sign in to comment.