summaryrefslogtreecommitdiffstats
path: root/tox.ini
AgeCommit message (Collapse)AuthorFilesLines
2023-09-25[DOC] Add missing graphviz moduleAndreas Geissler1-3/+11
Tox fails due to missing graphviz module. Added the installation in tox.ini files (Ticket: IT-26010) Issue-ID: OOM-2342 Change-Id: Ica9f750c6644386d2dc3fac6a786463929c320d6 Signed-off-by: Andreas Geissler <andreas-geissler@telekom.de>
2023-04-05[DOC] Prepare tox.ini for new tox versionMatthew Watkins1-4/+4
Change: whitelist_externals -> allowlist_externals Issue-ID: CIMAN-428 Signed-off-by: Matthew Watkins <mwatkins@linuxfoundation.org> Change-Id: I60bb0fe11363c0c4104c8a8465fc54a31f713363
2022-09-02Force py3.8 in tox.iniCédric Ollivier1-9/+14
It allows leveraging on OpenStack Yoga's upper-contraints without any exception. Issue-ID: DOC-782 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com> Change-Id: I05d6b683fda61cabed4e5e812ddc3d37ae5e28b6
2021-12-12[COMMON] Add a pre-commit-auto-update tox profileguillaume.lambert1-0/+6
This profile can be called manually to upgrade linters declared in the pre-commit configuration file. Issue-ID: OOM-2643 Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com> Change-Id: Ia3ccb818f973eba94d1723a14fc7775515ca8a48
2021-12-12[COMMON] Add a shellcheck tox profileguillaume.lambert1-0/+7
Shellcheck is a shell linter. It can include good remarks as well as false positives. It is currently not activated in the CI. Issue-ID: OOM-2643 Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com> Change-Id: Ie392ce030f877ab6bdca9e91d7f8ec6820f34d79
2021-12-12[GLOBAL] Move checkbashisms to a dedicated scriptguillaume.lambert1-10/+3
Using a dedicated shell script rather than scripts commands directly in tox.ini configuration is usually recommanded. It avoids quoting hell issues and ensures a better virtualenv isolation. Issue-ID: OOM-2643 Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com> Co-authored-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: Ic4764f628d6f8c3bb4d0dd36a0559603c80f6c4a
2021-12-08[COMMON] Fix & add to bashisms CI failover scriptsguillaume.lambert1-0/+2
Issue-ID: OOM-2643 Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com> Change-Id: Icf139e50d44aed0315d0e4cb21c59ad05a5a3bdb
2021-12-08[COMMON] Fix "local var=XX" bashismsguillaume.lambert1-0/+1
Variable attribute 'local' is not POSIX but is LSB supported. It is available in other shells such as ash or dash. And in ksh, local is the default scope of functions vaiables. Though, the syntax "local var=XX" is only supported and found in bash. Sadly, this is not detected by checkbashims. - fix "local var=XX" bashisms - add a manual command in tox.ini to detect them in the CI https://wiki.ubuntu.com/DashAsBinSh#local https://wiki.ubuntu.com/DashAsBinSh#declare_or_typeset https://stackoverflow.com/questions/12000949/scope-of-variables-in-ksh Issue-ID: OOM-2643 Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com> Change-Id: Iff26e50cd352eeb760d923a4740a6f92184fe0f2
2021-10-14[COMMON] Adds 2 upper-constraints files to pin all dependenciesCédric Ollivier1-11/+26
It leverages the latest change from lfdocs-conf and the upper-constraints.txt now centralized in ONAP docs. In a long run, upperconstraints.os.txt should be removed once ONAP is synced with OpenStack. docs/requirements-docs.txt is renamed requirements.txt as it mixes both docs and linter dependencies. It removes tox and setuptools from requirements as nothing depends on them (most requirements should be removed except lfdocsconf) Issue-ID: DOC-765 Change-Id: Iae808297484f4798de82a43597ccad7905ff4c94 Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
2021-09-26[COMMON] Add and run pre-commit linters via toxguillaume.lambert1-0/+27
- create a .pre-commit-config.yaml configuration file with * gitlint * trailing blanks linter * tabs removal linter - exclude .git folder from it - exclude Makefiles since tabs are mandatory by default in them - create a tox pre-commit profile to run it from tox note gitlint is not runnable at this pre-commit stage - create pre-commit-install and pre-commit-uninstall tox profiles to (un)install hooks locally and (un)perform tests at each "git commit" call (i.e. without calling manually the pre-commit tox profile) - precise pre-commit stages/types in the pre-commit configuration file so that hooks are installed correctly. This avoids messages about skipped tests when they are run at a wrong stage. Issue-ID: OOM-2643 Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com> Change-Id: Ie95bb4f6f90be80b05a1398973caffeff7936881
2021-09-26[DOC] Fix some doc8 issuesguillaume.lambert1-1/+2
- move doc8 dependency from docs/requirements-docs.txt to tox.ini since it is not needed by other tox profiles - disable doc8 tox profile voting since linelength issues are not completely fixed yet - fix a few linelength issues Issue-ID: DOC-765 Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com> Change-Id: I704fc2ee8087ffbb8a83d693f6dc5a5f7c992b10
2021-09-22[COMMON] Enforce checkbashisms tox profileGuillaume Lambert1-1/+2
- add checkbahims to tox.ini default profiles - remove -f options to unforce bashisms detection in explicit bash scripts and to differentiate treatments between bash and sh - migrate #!/bin/bash shebangs to #!/bin/sh for scripts without bashisms The following scripts have not been migrated since they still use bashisms difficult to migrate (mostly arrays - more details below) ./kubernetes/common/mariadb-init/resources/config/db_init.sh ./kubernetes/portal/components/portal-mariadb/resources/config/ \ mariadb/docker-entrypoint.sh ./kubernetes/helm/plugins/deploy/deploy.sh ./kubernetes/helm/plugins/undeploy/undeploy.sh ./kubernetes/sdnc/components/sdnc-prom/resources/bin/ensureSdncActive.sh $ find . -not -path '*/\.*' -name *.sh -exec checkbashisms -f {} + 2>&1\ | grep line | cut -d' ' -f 7- | sort | uniq -c | sort -k1,1nr 18 (bash arrays, ${name[0|*|@]}): 2 (declare): 1 ($FUNCNAME): 1 (shopt): 1 (trap with ERR|DEBUG|RETURN): https://mywiki.wooledge.org/Bashism#Arrays https://mywiki.wooledge.org/Bashism#Special_Variables https://mywiki.wooledge.org/Bashism#Builtins https://www.oilshell.org/release/0.5.alpha2/test/spec.wwz/builtin-trap.html Issue-ID: OOM-2643 Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com> Change-Id: Id06ad1d45004321a293bdd26038d8da5f7b6b4ac
2021-04-24[DOC] Decrease Sphinx tox profiles logs verbosityguillaume.lambert1-2/+2
to ease gate failures analysis as proposed by Eric. Issue-ID: DOC-710 Signed-off-by: guillaume.lambert <guillaume.lambert@orange.com> Change-Id: Ic59da02bc65ca9d5b584c48429215760fe4130da
2021-04-06[COMMON] Add a checkbashisms tox profileGuillaume Lambert1-0/+11
to identify potential bashisms in scripts and ensure compatibility with dash and other POSIX shells as often found in MAC OS X and BSD or UNIX systems. Though bash is a good interactive user shell, many UN*X systems and GNU+Linux distributions now prefers Almquist or Kornshell variants for scripting in order to improve the system performance and maintenability. https://wiki.ubuntu.com/DashAsBinSh https://mywiki.wooledge.org/Bashism https://en.wikipedia.org/wiki/Almquist_shell Issue-ID: OOM-2643 Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com> Change-Id: Ibfa114f5c4797e526edc6f59397117e093868c24
2021-02-23[COMMON] Add some python linters in tox.iniGuillaume Lambert1-0/+11
and configure them with a few reasonable parameters Issue-ID: OOM-2643 Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com> Change-Id: Ic1e8d6be63c45d89de41e8589aa3bd1214a3f0a1
2021-02-10[COMMON] Update words whitelist URLGuillaume Lambert1-1/+1
cf https://gerrit.onap.org/r/c/doc/+/117667 https://gerrit.onap.org/r/c/doc/+/117668 Issue-ID: OOM-2648 Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com> Change-Id: Iea01dd783ba2467bee5aee5f2ac9db1cee6f99d7
2021-02-10[COMMON] Add a spellchecker tox profileGuillaume Lambert1-0/+12
inspired from openStack https://github.com/openstack/qa-specs/blob/master/tox.ini https://doughellmann.com/blog/tag/sphinxcontrib-spelling/ https://pypi.org/project/sphinxcontrib-spelling/ Issue-ID: OOM-2648 Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com> Change-Id: Ia341f96a906c82f88257a885fd66005450a15d16
2021-02-02[COMMON] Fix tox docs profiles configurationGuillaume Lambert1-1/+1
- sphinx-build '-W' option needed only once - remove docs/tox.ini since * same profiles are declared in tox.ini * once run from the docs folder, this generates invalid files in doc/.tox for linters setup (e.g. docs/.tox/[..]/invalid.rst). They can cause warnings treated as errors by root tox profiles. - modify requirements.txt to force a sphinxcontrib-needs version prior to 0.6.0 . This latest version introduces a new services support functionality that cannot be easily disabled here and that requires additional configuration parameters to link GitHub issues. We cannot provide these parameters since this project uses JIRA. As a result, sphinx generates a warning treated as an error that makes the gate fail. https://sphinxcontrib-needs.readthedocs.io/en/service/services/index.html Issue-ID: OOM-2648 Signed-off-by: Guillaume Lambert <guillaume.lambert@orange.com> Change-Id: I14e9045482750f15a3e5e98af47197e2c9f60f60
2020-12-11[COMMON] Remove parallelism in doc lintingSylvain Desbureaux1-2/+2
`sphinxcontrib.needs` is not safe for parallel work and thus a warning is set during linting which makes it fail. We then remove the parallelism for sphinx here. Issue-ID: OOM-2648 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: I820e63fee78578794c96c3ff9867c4ecc56ba50e
2020-12-09[COMMON] Add doc lintingSylvain Desbureaux1-0/+19
Add 3 automated doc linting (sphinx building, linkchecking and doc8) in order to have an error free documentations Fix also issues found by these linters in order to start without errors. Issue-ID: OOM-2648 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: I318718c956020412a120ba3caeb9e21d35a99833
2020-12-08[COMMON] Add git commit lintingSylvain Desbureaux1-0/+14
Add an automated git commit linting in order to be sure commit messages are set the way we want. Issue-ID: OOM-2644 Signed-off-by: Sylvain Desbureaux <sylvain.desbureaux@orange.com> Change-Id: I36a397c318886f2ac05a8971147272669c7a4cd9