From 812c86bacd5925c27cab32c2741c4d2f63b2f8cd Mon Sep 17 00:00:00 2001 From: Erich Cordoba Date: Tue, 3 Jul 2018 18:07:53 -0500 Subject: [PATCH] Create initial template for documentation [dtroyer: fixed linters job and added to gate queue so this can be merged] Story: 2002813 Task: 22727 Change-Id: I8a988cc49440b21176dc95bd12ad383836148dca Signed-off-by: Erich Cordoba --- .gitignore | 104 ++++++++++++++++++++++++++++++++ .zuul.yaml | 8 +++ README.rst | 5 ++ docs/setup.cfg | 30 +++++++++ docs/setup.py | 29 +++++++++ docs/source/contributing.rst | 5 ++ docs/source/getting_started.rst | 5 ++ docs/source/index.rst | 17 ++++++ test-requirements.txt | 6 ++ tox.ini | 24 ++++++++ 10 files changed, 233 insertions(+) create mode 100644 .gitignore create mode 100644 .zuul.yaml create mode 100644 README.rst create mode 100644 docs/setup.cfg create mode 100644 docs/setup.py create mode 100644 docs/source/contributing.rst create mode 100644 docs/source/getting_started.rst create mode 100644 docs/source/index.rst create mode 100644 test-requirements.txt create mode 100644 tox.ini diff --git a/.gitignore b/.gitignore new file mode 100644 index 000000000..894a44cc0 --- /dev/null +++ b/.gitignore @@ -0,0 +1,104 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ diff --git a/.zuul.yaml b/.zuul.yaml new file mode 100644 index 000000000..7ccbd0a60 --- /dev/null +++ b/.zuul.yaml @@ -0,0 +1,8 @@ +--- +- project: + check: + jobs: + - openstack-tox-linters + gate: + jobs: + - openstack-tox-linters diff --git a/README.rst b/README.rst new file mode 100644 index 000000000..9c6ce9e10 --- /dev/null +++ b/README.rst @@ -0,0 +1,5 @@ +======================= +StarlingX documentation +======================= + +This repository contains base documentation for the StarlingX project. diff --git a/docs/setup.cfg b/docs/setup.cfg new file mode 100644 index 000000000..ea878a94b --- /dev/null +++ b/docs/setup.cfg @@ -0,0 +1,30 @@ +[metadata] +name = starlingxdocs +summary = StarlingX Documentation +author = StarlingX +author-email = starlingx-discuss@lists.starlingx.io +home-page = https://starlingx.io +classifier = +Environment :: OpenStack +Intended Audience :: Information Technology +Intended Audience :: System Administrators +License :: OSI Approved :: Apache Software License +Operating System :: POSIX :: Linux +Topic :: Documentation + +[global] +setup-hooks = + pbr.hooks.setup_hook + +[files] + +[build_sphinx] +all_files = 1 +build-dir = build +source-dir = source + +[wheel] +universal = 1 + +[pbr] +warnerrors = True \ No newline at end of file diff --git a/docs/setup.py b/docs/setup.py new file mode 100644 index 000000000..62f38a592 --- /dev/null +++ b/docs/setup.py @@ -0,0 +1,29 @@ +#!/usr/bin/env python +# +# 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. + +# THIS FILE IS MANAGED BY THE GLOBAL REQUIREMENTS REPO - DO NOT EDIT +import setuptools + +# In python < 2.7.4, a lazy loading of package `pbr` will break +# setuptools if some other modules registered functions in `atexit`. +# solution from: http://bugs.python.org/issue15881#msg170215 +try: + import multiprocessing # noqa +except ImportError: + pass + +setuptools.setup( + setup_requires=['pbr'], + pbr=True) diff --git a/docs/source/contributing.rst b/docs/source/contributing.rst new file mode 100644 index 000000000..b27996e0f --- /dev/null +++ b/docs/source/contributing.rst @@ -0,0 +1,5 @@ +============ +Contributing +============ + +The contributing page. diff --git a/docs/source/getting_started.rst b/docs/source/getting_started.rst new file mode 100644 index 000000000..4708fb80d --- /dev/null +++ b/docs/source/getting_started.rst @@ -0,0 +1,5 @@ +=============== +Getting started +=============== + +The getting started page. diff --git a/docs/source/index.rst b/docs/source/index.rst new file mode 100644 index 000000000..f79c30e73 --- /dev/null +++ b/docs/source/index.rst @@ -0,0 +1,17 @@ +======================= +StarlingX Documentation +======================= + +Abstract +~~~~~~~~ + +This is the general documentation for the StarlingX project. + +Contents +~~~~~~~~ + +.. toctree:: + :maxdepth: 2 + + getting_started.rst + contributing.rst diff --git a/test-requirements.txt b/test-requirements.txt new file mode 100644 index 000000000..cde66005e --- /dev/null +++ b/test-requirements.txt @@ -0,0 +1,6 @@ +bashate >= 0.2 +PyYAML >= 3.1.0 +yamllint >= 0.5.2 +openstack-doc-tools>=1.6.0 +sphinx>=1.6.2 +openstackdocstheme>=1.18.1 diff --git a/tox.ini b/tox.ini new file mode 100644 index 000000000..8303f125f --- /dev/null +++ b/tox.ini @@ -0,0 +1,24 @@ +[tox] +envlist = linters +minversion = 2.3 +skipsdist = True + +[testenv] +basepython = python3 +install_command = pip install -U {opts} {packages} +setenv = VIRTUAL_ENV={envdir} + OS_STDOUT_CAPTURE=1 + OS_STDERR_CAPTURE=1 + OS_TEST_TIMEOUT=60 +deps = -r{toxinidir}/test-requirements.txt + +[testenv:linters] +whitelist_externals = bash +commands = + bash -c "find {toxinidir} \ + \( -name .tox -prune \) \ + -o -type f -name '*.yaml' \ + -print0 | xargs -0 yamllint" + +[testenv:venv] +commands = {posargs}