Skip to content

Move config path to same location as other apps #68

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 14 additions & 14 deletions blacs/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@
import subprocess
import sys
import time
from pathlib import Path

import signal
# Quit on ctrl-c
Expand Down Expand Up @@ -144,7 +145,8 @@
#Draggable Tab Widget Code
from labscript_utils.qtwidgets.dragdroptab import DragDropTabWidget
# Lab config code
from labscript_utils.labconfig import LabConfig, config_prefix, hostname
from labscript_utils.labconfig import LabConfig
from labscript_profile import hostname
# Qt utils for running functions in the main thread
from qtutils import *
# And for icons:
Expand Down Expand Up @@ -773,21 +775,19 @@ def process(self,h5_filepath):
'labscript_utils.labconfig',
'zprocess',
], sub=True)
##########

splash.update_text('loading labconfig')
settings_path = os.path.join(config_prefix,'%s_BLACS.h5'%hostname)
required_config_params = {"DEFAULT":["experiment_name"],
"programs":["text_editor",
"text_editor_arguments",
],
"paths":["shared_drive",
"connection_table_h5",
"connection_table_py",
],
"ports":["BLACS", "lyse"],
}
exp_config = LabConfig(required_params = required_config_params)
required_config_params = {
"DEFAULT": ["experiment_name", "app_saved_configs"],
"programs": ["text_editor", "text_editor_arguments",],
"paths": ["shared_drive", "connection_table_h5", "connection_table_py",],
"ports": ["BLACS", "lyse"],
}
exp_config = LabConfig(required_params=required_config_params)
settings_dir = Path(exp_config.get('DEFAULT', 'app_saved_configs'), 'blacs')
if not settings_dir.exists():
os.makedirs(settings_dir, exist_ok=True)
settings_path = str(settings_dir / f'{hostname()}_BLACS.h5')

port = int(exp_config.get('ports','BLACS'))

Expand Down