Skip to content
Snippets Groups Projects
Commit 846da28f authored by Bryan Brancotte's avatar Bryan Brancotte
Browse files

Merge branch 'build-package' into 'main'

Build package

See merge request !1
parents de35cffb cc540ea6
No related branches found
No related tags found
1 merge request!1Build package
Pipeline #13112 passed with stage
in 49 seconds
/.coverage
*.egg-info
.DS_Store
__pycache__
.venv
.idea
dist/
results*/
\ No newline at end of file
upload:
stage: deploy
rules:
- if: $CI_COMMIT_TAG
needs: []
image: python:3.11
variables:
PRIVATE_REGISTRY_API_URL: "${PRIVATE_REGISTRY_API_URL}"
TWINE_PASSWORD: "${PRIVATE_REGISTRY_TOKEN_PASSWORD}"
TWINE_USERNAME: "${PRIVATE_REGISTRY_TOKEN_USERNAME}"
script:
- pip install "setuptools>=62.6"
- pip install -e .[dev]
- echo "Tag name used ${CI_COMMIT_TAG}"
- >
if [[ -z "$CI_COMMIT_TAG" ]]; then
CI_COMMIT_TAG="v0.0.1a"
fi
- sed -i "s/v0.0.1-dev/$CI_COMMIT_TAG/g" src/__init__.py
- python -m build
- python -m twine upload --verbose --repository-url ${PRIVATE_REGISTRY_API_URL} dist/*
import click
from src.nextflow_file import Nextflow_File
@click.command()
@click.argument('main_workflow_path')
@click.option('--author', 'author', required=False, help='Author name, extracted otherwise')
@click.option('--name', 'name', required=False, help='Workflow name, extracted otherwise')
@click.option('--output-dir', default='./results', help='Where the results will be written')
@click.option(
'--no-duplicate',
'duplicate',
required=False,
default=True,
is_flag=True,
help=''
'When processes and subworkflows are duplicated in the workflows by the \'include as\' option, '
'this option will duplicate the procedures in the graph output.',
)
@click.option(
'--graph-in-dot-only',
'render_graphs',
required=False,
default=True,
is_flag=True,
help='Generate the graph output only in dot format, not png (faster).',
)
def cli_command(main_workflow_path, **kwargs):
return cli(main_workflow_path, **kwargs)
def cli(main_workflow_path, render_graphs: bool, **kwargs):
"""
The path to main file, subworkflows and modules must be in direct subdir of this file,
in folders with eponymous names.
"""
w = Nextflow_File(address=main_workflow_path, **kwargs)
w.initialise()
w.generate_all_graphs(render_graphs=render_graphs)
if __name__ == '__main__':
cli_command()
...@@ -15,7 +15,7 @@ classifiers = [ ...@@ -15,7 +15,7 @@ classifiers = [
# "License :: OSI Approved :: MIT License", # "License :: OSI Approved :: MIT License",
"Operating System :: OS Independent", "Operating System :: OS Independent",
] ]
dynamic = ["version", "dependencies"] dynamic = ["version", "dependencies", "optional-dependencies"]
[tool.setuptools.dynamic] [tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]} dependencies = {file = ["requirements.txt"]}
......
File moved
//include { p1 as p1_1; p1 as p1_2} from './modules/p1'
//include { wf1 as wf1_1; wf1 as wf1_2 } from './subworkflows/wf1'
include { wf1 as wf1_1 } from './subworkflows/wf1'
//include { wf1 as wf1_2 } from './subworkflows/wf1'
workflow {
a = channel.empty()
//c = wf1_1(a)
//c = wf1_2(b)
b = wf1_1(a)
//c = p1_1(p1_2(wf1_2(wf1_1(a))))
//wf1_1(a)
// | wf1_2
// | p1_2
// | p1_1
//(a, b) = p1_1(a)
//(ch1, ch2) = (params.ped ? [a, Channel.empty()]: [Channel.empty(), b])
//(ch1, ch2) = a.into(2)
}
\ No newline at end of file
process p1 {
input:
file(input)
output:
file(output_1)
file(output_2)
"""
something
"""
}
include { p1 } from '../modules/p1'
workflow wf1 {
take:
input_wf1
main:
output_wf1 = p1(input_wf1)
emit:
//val = output_wf1
output_wf1
}
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment