singer-tap-installed

Description

Add a Singer tap.

Resources

Variables

Name Type Default Description

tap_name

string --

The name of the tap. Required

executable_name

string --

The name of the tap executable (defaults to tap name).

link_base_path

string --

(Optional) path to collect links to Singer binaries.

python_version

string latest

The Python version to use for the underlying virtualenv.

tap_pip_string

string --

The package name or git url for this tap.

tap_system_dependencies

list --

(Optional) system dependencies for the tap Python package to be installed.

Code

doc:
  short_help: Add a Singer tap.
  references:
    Singer webpage: https://www.singer.io

args:
  tap_name:
    doc:
      short_help: The name of the tap.
    type: string
    required: true
    cli:
      param_type: argument
  tap_pip_string:
    doc:
      short_help: The package name or git url for this tap.
    type: string
    required: false
  link_base_path:
    doc:
      short_help: (Optional) path to collect links to Singer binaries.
    type: string
    required: false
  executable_name:
    doc:
      short_help: The name of the tap executable (defaults to tap name).
    type: string
    required: false
  python_version:
    doc:
      short_help: The Python version to use for the underlying virtualenv.
    type: string
    default: latest
  tap_system_dependencies:
    doc:
      short_help: (Optional) system dependencies for the tap Python package to be
        installed.
    type: list
    schema:
      type: string
    required: false
    empty: true
    cli:
      param_decls:
      - --tap-system-dependency

frecklets:
- python-virtualenv:
    venv_name: 'singer_tap_{{:: tap_name ::}}'
    python_type: pyenv
    python_version: '{{:: python_version ::}}'
    system_dependencies: '{{:: tap_system_dependencies ::}}'
    pip_extra_args: -U
    python_packages:
    - "{{:: tap_pip_string | default('tap-'+tap_name) ::}}"
- link-exists:
    frecklet::skip: '{{:: link_base_path | true_if_empty ::}}'
    dest: '{{:: link_base_path ::}}/tap-{{:: tap_name ::}}'
    src: "~/.pyenv/versions/singer_tap_{{:: tap_name ::}}/bin/{{:: executable_name\
      \ | first_non_empty('tap-'+tap_name) ::}}"
frecklecute --community singer-tap-installed --help

Usage: frecklecute singer-tap-installed [OPTIONS] TAP_NAME

  Add a Singer tap.

Options:
  --executable-name EXECUTABLE_NAME
                                  The name of the tap executable (defaults to
                                  tap name).
  --link-base-path LINK_BASE_PATH
                                  (Optional) path to collect links to Singer
                                  binaries.
  --python-version PYTHON_VERSION
                                  The Python version to use for the underlying
                                  virtualenv.
  --tap-pip-string TAP_PIP_STRING
                                  The package name or git url for this tap.
  --tap-system-dependency TAP_SYSTEM_DEPENDENCIES
                                  (Optional) system dependencies for the tap
                                  Python package to be installed.
  --help                          Show this message and exit.
# -*- coding: utf-8 -*-


#
# module path: pycklets.singer_tap_installed.SingerTapInstalled
#


from dataclasses import dataclass
from pyckles import AutoPycklet
from typing import *    # noqa

@dataclass
class SingerTapInstalled(AutoPycklet):
    """Add a Singer tap.

       Args:
         executable_name: The name of the tap executable (defaults to tap name).
         link_base_path: (Optional) path to collect links to Singer binaries.
         python_version: The Python version to use for the underlying virtualenv.
         tap_name: The name of the tap.
         tap_pip_string: The package name or git url for this tap.
         tap_system_dependencies: (Optional) system dependencies for the tap Python package to be installed.

    """

    FRECKLET_ID = "singer-tap-installed"

    executable_name: str = None
    link_base_path: str = None
    python_version: str = None
    tap_name: str = None
    tap_pip_string: str = None
    tap_system_dependencies: List = None


    def __post_init__(self):
        super(SingerTapInstalled, self).__init__(var_names=["executable_name", "link_base_path", "python_version", "tap_name", "tap_pip_string", "tap_system_dependencies"])


frecklet_class = SingerTapInstalled
# -*- coding: utf-8 -*-


#
# module path: pycklets.singer_tap_installed.SingerTapInstalled
#


from pyckles import AutoPycklet

class SingerTapInstalled(AutoPycklet):
    """Add a Singer tap.

       Args:
         executable_name: The name of the tap executable (defaults to tap name).
         link_base_path: (Optional) path to collect links to Singer binaries.
         python_version: The Python version to use for the underlying virtualenv.
         tap_name: The name of the tap.
         tap_pip_string: The package name or git url for this tap.
         tap_system_dependencies: (Optional) system dependencies for the tap Python package to be installed.

    """

    FRECKLET_ID = "singer-tap-installed"

    def __init__(self, executable_name=None, link_base_path=None, python_version="latest", tap_name=None, tap_pip_string=None, tap_system_dependencies=None):

        super(SingerTapInstalled, self).__init__(var_names=["executable_name", "link_base_path", "python_version", "tap_name", "tap_pip_string", "tap_system_dependencies"])
        self._executable_name = executable_name
        self._link_base_path = link_base_path
        self._python_version = python_version
        self._tap_name = tap_name
        self._tap_pip_string = tap_pip_string
        self._tap_system_dependencies = tap_system_dependencies

    @property
    def executable_name(self):
        return self._executable_name

    @executable_name.setter
    def executable_name(self, executable_name):
        self._executable_name = executable_name

    @property
    def link_base_path(self):
        return self._link_base_path

    @link_base_path.setter
    def link_base_path(self, link_base_path):
        self._link_base_path = link_base_path

    @property
    def python_version(self):
        return self._python_version

    @python_version.setter
    def python_version(self, python_version):
        self._python_version = python_version

    @property
    def tap_name(self):
        return self._tap_name

    @tap_name.setter
    def tap_name(self, tap_name):
        self._tap_name = tap_name

    @property
    def tap_pip_string(self):
        return self._tap_pip_string

    @tap_pip_string.setter
    def tap_pip_string(self, tap_pip_string):
        self._tap_pip_string = tap_pip_string

    @property
    def tap_system_dependencies(self):
        return self._tap_system_dependencies

    @tap_system_dependencies.setter
    def tap_system_dependencies(self, tap_system_dependencies):
        self._tap_system_dependencies = tap_system_dependencies



frecklet_class = SingerTapInstalled