diff options
author | mrichomme <morgan.richomme@orange.com> | 2020-06-03 09:48:34 +0200 |
---|---|---|
committer | Bartek Grzybowski <b.grzybowski@partner.samsung.com> | 2020-06-04 10:59:59 +0200 |
commit | 427c105c589f0737871a60759b416eda6fb52bf2 (patch) | |
tree | 3a918e6fc1cb9e692bbecbd815196e42d51c4d37 | |
parent | f46416c1031ebd16613c06d8112d377f09216af0 (diff) |
Add tox.ini for pythonsdk-tests
Issue-ID: INT-1607
Signed-off-by: mrichomme <morgan.richomme@orange.com>
Change-Id: I668882bcceb98c47896486c600f24fae52341b61
Signed-off-by: mrichomme <morgan.richomme@orange.com>
-rw-r--r-- | .coafile | 30 | ||||
-rw-r--r-- | .gitattributes | 5 | ||||
-rw-r--r-- | .gitignore | 33 | ||||
-rw-r--r-- | .yamllint | 16 | ||||
-rw-r--r-- | docs/conf.py | 26 | ||||
-rw-r--r-- | docs/requirements-docs.txt | 15 | ||||
-rw-r--r-- | tox.ini | 53 |
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 @@ -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) \ " + |