Beispiel #1
0
    def __init__(self, api_manager, **options):
        """
        In Flask-Restless, it is up to you to choose which models you would like
        to make available as an api. It should also be a choice to expose your
        datamodel, and preferably in the same intuitive way that you register
        your models.

        This object functions as a puppet model to give the user the feeling
        like they are registering just another model they want to expose.
        """
        api_manager.create_api_blueprint = attach_listener(
            api_manager.create_api_blueprint, self)
        self.api_manager = api_manager
        vi = VersionInfo('flask-restless-datamodel')
        serialize_naively = options.get('serialize_naively', False)
        self.data_model = {
            'FlaskRestlessDatamodel': {
                'server_version': vi.release_string(),
                'serialize_naively': serialize_naively
            }
        }
        self.polymorphic_info = defaultdict(dict)
        self.options = options
        self.model_renderer = None
        self.model_views = {}
        self.app = None
        self.cereal = Cereal(raise_load_errors=options.get(
            'raise_load_errors', True),
                             serialize_naively=serialize_naively)
def cli(package: str, inc_kwargs: dict) -> None:
    """Bump a MAJOR.MINOR.PATCH version string at the specified index location or 'patch' digit."""

    semver = VersionInfo(package).semantic_version()

    # Pre-decrement a "dev" version to get the real version tuple.
    if 'dev' in semver.version_tuple():
        semver = semver.decrement()

    semver = semver.increment(**inc_kwargs)
    click.echo(semver.release_string(), nl=False)
Beispiel #3
0
from .rotation_matrix_3d import rotation_from_angles
from .rotation_matrix_3d import rotation_around_x
from .rotation_matrix_3d import rotation_around_y
from .rotation_matrix_3d import rotation_around_z
from .rotation_matrix_3d import rotation_around_axis
from .rotation_matrix_nd import rotation_from_angle_and_plane
from .rotation_matrix_2d import rotation_from_angle
from .rotation_matrix_nd import random_matrix

from pbr.version import VersionInfo

_v = VersionInfo('mgen').semantic_version()
__version__ = _v.release_string()
version_info = _v.version_tuple()
Beispiel #4
0
# same format as sys.version_info: "A tuple containing the five components of
# the version number: major, minor, micro, releaselevel, and serial. All
# values except releaselevel are integers; the release level is 'alpha',
# 'beta', 'candidate', or 'final'. The version_info value corresponding to the
# Python version 2.0 is (2, 0, 0, 'final', 0)."  Additionally we use a
# releaselevel of 'dev' for unreleased under-development code.
#
# If the releaselevel is 'alpha' then the major/minor/micro components are not
# established at this point, and setup.py will use a version of next-$(revno).
# If the releaselevel is 'final', then the tarball will be major.minor.micro.
# Otherwise it is major.minor.micro~$(revno).
from pbr.version import VersionInfo
_version = VersionInfo('testscenarios')
__version__ = _version.semantic_version().version_tuple()
version = _version.release_string()

__all__ = [
    'TestWithScenarios',
    'WithScenarios',
    'apply_scenario',
    'apply_scenarios',
    'generate_scenarios',
    'load_tests_apply_scenarios',
    'multiply_scenarios',
    'per_module_scenarios',
    'with_scenarios',
    ]


from testscenarios.scenarios import (
Beispiel #5
0
# same format as sys.version_info: "A tuple containing the five components of
# the version number: major, minor, micro, releaselevel, and serial. All
# values except releaselevel are integers; the release level is 'alpha',
# 'beta', 'candidate', or 'final'. The version_info value corresponding to the
# Python version 2.0 is (2, 0, 0, 'final', 0)."  Additionally we use a
# releaselevel of 'dev' for unreleased under-development code.
#
# If the releaselevel is 'alpha' then the major/minor/micro components are not
# established at this point, and setup.py will use a version of next-$(revno).
# If the releaselevel is 'final', then the tarball will be major.minor.micro.
# Otherwise it is major.minor.micro~$(revno).
from pbr.version import VersionInfo
_version = VersionInfo('testscenarios')
__version__ = _version.semantic_version().version_tuple()
version = _version.release_string()

__all__ = [
    'TestWithScenarios',
    'WithScenarios',
    'apply_scenario',
    'apply_scenarios',
    'generate_scenarios',
    'load_tests_apply_scenarios',
    'multiply_scenarios',
    'per_module_scenarios',
]

from testscenarios.scenarios import (
    apply_scenario,
    generate_scenarios,
Beispiel #6
0
# -*- coding: utf-8 -*-
# Copyright (C) 2004-2008 Tristan Seligmann and Jonathan Jacobs
# Copyright (C) 2012-2014 Bastian Kleineidam
# Copyright (C) 2015-2017 Tobias Gruetzmacher
"""
Automated comic downloader. Dosage traverses comic websites in
order to download each strip of the comic. The intended use is for
mirroring the strips locally for ease of viewing; redistribution of the
downloaded strips may violate copyright, and is not advisable unless you
have communicated with all of the relevant copyright holders, described
your intentions, and received permission to distribute.

The primary interface is the 'dosage' commandline script.
Comic modules for each comic are located in L{dosagelib.plugins}.
"""
from __future__ import absolute_import, division, print_function

from pbr.version import VersionInfo

AppName = u'dosage'

version_info = VersionInfo(AppName)
__version__ = version_info.version_string()  # PEP 396
AppVersion = version_info.release_string()
Beispiel #7
0
#! /usr/bin/env python
"""WSDL parsing services package for Web Services for Python."""

ident = "$Id$"

from pbr.version import VersionInfo
from . import WSDLTools  # noqa
from . import XMLname   # noqa

_v = VersionInfo('wstools').semantic_version()
__version__ = _v.release_string()
version_info = _v.version_tuple()

__all__ = (
    'WDSLTools',
    'XMLname',
    '__version__',
    'version_info'
)
Beispiel #8
0
from pbr.version import VersionInfo

VERSION = VersionInfo('ipfs-publish').semantic_version()
__version__ = VERSION.release_string()

APP_NAME = 'ipfs_publish'
"""
Constant that defines the basic application then, that is used for appdata
"""

ENV_NAME_CONFIG_PATH: str = 'IPFS_PUBLISH_CONFIG'
"""
Name of environmental variable that holds path to the toml config that should be used.
"""

ENV_NAME_IPFS_HOST: str = 'IPFS_PUBLISH_IPFS_HOST'
"""
Name of environmental variable that defines the hostname of the go-ipfs's daemon's API.
"""

ENV_NAME_IPFS_PORT: str = 'IPFS_PUBLISH_IPFS_PORT'
"""
Name of environmental variable that defines the port of the go-ipfs's daemon's API.
"""

ENV_NAME_VERBOSITY_LEVEL: str = 'IPFS_PUBLISH_VERBOSITY'
"""
Name of environmental variable that can increase the level of logging verbosity.
"""

ENV_NAME_PASS_EXCEPTIONS: str = 'IPFS_PUBLISH_EXCEPTIONS'
Beispiel #9
0
import logging
import argparse
import unittest
from io import StringIO
from urllib.parse import urlencode
from urllib.parse import urlunparse

import requests
from onetimepass import get_totp
from lxml import etree
from pbr.version import VersionInfo



_VERSION = VersionInfo('test_http').semantic_version()
__version__ = _VERSION.release_string()
__version_info__ = _VERSION.version_tuple()



__all__ = (
    "__version__",
    "__version_info__",
    "main",
)



class PathException(Exception):
    pass
Beispiel #10
0
from pbr.version import VersionInfo

version_info = VersionInfo('bmcmanager')
version_string = version_info.release_string()