Add tox/coala linting, docs config 51/10151/3
authorDaniel Farrell <dfarrell@redhat.com>
Thu, 19 Apr 2018 20:50:02 +0000 (16:50 -0400)
committerDaniel Farrell <dfarrell@redhat.com>
Mon, 23 Apr 2018 20:18:31 +0000 (16:18 -0400)
* Add tox config for running coala linting, docs builds
* Add coala config for running rst, formatting, grammar and git linting
* Add basic docs config, skeleton
* Update gitignore from default to appropriate for this repo

Change-Id: Ief9e3ac4cc145139df8bc7e3601dae4dbd637456
Signed-off-by: Daniel Farrell <dfarrell@redhat.com>
.coafile [new file with mode: 0644]
.gitignore
docs/_static/logo.png [new file with mode: 0644]
docs/conf.py [new file with mode: 0644]
docs/conf.yaml [new file with mode: 0644]
docs/favicon.ico [new file with mode: 0644]
docs/index.rst [new file with mode: 0644]
requirements-docs.txt [new file with mode: 0644]
tox.ini [new file with mode: 0644]

diff --git a/.coafile b/.coafile
new file mode 100644 (file)
index 0000000..e9a976c
--- /dev/null
+++ b/.coafile
@@ -0,0 +1,39 @@
+[all]
+ignore = .tox/**,
+    .git/**,
+    .gitignore,
+    .gitreview,
+    node_modules/**,
+    **.sw?,
+    **.orig
+
+[all.reStructuredText]
+bears = RSTcheckBear
+files = **.rst
+
+[all.linelength]
+bears = LineLengthBear
+files = **.rst
+max_line_length = 80
+
+[all.spacing]
+bears = SpaceConsistencyBear
+files = **.rst
+use_spaces = True
+enforce_newline_at_EOF = False
+default_actions = SpaceConsistencyBear: ApplyPatchAction
+
+[all.grammar]
+bears = WriteGoodLintBear
+files = **.rst
+allow_so_beginning = False
+allow_there_is = False
+allow_cliche_phrases = False
+
+[all.git]
+bears = GitCommitBear
+ignore_length_regex = Signed-off-by,
+    Also-by,
+    Co-authored-by,
+    http://,
+    https://
index 2fdce4b..604d4e2 100644 (file)
@@ -1,20 +1,11 @@
-# Ignore Vim temporary files
+# Vim
 .*.sw?
 
-# Maven
-target/
-
-# Vagrant
-.vagrant
-
-# IntelliJ
-.idea/
-*.iml
+# Tox
+.tox/
 
-# Eclipse
-.project
+# Docs
+docs/_build/
 
-# Python
-.tox/
-__pycache__/
-*.pyc
+# Coala
+node_modules
diff --git a/docs/_static/logo.png b/docs/_static/logo.png
new file mode 100644 (file)
index 0000000..0796dac
Binary files /dev/null and b/docs/_static/logo.png differ
diff --git a/docs/conf.py b/docs/conf.py
new file mode 100644 (file)
index 0000000..751fd20
--- /dev/null
@@ -0,0 +1,17 @@
+#!/usr/bin/env python3
+# -*- coding: utf-8 -*-
+# SPDX-License-Identifier: EPL-1.0
+##############################################################################
+# Copyright (c) 2018 The Linux Foundation and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Eclipse Public License v1.0
+# which accompanies this distribution, and is available at
+# http://www.eclipse.org/legal/epl-v10.html
+##############################################################################
+
+from docs_conf.conf import *
+
+linkcheck_ignore = []
+
+nitpicky = True
diff --git a/docs/conf.yaml b/docs/conf.yaml
new file mode 100644 (file)
index 0000000..d3b008f
--- /dev/null
@@ -0,0 +1,10 @@
+---
+project: lftools
+project_cfg: lfdocs
+extensions:
+  - sphinx.ext.autodoc
+  - sphinx.ext.doctest
+  - sphinx.ext.intersphinx
+  - sphinx.ext.todo
+  - sphinx.ext.coverage
+  - sphinx.ext.viewcode
diff --git a/docs/favicon.ico b/docs/favicon.ico
new file mode 100644 (file)
index 0000000..fc9eadb
Binary files /dev/null and b/docs/favicon.ico differ
diff --git a/docs/index.rst b/docs/index.rst
new file mode 100644 (file)
index 0000000..f70a25c
--- /dev/null
@@ -0,0 +1,18 @@
+.. Linux Foundation Networking Processes documentation master file
+
+Linux Foundation Networking Process
+===================================
+
+Linux Foundation Networking (LFN) Process documentation.
+
+Contents:
+
+.. toctree::
+    :maxdepth: 2
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
diff --git a/requirements-docs.txt b/requirements-docs.txt
new file mode 100644 (file)
index 0000000..74a3b7a
--- /dev/null
@@ -0,0 +1 @@
+lfdocs-conf
diff --git a/tox.ini b/tox.ini
new file mode 100644 (file)
index 0000000..5b4accb
--- /dev/null
+++ b/tox.ini
@@ -0,0 +1,27 @@
+[tox]
+minversion = 1.6
+envlist = coala,docs
+skipsdist = true
+
+[testenv:coala]
+basepython = python3
+deps =
+    coala
+    coala-bears
+    nodeenv==1.1.2
+commands =
+    nodeenv -p
+    npm install --global write-good
+    python3 -m nltk.downloader punkt maxent_treebank_pos_tagger averaged_perceptron_tagger
+    coala --non-interactive
+
+[testenv:docs]
+deps = -rrequirements-docs.txt
+commands =
+    sphinx-build -W -b html -n -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/html
+    echo "Generated docs available in {toxinidir}/docs/_build/html"
+whitelist_externals = echo
+
+[testenv:docs-linkcheck]
+deps = -rrequirements-docs.txt
+commands = sphinx-build -W -b linkcheck -d {envtmpdir}/doctrees ./docs/ {toxinidir}/docs/_build/linkcheck