To receive notifications about scheduled maintenance, please subscribe to the mailing-list gitlab-operations@sympa.ethz.ch. You can subscribe to the mailing-list at https://sympa.ethz.ch

Commit 78c8ccf0 authored by holukas's avatar holukas
Browse files

Option to add prefix to output folder

parent 348c3582
......@@ -2,12 +2,10 @@
<project version="4">
<component name="ChangeListManager">
<list default="true" id="254ecb79-655b-4854-8af6-177bb7347e8a" name="Default Changelist" comment="">
<change afterPath="$PROJECT_DIR$/bico/settings/data_blocks/IRGA75-A-GN1.dblock" afterDir="false" />
<change afterPath="$PROJECT_DIR$/bico/settings/data_blocks/IRGA75-A-GN1.md" afterDir="false" />
<change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
<change beforePath="$PROJECT_DIR$/bico/bico.py" beforeDir="false" afterPath="$PROJECT_DIR$/bico/bico.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/bico/gui/gui.py" beforeDir="false" afterPath="$PROJECT_DIR$/bico/gui/gui.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/bico/ops/setup.py" beforeDir="false" afterPath="$PROJECT_DIR$/bico/ops/setup.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/bico/ops/vis.py" beforeDir="false" afterPath="$PROJECT_DIR$/bico/ops/vis.py" afterDir="false" />
<change beforePath="$PROJECT_DIR$/bico/settings/Bico.settings" beforeDir="false" afterPath="$PROJECT_DIR$/bico/settings/Bico.settings" afterDir="false" />
<change beforePath="$PROJECT_DIR$/bico/settings/Bico.settingsOld" beforeDir="false" afterPath="$PROJECT_DIR$/bico/settings/Bico.settingsOld" afterDir="false" />
<change beforePath="$PROJECT_DIR$/bico/settings/_version.py" beforeDir="false" afterPath="$PROJECT_DIR$/bico/settings/_version.py" afterDir="false" />
......@@ -301,6 +299,9 @@
<workItem from="1609065970989" duration="8000" />
<workItem from="1609110762183" duration="1238000" />
<workItem from="1609331721109" duration="6020000" />
<workItem from="1609370877343" duration="21000" />
<workItem from="1609370919139" duration="36000" />
<workItem from="1609372690529" duration="1334000" />
</task>
<servers />
</component>
......@@ -309,6 +310,13 @@
</component>
<component name="XDebuggerManager">
<breakpoint-manager>
<breakpoints>
<line-breakpoint enabled="true" suspend="THREAD" type="python-line">
<url>file://$PROJECT_DIR$/bico/bico.py</url>
<line>58</line>
<option name="timeStamp" value="8" />
</line-breakpoint>
</breakpoints>
<default-breakpoints>
<breakpoint type="python-exception">
<properties notifyOnTerminate="true" exception="BaseException">
......@@ -326,7 +334,7 @@
<SUITE FILE_PATH="coverage/BICO$main.coverage" NAME="bico Coverage Results" MODIFIED="1598258463691" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/bico" />
<SUITE FILE_PATH="coverage/BICO_Binary_Converter$gui.coverage" NAME="gui Coverage Results" MODIFIED="1606435918815" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/bico" />
<SUITE FILE_PATH="coverage/BICO_Binary_Converter$main.coverage" NAME="main Coverage Results" MODIFIED="1596498134562" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/bico" />
<SUITE FILE_PATH="coverage/BICO_Binary_Converter$start_bico.coverage" NAME="start_bico Coverage Results" MODIFIED="1609334088654" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/bico" />
<SUITE FILE_PATH="coverage/BICO_Binary_Converter$start_bico.coverage" NAME="start_bico Coverage Results" MODIFIED="1609373954783" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/bico" />
<SUITE FILE_PATH="coverage/BICO_Binary_Converter$example.coverage" NAME="example Coverage Results" MODIFIED="1606348759035" SOURCE_PROVIDER="com.intellij.coverage.DefaultCoverageFileProvider" RUNNER="coverage.py" COVERAGE_BY_TEST_ENABLED="true" COVERAGE_TRACING_ENABLED="false" WORKING_DIRECTORY="$PROJECT_DIR$/example" />
</component>
</project>
\ No newline at end of file
......@@ -53,13 +53,13 @@ class Bico(qtw.QMainWindow, Ui_MainWindow):
def run(self):
# Setup run
self.get_settings_from_gui()
self.save_settings_to_file(copy_to_outdir=True)
self.settings_dict = ops.setup.make_run_outdirs(settings_dict=self.settings_dict)
self.logger = ops.logger.setup_logger(settings_dict=self.settings_dict)
self.logger.info(f"Run ID: {self.run_id}")
self.logger.info(f"BICO Version: {_version.__version__} / {_version.__date__}")
self.get_settings_from_gui()
self.save_settings_to_file(copy_to_outdir=True)
self.settings_dict['filename_datetime_parsing_string'] = self.make_datetime_parsing_string()
self.bin_size_header = 29 if self.settings_dict['header'] == 'WECOM3' else 38 # todo better solution
......@@ -161,6 +161,7 @@ class Bico(qtw.QMainWindow, Ui_MainWindow):
# Output
self.update_dict_key(key='dir_out', new_val=self.lbl_output_folder.text())
self.update_dict_key(key='output_folder_name_prefix', new_val=self.lne_output_folder_name_prefix.text())
self.update_dict_key(key='file_compression', new_val=self.cmb_output_compression.currentText())
self.update_dict_key(key='plot_file_availability',
new_val='1' if self.chk_output_plots_file_availability.isChecked() else '0')
......@@ -225,6 +226,8 @@ class Bico(qtw.QMainWindow, Ui_MainWindow):
# Output
self.lbl_output_folder.setText(str(self.settings_dict['dir_out']))
self.set_gui_lineedit(lineedit=self.lne_output_folder_name_prefix,
string=self.settings_dict['output_folder_name_prefix'])
self.set_gui_combobox(combobox=self.cmb_output_compression, find_text=self.settings_dict['file_compression'])
self.set_gui_checkbox(checkbox=self.chk_output_plots_file_availability,
state=self.settings_dict['plot_file_availability'])
......
......@@ -118,12 +118,20 @@ class Ui_MainWindow(object):
self.lbl_output_folder = qtw.QLabel("***Please select output folder...***")
grid.addWidget(self.lbl_output_folder, 3, 0, 1, 2)
# Output folder name
header_rawdata_file_settings = qtw.QLabel('Output Folder Name')
header_rawdata_file_settings.setProperty('labelClass', 'header_2')
grid.addWidget(header_rawdata_file_settings, 4, 0, 1, 1)
self.lne_output_folder_name_prefix = \
gui_elements.add_label_lineedit_to_grid(label='Folder Name Prefix', grid=grid,
row=5, value='')
# File Compression
header_output_file_compression = qtw.QLabel('File Compression')
header_output_file_compression.setProperty('labelClass', 'header_2')
grid.addWidget(header_output_file_compression, 4, 0)
grid.addWidget(header_output_file_compression, 6, 0)
self.cmb_output_compression = \
gui_elements.add_label_combobox_to_grid(label='Compression', grid=grid, row=5,
gui_elements.add_label_combobox_to_grid(label='Compression', grid=grid, row=7,
items=['gzip', 'None'])
self.cmb_output_compression.setToolTip(tooltips.cmb_output_compression)
......@@ -131,19 +139,17 @@ class Ui_MainWindow(object):
# Plots
header_output_plots = qtw.QLabel('Plots')
header_output_plots.setProperty('labelClass', 'header_2')
grid.addWidget(header_output_plots, 6, 0, 1, 1)
grid.addWidget(header_output_plots, 8, 0, 1, 1)
self.chk_output_plots_file_availability = \
gui_elements.add_checkbox_to_grid(label='File Availability Heatmap', grid=grid, row=7)
gui_elements.add_checkbox_to_grid(label='File Availability Heatmap', grid=grid, row=9)
self.chk_output_plots_ts_hires = \
gui_elements.add_checkbox_to_grid(label='High-res Time Series', grid=grid, row=8)
gui_elements.add_checkbox_to_grid(label='High-res Time Series', grid=grid, row=10)
self.chk_output_plots_histogram_hires = \
gui_elements.add_checkbox_to_grid(label='High-res Histograms', grid=grid, row=9)
gui_elements.add_checkbox_to_grid(label='High-res Histograms', grid=grid, row=11)
self.chk_output_plots_ts_agg = \
gui_elements.add_checkbox_to_grid(label='Aggregated Time Series', grid=grid, row=10)
# self.chk_rd_plots_ts_histogram=\
# gui_elements.add_checkbox_to_grid(label='Time Series Histogram (TODO)', grid=grid, row=12)
gui_elements.add_checkbox_to_grid(label='Aggregated Time Series', grid=grid, row=12)
grid.setRowStretch(11, 1)
grid.setRowStretch(13, 1)
section.setLayout(grid)
return section
......
......@@ -29,7 +29,8 @@ def make_run_outdirs(settings_dict):
# Run output folder
# settings_dict['dir_out_run'] = Path(settings_dict['dir_out']) / "BICO_TEST_OUT"
settings_dict['dir_out_run'] = Path(settings_dict['dir_out']) / settings_dict['run_id'] # todo act
folder_name = settings_dict['output_folder_name_prefix'] + "_" + settings_dict['run_id'] # todo act
settings_dict['dir_out_run'] = Path(settings_dict['dir_out']) / folder_name # todo act
if not Path.is_dir(settings_dict['dir_out_run']):
print(f"Creating folder {settings_dict['dir_out_run']} ...")
os.makedirs(settings_dict['dir_out_run'])
......
run_id=BICO-20201230-141449
run_id=BICO-20201231-011915
# INSTRUMENTS
# ===========
......@@ -9,7 +9,7 @@ site=CH-AES
# Data Blocks
header=WECOM3
instrument_1=R350-A
instrument_2=IRGA75-A-GN1
instrument_2=IRGA75-A
instrument_3=LGR-A
# RAW DATA
......@@ -27,7 +27,7 @@ filename_datetime_format=yyyymmddHH.XMM
file_ext=*.X*
file_size_min=900
file_limit=1
row_limit=0
row_limit=100
# Special
select_random_files=0
......@@ -42,6 +42,7 @@ dir_out_run_plots_hires=A:\FLUXES\x-TEST-OUT\BICO-20201230-141449\plots\hires
dir_out_run_plots_agg=A:\FLUXES\x-TEST-OUT\BICO-20201230-141449\plots\agg
dir_out_run_raw_data_csv=A:\FLUXES\x-TEST-OUT\BICO-20201230-141449\raw_data_csv
output_folder_name_prefix=20XX_1
file_compression=gzip
plot_file_availability=1
......
run_id=BICO-20201230-141143
run_id=BICO-20201231-011421
# INSTRUMENTS
# ===========
......@@ -9,7 +9,7 @@ site=CH-AES
# Data Blocks
header=WECOM3
instrument_1=R350-A
instrument_2=IRGA75-A
instrument_2=IRGA75-A-GN1
instrument_3=LGR-A
# RAW DATA
......@@ -35,13 +35,14 @@ select_random_files=0
# OUTPUT
# ======
dir_out=A:/FLUXES/x-TEST-OUT
dir_out_run=A:\FLUXES\x-TEST-OUT\BICO-20201230-141143
dir_out_run_log=A:\FLUXES\x-TEST-OUT\BICO-20201230-141143\log
dir_out_run_plots=A:\FLUXES\x-TEST-OUT\BICO-20201230-141143\plots
dir_out_run_plots_hires=A:\FLUXES\x-TEST-OUT\BICO-20201230-141143\plots\hires
dir_out_run_plots_agg=A:\FLUXES\x-TEST-OUT\BICO-20201230-141143\plots\agg
dir_out_run_raw_data_csv=A:\FLUXES\x-TEST-OUT\BICO-20201230-141143\raw_data_csv
dir_out_run=A:\FLUXES\x-TEST-OUT\BICO-20201230-141449
dir_out_run_log=A:\FLUXES\x-TEST-OUT\BICO-20201230-141449\log
dir_out_run_plots=A:\FLUXES\x-TEST-OUT\BICO-20201230-141449\plots
dir_out_run_plots_hires=A:\FLUXES\x-TEST-OUT\BICO-20201230-141449\plots\hires
dir_out_run_plots_agg=A:\FLUXES\x-TEST-OUT\BICO-20201230-141449\plots\agg
dir_out_run_raw_data_csv=A:\FLUXES\x-TEST-OUT\BICO-20201230-141449\raw_data_csv
output_folder_name_prefix=aaa
file_compression=gzip
plot_file_availability=1
......
__version__ = "0.0.2"
__version__ = "0.0.3"
__date__ = "31 Dec 2020"
__link_source_code__ = "https://gitlab.ethz.ch/holukas/bico"
__link_releases__ = "https://gitlab.ethz.ch/holukas/bico/-/releases"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment