Skip to content

Commit

Permalink
remove option to pass a config dict to setup_workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
sfmig committed Oct 4, 2023
1 parent a4bcd51 commit ac14d84
Showing 1 changed file with 6 additions and 11 deletions.
17 changes: 6 additions & 11 deletions brainglobe_workflows/cellfinder/cellfinder_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def run_workflow_from_cellfinder_run(cfg):
save_cells(detected_cells, cfg.detected_cells_filepath)

Check warning on line 148 in brainglobe_workflows/cellfinder/cellfinder_main.py

View check run for this annotation

Codecov / codecov/patch

brainglobe_workflows/cellfinder/cellfinder_main.py#L148

Added line #L148 was not covered by tests


def setup_workflow(input_config_dict: dict = DEFAULT_CONFIG_DICT):
def setup_workflow():

Check warning on line 151 in brainglobe_workflows/cellfinder/cellfinder_main.py

View check run for this annotation

Codecov / codecov/patch

brainglobe_workflows/cellfinder/cellfinder_main.py#L151

Added line #L151 was not covered by tests
"""Prepare configuration to run workflow
This includes
Expand All @@ -159,17 +159,12 @@ def setup_workflow(input_config_dict: dict = DEFAULT_CONFIG_DICT):
To instantiate the config dictionary, we first check if an environment
variable "CELLFINDER_CONFIG_PATH" pointing to a config json file exists.
If not, the default config is used.
Parameters
----------
input_config_dict : dict
a dictionary with the input config parameters
If not, the default config (DEFAULT_CONFIG_DICT) is used.
Returns
-------
_type_
_description_
config : CellfinderConfig
a class with the required setup methods and parameters for
the cellfinder workflow
"""

# Define config
Expand All @@ -190,7 +185,7 @@ def setup_workflow(input_config_dict: dict = DEFAULT_CONFIG_DICT):
)

else:
config = CellfinderConfig(**input_config_dict)
config = CellfinderConfig(**DEFAULT_CONFIG_DICT)
logging.info("Using default configuration")

Check warning on line 189 in brainglobe_workflows/cellfinder/cellfinder_main.py

View check run for this annotation

Codecov / codecov/patch

brainglobe_workflows/cellfinder/cellfinder_main.py#L188-L189

Added lines #L188 - L189 were not covered by tests

# Retrieve and add lists of input data to config if neither are defined
Expand Down

0 comments on commit ac14d84

Please sign in to comment.