c1dc203aba
It is a boring job to review a patch to update the team member list. To avoid this, this commit proposes a bit improved approach. - When you want to propose an update of the team member list, you need to sync all members with Zanata. If you want to add you, you need to propose a latest member list. The new list may contains someone other than you. - pep8 job checks a proposed member list is up-to-date. If not, the job fails. To make it easy to sync all members with Zanata, a tox target 'zanata-users-sync' is added. To download the latest member list of all language teams, just run: tox -e zanata-users-sync Change-Id: I393a6b77261f6a3d7788a4c4f57bd6fdc95b5146
48 lines
1.4 KiB
INI
48 lines
1.4 KiB
INI
[tox]
|
|
minversion = 1.6
|
|
envlist = docs,pep8
|
|
skipsdist = True
|
|
|
|
[testenv]
|
|
install_command = pip install -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
|
|
usedevelop = True
|
|
setenv = VIRTUAL_ENV={envdir}
|
|
deps = -r{toxinidir}/requirements.txt
|
|
-r{toxinidir}/test-requirements.txt
|
|
|
|
[testenv:venv]
|
|
commands = {posargs}
|
|
|
|
[testenv:docs]
|
|
passenv =
|
|
# Required by add-marker.sh
|
|
ZUUL*
|
|
# Pass NO_LANG_BUILD=1 if you would like to build English version only
|
|
NO_LANG_BUILD
|
|
commands =
|
|
# Build translated guides
|
|
{toxinidir}/tools/build-docs.sh
|
|
# Publish
|
|
mkdir -p publish-docs/i18n/latest
|
|
rsync -av --delete doc/build/html/ publish-docs/i18n/latest/
|
|
{toxinidir}/tools/add-marker.sh publish-docs/i18n/latest/
|
|
whitelist_externals =
|
|
mkdir
|
|
rsync
|
|
|
|
[testenv:pep8]
|
|
commands =
|
|
flake8
|
|
bash -c "find {toxinidir} -type f \( -name '*.po' -o -name '*.pot' \) -print0 | xargs -0 -n1 --no-run-if-empty msgfmt --check-format -o /dev/null"
|
|
python {toxinidir}/tools/check_yaml_file.py {toxinidir}/tools/zanata/translation_team.yaml
|
|
bash {toxinidir}/tools/check-zanata-users-list.sh
|
|
whitelist_externals = bash
|
|
|
|
[testenv:generatepot]
|
|
# Generate POT files for translation
|
|
commands = {toxinidir}/tools/generatepot.sh
|
|
|
|
[testenv:zanata-users-sync]
|
|
commands =
|
|
python {toxinidir}/tools/zanata/zanata_users.py --output-file {toxinidir}/tools/zanata/translation_team.yaml
|