summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZuul <zuul@review.openstack.org>2018-01-31 21:24:04 +0000
committerGerrit Code Review <review@openstack.org>2018-01-31 21:24:04 +0000
commitb9af73dc55619e228efe039b69509aa244b707ff (patch)
tree820e1afc45a76d84d7997a415b606ee9f9d6bcc5
parent9d730a30b20165d6a77a170f94c4887dcc1da91f (diff)
parent5dbfc60fdee9bcf98d53455b54ba7295e40f8705 (diff)
downloados-client-config-b9af73dc55619e228efe039b69509aa244b707ff.tar.gz
Merge "Split docs requirements and update tox.ini"
-rw-r--r--.testr.conf7
-rw-r--r--doc/requirements.txt4
-rw-r--r--doc/source/install/index.rst2
-rw-r--r--doc/source/user/configuration.rst14
-rw-r--r--test-requirements.txt6
-rwxr-xr-xtools/tox_install.sh30
-rw-r--r--tox.ini61
7 files changed, 57 insertions, 67 deletions
diff --git a/.testr.conf b/.testr.conf
deleted file mode 100644
index fb62267..0000000
--- a/.testr.conf
+++ /dev/null
@@ -1,7 +0,0 @@
-[DEFAULT]
-test_command=OS_STDOUT_CAPTURE=${OS_STDOUT_CAPTURE:-1} \
- OS_STDERR_CAPTURE=${OS_STDERR_CAPTURE:-1} \
- OS_TEST_TIMEOUT=${OS_TEST_TIMEOUT:-60} \
- ${PYTHON:-python} -m subunit.run discover -t ./ . $LISTOPT $IDOPTION
-test_id_option=--load-list $IDFILE
-test_list_option=--list \ No newline at end of file
diff --git a/doc/requirements.txt b/doc/requirements.txt
new file mode 100644
index 0000000..5715746
--- /dev/null
+++ b/doc/requirements.txt
@@ -0,0 +1,4 @@
+docutils>=0.11 # OSI-Approved Open Source, Public Domain
+sphinx!=1.6.6,>=1.6.2 # BSD
+openstackdocstheme>=1.18.1 # Apache-2.0
+reno>=2.5.0 # Apache-2.0
diff --git a/doc/source/install/index.rst b/doc/source/install/index.rst
index 48bbc2f..cb31b25 100644
--- a/doc/source/install/index.rst
+++ b/doc/source/install/index.rst
@@ -9,4 +9,4 @@ At the command line::
Or, if you have virtualenvwrapper installed::
$ mkvirtualenv os-client-config
- $ pip install os-client-config \ No newline at end of file
+ $ pip install os-client-config
diff --git a/doc/source/user/configuration.rst b/doc/source/user/configuration.rst
index df0b266..54a829a 100644
--- a/doc/source/user/configuration.rst
+++ b/doc/source/user/configuration.rst
@@ -9,8 +9,8 @@ Environment Variables
provide backwards compatibility to service-specific variables such as
`NOVA_USERNAME`.
-If you have OpenStack environment variables set, `os-client-config` will produce
-a cloud config object named `envvars` containing your values from the
+If you have OpenStack environment variables set, `os-client-config` will
+produce a cloud config object named `envvars` containing your values from the
environment. If you don't like the name `envvars`, that's ok, you can override
it by setting `OS_CLOUD_NAME`.
@@ -115,11 +115,11 @@ location rules previously mentioned for the config files.
`regions` can be a list of regions. When you call `get_all_clouds`,
you'll get a cloud config object for each cloud/region combo.
-As seen with `dns_service_type`, any setting that makes sense to be per-service,
-like `service_type` or `endpoint` or `api_version` can be set by prefixing
-the setting with the default service type. That might strike you funny when
-setting `service_type` and it does me too - but that's just the world we live
-in.
+As seen with `dns_service_type`, any setting that makes sense to be
+per-service, like `service_type` or `endpoint` or `api_version` can be set by
+prefixing the setting with the default service type. That might strike you
+funny when setting `service_type` and it does me too - but that's just the
+world we live in.
Auth Settings
-------------
diff --git a/test-requirements.txt b/test-requirements.txt
index 27ece84..c4927dc 100644
--- a/test-requirements.txt
+++ b/test-requirements.txt
@@ -5,17 +5,13 @@
hacking!=0.13.0,<0.14,>=0.12.0 # Apache-2.0
coverage!=4.4,>=4.0 # Apache-2.0
-docutils>=0.11 # OSI-Approved Open Source, Public Domain
extras>=1.0.0 # MIT
fixtures>=3.0.0 # Apache-2.0/BSD
jsonschema<3.0.0,>=2.6.0 # MIT
mock>=2.0.0 # BSD
python-glanceclient>=2.8.0 # Apache-2.0
python-subunit>=1.0.0 # Apache-2.0/BSD
-sphinx>=1.6.2 # BSD
-openstackdocstheme>=1.17.0 # Apache-2.0
oslotest>=1.10.0 # Apache-2.0
-reno>=2.5.0 # Apache-2.0
-testrepository>=0.0.18 # Apache-2.0/BSD
+stestr>=1.0.0 # Apache-2.0
testscenarios>=0.4 # Apache-2.0/BSD
testtools>=2.2.0 # MIT
diff --git a/tools/tox_install.sh b/tools/tox_install.sh
deleted file mode 100755
index 43468e4..0000000
--- a/tools/tox_install.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/usr/bin/env bash
-
-# Client constraint file contains this client version pin that is in conflict
-# with installing the client from source. We should remove the version pin in
-# the constraints file before applying it for from-source installation.
-
-CONSTRAINTS_FILE=$1
-shift 1
-
-set -e
-
-# NOTE(tonyb): Place this in the tox enviroment's log dir so it will get
-# published to logs.openstack.org for easy debugging.
-localfile="$VIRTUAL_ENV/log/upper-constraints.txt"
-
-if [[ $CONSTRAINTS_FILE != http* ]]; then
- CONSTRAINTS_FILE=file://$CONSTRAINTS_FILE
-fi
-# NOTE(tonyb): need to add curl to bindep.txt if the project supports bindep
-curl $CONSTRAINTS_FILE --insecure --progress-bar --output $localfile
-
-pip install -c$localfile openstack-requirements
-
-# This is the main purpose of the script: Allow local installation of
-# the current repo. It is listed in constraints file and thus any
-# install will be constrained and we need to unconstrain it.
-edit-constraints $localfile -- $CLIENT_NAME
-
-pip install -c$localfile -U $*
-exit $?
diff --git a/tox.ini b/tox.ini
index 57feb6d..a660749 100644
--- a/tox.ini
+++ b/tox.ini
@@ -5,37 +5,64 @@ skipsdist = True
[testenv]
usedevelop = True
-passenv = ZUUL_CACHE_DIR
- REQUIREMENTS_PIP_LOCATION
-install_command = {toxinidir}/tools/tox_install.sh {env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt} {opts} {packages}
+passenv = UPPER_CONSTRAINTS_FILE
+install_command = pip install -U {opts} {packages}
setenv =
- VIRTUAL_ENV={envdir}
- BRANCH_NAME=master
- CLIENT_NAME=os-client-config
- OS_STDOUT_CAPTURE=1
- OS_STDERR_CAPTURE=1
- OS_TEST_TIMEOUT=60
-deps = -r{toxinidir}/test-requirements.txt
-commands = python setup.py testr --slowest --testr-args='{posargs}'
+ VIRTUAL_ENV={envdir}
+ LANG=en_US.UTF-8
+ LANGUAGE=en_US:en
+ LC_ALL=C
+ OS_STDOUT_CAPTURE=1
+ OS_STDERR_CAPTURE=1
+ OS_TEST_TIMEOUT=60
+deps =
+ -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
+ -r{toxinidir}/requirements.txt
+ -r{toxinidir}/test-requirements.txt
+commands = stestr run {posargs}
+ stestr slowest
[testenv:pep8]
-commands = flake8
+usedevelop = False
+skip_install = True
+deps =
+ -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
+ doc8
+ hacking
+ pygments
+ readme
+commands =
+ doc8 doc/source
+ python setup.py check -r -s
+ flake8 os_client_config
[testenv:venv]
commands = {posargs}
[testenv:cover]
-commands = python setup.py test --coverage --coverage-package-name=os_client_config --testr-args='{posargs}'
+setenv =
+ {[testenv]setenv}
+ PYTHON=coverage run --source os_client_config --parallel-mode
+commands =
+ stestr run {posargs}
+ coverage combine
+ coverage html -d cover
+ coverage xml -o cover/coverage.xml
[testenv:docs]
+skip_install = True
deps =
- {[testenv]deps}
- readme
+ -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
+ -r{toxinidir}/requirements.txt
+ -r{toxinidir}/doc/requirements.txt
commands =
- python setup.py build_sphinx
- python setup.py check -r -s
+ sphinx-build -W -d doc/build/doctrees -b html doc/source/ doc/build/html
[testenv:releasenotes]
+skip_install = True
+deps =
+ -c{env:UPPER_CONSTRAINTS_FILE:https://git.openstack.org/cgit/openstack/requirements/plain/upper-constraints.txt}
+ -r{toxinidir}/doc/requirements.txt
commands = sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[flake8]