Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions cirro/cli/interactive/create_pipeline_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down
12 changes: 7 additions & 5 deletions cirro/models/process/nextflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions cirro/models/process/process.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -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
Expand Down
Loading