Exemple #1
0
def main() -> None:
    args = docopt(__doc__,
                  version=poetry_version.extract(source_file=__file__))
    paths = [Path(path) for path in args.get('<path>', ['.'])]
    if args['--stats']:
        result = dict(stats(paths, TEST_NODE_FILTER))
    else:
        result = blame(paths, TEST_NODE_FILTER)
    yaml = YAML()
    yaml.dump(result, stream=sys.stdout)
import logging
from price_prediction_model.config import config, logging_config
from price_prediction_model import utils, preprocessing, features, model
import poetry_version

# Configure logger for use in package
logger = logging.getLogger(__name__)
logger.setLevel(logging.DEBUG)
logger.addHandler(logging_config.get_console_handler())
logger.propagate = False

__version__ = poetry_version.extract(source_file=__file__)
Exemple #3
0
import argparse
import os
import sys

import connexion
import poetry_version

from .models import create_tables

__version__ = poetry_version.extract(__file__)


def create_app():
    connexion_app = connexion.App(__name__, specification_dir="specs/")
    connexion_api = connexion_app.add_api(
        resolver=connexion.RestyResolver("jboard.viewsets"),
        specification="v1.yaml",
        strict_validation=True,
        validate_responses=True,
    )
    flask_app = connexion_app.app
    flask_app.config["JSON_SORT_KEYS"] = False
    flask_app.config["spec"] = connexion_api.specification
    return flask_app


def entry_point():
    parser = argparse.ArgumentParser()
    parser.add_argument("--version", action="version", version=__version__)
    parser.add_argument("--prod", default=False, action="store_true")
    parser.add_argument("cmd")
Exemple #4
0
@click.option("-o",
              "--output",
              default=".env",
              type=Path,
              help="Destination for env-file")
@click.option("-t",
              "--template",
              default="env-template.yml",
              type=Path,
              help="Template for environment variables")
@click.option(
    "-z",
    "--zero-input",
    is_flag=True,
    help="Skip prompts and use presets verbatim. Useful for CI environments.")
@click.version_option(poetry_version.extract(source_file=__file__))
def barbara_develop(skip_existing, output, template, zero_input):
    """Development mode which prompts for user input"""
    if zero_input:
        destination_handler = create_target_file
        merge_strategy = merge_with_presets
    else:
        destination_handler = confirm_target_file
        merge_strategy = merge_with_prompts

    confirmed_target = Path(
        output if output.exists() else destination_handler(output))

    click.echo(f"Creating environment: {confirmed_target}")

    template_reader_class = readers.get_reader(template)
Exemple #5
0
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.insert(0, os.path.abspath('..'))
sys.path.insert(0, os.path.abspath('../sigaa'))

# -- Project information -----------------------------------------------------

project = 'sigaa-cli'
copyright = '2019, Bruno do Nascimento Maciel'
author = 'Bruno do Nascimento Maciel'

# The full version, including alpha/beta/rc tags
import poetry_version
release = str(poetry_version.extract(source_file="../pyproject.toml"))

# -- General configuration ---------------------------------------------------
master_doc = 'index'
# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = ['sphinx.ext.autodoc']

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
Exemple #6
0
from setuptools import find_packages, setup
import poetry_version

with open('README.md', 'r') as fh:
    long_description = fh.read()

setup(
    name='sigaa-cli',
    version=poetry_version.extract(source_file="pyproject.toml"),
    description=
    'A uniffical Comand Line Interface that enable developers to execute some actions inside the SIGAA platform using python code. Independent of the university.',
    long_description=long_description,
    long_description_content_type='text/markdown',
    packages=find_packages(),
    url="https://github.com/macielti/sigaa-cli",
    author="Bruno do Nascimento Maciel",
    author_email="*****@*****.**",
    classifiers=[
        "Programming Language :: Python :: 3",
        "Development Status :: 2 - Pre-Alpha",
        "License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)",
        "Operating System :: OS Independent",
    ],
    install_requires=["requests", "tqdm"])