Commit Graph

21 Commits

Author SHA1 Message Date
Eyal 2580e0f4fe uncap json schema
All openstack projects now use this requirement

Change-Id: Idf458b53843ddf2cb4eec211a1fe667c18db5b05
2019-12-30 11:50:42 +02:00
kushalagrawal 5815d94781 Made it compatible to python3.7
Due to https://www.python.org/dev/peps/pep-0479/ stopIteration
will not be caught anymore and needs to be use return instead.
updated with relevant changes.

Change-Id: If25b6ccecd46fed0225a230096041996fb91c0c5
closes-bug: #1837778
2019-07-30 19:42:24 +05:30
Zuul 1cee3290ed Merge "Switch to using stestr" 2018-10-25 18:41:08 +00:00
Chuck Short a1e5c1c039 Switch to using stestr
According to Openstack summit session [1] stestr is maintained
project to which all Openstack projects should migrate.
Let's switch it then.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Depends-On: https://review.openstack.org/560493
Change-Id: I7149bd55da66479bda83e8bd2dd2b806e7394342
Signed-off-by: Chuck Short <chucks@redhat.com>
Co-Authored-By: Nguyen Hai <nguyentrihai93@gmail.com>
2018-10-04 10:00:52 +00:00
huang.zhiping 68e758f2f2 fix tox python3 overrides
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: I90d3b61a00cb3e3da0d0c89e49e1a9278aed43c3
2018-07-26 02:00:03 +00:00
Zuul 12ef49c476 Merge "Update bandit usage" 2017-11-04 12:37:08 +00:00
Pavlo Shchelokovskyy 9eb36a9013 Update bandit usage
This patch replaces explicit list of bandit tests to run
with a list of bandit tests to skip (only 3 are skipped).

It also replaces legacy-formatted bandit.yaml with what current
bandit version expects,
and improves the 'bandit' tox target somewhat.

Change-Id: If1c7be8377b92dac2e47bfcfd6de2847ace31c32
2017-11-01 20:28:32 +02:00
Mike Fedosin 209028bb4e tests: replace .testr.conf with .stestr.conf
TrivialFix:In the change[1] os_testr changed under the covers
from using testr to stestr, so that we now get the following
warning:
   ostestr.py:120:
   UserWarning: No .stestr.conf file found in the CWD.
   Please create one to to replace the .testr.conf. You
   can find a script to do this in the stestr git repository.
So remove the .testr.conf and add .stestr.conf which was
generated using a utility script as documented here [2].
[1] Id7cb2a39a8308f1413608dcf19273a1d7f33592e
[2] https://media.readthedocs.org/pdf/stestr/stable/stestr.pdf

Change-Id: I084215311928c0e66d45977748e5a2263bbc1444
2017-10-31 01:15:15 +03:00
Ngo Quoc Cuong 4e615d6da6 Enable H904 check
H904  String interpolation should be delayed to be handled by the
logging code, rather than being done at the point of the logging call.
Use ',' instead of '%'.

See: https://docs.openstack.org/oslo.i18n/latest/user/guidelines.html#adding-variables-to-log-messages

Change-Id: I66ea69fe877fa57a54e06c22221cdd1f3414ef16
Related-Bug: #1596829
2017-07-05 03:39:22 -04:00
Mike Fedosin 144ca45efb Change "rm" command path in tox.ini
tox command shows WARNING message as follow.
"WARNING:test command found but not installed in testenv"
If we use "find" command in tox.ini, we should use the full path.
This patch changes fix command path and remove the Warning message.

Change-Id: I6b8f487afc84ef5ecb5e0e4ec865ab0bb2cf2688
2017-06-27 18:15:12 +03:00
Mike Fedosin b32d29e4ab Add 'rm -f .testrepository/times.dbm' command in testenv
Running py2* post py3* tests results in InvocationError. Add
'rm -f .testrepository/times.dbm' command in testenv to
resolve this.

Change-Id: Ia3fb0b63eddad01cd253ac441a2036ca322a0164
2017-06-23 22:28:04 +03:00
liangcui d4e2cdd576 Enable some off-by-default checks
Some of the available checks are disabled by default, like:
[H106] Don’t put vim configuration in source files
[H203] Use assertIs(Not)None to check for None

Change-Id: I7b2f51052b736442613001c6ab38a8832c46fcc0
2017-06-22 17:20:36 +08:00
Mike Fedosin 025e6fc726 Update tox.ini file for coverage
1. Set basepython as 'python2.7'
2. Exclude tests files from coverage

Change-Id: I72834f76dd538f851cb457f2a4bf3c2b13ff70e7
2017-05-08 15:31:59 +03:00
Mike Fedosin c454fb83b9 Add architecture documentation
Change-Id: I52868375cbf82a9f4b320d3a9d5229c63d13ca96
2017-05-01 14:32:53 +03:00
loooosy df9628e724 Drop py34 target and add py35 in tox.ini and setup.cfg
We support py35 now.We do not have python 3.4 in setup.cfg which declares the explicit
supported versions.so it is no need to keep the supoort for py34.

Change-Id: Ie634245d455a8a5a58c09e23b418a10147ca4743
see:https://review.openstack.org/#/c/349069/
2017-03-28 11:02:01 +08:00
Idan d3099efe40 rename policy.json.sample to policy.yaml.sample
Change-Id: I10c95dd02437d5c08f124eca407c6b510d9ba159
2017-03-20 14:25:59 +00:00
Mike Fedosin 0ef6a4cd61 Documentation initial commit
Change-Id: Icb8f6f93726d316241f9d25b56ae98c2c7a3aa72
2017-02-06 22:47:00 +03:00
Alexey Galkin 51dc8fb373 Update tox.ini
* Don't write python bytecode while testing
* Remove previous coverage data before generating new

Change-Id: I3dcd61ab5da31270612d1a8a7287037620185d2a
2016-09-06 16:03:30 +03:00
Mike Fedosin aef9290dc4 Update tox.ini
* removed unnecessary "install_command" from venv and cover;
* unignored E711,E712 in pep8
* add genpolicy

Change-Id: Iab71163a2317ddd339e72dc8790edfa05a9aafe0
2016-09-01 00:18:20 +03:00
kairat_kushaev 46f27365f8 Fix docs and remove bandit check for translation
Currently there are no translation files in glare repo. Because of
that some bandit checks have failed during pep8 run. The patch
fixes this behavior. It also adds gitreview file and
adds additional exception for idea files to gitignore
Additionally tox -edocs has failed because doc configuration is
absent. The patch has added basic configuration for sphinx so
users can generate docs for glare.

Change-Id: I817d8f4e072ff300923faf13871c29a80f226336
2016-08-23 09:25:01 +00:00
Mike Fedosin b4bcc61991 Glare Code 2016-08-05 18:59:44 +03:00