52 Commits

Author SHA1 Message Date
pawnesh.kumar
169d983c70 Don't include openstack/common in flake8 exclude list
The directory openstack/common was used to keep codes from
oslo-incubator, we have retired oslo-incubator, so don't use
this directory any more

Change-Id: Id1f9c3eda6a13c3db5173c07f75a4833822631c2
2016-10-09 03:13:31 +05:30
Hardik Parekh
bb257de979 Revert "Update UPPER_CONSTRAINTS_FILE for stable/newton"
This reverts commit 26894df15dd124ce175b2a69a4deee8d7a259603.

Change-Id: I56ad12f96e5c7cdf4080250a1b9bd54caf8a4b3c
2016-09-27 09:50:50 +00:00
avnish
26894df15d Update UPPER_CONSTRAINTS_FILE for stable/newton
Change-Id: Ibe84879a75c54d56f7150d991c2ce6fbbf9c3377
2016-09-23 12:46:41 +05:30
lvdongbing
4ecca5717c Use upper constraints for all jobs in tox.ini
Openstack infra now supports upper constraints for
all jobs. Updated tox.ini to use upper constraints
for all jobs.

Change-Id: Id6080cf39ff5c50bc85b576247822040ccaae445
Closes-Bug: #1614361
2016-08-22 01:59:11 -04:00
PanFengyun
89645ce243 Add Python 3.5 classifier and venv
Now that 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: I4bc6f28411b4eee1df62a845e70d24c3cfbf500e
2016-07-14 08:35:49 +08:00
Renat Akhmerov
af5975eaf4 Enforcing upper constraints for tox test jobs
Co-Authored-By: Lingxian Kong <anlin.kong@gmail.com>
Change-Id: Ibe35586272f39d5c0bbf2cd4e3425b5f06e2b6ea
2016-05-21 12:24:35 +12:00
Renat Akhmerov
3e9aa8b310 Fixing a bug in DB API method that acquires entity lock
* Before this change method acquire_lock() would override all changes
  made for an entity by a concurrent transaction when calling
  entity.update() although one line before it should have read this
  entity from DB and update only a timestamp to acquire the lock.
  The solution is just to append "FOR UPDATE" to an SQL statement
  when fetching an entity from DB. In this case we don't need to
  artificially update a timestamp at all.
* Unit test for MySQL or Postgres is currently impossible, all unit
  tests are run against sqlite
* Adding "PYTHONHASHSEED = 0" into "venv" environment in tox.ini to
  prevent sphinx from failing. It should be added to "venv" because
  docs building run with command "tox -evenv -- python setup.py build_sphinx".
* Fixed minor style issues

Change-Id: Ia749f397e18e927820ff7ae6bac7d28dc2aa2ba4
2016-03-28 14:47:09 +07:00
Nina Goradia
fdb24bd697 module docs are not being generated
The pbr section in setup.cfg is not defined, so the module docs are not being
generated. This causes the 404 when clicking on the ‘Module Index’ link under
the 'Indices and Tables’ section in [0].

[0] http://docs.openstack.org/developer/mistral/

Change-Id: I337e9f6e78257a3e8e9222779dfcd600ba6cebd8
Closes-bug: #1558574
2016-03-21 17:27:14 -05:00
hparekh
f9ca1e3c7e Fix db error when running python34 unit tests
If tests for py27 is executed before py34 tests,
then there is a chance that py34 related tests may fail.
The following patch fixes it.
Ref: https://review.openstack.org/#/q/status:merged++topic:bug/1489059,n,z
TrivialFix

Change-Id: I67f4414c6486fecec20d6e52645dc8190c21fc61
Closes-bug: #1489059
2016-01-06 15:06:42 +09:00
hparekh
9b49804d3b 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.

Change-Id: Idecb51c1cfdbfa15729a7a5ccd0a473e9860f1fe
Closes-Bug: #1526170
2015-12-24 16:30:56 +09:00
Jenkins
eeaec7f2ae Merge "Pass environment variables of proxy to tox" 2015-12-11 00:23:08 +00:00
Jenkins
02901ed230 Merge "Ignored PEP257 errors." 2015-12-10 10:20:26 +00:00
hparekh
e0920a4858 Ignored PEP257 errors.
Change-Id: I5846e830cf6771b0e9dbd6f860dd50e87425b0c3
Closes-bug: #1523590
2015-12-09 15:32:26 +09:00
hparekh
7a08be7d88 Pass environment variables of proxy to tox
When a development environment is under a proxy, tox is failed even if
environment variables of the proxy are set.

This patch fixes this problem.

Change-Id: I65b2d9dbc7fbd883a7c90858bb08056da9d5a14f
2015-12-08 07:57:25 +00:00
hparekh
c47714c759 Delete python bytecode before every test run.
This should eliminate the need to clean -x -i to kill pyc files in
your local directory to get tests to pass.

Change-Id: Ia6f81dfd1c6487c293012623a165d9dd474b0f4f
Closes-Bug: #1368661
2015-12-07 18:00:08 +09:00
Dan Prince
97aaaa5c42 Run pep8 on some tools python files
Running pep8 on some of the python files in tools/ would
be useful/helpful during development.

Change-Id: I10e7cf7ca448e7498482bae90aa2255507413fce
2015-12-03 08:42:38 -05:00
Lingxian Kong
fab684d864 Force releasenotes warnings to be treated as errors
See
http://lists.openstack.org/pipermail/openstack-dev/2015-November/080521.html

Change-Id: I73b43e84a0fc996cbda6f91445e161d5cc7fc8c0
2015-11-27 18:16:43 +08:00
Jenkins
37c6d62f49 Merge "Adding releasenotes management to Mistral" 2015-11-23 08:32:03 +00:00
Lingxian Kong
559c440cd8 Adding releasenotes management to Mistral
Please get more information here[1][2] for understanding well about reno.

[1]: http://lists.openstack.org/pipermail/openstack-dev/2015-November/078301.html
[2]: http://docs.openstack.org/developer/reno/design.html

Change-Id: Iaba8cb4fd2de069debf75ba28977380b6a4cc09c
2015-11-21 00:26:36 +08:00
Anastasia Kuznetsova
dbdc29531c Fix all H405 pep8 errors
Improved code style, fixed all H405 (Multi line docstring
summary not separated with an empty line) errors.

Change-Id: I6639a2e1a9dc5d3802cb1bda05c5bf9b302bc82f
2015-11-16 18:00:18 +03:00
Anastasia Kuznetsova
e882a4f16d Initial commit that fix py34 tests run
Partial-Bug: #1378537

Change-Id: Ib32b66e8e9771bbc9957a4f2489d528aeb3d40d5
2015-09-15 09:57:47 +00:00
zhu.rong
06e7520065 Update the gitingore file and tox.ini
1.update the gitingore file for .swp.
2.delete the no need line before build the docs in tox.ini.

Change-Id: I64b9da411a902a9cedf90d69f59e3d32cc1913e1
2015-08-20 22:05:39 +08:00
Anastasia Kuznetsova
75b1482a9f Fix postgresql unit tests running
- access to the "openstack_citest" db under the "openstack_citest" user
  in case if tests run on Jenkins gate, do not run commands under the
  'sudo' because sudo access is revoked on Jenkins gates
- add one more argument that determines in how many threads tests will be run
  (by default tests will be run in 1 thread, otherwise tests fail because of
   incorrect cleanup mechanism in unit tests)

Change-Id: If332e8661f9309f71a3a0174144026de99df463e
2015-08-12 13:57:28 +03:00
Anastasia Kuznetsova
5ba583f660 Add one more tox env for running unit tests with postgresql
Change-Id: I257b3a464df2dbe5de4dae0737cd789421e861d7
2015-08-05 14:56:18 +03:00
Jenkins
8ede52cbd6 Merge "Remove explicit requirements.txt occurrence from tox.ini" 2015-07-16 10:30:11 +00:00
Renat Akhmerov
5b1608c0ad Remove explicit requirements.txt occurrence from tox.ini
* See http://lists.openstack.org/pipermail/openstack-dev/2015-July/069663.html
  for details.

Change-Id: Ia6de0a6a475e7f5e63796c6c973505cdc4a39120
2015-07-16 11:25:30 +06:00
Zhenguo Niu
8cffeacb6f Remove H803, H305
The rules of H803 and H305 are removed from hacking.

Change-Id: I99e3cfbacc3f15aa566a6ed31185eb4f14d45868
2015-07-16 10:56:34 +08:00
Doug Hellmann
2e0cde447a Drop use of 'oslo' namespace package
The Oslo libraries have moved all of their code out of the 'oslo'
namespace package into per-library packages. The namespace package was
retained during kilo for backwards compatibility, but will be removed by
the liberty-2 milestone. This change removes the use of the namespace
package, replacing it with the new package names, and adds a hacking
check to prevent regressions.

The patches in the libraries will be put on hold until application
patches have landed, or L2, whichever comes first. At that point, new
versions of the libraries without namespace packages will be released as
a major version update.

Please merge this patch, or an equivalent, before L2 to avoid problems
with those library releases.

Blueprint: remove-namespace-packages
https://blueprints.launchpad.net/oslo-incubator/+spec/remove-namespace-packages

Change-Id: I7137e7199f1cd6cdeacbc6c421d294f596e2ec0e
2015-07-14 06:25:24 +00:00
LingxianKong
645576e2f0 Get rid of openstack/common package
* use oslo graduated modules, delete openstack/common package since there
  is no dependency on oslo-incubator modules now.
* delete openstack-common.conf for the reason above.
* update project requirements automatically.

Change-Id: I80610cbfe7fd54263c8a2d9178ec9a2498c91899
Closes-Bug: #1459188
2015-06-24 16:49:06 +08:00
Nikolay Mahotkin
f34edb7e27 Make mistral use of oslo-config-generator
Change-Id: I01f36e4b0080e10b9d39a6adbfe4b6cd43957fc6
2015-05-26 13:06:09 +03:00
Anastasia Kuznetsova
8919453e10 Fix H904 pep8 error
Change-Id: I6540c5547a68721cc40b46b96da3648be00fa766
2015-02-09 15:23:06 +04:00
Dmitri Zimine
533fdbb546 small tox fixes
* remove py26: it no longer used in gates, and fails the tests on:

    (dt.datetime.now() - time_before).total_seconds(),
    AttributeError: 'datetime.timedelta' object has no
    attribute'total_seconds'`

* don't generate __pycache__ folders

Change-Id: Ifce1e77012bc3be7785597ab84b998209b866ae8
2015-01-09 18:58:44 -08:00
Christian Berendt
7e9e40c18a Whitelist binary 'rm' in tox.ini
To solve the following issue when running 'tox -e docs' it is necessary
to whitelist the binary 'rm'.

---snip---
WARNING:test command found but not installed in testenv
  cmd: /usr/bin/rm
  env: /home/berendt/development/branches/add_doc8/mistral/.tox/docs
Maybe forgot to specify a dependency?
---snap---

Change-Id: I120f221b64038d86afa6611f0f9634bce7b6fc0e
2014-10-08 10:51:04 +02:00
Jeremy Stanley
3a40848786 Work toward Python 3.4 support and testing
Change-Id: I1bea00da2090a381cc774ca0b2e678ffa92a301b
2014-09-03 19:07:00 +00:00
Kirill Izotov
6a47676300 Remove redundant DB API arguments
The main reason is to be able to create root /executions and /tasks
endpoints, the one you should be able to get without knowing their
'workbook_name'.

Change-Id: I94b64f2b0e761259fd09c828bb63075ef898e4e3
Implements: blueprint mistral-ui
2014-06-20 12:54:39 +07:00
Angus Salkeld
afe28f743f Fix Hacking rule H306 and H307
- H306: imports not in alphabetical order
- H307: like imports should be grouped together

Change-Id: Ib7f07bc72c2d1aa95267189c9c373af74854eaf5
2014-06-18 19:19:57 +10:00
Angus Salkeld
1afa6716cb Fix hacking rule H236
H236  Python 3.x incompatible __metaclass__, use six.add_metaclass()

Change-Id: I9c52563203366a7a5cc936b57525402e9c877140
2014-06-18 19:19:57 +10:00
Angus Salkeld
976ef6c702 Fix Hacking rule H302 (import only modules)
Change-Id: Id6407aac9e5a4bdbd730576433032d43dc89f934
2014-06-18 19:19:57 +10:00
Angus Salkeld
9fa8cd669b Fix hacking rules H101 and E265
This is trivial, but easy to get out of the way.

Change-Id: Id261784e71c1b763c60090ffed92430d359f448b
2014-06-16 20:51:29 +10:00
Angus Salkeld
f827fedd19 Temporarily disable the new hacking rules
Change-Id: I951e7fe9fec7a292f2773a5f0e55e9ee8d3d3aeb
2014-06-16 20:23:54 +10:00
Nikolay Mahotkin
9cfc57fed3 Move tests to testr
* Restored tools/install_venv scripts

Implements bp mistral-speedup-tests

Change-Id: I25d4755d1f06a248fe1de87da19f42fecba63404
2014-06-04 14:58:29 +04:00
Angus Salkeld
ba21390f48 Fix H404 multi line docstring should start without a leading new line
Change-Id: Id028ec196dd16696b47614fd77c8adde893dbc56
2014-05-28 13:17:16 +10:00
Angus Salkeld
85b78b4a67 Fix H233 Python 3.x incompatible use of print operator
Change-Id: I85efe06a1d815a016ab7735df1778c6f984d9cca
2014-05-28 13:10:45 +10:00
Angus Salkeld
024ad6e071 Fix pep H301 one import per line
Change-Id: Ie763743beb0219a6068f184113980122cb31fc83
2014-05-28 13:07:51 +10:00
Angus Salkeld
9c2757ca08 Fix pep H231 Python 3.x incompatible 'except x,y:' construct
Change-Id: I00effa3cb87bf334c68eb2c3b65ff46d3fb69e4f
2014-05-28 13:06:08 +10:00
Angus Salkeld
da2d313b8c Fix pep H402 one line docstring needs punctuation
Change-Id: I3b3849615bad84a532f9f747f5449c106252051a
2014-05-28 13:04:33 +10:00
Angus Salkeld
fcd91d860a Fix pep H201 no 'except:' at least use 'except Exception:'
Change-Id: Iac649af181f60f800c508c4dac13c292f030b298
2014-05-28 13:02:58 +10:00
Angus Salkeld
f033f1af45 Fix pep E226 missing whitespace around arithmetic operator
Change-Id: I7f23d6589fe4e635ccaecdf6aa78c4092ee50112
2014-05-28 12:58:01 +10:00
Angus Salkeld
a4852977be Add hacking to the flake8 tests
ignore everything so we can fix issues as desired

Change-Id: I73bcd617040726a0fea5e73910a366adcdb6e03f
2014-05-28 12:57:10 +10:00
Renat Akhmerov
1652d2e7fd Fixing flak8 excludes in tox.ini
Change-Id: I914b4dfd9155b1f813b951c1b41ca462f33c4e12
2013-12-30 21:19:01 +07:00