The docs requirements migrated to doc/requirements.txt
we need not install things from requirements.txt.
Change-Id: I0b3b6acac49846a8c9e8efb4de31b0be22283180
the requirements.txt is unnecessary when run tox -e docs
docs relative stuffs is in doc/requirements.txt, this ps to remove
the requirements.txt from tox.ini
Change-Id: I4da4d4e862be137e919e4e94a239cc5461b208da
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.
Fix problems found.
Change-Id: I5da442bb2f1e634e6b3fe37a6ea3820cea1db96f
This is a mechanically generated patch to add a unit test job running
under Python 3.6 as part of the python3-first goal.
See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html
Change-Id: I72d4101d9edb049b58f5ce662160f9629dbf1665
Story: #2002586
The commands used by constraints need at least tox 2.0. Update to
reflect reality, which should help with local running of constraints
targets.
Change-Id: I8a8766706f60a75c546fa338943630a28f3670f2
Quotes around {posargs} cause the entire string to be combined into one
arg that gets passed to stestr. This prevents passing multiple args
(e.g. '--concurrency=16 some-regex')
Change-Id: Ieeaa82bc6fb472490d1806c41cbffac130c0d23a
According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
Let's switch to stestr as other projects have already moved to it.
[1] https://etherpad.openstack.org/p/YVR-python-pti
Change-Id: I9bfb80f2556ca7c801dde69d1685751169e25307
We want to default to running all tox environments under python 3, so
set the basepython value in each environment.
We do not want to specify a minor version number, because we do not
want to have to update the file every time we upgrade python.
We do not want to set the override once in testenv, because that
breaks the more specific versions used in default environments like
py35 and py36.
Change-Id: I3868de365369664b3689582cc9d25f3228e5dbb7
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
- The Zuul gate currently only support py35.
- In setup.cfg, the project said that it support
Programming Language :: Python :: 3.5.
Therefor, this patch changes py34 to py35.
Change-Id: Iaad9bf41e3c8a8915c06ff039e570a2cc41ca2a1
Create a tox environment for running the unit tests against the lower
bounds of the dependencies.
Create a lower-constraints.txt to be used to enforce the lower bounds
in those tests.
Add openstack-tox-lower-constraints job to the zuul configuration.
See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.
About PrettyTable requirement:
The minimum version of PrettyTable is not correct in requirements.txt,
which should be 0.7.2 according to the unittests(before 0.7.2, if the
table is empty, i.e. no rows in the table, PrettyTable won't print the
headers and borders, this is changed during 0.7.2)
Co-Authored-By: Zhao Chao <zhaochao1984@gmail.com>
Change-Id: Ia9cadcbc2bc9aa2864fe47040dfe7be8ae286b98
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
We do not need tox_install.sh, pip can handle constraints itself
and install the project correctly. Thus update tox.ini and remove
the now obsolete tools/tox_install.sh file.
This follows https://review.openstack.org/#/c/508061 to remove
tools/tox_install.sh.
Change-Id: I65e1e4d40fbd56c7e2f7e4a59c0438d7176c36b4
In review[1] which passed just fine in check some days ago failed in
gate today. This is because the current tox environment uses requests
v2.12.1 which appears to not work and is beyond the value in
upper-constraints.txt. As observed in [2] we need
upper-constraints.txt in python-troveclient.
But since python-troveclient is itself listed in upper-constraints.txt
you can't just stick it in tox.ini and expect good things to happen.
I'm adding a co-author to this change based on [2].
[1] https://review.openstack.org/#/c/382493/
[2] https://review.openstack.org/#/c/398339/
Co-Authored-By: jiansong <jian.song@easystack.cn>
Change-Id: I386efb2d5c147417af7ea25704405977c9b6bbcd
If you run the py27 tox tests then attempt to run the py34 tests,
the following error will occur:
running testr
running=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 ./ ./ --list
db type could not be determined
error: testr failed (3)
This happens because the apparently the times.dbm file generated
by py27 is not compatible with py34. The converse is not true though -
if you run py34 first, py27 will work.
Both these bugs have been filed against it, but I see no resolution
https://bugs.launchpad.net/testrepository/+bug/1212909https://bugs.launchpad.net/testrepository/+bug/1229445
The work-around is to delete the file, which is what is now done
before running every tox test. Once the bug has been fixed, the
work-around can be removed.
Change-Id: Icf5d9efc65ffda8acdcc6f43b37ef03c84b3fd43
Closes-Bug: #1565928
Once we add debug testenv, we can use "tox -e debug" to debug test cases
when tox is running. Then tox will use oslotest which really debug our
test cases.
Only we should do is insert pdb into code.It's easy to use.
The same in trove:
https://review.openstack.org/#/c/265524/
usage link:
http://docs.openstack.org/developer/oslotest/features.html
Change-Id: I93709451af9a14fc9c71e1c3306a1a025aee8b44
To solve the problem of "db type could
not be determined" on py34 we have to run first the py34 env to, then,
run py27. This patch puts py34 first on the tox.ini list of envs to
avoid this problem to happen.
Change-Id: I90be329de961a0a63607d04b5c7cc88d033f05ec
Closes-bug: #1489059
"Python 3.3 support is being dropped since OpenStack Liberty."
written in following URL.
https://wiki.openstack.org/wiki/Python3
And already the infra team and the oslo team are dropping py33
support from their projects.
Since we rely on oslo for a lot of our work, and depend on infra
for our CI, we should drop py33 support too.
Change-Id: I37a08fc005ec78031e582721a5e472348ee5324c
Closes-Bug: #1526170
As of Mitaka, the infra team won't have the resources available to
reasonably test py26, also the oslo team is dropping py26 support
from their libraries. since we rely on oslo for a lot of our work,
and depend on infra for our CI, we should drop py26 support too.
Closes-Bug: 1519510
Change-Id: Ifc92fdb0823a032d9b9f744494276a702a16e8b7
Because python creates pyc files during tox runs, certain
changes in the tree, like deletes of files, or switching
branches, can create spurious errors.
Change-Id: I948892fb820f3d0583731627068ae3aa254121e7
Closes-Bug: #1368661
Updated the hacking version as per global-requirements.
Fixed some of new appearing hacking rules, as listed follows:
- E128 continuation line under-indented for visual indent
- E265 block comment should start with '# '
- E713 test for membership should be 'not in'
- H238 old style class declaration, use new style (inherit from `object`)
Rules which are not yet fixed have been incorporated to ignorelist
- H405 Multi line docstrings should start with a one line summary
followed by an empty line
- H501 Do not use locals() or self.__dict__ for formatting strings
Change-Id: I885c6fa8ad0e6a98f7a8479f3441ed08ed2cbaa6
- Added .coveragerc file to project, this file is utilized
to provide variuos various options like while running coverage.
- Used the .coveragerc file available in trove project.
- Updated tox.ini to show the calculated coverage results.
Change-Id: I9cc72766ab5a3ca48c60089062f37123dafc2850
Closes-Bug: #1453100
Closes-Bug: #1453101
Now both the standard command "python setup.py build_sphinx" and
"tox -e docs" will build the documentation.
The changes:
* tox.ini: Fix docs section: Remove unneeded deps line, the general
deps line is just fine. Enable the command, clean up before running
sphinx and use the normal command for execution.
* pydocs.rst: This throw an error while building since
troveclient.client.Dbaas does not exist, replace it.
* index.rst: Generate table of content. No need to include the files.
Change-Id: I2095ef73a76b0212e33776af925f5eaf1810be7a
Partial-Bug: #1315101
There are a few checks that already pass:
- F401 - unused imports of modules
- F403 - ‘from module import *’ used; unable to detect undefined names
And there are two (H401 and H403) that can be made
passing easily. Enable gating on all of them.
Change-Id: I9d3c49ecea1b2171d194ab6cc751316c252081e8
Ask pip to upgrade packages in the virtualenv so that a long-lived
virtualenv is still kept up to date as external dependencies change.
Change-Id: Id1e83aa5dd7c39d4827baeb39827b0ddeb8b6d4a
Reasons:
- code should be pythonicaly clean,
that is why number of ignored rules should reduced
Changes:
- E125, F811, H102, H103, F201, H23,
H302, F841, H301, H702, H703 rules are now enabled
Change-Id: Ibf4025162244d3c2f1278b49a76ec1527a729042
Reasons:
- tox update v1.6
Changes:
- tox 1.6 allows us to skip the sdist step, which is slow.
- It also allows us to override the install line. In this case, it's
important as it allows us to stop getting pre-release software we
weren't asking for.
Original patch by Monty Taylor, talked about here:
http://lists.openstack.org/pipermail/openstack-dev/2013-September/015495.html
Change-Id: I3d857f8ef19b49e0a09b50a9eda7121b28329532
Mainly, remove the pin in setup.py and remove the hook entry in
setup.cfg. Update from requirements while we're at it.
Change-Id: I34a05229b9ea0bdfd99dc16d09713c9494c1cb78
Instead of globally disabling pyflakes warnings,
disable only those that occur frequently and
fix the rest. Enable gating on those.
Change-Id: I774d809ebcda2339b30c104b031211a3b2c491bd