def test_semantic_version():
    """
    Check that version follows the Semantic Versioning 2.0.0 specification.

        http://semver.org/
    """
    mayor, minor, rev = map(int, __version__.split('.'))

    assert mayor >= 0
    assert minor >= 0
    assert rev >= 0
Пример #2
0
""" Sphinx configuration. """
# -*- coding: utf-8 -*-

import os
import sys
import datetime

from bottle-login import __version__ as release

sys.path.insert(0, os.path.abspath(
    os.path.join(os.path.dirname(__file__), '..')))
extensions = ['sphinx.ext.autodoc', 'sphinx.ext.intersphinx']
templates_path = ['_templates']
source_suffix = '.rst'
master_doc = 'index'
project = u'Bottle Login'
copyright = u'%s, Kirill Klenov' % datetime.datetime.now().year
version = '.'.join(release.split('.')[:2])
exclude_patterns = ['_build']
autodoc_member_order = 'bysource'
html_use_modindex = False
html_show_sphinx = False
htmlhelp_basename = 'helpdoc'
pygments_style = 'tango'
html_theme = 'default'
html_theme_options = {}
Пример #3
0
def test_semver():
    """Test a proper semantic version is used."""
    # TODO Test rules according to PEP440 - Version Identification and Dependency Specification
    assert len(version.split('.')) == 3, "Semantic version M.m.µ OK"
    assert all(i.isdigit for i in version.split('.')), "Semantic version parts are numeric"
Пример #4
0
source_suffix = '.rst'

# The master toctree document.
master_doc = 'index'

# General information about the project.
project = u'{{parentcap}}{{joiner}}{{projectcap}}'
copyright = __copyright__
author = __author__

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '.'.join(__version__.split('.')[:2])
# The full version, including alpha/beta/rc tags.
release = __version__

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This patterns also effect to html_static_path and html_extra_path
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
Пример #5
0
from sprockets.{{cookiecutter.project_name}} import version_info, __version__

needs_sphinx = '1.0'
extensions = [
    'sphinx.ext.autodoc',
    'sphinx.ext.intersphinx',
    'sphinxcontrib.httpdomain',
]
templates_path = []
source_suffix = '.rst'
master_doc = 'index'
project = 'sprockets.{{cookiecutter.project_name}}'
copyright = '{{cookiecutter.year}}, {{cookiecutter.full_name}}'
version = '.'.join(__version__.split('.')[0:1])
release = __version__
if len(version_info) > 3:
    release += '-{0}'.format(str(v) for v in version_info[3:])
exclude_patterns = []
intersphinx_mapping = {
    'python': ('https://docs.python.org/3/', None),
    'sprockets': ('https://sprockets.readthedocs.org/en/latest/', None),
}
Пример #6
0
"""Provide the core FastAPI application."""
from fastapi import FastAPI

from {{cookiecutter.package}} import __version__


if 'untagged' in __version__ or 'unknown':
    API_VERSION = 0
else:
    API_VERSION = __version__.split('.')[0]


app = FastAPI(title='{{cookiecutter.package}}',
              description='{{cookiecutter.description}}',
              version=__version__,
              openapi_url=f"/api/v{API_VERSION}/openapi.json",
              docs_url='/api/docs',
              redoc_url='/api/redoc')