Commit Graph

52 Commits

Author SHA1 Message Date
Abhishek Kekane c2898998a7 Move old oslo-incubator code out of openstack/common
As part of the first community-wide goal, teams were asked to
remove the openstack/common package of their projects if one
existed. This was a byproduct of the old oslo-incubator form
of syncing common functionality.

Package openstack/common/apiclient is moved to glanceclient/v1
package as it is used by v1 api only.

NOTE:
Removed glanceclient/common/base.py as it is deprecated and not
used anywhere.

Closes-Bug: #1639487
Change-Id: Ib3ac09743ce761ab0186e99e1c9de02517f89510
2016-11-08 11:33:09 +05:30
Andreas Jaeger 546a9beea8 Use constraints everywhere
Infra now supports constraints everywhere, remove now unused
workarounds.

For more information about constraints see:
http://lists.openstack.org/pipermail/openstack-dev/2016-August/101474.html

Change-Id: Ie46068f0bf406da82c521d888e0876f60cf91115
2016-08-30 19:45:37 +02:00
zheng yin fa5bfbed41 Add Python 3.5 classifier and venv
There is a passing gate job, we can claim support for Python 3.5
in the classifier. This patch also adds the convenience py35 venv.

Change-Id: I15304210a7f32b719a910e22518d33427ddedbb9
2016-07-12 07:26:45 +08:00
Niall Bunting 10ad2886e1 Add upper constraints to glanceclient
This will force pip install to use the upper-constraints.txt specified
version of pip modules. When you don't do this, you are out on the
bleeding edge and become unstable everytime some python library in the
world changes in a way that you don't expect.

The script is needed because it cleans up the conflicting entry that
corresponds to the client before applying it to source based installation.

Change-Id: I8f168fde04bf9e421d9a39e91a041512bf4f2b79
Closes-Bug: 1563038
2016-06-03 14:21:15 +00:00
Tin Lam cd5925bc60 Enable hacking checks
Enabled following hacking checks from tox.ini:
- H233 Python 3.x incompatible use of print operator
- H303 no wildcard import
- H404 multi line docstring should start with a summary

Change-Id: I2553bcd3e80c00acc08d135a1d2dadfb6cda49fe
Partial-Bugs: #1475054
2016-04-18 16:23:59 +00:00
Tom Cocozzello c6904d0332 Docs are generated incorrectly
When docs are generated with pbr command 'warnerrors = True'
there are many doc problems that are shown. This patch fixes
these problems.

Change-Id: Idb804ab924782b6d7d379494987bdba2acbce568
Closes-Bug: #1557235
2016-03-22 13:28:14 +00:00
kairat_kushaev a49ce80db6 Add reno to glanceclient
Add possibility to generate release notes to glanceclient.
We need this because it helps to prepare good documentation
and provide useful info to Openstack users.

Change-Id: Ifce2df8ac5f3a14518a758d748964e7201a75291
2016-02-11 11:58:19 +00:00
Jenkins dd588b475b Merge "Drop py33 support" 2016-01-12 03:58:21 +00:00
Jenkins dfff3af389 Merge "Remove py26 support" 2016-01-09 00:49:58 +00:00
Shu Muto bc8cc31048 Drop py33 support
"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: Id80bab700d0535b919be6b8f42e0c1561557e45e
Closes-Bug: #1526170
2016-01-07 01:51:11 +00:00
shu-mutou aba40f9fdb Remove py26 support
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. sine we rely on oslo for a lot of our work,
and depend on infra for our CI, we should drop py26 support too.

Change-Id: I50eff4ea33358791cc4f139b3b369489c38f7e5c
Closes-Bug: 1519510
2015-12-15 15:07:00 +09:00
Ondřej Nový 3dba560849 Deprecated tox -downloadcache option removed
Caching is enabled by default from pip version 6.0

More info:
https://testrun.org/tox/latest/config.html#confval-downloadcache=path
https://pip.pypa.io/en/stable/reference/pip_install/#caching

Change-Id: I235e737bc6375c8e09d86818195b6aba8a0c332c
2015-12-11 23:23:29 +01:00
Flavio Percoco 0e4cd15705 Remove pypy env from tox
We removed pypy's gate a few weeks ago as it's been failing for some
time. This means we're not supporting it anymore. Therefore, it should
be ok to remove it from the tox file.

Change-Id: Iac9bf4775794b8d097c0c5cae0337f14fa2fa25c
2015-12-08 22:49:34 -04:30
kairat_kushaev 22ef7be20d Run py34 env first when launching tests
To resolve "db type could not be determined" when running tox
for the first time py34 environment need to laucnhed before py27.

Change-Id: Id46e9e9400974fcb6eebb4516bf4b3e69a6570e2
Closes-Bug: #1489059
2015-12-03 12:54:42 +03:00
Jenkins 785ced37ae Merge "Add documentation for running the functional tests" 2015-11-02 14:00:17 +00:00
Stuart McLaren 8a4cd7916b Add documentation for running the functional tests
Change-Id: I824f6cd2aa988ed1e4025765971161b44993f00a
2015-10-21 13:33:41 +00:00
kairat_kushaev 6b9133c9b6 Import i18n functions directly
As stated in i18n guide it is normal to import i18n functions
(_, _LW..)  directly and we can include i18n functions in
hacking exceptions.
Also there is no need to make exceptions for six moves
because pep8 passes correctly without it.

Change-Id: I9c9aa490f1447bb7ae221809df7bc110c27d1336
2015-10-16 11:26:11 +03:00
Darja Shakhray ec0f2dfd85 Enable flake8 checks
This commit enables new flake8 checks:
* E265  block comment should start with '# '
* H405  multi line docstring summary not separated with an empty line
* E123  closing bracket does not match indentation of opening bracket's line
* H238  old style class declaration, use new style (inherit from `object`)
* E128  continuation line under-indented for visual indent
and makes related changes in the code.

Change-Id: Ie993afc930f6b74d7a990bcaa9fc0e9f5ba1585c
2015-07-21 17:08:27 +03:00
Cindy Pallares 997c12d3ab Import only modules and update tox.ini
As stated in the OpenStack Hacking Guidelines, it is prefered
that only modules should be imported.

Also updated tox.ini to ignore opestack/common among others.

Change-Id: I2f0a603c31052eadee581c11880c0ec6bd392829
2015-06-17 10:56:37 -05:00
Louis Taylor dfa98ab04c Updated from global requirements
Also update hacking to

    hacking>=0.10.0,<0.11

to get around breakage with pbr dependency.

Change-Id: Ic5e2d8df6993397ee4d1b087d96cc6667bd72acc
2015-06-05 15:23:33 +00:00
Stuart McLaren 71d97836f8 Create functional test base
This will allow adding 'check-glanceclient-dsvm-functional' tests in
the gate, similar to:

 * check-novaclient-dsvm-functional
 * check-keystoneclient-dsvm-functional
 * check-neutronclient-dsvm-functional
 * etc

Change-Id: Id970db52695db7dc53206aa05fe573995b57aa78
2015-04-18 17:43:01 +00:00
Ian Wienand f272ab3ae4 Generate API documentation
As a new user I found navigating the documentation difficult.  The
flow was a bit unclear and searches bring up old versions of API
references that aren't included in the current documentation.

This
 - provides an introduction to the tools similar to other projects
 - generates API references for the v1 and v2 client
 - fixes some minor docstring issues
 - adds doc/* to pep8 tests to check the conf.py

The API generation code is cribbed from python-novaclient

Change-Id: I65772127679d7afd5e7e48ca7872366b01382f21
2015-02-16 11:09:00 +11:00
Jenkins 128ea59bea Merge "Work toward Python 3.4 support and testing" 2014-09-13 07:19:29 +00:00
Jeremy Stanley 9fbc313719 Work toward Python 3.4 support and testing
Change-Id: I0498fcfdf9eee399e29de5b034fd6010682ca4b6
2014-09-03 19:05:27 +00:00
Louis Taylor 4631b76550 Fix indentation in tox.ini
Previously, a tab was used to indent a line with a block of code which
otherwise uses eight spaces, causing it to display strangely in text
editors which do not have tabstop=8 set.

TrivialFix

Change-Id: I99a432373beebac912df88e6685db26e738bf654
2014-08-26 15:41:25 +00:00
Steve Martinelli e79031b70a Add a tox job for generating docs
Add a tox job to make it easier for developers to generate their
own docs before submitting a patch.

Change-Id: I1897407d0db901c61360a196b365b0661eb65b66
2014-07-24 17:44:37 -04:00
ChangBo Guo(gcb) 1db17aaad9 Enable F841
F841 detects local variable is assigned to but never used.
This commit fixes the violations and enables F841 in gate.

Change-Id: Ic4dcac2733dfe334009327ac17aa3952cafaa63a
2014-07-09 14:10:23 +08:00
Frederic Lepied 628c541a69 Finalize Python3 support
Set the environment variable PYTHONHASHSEED to 0 to have
predictive tests under Python 3.

Change-Id: Ia15a9383e0f20bd0e4572e9f9b9772f1704dff86
2014-05-20 16:42:10 +02:00
Jeremy Stanley b8a850c5b3 Remove tox locale overrides
* tox.ini: The LANG, LANGUAGE and LC_ALL environment overrides were
introduced originally during the testr migration in an attempt to be
conservative about the possibility that locale settings in the
calling environment could cause consistency problems for test runs.
In actuality, this should be unnecessary and any place where it does
cause issues ought to be considered an actual bug. Also, having
these in the configuration actively causes older pip to have
problems with non-ASCII content in some package metadata files under
Python 3, so drop it now.

Change-Id: I6be8e42167191096b16d0f16e8c89e85aeedd74c
Closes-Bug: #1277495
2014-02-10 03:09:45 +00:00
Jenkins 14b74573f1 Merge "Fix and enable gating on H306" 2013-12-23 05:10:08 +00:00
Dirk Mueller 9f255a9b49 Fix and enable gating on H306
H306 - module imports should be in alphabetical order

Change-Id: I1f8fc25b0e6ca23c21c90bda420f42a45141c2e2
2013-12-16 15:28:05 +01:00
Sushil Kumar 005d1cf244 Updates tox.ini to use new features
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: Idbf8e08383232ae0af5b245c1abe91a7f852bfcf
2013-12-09 15:31:41 +00:00
Alex Gaynor b331cb63a4 Added support for running the tests under PyPy with tox
This is a precursor to having them run under check and gate.

Change-Id: I9c2f8218f457aeaa03e06b4a87554fcdc40e4a0a
2013-09-05 09:57:40 -07:00
Monty Taylor 1f2eef510f Updated from global requirements
Change-Id: I2e2bd3a38458e1307bcc0410da74dc76c0a5987a
2013-08-10 10:49:11 -07:00
Alex Meade aa2ff9a2b7 Flake8 should ignore build folder
This adds 'build' to the exclude list for flake8

Fixes bug 1198329

Change-Id: Ia662f93db6c86c0aedfbc44632a56cd8667df469
2013-07-05 17:05:49 -04:00
Dirk Mueller 62579fbb21 Start using Pyflakes and Hacking
Instead of globally ignoring pyflakes and
hacking warnings, only blacklist those that trigger
very frequently so far, in order to clean them
up in followup commits. Fix and start gating
on the rest already.

Change-Id: Ied7c7250061e3bf379e8286e8ce3b9e4af817faf
2013-06-22 16:00:26 +02:00
Jenkins a7bc8fe9f6 Merge "python3: Introduce py33 to tox.ini" 2013-06-11 00:27:17 +00:00
Chuck Short b586957e1c python3: Introduce py33 to tox.ini
Introduce py33 to tox.ini to make testing with
python3 easier.

Change-Id: I11801a5b3fd736d8e647a8a7152e498f505108f6
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2013-06-01 19:57:47 -05:00
Zhenguo Niu 40460cbeb1 Rename requires files to standard names.
Rename tools/pip-requires to requirements.txt and tools/test-requires
to test-requirements.txt. These are standard files, and tools in the
general world are growing intelligence about them.

Change-Id: Ic220b54de5ce7c15f442b8ffcb97cd03c2344f9a
Fixes: bug #1179008
2013-05-29 17:26:33 +08:00
Monty Taylor ca17541f33 Migrate to flake8.
Fixes bug 1172444.

Change-Id: Icec0820d0f780ed9473218b7e46e29c1e3db6541
2013-05-18 08:29:02 -07:00
Monty Taylor c5e9426bb5 Migrate to testr.
Part of blueprint grizzly-testtools

Change-Id: I9a12f0300e2731a6ee0a82e1f9737a6b83aa5d85
2013-01-16 18:39:18 -05:00
Clark Boylan d004b1a73a Fix coverage reporting test.
A change was committed that modified the
glanceclient.common.__init__.py file that seems to conflict with the
NOSE_WITH_COVERAGE environment variable. Run the coverage tests like
novaclient and swiftclient to get around this problem.

Change-Id: Id9a655a0207d3b16a619972ebaecc87387cf784e
2012-07-27 14:39:58 -07:00
Monty Taylor c315c5274f Latest setup goodness.
Upgrade the common setup code to the latest versions, and use setuptools-git
for sdist tarball generation.

Change-Id: I81eca9199b7d330ef8ec80482565a75f8475a78c
2012-07-11 12:21:29 -05:00
Brian Waldon 1c3db6c756 Minimize tox.ini
Change-Id: I77d0873cbd789726b93b059429d742f1cbdc57c1
2012-06-07 14:51:29 -07:00
Brian Waldon 0935e38113 Add tests dir to pep8 command
Change-Id: I28120c67e157277202976696eea37023fb719d6d
2012-06-07 14:37:56 -07:00
Brian Waldon bcff183f9a Set pep8 dependency at v1.2
Additionally, remove the pep8 dep override in tox.ini so the dep we
set in tools/test-requires is actually used

Change-Id: Iceb6d7a5dd8eceeebc1408e8a5edfabb48462d3e
2012-06-04 09:12:36 -07:00
James E. Blair ae58edcba7 Use tox for running tests locally.
See: http://wiki.openstack.org/ProjectTestingInterface

Tox can manage virtualenvs, and is currently doing so for running
tests in Jenkins.  It's just as, or more, useful for running tests
locally, so this starts the migration from the run_tests system to
tox.  The goal is to reduce duplicate testing infrastructure, and
get what's running locally on developer workstations as close to
what is run by Jenkins as possible.

This patch removes run_tests.py, and the scripts that manage .venv.
It makes run_tests.sh call tox to facilitate the transition for
developers used to typing "run_tests.sh".

Developers will need tox installed on their workstations.  It can
be installed from PyPI with "pip install tox".  run_tests.sh outputs
those instructions if tox is not present.

New facilities are available using tox directly, including:

  tox -e py26  # run tests under python 2.6
  tox -e py27  # run tests under python 2.7
  tox -e pep8  # run pep8 tests
  tox          # run all of the above
  tox -e venv foo  # run the command "foo" inside a virtualenv

The configuration of the openstack nose plugin is removed from
setup.cfg and added to the nosetests command line arguments in tox.
It is used when running tox from the command line, so the enhanced,
colorized output is visible to developers running the test suite
locally.  However, when Jenkins runs tox, the xunit plugin will be
used instead, providing output natively understood by jenkins which
is much more readable in that context.

Change-Id: Id678c2fb8a5a7d79c680d3d1f2f12141f73dc8a6
2012-04-27 23:45:38 +00:00
Jenkins 73ea207a39 Merge "Updated depend processing to norms." 2012-04-09 21:57:22 +00:00
Monty Taylor c80e2640c6 Make tox cover output coverage.xml.
Change-Id: I8719be2f627c9f2bf33e7752cdd7348c14943f7a
2012-04-05 19:06:57 -07:00
Monty Taylor cc479717cf Updated depend processing to norms.
Change-Id: I843c30acaf813614def68b936eb5a982e5a9b242
2012-04-03 21:54:43 -06:00