From 059edf6a16578dc3ae425994b6fa2460b3736d06 Mon Sep 17 00:00:00 2001 From: Daniel Farrell Date: Thu, 19 Apr 2018 16:50:02 -0400 Subject: [PATCH] Add tox/coala linting, docs config * 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 --- .coafile | 39 +++++++++++++++++++++++++++++++++++++++ .gitignore | 23 +++++++---------------- docs/_static/logo.png | Bin 0 -> 558 bytes docs/conf.py | 17 +++++++++++++++++ docs/conf.yaml | 10 ++++++++++ docs/favicon.ico | Bin 0 -> 2462 bytes docs/index.rst | 18 ++++++++++++++++++ requirements-docs.txt | 1 + tox.ini | 27 +++++++++++++++++++++++++++ 9 files changed, 119 insertions(+), 16 deletions(-) create mode 100644 .coafile create mode 100644 docs/_static/logo.png create mode 100644 docs/conf.py create mode 100644 docs/conf.yaml create mode 100644 docs/favicon.ico create mode 100644 docs/index.rst create mode 100644 requirements-docs.txt create mode 100644 tox.ini diff --git a/.coafile b/.coafile new file mode 100644 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:// diff --git a/.gitignore b/.gitignore index 2fdce4b..604d4e2 100644 --- a/.gitignore +++ b/.gitignore @@ -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 index 0000000000000000000000000000000000000000..0796dacfe552b5f77594ae4058ce6f8d72cd8f06 GIT binary patch literal 558 zcmV+}0@3}6P)e7N_V^Zk-@4&4Ywm!fMR-Fh%qjJ5w-sgzcn0Wwx< ztLwA16;JDql+>89;i2K`V3XAfva_|77cXBU3;-Z+1_S_T#CSe+_j)-41i;f8VSq4T zCe6yV!3bo;inzbYc|8&lqy~XER4I?&zZs|I6v+4VTy1sv`<6YU*-SKWrF7$VrF1EL zJU;Sday0X2&tA=}t^cqtALMB@@!-zA>Q%*jx!9A}<~T9#?C}ezZVHPH3KUgC-GA;q zGU7gN96p`j?klM2Tg8$7;QX8ID=PZj>vKWz#n)Ok$XB@qfv>5fX#WVnh@0PxfSu%c z?IJ6WD!qeV^mgv^`^9Br1=I-yf;g=0#NT$4=H0JEuJwhb!r_|_pO(IEfT_caQo&K` z0KrL_?I#jjXGQi78aOzDr_qR0b3#DWv|8)%WjkJ|M_yas66+q8dj@p$ZegkZbB~$Z wZG>7q+d3G@whzt3aH+9!oPWyL=>IkU-%;AVxx0fi<^TWy07*qoM6N<$g8k?SlK=n! literal 0 HcmV?d00001 diff --git a/docs/conf.py b/docs/conf.py new file mode 100644 index 0000000..751fd20 --- /dev/null +++ b/docs/conf.py @@ -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 index 0000000..d3b008f --- /dev/null +++ b/docs/conf.yaml @@ -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 index 0000000000000000000000000000000000000000..fc9eadbebd56765d84a3e79a32c69e9113c4c3e6 GIT binary patch literal 2462 zcmeHJ&nts*9R4DcTt~a%peV*gYw-{G2Uf(z?}Jj5Qp%57bC66jMI#3xxkygCElQ!a z+JTvaB+ar=X6Ai-pO@5X+xxz9=ktBP&+{}P^5n;25%Rl2Ocx7LCWNS# zkV~RLg6r7||7GkAC@CnZL{7+uP!t7k$yX#_U%v64dduBQ{w{HMg7}#m@xWq6JewAuwFl3WtyF$FH@PFr<%q0Q;>uf;|Cbw4YER3MPxdUbJfY`1r7y?ZYO(De#>UJ*Mr^x>Fxg(O+h63T2bm}I ze2+aJ{Y@tHH5FzApK*`gd>}t_kXgkZDx@#z&8+y^rzhW-t;|^V;5m#yPd@W9*@Nf! T336q>rcnOqhHU?ferx>$BV*m= literal 0 HcmV?d00001 diff --git a/docs/index.rst b/docs/index.rst new file mode 100644 index 0000000..f70a25c --- /dev/null +++ b/docs/index.rst @@ -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 index 0000000..74a3b7a --- /dev/null +++ b/requirements-docs.txt @@ -0,0 +1 @@ +lfdocs-conf diff --git a/tox.ini b/tox.ini new file mode 100644 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 -- 2.16.6