diff --git a/cirro/cli/interactive/create_pipeline_config.py b/cirro/cli/interactive/create_pipeline_config.py index bea58085..65fb226b 100644 --- a/cirro/cli/interactive/create_pipeline_config.py +++ b/cirro/cli/interactive/create_pipeline_config.py @@ -46,8 +46,7 @@ def ask_output_directory(input_value: str) -> str: 'type': 'path', 'name': 'output_dir', 'message': 'Enter the output directory for the pipeline configuration files', - 'validate': utils.DirectoryValidator, - 'default': input_value or '', + 'default': input_value or str(Path.cwd()), 'complete_style': CompleteStyle.READLINE_LIKE, 'only_directories': True } diff --git a/cirro/models/process/nextflow.py b/cirro/models/process/nextflow.py index 611414ea..30f0bd7e 100644 --- a/cirro/models/process/nextflow.py +++ b/cirro/models/process/nextflow.py @@ -58,13 +58,15 @@ def get_nextflow_json_schema(workflow_dir: str, logger: Optional[logging.Logger] logger.error(msg) raise FileNotFoundError(msg) - _all_of = {} + # ignore the 'allOf' attribute if it exists + # merge 'definitions' or '$defs' attribute with 'properties' if contents.get('allOf'): - # this is typically a root attribute in nextflow_schema.json files and a list of $ref - # convert this to an object - _all_of = {item["$ref"].split('/')[-1]: item for item in contents['allOf']} del contents['allOf'] - contents['properties'] = contents.get('properties', {}) | _all_of + contents['properties'] = ( + contents.get('properties', {}) + | contents.get('$defs', {}) + | contents.get('definitions', {}) + ) return contents diff --git a/cirro/models/process/process.py b/cirro/models/process/process.py index 294ff296..7191ec41 100644 --- a/cirro/models/process/process.py +++ b/cirro/models/process/process.py @@ -8,7 +8,7 @@ from referencing import Resource, Registry -CONFIG_APP_URL = "https://app.cirro.bio/tools/pipeline-configurator" +CONFIG_APP_URL = "https://app.cirro.bio/tools/pipeline-configurator/" class ConfigAppStatus(Enum): @@ -51,7 +51,7 @@ def parameter_schema(self) -> Resource: # look for a nextflow_schema.json file at the root of the workflow directory is_nextflow = ( ('nextflow_schema.json' in filenames) - or ('main.nf' in filenames and 'nextflow.config' in filenames) + or ('nextflow.config' in filenames) ) if is_nextflow: # lazy load nextflow dependencies