예제 #1
0
              "report_comment",
              type=str,
              help="Custom comment, will be printed at the top of the report.")
@click.option(
    "-n",
    "--filename",
    type=str,
    help="Report filename. Use '[yellow i]stdout[/]' to print to standard out."
)
@click.option("-o",
              "--outdir",
              type=str,
              help="Create report in the specified output directory.")
@click.option("-t",
              "--template",
              type=click.Choice(config.avail_templates),
              metavar=None,
              help="Report template to use.")
@click.option("--tag",
              "module_tag",
              type=str,
              multiple=True,
              help="Use only modules which tagged with this keyword")
@click.option(
    "--view-tags",
    is_flag=True,
    callback=util_functions.view_all_tags,
    expose_value=False,
    is_eager=True,
    help="View the available tags and which modules they load",
)
예제 #2
0
@click.group()
def main():
    find_airflow_sources_root()


option_verbose = click.option(
    "-v",
    "--verbose",
    is_flag=True,
    help="Print verbose information about performed steps",
)

option_python_version = click.option(
    '-p',
    '--python',
    type=click.Choice(ALLOWED_PYTHON_MAJOR_MINOR_VERSIONS),
    help='Choose your python version',
)

option_backend = click.option(
    '-b',
    '--backend',
    type=click.Choice(ALLOWED_BACKENDS),
    help='Choose your backend database',
)

option_github_repository = click.option(
    '-g',
    '--github-repository',
    help='GitHub repository used to pull, push images. Default: apache/airflow.'
)
예제 #3
0
        log_fh.setFormatter(
            logging.Formatter(
                "[%(asctime)s] %(name)-20s [%(levelname)-7s]  %(message)s"))
        log.addHandler(log_fh)


# nf-core list
@nf_core_cli.command()
@click.argument("keywords",
                required=False,
                nargs=-1,
                metavar="<filter keywords>")
@click.option(
    "-s",
    "--sort",
    type=click.Choice(["release", "pulled", "name", "stars"]),
    default="release",
    help="How to sort listed pipelines",
)
@click.option("--json",
              is_flag=True,
              default=False,
              help="Print full output as JSON")
@click.option("--show-archived",
              is_flag=True,
              default=False,
              help="Print archived workflows")
def list(keywords, sort, json, show_archived):
    """
    List available nf-core pipelines with local info.
예제 #4
0
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
import os

import rich_click as click

from airflow import settings
from airflow.utils.cli import ColorMode
from airflow.utils.timezone import parse as parsedate

BUILD_DOCS = "BUILDING_AIRFLOW_DOCS" in os.environ

click_color = click.option(
    '--color',
    type=click.Choice([ColorMode.ON, ColorMode.OFF, ColorMode.AUTO]),
    default=ColorMode.AUTO,
    help="Do emit colored output (default: auto)",
)
click_conf = click.option(
    '-c',
    '--conf',
    help="JSON string that gets pickled into the DagRun's conf attribute")
click_daemon = click.option(
    "-D",
    "--daemon",
    'daemon_',
    is_flag=True,
    help="Daemonize instead of running in the foreground")
click_dag_id = click.argument("dag_id", help="The id of the dag")
click_dag_id_opt = click.option("-d", "--dag-id", help="The id of the dag")
예제 #5
0
    is_flag=True,
    help="Print verbose information about performed steps.",
    envvar='VERBOSE')

option_dry_run = click.option(
    "-D",
    "--dry-run",
    is_flag=True,
    help="If dry-run is set, commands are only printed, not executed.",
    envvar='DRY_RUN',
)

option_python = click.option(
    '-p',
    '--python',
    type=click.Choice(ALLOWED_PYTHON_MAJOR_MINOR_VERSIONS),
    help='Python version to use.',
    envvar='PYTHON_MAJOR_MINOR_VERSION',
)

option_backend = click.option(
    '-b',
    '--backend',
    help="Database backend to use.",
    type=click.Choice(ALLOWED_BACKENDS),
)

option_integration = click.option(
    '--integration',
    help="Integration(s) to enable when running (can be more than one).",
    type=click.Choice(ALLOWED_INTEGRATIONS),
예제 #6
0
파일: breeze.py 프로젝트: mhenc/airflow
                'Set-ExecutionPolicy Unrestricted -Scope CurrentUser'
            ])
            script_path = subprocess.check_output(
                ['powershell', '-NoProfile', 'echo $profile']).strip()
            command_to_execute = f". {autocomplete_path}"
            write_to_shell(command_to_execute, script_path.decode("utf-8"),
                           breeze_comment)
    else:
        click.echo(
            f"Link for manually adding the autocompletion script to {shell} profile"
        )


@main.command(name='config')
@click.option('--python',
              type=click.Choice(ALLOWED_PYTHON_MAJOR_MINOR_VERSION))
@click.option('--backend', type=click.Choice(ALLOWED_BACKENDS))
@click.option('--cheatsheet/--no-cheatsheet', default=None)
@click.option('--asciiart/--no-asciiart', default=None)
def change_config(python, backend, cheatsheet, asciiart):
    """
    Toggles on/off cheatsheet, asciiart
    """
    if asciiart:
        console.print('[blue] ASCIIART enabled')
        delete_cache('suppress_asciiart')
    elif asciiart is not None:
        touch_cache_file('suppress_asciiart')
    else:
        pass
    if cheatsheet:
예제 #7
0
    "-v", "--verbose", is_flag=True, help="Print verbose information about performed steps.", envvar='VERBOSE'
)

option_dry_run = click.option(
    "-D",
    "--dry-run",
    is_flag=True,
    help="If dry-run is set, commands are only printed, not executed.",
    envvar='DRY_RUN',
)


option_python = click.option(
    '-p',
    '--python',
    type=click.Choice(ALLOWED_PYTHON_MAJOR_MINOR_VERSIONS),
    help='Python version to use.',
    envvar='PYTHON_MAJOR_MINOR_VERSION',
)

option_backend = click.option(
    '-b',
    '--backend',
    help="Database backend to use.",
    type=click.Choice(ALLOWED_BACKENDS),
)

option_integration = click.option(
    '--integration',
    help="Integration(s) to enable when running (can be more than one).",
    type=click.Choice(ALLOWED_INTEGRATIONS),
예제 #8
0
click_completion.init()


@click.group()
def main():
    find_airflow_sources_root()


option_verbose = click.option(
    "-v", "--verbose", is_flag=True, help="Print verbose information about performed steps", envvar='VERBOSE'
)

option_python_version = click.option(
    '-p',
    '--python',
    type=click.Choice(ALLOWED_PYTHON_MAJOR_MINOR_VERSIONS),
    help='Choose your python version',
    envvar='PYTHON_MAJOR_MINOR_VERSION',
)

option_backend = click.option(
    '-b',
    '--backend',
    type=click.Choice(ALLOWED_BACKENDS),
    help='Choose your backend database',
)

option_github_repository = click.option(
    '-g', '--github-repository', help='GitHub repository used to pull, push images. Default: apache/airflow.'
)