Commit graph

53 commits

Author SHA1 Message Date
rabi
2c27692f49 Remove oslo-incubator modules
This is the last patch in the series that removes all remaining
oslo-incubator modules. This also removes some unused scripts
in tools.

Change-Id: I4ca11596f1a2967e7c920c4ec7709c3408854534
2016-11-12 19:23:26 +05:30
Chuck Short
29d6c613f6 Graduate to oslo.i18n and cleanup incubator usage
Graduate from Oslo Incubator to oslo.i18n library.
Cleanup of unused Oslo Incubator utils.
Added optional enable_lazy() usage.

Change-Id: I5ec02477f3f52f4d7097669120581e82cced3748
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2016-11-08 08:29:09 +05:30
Lucky samadhiya
34c07a6630 delete python bytecode including pyo before every test run
Change-Id: I435274c0010ceb7595b2e8c83848b010a9b42edd
2016-09-16 13:13:11 +05:30
PanFengyun
25e13e81f0 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: I3b8b68c4ec4904d1aee150e6158f9ff29c68ff7a
2016-07-14 11:15:19 +08:00
Andreas Jaeger
00ba1ec9b4 Update translation setup
Follow new infra setup for translations, see spec
http://specs.openstack.org/openstack-infra/infra-specs/specs/translation_setup.html
for full details.

This basically renames
python-heatclient/locale/python-heatclient.pot to
heatclient/locale/heatclient.pot. For this we need to update
setup.cfg.

The domain name is already correct in i18n.py.

The project has no translations currently, let's remove the outdated
pot file, the updated scripts work without them. So, we can just
delete the file and once there are translations, an updated pot file
together with translations can be imported automatically.

Remove test for valid translation files in tox.ini since there are now
no more pot files - and the test fails if there are no files at all.

Change-Id: I6f5e77b9cd633f6edb503ff225ca0b507153946c
2016-01-28 21:49:27 +01:00
ting.wang
39c3fc41a0 Add debug testenv in tox
Once we add debug testenv, we can use "tox -e debug -- --debug"
to debug test cases when tox is running.

Change-Id: I3b7a090042e95ac89d6829495bf42f84e11bbd21
2016-01-12 14:45:20 +08:00
Ondřej Nový
4bfc6ea5de 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: I89546c2c77b1a15659918be65e6ef73157f98b23
2015-12-11 23:24:11 +01:00
Jenkins
1d3a49737b Merge "Delete python bytecode before every test run" 2015-12-04 02:10:05 +00:00
Jenkins
ed250fbcfe Merge "Remove py26 support" 2015-12-03 10:36:11 +00:00
ricolin
32397cbd66 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.
Closes-Bug: 1519510

Change-Id: I680043c48c75a50b3ef8eed4f22e97dca029c477
2015-12-03 08:46:19 +08:00
shu-mutou
debd086b2a Delete python bytecode before every test run
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: I9b0e7afeeb934d24c9847573cd7582709e990c9e
Closes-Bug: #1368661
2015-12-02 12:37:45 +09:00
ricolin
3e8d6720c1 Enable pep8 E123 test
Change-Id: Ib22a14c8060f4c78ade64b65988ed989607b04cb
2015-12-01 00:31:31 +08:00
ricolin
978eeb3994 Enable pep8 E126 test
Enable E126 continuation line over-indented for hanging indent.

Change-Id: I12ca2d8d610574dfcd528b0e613ec0328f4fb45e
2015-12-01 00:31:31 +08:00
ricolin
ec2530b975 Enable pep8 E128 test
Enable E128 continuation line under-indented for visual indent

Change-Id: If662f729e7aacdd439b38c5e5630d74afefebcc6
2015-12-01 00:31:22 +08:00
ricolin
6f1542c2ca Enable pep8 E265 test
Enable E265 block comment should start with '# '

Change-Id: I78813e73f8dd800bc58a1d69eedc2c066ccb8c28
2015-11-23 23:45:04 +08:00
ricolin
9e7a04110a Enable pep8 E241 test
Enable E241 multiple spaces after ','

Change-Id: Iced079fe6315df0ac91995e77861b16340cb8727
2015-11-23 23:45:04 +08:00
ricolin
5a658551bd Enable pep8 E713 test
Enable E713 test for membership should be 'not in'

Change-Id: I22c8f849713f613e0ef5f6011c075de5f31b7621
2015-11-23 23:44:51 +08:00
ricolin
728b40bc0d Enable pep8 H202 test
Change-Id: Id9331cfd3ac61bd061b29a717eaeb28441d51e0c
2015-11-16 23:34:57 +08:00
ricolin
623c704312 Enable pep8 H238 test
Enable H238 old style class declaration, use new style (inherit from `object`)

Change-Id: I4d11e398a008bcb1b22ecc0b6b2df41c1abae6d5
2015-11-16 23:34:57 +08:00
ricolin
47cbec7ff5 Enable pep8 H405 tests
Enabled H405 multi line docstring summary not separated with an empty
line in tox testing.

Change-Id: I89d063133154ae343315872b677fa06cc901cf3b
2015-11-16 23:34:57 +08:00
Pavlo Shchelokovskyy
47ecd150c3 Add py34 env to default tox run
Also, change order of envs in default tox run to avoid some errors
when running tox for the first time on fresh clone:
- run pypy first to avoid "No module _bsddb" error
- run py34 before py2x to avoid LP bug #1489059

Change-Id: I777c55077edb5d4f09518acf35366af97de3943f
Closes-Bug: #1492123
2015-09-04 06:34:28 +00:00
Sergey Kraynev
7e23bac918 Add functional tests from Tempest
- Add separate testenv for functional tests
- Copy Heat templates and tests from tempest
- Add requirements tempest-lib
- Add base class to functional tests

Partial-Bug: #1446442

Change-Id: I254be9b25f248d59392507841dad44e1ef1c68e3
2015-06-03 11:57:51 -04:00
Steve Baker
58fd470f95 Update hacking version to fix pep8 gate job
Any new failing rules have just been added to ignore for now, so
that the gate can be unblocked quickly, although future changes
which un-ignore those rules would be welcome.

Change-Id: I5861ab178ae8bf4861c93941c33b551b7f90e835
2015-05-27 15:43:57 +12:00
Steven Hardy
7896760cd8 Work around pypy testing issue
We appear to be hitting an issue similar to bug #1290562, so try the
same workaround.

Change-Id: I17b663480016394daaa0378907c02f965be4222b
Partial-Bug: #1453095
Related-Bug: #1290562
2015-05-11 11:01:08 +01:00
Tetiana Lashchova
802ed10fde Initial setup for i18n support
Change-Id: Ifc912b31fe2f71d5267827321b8de0420ad62903
Partial-Bug: #1269930
2014-12-10 12:11:48 +02:00
Tetiana Lashchova
d0b0270ec7 Fix H302 errors
Change-Id: I0354b4c99fb6d22ede85ec711fb81c2bb3627f99
2014-11-26 18:25:12 +02:00
Jenkins
ca403ccacf Merge "Remove _ from builtins" 2014-11-11 21:28:08 +00:00
Oleksii Chuprykov
409710f93e Tests work fine with random PYTHONHASHSEED
Related-Bug: #1348818

Change-Id: I702213ab129b3d4893b2253f90cb2e1c51793d8e
2014-11-10 13:19:25 +02:00
Oleksii Chuprykov
4d03328881 Remove _ from builtins
This helps ensure that the _ from i18n is used.

Change-Id: Ibffca00435203d4ef3538fa3d9cd020f77c31c36
2014-11-03 14:58:25 +02:00
Angus Salkeld
d78711e82f Put a cap on our cyclomatic complexity
flake8 has support for cyclomatic complexity (Mccabe) currently our
worst offender has a complexity of 18 (25 is considered very bad). So
set our max-complexity to 20 so we keep our complexity in a great shape.

https://github.com/flintwork/mccabe

Change-Id: I682f3c192e46bd50236b10a337f0b129c4b02eb8
2014-10-17 14:33:46 +10:00
Andreas Jaeger
85d665e511 warn against sorting requirements
And do not check for sorted requirements.

Change-Id: I64ae9191863564e278a35d42ec9cd743a233028e
Closes-Bug: 1365061
2014-09-11 18:54:13 +02:00
Steve Martinelli
e78762152c 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: I9c53ce664b164003fe42ed03d1f850d954bf0971
2014-07-24 18:08:03 -04:00
Alex Gaynor
e4c0bf98bc Removed now unnecesary workaround for PyPy
Change-Id: I4a0de9ffc6129285465ab18140495d39a5ff5a14
2014-05-31 21:02:01 -07:00
Jenkins
a49e7f1eaa Merge "Sort requirement files in alphabetical order" 2014-03-24 06:27:02 +00:00
Steve Baker
5e30e7d263 Workaround failing pypy gate job
Until a proper fix is found, pin the version of setuptools to one
that doesn't cause this issue.

Change-Id: I4f5f2b6449a90df06b366f9eb3f2c16bb37cc758
Related-Bug: #1290562
2014-03-18 14:49:28 +08:00
Cyril Roelandt
dea62e1593 Python3: fix test_stack_list_with_args()
The expected_url in test_stack_list_with_args() does not always match the URL
actually used in the code. This patch fixes this issue by:
- using urlutils.urlencode() in both the code and the tests, so that changes in
 the urlencode() implementation do not affect the tests;
- setting the PYTHONHASHSEED environment variable to 0 when running the tests,
  so that randomisation is disabled and urlutils.urlencode() has predictable
  results.

Change-Id: I5b50bad98f5c237cdc12e4ab75f21917ca0ef30d
2014-03-06 15:39:00 +01:00
ChenZheng
339f3e4de0 Sort requirement files in alphabetical order
This makes code more readable, and can check whether specific library
in the requirement files easily. We also enforce the check in pep8.

Change-Id: I08434dd56d41a82045e4119e547b7b3f60d66698
Closes-Bug: #1285478
2014-02-27 18:03:28 +08:00
ZhiQiang Fan
8567c289e2 Enable hacking H233 rule
H233: Python 3.x incompatible use of print operator

Python 3 support is a good feature for OpenStack service client,
and we already have a patch for H233 but still ignore it in hacking check,
we can enable it to avoid introducing such problem again.

Change-Id: I5295ef62eef7a9f6ec7f2b67d6b68dbe2dec7067
ref: https://review.openstack.org/#/c/52841/
2014-01-31 21:33:55 +08:00
JUN JIE NAN
276b1e4ed5 Added API reference document
The API reference document is missing so addded it and enabled pep8
check for conf.py.

Change-Id: I04236c5427d7ac624781fbfc920a79f855d8cd75
2014-01-06 13:25:00 +08:00
Sushil Kumar
010c82947e 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: Ib51796afbfdffb5a879046ca1b94a55b1f6ef6f1
2013-12-13 03:14:10 +00:00
Jenkins
a7ffcd76d0 Merge "Fix and enable Hacking H501 warning" 2013-09-04 03:12:33 +00:00
Alex Gaynor
9d19772089 Added support for running the tests under PyPy with tox
This is a precursor to having them run under check and gate.

This also fixes a single test which fails on PyPy, the test failes at
because it assumes a ``dict`` has a particular order for its keys when
it is printed out, on PyPy dicts have a different order sometimes, the
exact ordering is not a guarnteed property of Python.

Change-Id: Ie86726a0221e5e9aa68f7303d8ca8c7acd878f65
2013-09-03 17:32:09 -07:00
Dirk Mueller
d48d3587bd Fix and enable Hacking H501 warning
Enable Gating on H501. Fix the only two cases
that trigger.

Change-Id: Ib309b989df6556d7436e718e1497ce4dcacc83d6
2013-09-02 21:39:21 +02:00
Monty Taylor
9104cb00a1 Sync with global requirements
Change-Id: Iad82b688da07f3aa83a9850b5ea9fe2beb51019e
2013-08-05 18:43:13 -03:00
Angus Salkeld
a77fd1348d Fix all but H302 hacking rules.
Change-Id: Iac329617428b851df42579d5bd0b299d2f6e2c0a
2013-06-27 13:22:07 +10:00
Angus Salkeld
2fcd4570f3 Fix all the pep8 E* and F* errors.
Change-Id: I34bab949e4795073544c64c9796237c60ace4d65
2013-06-27 13:13:14 +10:00
Dirk Mueller
61ce60358e Fix various smaller pep8 issues
Change-Id: Icc015418e0e231311ac0a0cc507fa3f8842d8811
2013-06-20 20:43:19 +02:00
Steve Baker
dc91ee54f8 flake8 ignore build directory.
Change-Id: I5c1b436dac7bb558f2c2c02c0d7de51751305e91
2013-06-17 11:54:26 +12:00
Angus Salkeld
c4174d39ae Migrate to testr from nose.
Change-Id: Ibe0c2eeee9aeb4cb1832456cdc0d080a5a9af175
2013-05-31 20:13:37 +10:00
Monty Taylor
3768432707 Move requirements files to standard names.
Change-Id: Ia27def1cf04aae8fe6e9f19e965b0083638d2201
2013-05-25 08:41:07 +02:00