Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • sharefair/bioflow-insight
1 result
Show changes
Commits on Source (3)
...@@ -11,6 +11,17 @@ run_tests: ...@@ -11,6 +11,17 @@ run_tests:
black_cli:
needs: []
image: python:3.10
stage: test
script:
- python -m pip install --upgrade pip
- pip install -r requirements-dev.txt
- black bioflow_insight_cli/ --check --diff
upload: upload:
stage: deploy stage: deploy
rules: rules:
......
...@@ -7,8 +7,11 @@ from src.workflow import Workflow ...@@ -7,8 +7,11 @@ from src.workflow import Workflow
@click.command() @click.command()
@click.version_option(bioflow_insight_src.__version__) @click.version_option(bioflow_insight_src.__version__)
@click.argument('main_workflow_path') @click.argument('main_workflow_path')
@click.option(
@click.option('--output-dir', default='./results', help='Where the results will be written.') '--output-dir',
default='./results',
help='Where the results will be written.',
)
@click.option( @click.option(
'--duplicate', '--duplicate',
'duplicate', 'duplicate',
...@@ -19,15 +22,14 @@ from src.workflow import Workflow ...@@ -19,15 +22,14 @@ from src.workflow import Workflow
'When processes and subworkflows are duplicated in the workflow by the \'include as\' option, ' 'When processes and subworkflows are duplicated in the workflow by the \'include as\' option, '
'this option will duplicate the task in the graph output.', 'this option will duplicate the task in the graph output.',
) )
@click.option( @click.option(
'--processes-to-remove', '--processes-to-remove',
'processes_2_remove', 'processes_2_remove',
required=False, required=False,
help='' help=''
'List of processes which are to be removed from the different structural representations (format "process1, process2, ...").', 'List of processes which are to be removed from the different structural representations '
'(format "process1, process2, ...").',
) )
@click.option( @click.option(
'--no-render-graphs', '--no-render-graphs',
'render_graphs', 'render_graphs',
...@@ -37,30 +39,66 @@ from src.workflow import Workflow ...@@ -37,30 +39,66 @@ from src.workflow import Workflow
help='Don\'t generate the graphs output in png format using graphviz (faster),' help='Don\'t generate the graphs output in png format using graphviz (faster),'
'the mermaid and dot formats are always generated.', 'the mermaid and dot formats are always generated.',
) )
@click.option(
'--name',
@click.option('--name', 'name', required=False, help='Workflow name, extracted otherwise (in the case of a Git repo).') 'name',
required=False,
help='Workflow name, extracted otherwise (in the case of a Git repo).',
)
@click.option( @click.option(
'--authors', '--authors',
'authors', 'authors',
required=False, required=False,
help='' help='Authors of workflow (format "author1, author2, ..."), extracted otherwise (in the case of a Git repo).',
'Authors of workflow (format "author1, author2, ..."), ' )
'extracted otherwise (in the case of a Git repo).', @click.option(
'--keywords',
'keywords',
required=False,
help='Keywords of workflow (fomat "keyword1, keyword2, ..."), extracted otherwise (in the case of a Git repo).',
)
@click.option(
'--description',
'description',
required=False,
help='Description of workflow, extracted otherwise (in the case of a Git repo).',
)
@click.option(
'--date-published',
'datePublished',
required=False,
help='Publication date (format "yyyy-mm-dd"), extracted otherwise (in the case of a Git repo).',
)
@click.option(
'--license',
'license',
required=False,
help='License of workflow, extracted otherwise (in the case of a Git repo).',
)
@click.option(
'--creative-work-status',
'creativeWorkStatus',
required=False,
help='Creative work status of workflow, extracted otherwise (in the case of a Git repo).',
)
@click.option(
'--version',
'version',
required=False,
help='Version of workflow, extracted otherwise (in the case of a Git repo).',
)
@click.option(
'--producer',
'producer',
required=False,
help='Producer of workflow, extracted otherwise (in the case of a Git repo).',
)
@click.option(
'--publisher',
'publisher',
required=False,
help='Publisher of workflow, extracted otherwise (in the case of a Git repo).',
) )
@click.option('--keywords', 'keywords', required=False, help='Keywords of workflow (fomat "keyword1, keyword2, ..."), extracted otherwise (in the case of a Git repo).')
@click.option('--description', 'description', required=False, help='Description of workflow, extracted otherwise (in the case of a Git repo).')
@click.option('--date-published', 'datePublished', required=False, help='Publication date (format "yyyy-mm-dd"), extracted otherwise (in the case of a Git repo).')
@click.option('--license', 'license', required=False, help='License of workflow, extracted otherwise (in the case of a Git repo).')
@click.option('--creative-work-status', 'creativeWorkStatus', required=False, help='Creative work status of workflow, extracted otherwise (in the case of a Git repo).')
@click.option('--version', 'version', required=False, help='Version of workflow, extracted otherwise (in the case of a Git repo).')
@click.option('--producer', 'producer', required=False, help='Producer of workflow, extracted otherwise (in the case of a Git repo).')
@click.option('--publisher', 'publisher', required=False, help='Publisher of workflow, extracted otherwise (in the case of a Git repo).')
@click.option( @click.option(
'--display-info', '--display-info',
'display_info', 'display_info',
...@@ -69,7 +107,6 @@ from src.workflow import Workflow ...@@ -69,7 +107,6 @@ from src.workflow import Workflow
is_flag=True, is_flag=True,
help='Option to show a visual summary of the analysis.', help='Option to show a visual summary of the analysis.',
) )
def cli_command(main_workflow_path, **kwargs): def cli_command(main_workflow_path, **kwargs):
return cli(main_workflow_path, **kwargs) return cli(main_workflow_path, **kwargs)
......
...@@ -23,8 +23,7 @@ from .bioflowinsighterror import BioFlowInsightError ...@@ -23,8 +23,7 @@ from .bioflowinsighterror import BioFlowInsightError
class Nextflow_File(Nextflow_Building_Blocks): class Nextflow_File(Nextflow_Building_Blocks):
def __init__(self, address, duplicate = True, DSL="", author = None, name = None, origin=None, output_dir='./results', display_info = True): def __init__(self, address, duplicate = True, DSL="", author = None, name = None, origin=None, output_dir='./results', display_info = True):
self.file = address self.file = address
print(self.get_file_address()) if(self.get_file_address().find('/')==-1):
if(self.get_file_address().find('/')!=-1):
raise BioFlowInsightError(f"BioFlow-Insight cannot directly analyse a workflow from its directory. Please analyse the workflow from the parent directory instead.", num = -1) raise BioFlowInsightError(f"BioFlow-Insight cannot directly analyse a workflow from its directory. Please analyse the workflow from the parent directory instead.", num = -1)
self.output_dir = Path(output_dir) self.output_dir = Path(output_dir)
......