initiate repository

This commit is contained in:
Tino Schreiber 2023-09-22 09:10:54 +00:00
parent 3550c0271f
commit 3d336af3bc
21 changed files with 574 additions and 0 deletions

6
.coveragerc Normal file
View File

@ -0,0 +1,6 @@
[run]
branch = True
source = hc-tools
[report]
ignore_errors = True

61
.gitignore vendored Normal file
View File

@ -0,0 +1,61 @@
# Add patterns in here to exclude files created by tools integrated with this
# repository, such as test frameworks from the project's recommended workflow,
# rendered documentation and package builds.
#
# Don't add patterns to exclude files created by preferred personal tools
# (editors, IDEs, your operating system itself even). These should instead be
# maintained outside the repository, for example in a ~/.gitignore file added
# with:
#
# git config --global core.excludesfile '~/.gitignore'
# Bytecompiled Python
*.py[cod]
# C extensions
*.so
# Packages
*.egg*
*.egg-info
dist
build
eggs
parts
bin
var
sdist
develop-eggs
.installed.cfg
lib
lib64
# Installer logs
pip-log.txt
# Unit test / coverage reports
cover/
.coverage*
!.coveragerc
.tox
nosetests.xml
.testrepository
.stestr
.venv
# Translations
*.mo
# Complexity
output/*.html
output/*/index.html
# Sphinx
doc/build
# pbr generates these
AUTHORS
ChangeLog
# Files created by releasenotes build
releasenotes/build

3
.stestr.conf Normal file
View File

@ -0,0 +1,3 @@
[DEFAULT]
test_path=./hc_tools/tests/
top_dir=./

3
CONTRIBUTING.rst Normal file
View File

@ -0,0 +1,3 @@
The source repository for this project can be found at:
https://gitea.eco.tsi-dev.otc-service.com/infra/hc-tools.git

4
doc/requirements.txt Normal file
View File

@ -0,0 +1,4 @@
sphinx>=2.0.0,!=2.1.0 # BSD
otcdocstheme>=1.0.0 # Apache-2.0
# releasenotes
reno>=3.1.0 # Apache-2.0

76
doc/source/conf.py Executable file
View File

@ -0,0 +1,76 @@
# -*- coding: utf-8 -*-
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import os
import sys
sys.path.insert(0, os.path.abspath('../..'))
# -- General configuration ----------------------------------------------------
# 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',
'otcdocstheme',
#'sphinx.ext.intersphinx',
]
# autodoc generation is a bit aggressive and a nuisance when doing heavy
# text edit cycles.
# execute "export SPHINX_DEBUG=1" in your terminal to disable
# The suffix of source filenames.
source_suffix = '.rst'
# The master toctree document.
master_doc = 'index'
# General information about the project.
project = 'ssh://git@gitea.eco.tsi-dev.otc-service.com:2222/infra/otc-metadata.git'
copyright = '2022, Open Telekom Cloud Developers'
# If true, '()' will be appended to :func: etc. cross-reference text.
add_function_parentheses = True
# If true, the current module name will be prepended to all description
# unit titles (such as .. function::).
add_module_names = True
# The name of the Pygments (syntax highlighting) style to use.
pygments_style = 'native'
# -- Options for HTML output --------------------------------------------------
# The theme to use for HTML and HTML Help pages. Major themes that come with
# Sphinx are currently 'default' and 'sphinxdoc'.
# html_theme_path = ["."]
# html_theme = '_theme'
# html_static_path = ['static']
html_theme = 'otcdocs'
# Output file base name for HTML help builder.
htmlhelp_basename = '%sdoc' % project
# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title, author, documentclass
# [howto/manual]).
latex_documents = [
('index',
'%s.tex' % project,
'%s Documentation' % project,
'Open Telekom Cloud Developers', 'manual'),
]
# Example configuration for intersphinx: refer to the Python standard library.
#intersphinx_mapping = {'http://docs.python.org/': None}

3
doc/source/index.rst Normal file
View File

@ -0,0 +1,3 @@
============================================
Welcome to the documentation of hc-tools
============================================

35
hc_tools/__init__.py Normal file
View File

@ -0,0 +1,35 @@
# Licensed under the Apache License, Version 2.0 (the "License"); you may
# not use this file except in compliance with the License. You may obtain
# a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
# License for the specific language governing permissions and limitations
# under the License.
__all__ = ["__version__", "Docs"]
import pbr.version
from otc_metadata.services import Services # flake8: noqa
__version__ = pbr.version.VersionInfo("otc-metadata").version_string()
_service_manager = None
def get_service_data(*args, **kwargs):
"""Return singleton instance of the Services object.
Parameters are all passed through to the
:class:`~otc_metadata.services.Services` constructor.
.. note::
Only one singleton is kept, so if instances with different parameter
values are desired, directly calling the constructor is necessary.
:returns: Singleton instance of
:class:`~otc_metadata.services.Services`
"""
global _service_manager
if not _service_manager:
_service_manager = Services(*args, **kwargs)
return _service_manager

View File

View File

271
releasenotes/source/conf.py Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,8 @@
============================================
otc-metadata Release Notes
============================================
.. toctree::
:maxdepth: 1
unreleased

View File

@ -0,0 +1,5 @@
==============================
Current Series Release Notes
==============================
.. release-notes::

5
requirements.txt Normal file
View File

@ -0,0 +1,5 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
pbr>=2.0 # Apache-2.0

25
setup.cfg Normal file
View File

@ -0,0 +1,25 @@
[metadata]
name = hc-tools
summary = Tools to maintain the Open Telekom Cloud Helpcenter
description_file =
README.rst
author = Open Telekom Cloud
home_page = https://open.telekom.cloud/
python_requires = >=3.6
classifier =
Environment :: OpenStack
Intended Audience :: Information Technology
Intended Audience :: System Administrators
License :: OSI Approved :: Apache Software License
Operating System :: POSIX :: Linux
Programming Language :: Python
Programming Language :: Python :: 3
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3 :: Only
Programming Language :: Python :: Implementation :: CPython
[files]
packages =
hc_tools

18
setup.py Normal file
View File

@ -0,0 +1,18 @@
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
# implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import setuptools
setuptools.setup(
setup_requires=['pbr'],
pbr=True)

7
test-requirements.txt Normal file
View File

@ -0,0 +1,7 @@
# The order of packages is significant, because pip processes them in the order
# of appearance. Changing the order has an impact on the overall integration
# process, which may cause wedges in the gate later.
stestr>=2.0.0 # Apache-2.0
testtools>=2.2.0 # MIT
flake8

7
tools-requirements.txt Normal file
View File

@ -0,0 +1,7 @@
GitPython
ruamel.yaml
requests
jinja2
dirsync
cookiecutter
opensearch-py

25
tox.ini Normal file
View File

@ -0,0 +1,25 @@
[tox]
minversion = 3.2.0
envlist = py3,pep8
ignore_basepython_conflict = true
[testenv]
basepython = python3
usedevelop = True
setenv =
PYTHONWARNINGS=default::DeprecationWarning
deps = -r{toxinidir}/test-requirements.txt
commands = stestr run {posargs}
[testenv:pep8]
commands = flake8 {posargs}
[testenv:venv]
commands = {posargs}
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
show-source = True
ignore = E123,E125,W503
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build

12
zuul.yaml Normal file
View File

@ -0,0 +1,12 @@
---
- project:
merge-mode: squash-merge
default-branch: main
check:
jobs:
- otc-tox-pep8
- otc-tox-py39
gate:
jobs:
- otc-tox-pep8
- otc-tox-py39