Skip to content

Commit

Permalink
Fix cmd_access.py/set_up.py
Browse files Browse the repository at this point in the history
  • Loading branch information
niinina committed Jun 18, 2024
1 parent f4f2edf commit 36e97f6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/specimen/cmd_access.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def setup():
# -----------------
@setup.command()
@click.option('--filename', '-f', default='config.yaml', type=str, show_default=True, help='Name (path) to the save the config file under.')
@click.option('--type', '-t', default='htqb-basic', type=click.Choice(['htqb-basic', 'htqb-advanced','htqb-defaults','media','cmpb']), help='Type of config file to download. Either a more detailed one for advanced usage or a basic one for beginners with less options.')
@click.option('--type', '-t', default='hqtb-basic', type=click.Choice(['hqtb-basic', 'hqtb-advanced','hqtb-defaults','media','cmpb']), help='Type of config file to download. Either a more detailed one for advanced usage or a basic one for beginners with less options.')
def config(filename,type):
"""Download a configuration file (.yaml).
Expand Down
12 changes: 6 additions & 6 deletions src/specimen/util/set_up.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def download_config(filename:str='my_basic_config.yaml', type:Literal['hqtb-basi
The media config and the config for the cmpb / CarveMe + Modelpolisher based pipeline
can be downloaded using 'media' and 'cmpb' respectively
For the htqb / high-quality template based pipeline:
For the hqtb / high-quality template based pipeline:
Depending on the knowledge of the user, either a 'hqtb-basic' or an 'hqtb-advanced' type
of configuration file can be downloaded (or 'hqtb-defaults' for developers).
Expand All @@ -142,7 +142,7 @@ def download_config(filename:str='my_basic_config.yaml', type:Literal['hqtb-basi
- filename (str, optional):
Filename/filepath to save the downloaded config file under.
Defaults to 'my_basic_config.yaml'.
- type (Literal['htqb-basic','htqb-advanced','htqb-defaults','media','cmpb'], optional):
- type (Literal['hqtb-basic','hqtb-advanced','hqtb-defaults','media','cmpb'], optional):
The type of file to download.
Can be 'hqtb-basic', 'hqtb-advanced' or 'hqtb-defaults' or 'media' or 'cmpb'.
Defaults to 'hqtb basic'.
Expand All @@ -155,19 +155,19 @@ def download_config(filename:str='my_basic_config.yaml', type:Literal['hqtb-basi
match type:
# the 'beginner' version
case 'hqtb-basic':
config_file = files('specimen.data.config').joinpath('htqb_basic_config_expl.yaml')
config_file = files('specimen.data.config').joinpath('hqtb_basic_config_expl.yaml')
with open(config_file, "r") as cfg_file, open(filename, 'w') as cfg_out:
for line in cfg_file:
cfg_out.write(line)
# for advanced users
case 'hqtb-advanced':
config_file = files('specimen.data.config').joinpath('htqb_advanced_config_expl.yaml')
config_file = files('specimen.data.config').joinpath('hqtb_advanced_config_expl.yaml')
with open(config_file, "r") as cfg_file, open(filename, 'w') as cfg_out:
for line in cfg_file:
cfg_out.write(line)
# for developer: the config with all internal defaults
case 'hqtb-defaults':
config_file = files('specimen.data.config').joinpath('htqb_config_default.yaml')
config_file = files('specimen.data.config').joinpath('hqtb_config_default.yaml')
with open(config_file, "r") as cfg_file, open(filename, 'w') as cfg_out:
for line in cfg_file:
cfg_out.write(line)
Expand Down Expand Up @@ -289,7 +289,7 @@ def dict_recursive_check(dictA:dict, key:str=None,
# load both files
match pipeline:
case 'hqtb':
defaultc_path = files('specimen.data.config').joinpath('htqb_config_default.yaml')
defaultc_path = files('specimen.data.config').joinpath('hqtb_config_default.yaml')
case 'cmpb':
defaultc_path = files('specimen.data.config').joinpath('cmpb_config.yaml')
case _:
Expand Down

0 comments on commit 36e97f6

Please sign in to comment.