aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.coafile30
-rw-r--r--.gitattributes5
-rw-r--r--.gitignore33
-rw-r--r--.yamllint16
-rw-r--r--docs/conf.py26
-rw-r--r--docs/requirements-docs.txt15
-rw-r--r--tox.ini53
7 files changed, 178 insertions, 0 deletions
diff --git a/.coafile b/.coafile
new file mode 100644
index 0000000..c67ac99
--- /dev/null
+++ b/.coafile
@@ -0,0 +1,30 @@
+[yaml]
+bears = YAMLLintBear
+yamllint_config = .yamllint
+ignore =
+ .tox/**,
+
+[json]
+bears = JSONFormatBear
+json_sort = False
+indent_size = 2
+ignore =
+ .tox/**,
+
+[py]
+bears = PyLintBear
+pylint_disable = all
+pylint_enable =
+ bad-indentation, trailing-whitespace, unused-wildcard-import, unused-import,
+ unnecessary-semicolon, unnecessary-semicolon, undefined-variable,
+ syntax-error, unused-variable, using-constant-test,unused-argument,
+ len-as-condition, trailing-newlines, missing-final-newline, reimported,
+ too-many-function-args, singleton-comparison
+ignore =
+ .tox/**
+
+[md]
+bears = MarkdownBear
+ignore =
+ .tox/**
+
diff --git a/.gitattributes b/.gitattributes
new file mode 100644
index 0000000..2eb6749
--- /dev/null
+++ b/.gitattributes
@@ -0,0 +1,5 @@
+* text=auto eol=lf
+*.png binary
+*.jpg binary
+*.xlsx binary
+*.csar -text
diff --git a/.gitignore b/.gitignore
new file mode 100644
index 0000000..543c596
--- /dev/null
+++ b/.gitignore
@@ -0,0 +1,33 @@
+.idea/
+.project
+.classpath
+.factorypath
+.settings/
+target/
+autorelease/build/*/
+autorelease/dist
+log.html
+output.xml
+report.html
+env.properties
+.vagrant
+/archives/
+*.jar
+*.zip
+*.tar
+*.log
+.vagrant
+*~
+.checkstyle
+.DS_Store
+devtool/
+seccom/
+csit/
+.idea
+*.iml
+/.pydevproject
+/bin/
+*.class
+*.csar
+benchmark/
+.tox/
diff --git a/.yamllint b/.yamllint
new file mode 100644
index 0000000..ab5bdc3
--- /dev/null
+++ b/.yamllint
@@ -0,0 +1,16 @@
+---
+
+extends: default
+
+rules:
+ line-length: disable
+ truthy: disable
+ braces:
+ max-spaces-inside: 1
+ brackets:
+ max-spaces-inside: 1
+ comments-indentation: disable
+ comments: disable
+ document-start: disable
+ indentation:
+ indent-sequences: whatever
diff --git a/docs/conf.py b/docs/conf.py
new file mode 100644
index 0000000..6684e1c
--- /dev/null
+++ b/docs/conf.py
@@ -0,0 +1,26 @@
+from docs_conf.conf import *
+
+branch = 'latest'
+master_doc = 'index'
+
+linkcheck_ignore = [
+ r'http://localhost:.*',
+ 'http://CONSUL_SERVER_UI:30270/ui/#/dc1/services',
+ r'https://.*h=frankfurt',
+ r'http.*frankfurt.*',
+ r'http.*simpledemo.onap.org.*',
+ r'http://ANY_K8S_IP.*',
+ 'http://so-monitoring:30224',
+ r'http://SINK_IP_ADDRESS:667.*',
+ r'http.*K8S_HOST:30227.*',
+ r'http.*K8S_NODE_IP.*'
+]
+
+intersphinx_mapping = {}
+
+html_theme = 'sphinx_rtd_theme'
+html_last_updated_fmt = '%d-%b-%y %H:%M'
+html_theme_options = {'body_max_width': '100%'}
+
+def setup(app):
+ app.add_stylesheet("css/ribbon.css")
diff --git a/docs/requirements-docs.txt b/docs/requirements-docs.txt
new file mode 100644
index 0000000..b3188dd
--- /dev/null
+++ b/docs/requirements-docs.txt
@@ -0,0 +1,15 @@
+tox
+Sphinx
+doc8
+docutils
+setuptools
+six
+sphinx_rtd_theme>=0.4.3
+sphinxcontrib-blockdiag
+sphinxcontrib-needs>=0.2.3
+sphinxcontrib-nwdiag
+sphinxcontrib-seqdiag
+sphinxcontrib-swaggerdoc
+sphinxcontrib-plantuml
+sphinx_bootstrap_theme
+lfdocs-conf
diff --git a/tox.ini b/tox.ini
new file mode 100644
index 0000000..ee2b4c0
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,53 @@
+[tox]
+minversion = 3.2.0
+envlist = json,yaml,py,rst,md
+skipsdist = true
+requires = pip >= 8
+
+[testenv]
+basepython = python3
+whitelist_externals =
+ git
+ bash
+deps =
+ coala-bears
+ nodeenv
+
+[testenv:json]
+commands_pre =
+ /bin/sh -c "git --no-pager diff HEAD HEAD^ --name-only '*.json' > /tmp/.coalist_json"
+commands =
+# '\ ' at the end of command is needed for a case where above command returns empty list (it adds empty file
+# parameter to '--files' opt
+ /bin/bash -c "coala --non-interactive --disable-caching --no-autoapply-warn json --files $(</tmp/.coalist_json) \ "
+
+[testenv:yaml]
+commands_pre =
+ /bin/sh -c "git --no-pager diff HEAD HEAD^ --name-only '*.yaml' '*.yml' > /tmp/.coalist_yaml"
+commands =
+# '\ ' at the end of command is needed for a case where above command returns empty list (it adds empty file
+# parameter to '--files' opt
+ /bin/bash -c "coala --non-interactive --disable-caching --no-autoapply-warn yaml --files $(</tmp/.coalist_yaml) \ "
+
+[testenv:py]
+commands_pre =
+ /bin/sh -c "git --no-pager diff HEAD HEAD^ --name-only '*.py' > /tmp/.coalist_py"
+commands =
+ /bin/bash -c "coala --non-interactive --disable-caching --no-autoapply-warn py --files $(</tmp/.coalist_py) \ "
+
+[testenv:rst]
+commands_pre =
+ /bin/sh -c "git --no-pager diff HEAD HEAD^ --name-only '*.rst' > /tmp/.coalist_rst"
+deps = -r ./docs/requirements-docs.txt
+commands =
+ /bin/sh -c "sphinx-build -n -b html docs docs/build/html $(</tmp/.coalist_rst)"
+ /bin/sh -c "sphinx-build -n -b linkcheck docs docs/build/linkcheck $(</tmp/.coalist_rst)"
+
+[testenv:md]
+commands_pre =
+ nodeenv -p --verbose
+ npm install --global remark-cli
+ /bin/sh -c "git --no-pager diff HEAD HEAD^ --name-only '*.md' > /tmp/.coalist_md"
+commands =
+ /bin/bash -c "coala --non-interactive --disable-caching --no-autoapply-warn md --files $(</tmp/.coalist_md) \ "
+