- Apr 24, 2019
-
-
ZhongShengping authored
Thorough replacement of git.openstack.org URLs with their opendev.org counterparts. Change-Id: I7f5506455ed52e4670b8e428548e931db13b13db
-
- Mar 18, 2019
-
-
manchandavishal authored
With python3.6 and python3.7 jobs added to the Zuul jobs, it makes sense to add this to the tox config too. Change-Id: Icf4a05048c406250ad6331f5593617471dcba319
-
- Mar 05, 2019
-
-
Ivan Kolodyazhny authored
tox env for the integration tests is now renamed to 'integration' as it is no longer run under python 2.7. __hash__() method is now defined in integration_tests.helpers.BaseTestCase to avoid unhashable error during loading django test runner. This is originally caused by the fact that the base testcase class for integration tests is implemented on top of testtools and testtools does not define __hash__() method. In Python 3, __hash__() method must be defined if a class (re)defines __eq__() method to make the class hashable [1]. Ideally integration base TestCase class can be implemented on top of Django test case, but the current implementation depends on features from testtools a lot, so it seems better to add __hash__() method as a workaround. Unbound methods don't exist in Python 3[2], so six.create_unbound_method doesn' work as expected. To dynamic method generation we have to use new descriptors interface [3] or just generate new functools.partialmethod [4] function introduced in Python 3.4 to generate class methods with pre-defined 'path' argument and pass 'self' as a first function argument for class instance. [1] https://docs.python.org/3.5/reference/datamodel.html#object.__hash__ [2] https://six.readthedocs.io/#six.create_unbound_method [3] https://docs.python.org/3/howto/descriptor.html [4] https://docs.python.org/3/library/functools.html#functools.partialmethod Change-Id: I5c3078bdc66e33fe676d431bb28d92b35faaf479
-
- Feb 27, 2019
-
-
manchandavishal authored
Python 3.5 was the target runtime for the Rocky release. The current target py3 runtime for Stein is Python 3.6, so there is no reason to keep testing against the older version as mentioned here[1]. [1] https://governance.openstack.org/tc/reference/runtimes/stein.html Change-Id: Ib585add30e8b34016a4af18d567a3613aaa74241
-
- Jan 12, 2019
-
-
Akihiro Motoki authored
tests.py files are excluded from targets checked by pylint because it takes longer and longer time to check them somehow. pylint 2.2.x is supported only in Python 3 and we already switched our pep8 basepython to python3, so pylint and astroid are installed only for python3. This seems the easiest way to ensure py27 env works. literal-comparison error in openstack_dashboard/api/nova.py is also fixed in this commit as it is simple enough. Change-Id: Ic8868a44b296dba457be721716ca6f9d37ad9369
-
- Dec 28, 2018
-
-
Akihiro Motoki authored
This is due to my mistake in https://review.openstack.org/#/c/596613/. Change-Id: I185c75f6102979636eacccd0fe546e25ccc00c19
-
- Dec 25, 2018
-
-
Akihiro Motoki authored
This massively reduces the amount of time needed to install dependencies and saves a lot of disk space :-) Borrowed from nova change https://review.openstack.org/#/c/534382/ Change-Id: I70bbc41a8f5f7992dc02a5baac632800a4d69acb
-
- Dec 22, 2018
-
-
Akihiro Motoki authored
As of now, when horizon plugins are configured in the horizon repo, pep8 and docs tox env cannot run. This is because openstack_dashboard.settings tries to load horizon plugins but horizon plugins are not installed in tox env by default and the jobs will fail as a result. This commit changes to use openstack_dashboard.test.settings as DJANGO_SETTINGS_MODULE for these tox environments by default. Change-Id: I6a9d0c74271cc4addd8a0964b5955d7d3b6d8267
-
- Nov 10, 2018
-
-
Akihiro Motoki authored
Fix the following new errors: * E305 expected 2 blank lines after class or function definition, found 1 * E126 continuation line over-indented for hanging indent max_line_length is set to 80 as the default value in pycodestyle is 79 but horizon uses 80 as max_line_length. Ignore W504 and F405 by configurations. Reasons of disabling them are explained as comments in tox.ini. Change-Id: Iee8bcd60c30883fc8c74f08cf20af853cbb5e271
-
- Oct 30, 2018
-
-
Sean McGinnis authored
Using "python setup.py check -r -s" method of checking the package has been deprecated with the new recommendation to build the sdist and wheel, then running "twine check" against the output. Luckily, there is already a job that covers this that only runs when the README, setup.py, or setup.cfg files change, making running this in the pep8 job redundant. This covered by the test-release-openstack-python3 that is defined in the publish-to-pypi-python3 template. More details can be found in this mailing list post: http://lists.openstack.org/pipermail/openstack-dev/2018-October/136136.html Change-Id: Iaea98becbcc6877d8413a08a62d4427b11598fd3 Signed-off-by:
Sean McGinnis <sean.mcginnis@gmail.com>
-
- Aug 26, 2018
-
-
Akihiro Motoki authored
Most jobs run with python3 now by default. In addition, this commit moves bandit testenv definitions before non-testenv tox environments. I believe this brings better readability. Change-Id: Ibc66211ebc517368b629a09084a494dc81a0265f
-
Akihiro Motoki authored
Django 2.1 has been released. It would be nice to have tox env for testing with Django 2.1. Note that this does not mean I lead Django 2.1 support. Related-Bug: #1789046 Change-Id: Ic5f59e3c19480e01f5bfecbb0994121ee649388f
-
- Jul 08, 2018
-
-
Qian Min Chen authored
Since the horizon remove the 'run_tests.sh' file, so there should remove '.venv' from the '.tox.ini' file. Change-Id: I3f956521ac1af37df77961991eddbfc0a3afb718
-
- Jun 22, 2018
-
-
Ivan Kolodyazhny authored
This commit adds two new tox environments for bandit scanner. To run any of them you can use tox commands: 1) 'tox -e bandit' to run bandit scanner against all the code 2) 'tox -e bandit-baseline' to run bandit scanner only against the last commit or the current changes. Bandit job uses 'bandit-baseline' tox environment to veryfy that no new issues were introduced. Change-Id: I1fc3bb0d5d151f215b9efc916f921fabaa72e7d8
-
- Jun 21, 2018
-
-
Akihiro Motoki authored
* Define py35 commands in a single place. Previously it was defined in [testenv] and [testenv:py35]. * py35 env should use python3.5 instead of python3 because pyNN job is specific to a specific python version. In addition, python version is automatically assumed by tox. * Sort env definitions in the order of unit tests, other testing stuffs with 'testenv:' prefix and finally non testenv stuffs (like flake8). * Drop testenv:manage-py35dj20 because testenv:manage now uses python 3.5 and Django 2.0. * Avoid using dict-style env commands definitions. In OpenStack projects, we usually use [testenv:xxxx] style. Change-Id: Ib55031a50a51f952b738f0fdf33313fa2c7522ff
-
- Jun 15, 2018
-
-
Ivan Kolodyazhny authored
Commit I7fb2fd7dd40f301ea822154b9809a9a07610c507 from integration tests run by incorrect syntax of posargs argument. This patch fixes it. Change-Id: I5882556a1b346ac40fe68b06772c4b349f70dfbc
-
- Jun 08, 2018
-
-
Ivan Kolodyazhny authored
Nose has been in maintenance mode for the past several years. It has issue with exit code [1] which leads to false positive results for our seleniun-headless job. This patch changes test runner for Horizon tests and does the following things: * Django test runner executes test in a different order than Nose does. That's why we've got an issue with side-effect in horizon.tests.unit.tables.test_tables.MyToggleAction class. This patch adds workaround to it. * Rename filename of test files to names starting with 'test_' so that the django test runner can find tests expectedly. * '--with-html-output' option is temporary dropped and will be added in a following patch. * Integraion tests is marked via django.test.tag mechanism which is introduced in Django 1.10 * 'selenium-headless' is broken now because we don't have geckodriver on gates, this patch makes it non-voting. * 'tox -e cover' is fixed * Remove @memorized decorator from dashboards.project.images.images.tables.filter_tenant_ids function. [1] https://github.com/nose-devs/nose/issues/984 Depends-On: https://review.openstack.org/572095 Depends-On: https://review.openstack.org/572124 Depends-On: https://review.openstack.org/572390 Depends-On: https://review.openstack.org/572391 Related blueprint: improve-horizon-testing Change-Id: I7fb2fd7dd40f301ea822154b9809a9a07610c507
-
Akihiro Motoki authored
Django 2.0 is now used in tox py35 job, so there is no need for py35dj20 job. Instead, Django 1.11 with python3 is not covered. - py35dj20 job is dropped from tox.ini. - python3-django111 is added to tox.ini. python3 is specified to basepython to avoid a specific python version. - Zuul job to consume python3-django111 is added. Note that horizon-openstack-tox-py35dj20 cannot be dropped because this job is used by horizon plugins. Change-Id: Ic3b5e06d591a6f1d667993d19dcddfaf40882dee
-
- Jun 06, 2018
-
-
Doug Hellmann authored
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: Iceeaad2d6e31f3afeba5879ba3825caba437940d Signed-off-by:
Doug Hellmann <doug@doughellmann.com>
-
- Apr 11, 2018
-
-
Akihiro Motoki authored
Also run pep8 env with python3 as pep8/flake8 python 3 is generally more strict. Change-Id: Id4669ca1f929826f07cfe2928092d0e7255fda6f Closes-Bug: #1762992
-
Akihiro Motoki authored
E402 module level import not at top of file Change-Id: Ia8425ffe5b1325d00ae482d99b6764fd0fcbf822
-
Akihiro Motoki authored
W503 line break before binary operator Looking at the code base, it sounds okay to follow this check. Change-Id: Id511e0104dc6de5b204021661d4a8776ca6d3658
-
- Apr 10, 2018
-
-
Akihiro Motoki authored
Recent pep8 upgrade and corresponding pycodestyle update break horizon pep8 job due to the new rules. This commit fixes the following new errors: - E226 missing whitespace around arithmetic operator - E241 multiple spaces after ',' - E731 do not assign a lambda expression, use a def The following errors are added to the ignore list as there are many errors: - E402 module level import not at top of file - W503 line break before binary operator Change-Id: I3478b0684175d2604bbcc1d89cbfca298b97f1e1
-
- Mar 25, 2018
-
-
Doug Hellmann authored
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. --- horizon specific change: * Django minimum version is bumped to >=1.11 as horizon rocky dropped Django 1.8-1.10 support. * django-babel needs to be bumped to 0.6.2 to support Django 2.0 https://github.com/python-babel/django-babel/commit/8762ff5dc00c4c552655134970c8a261f9bd7366 * nose-exclude needs to be bumped to 0.5.0 to run horizon unit tests properly. According to my test, 0.4.0 also works but this is a testing dependency, so we don't need to care multiple versions much. Otherwise only one test is run for openstack_dashboard unit tests. https://review.openstack.org/555402 allows us to bump lower requirements. Co-Authored-By:
Akihiro Motoki <amotoki@gmail.com> Change-Id: I73c3e4531c57d015f6016ca00b056a6fd0d8fc1a Depends-On: https://review.openstack.org/555034 Depends-On: https://review.openstack.org/555402 Signed-off-by:
Doug Hellmann <doug@doughellmann.com> Signed-off-by:
Akihiro Motoki <amotoki@gmail.com>
-
- Mar 24, 2018
-
-
Akihiro Motoki authored
The detail is described in the following links: https://governance.openstack.org/tc/reference/project-testing-interface.html http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html doc8 command is dropped from docs and releasenotes tox envs. We run doc8 in pep8 tox env, so this hurts nothing. Change-Id: I24271b527258b1de4cf26ca7efd625954eb834de
-
- Mar 11, 2018
-
-
Akihiro Motoki authored
- Drop tox envs for Django 1.10 or older. - Drop tox env py27dj111 as Django 1.11 is our primary version and it is covered by py27. - Ensure Django 2.0 is installed in py35dj20 and manage-py35dj20. The current install command potentially installs Django 2.1 or later if alpha version is released. It is better to ensure 2.0.x is installed. Change-Id: I85cbb61da9496313ae1633ec94b85702b434b122
-
- Mar 08, 2018
-
-
Monty Taylor authored
In order to deal with horizon going into the upper-constraints file so that horizon plugins can consume it normally, we need to align the constraints invocation in horizon's tox.ini. This means putting the -C argument into the dependencies list rather than the pip install line so that it doesn't get appended to tox installing horizon itself. While we're in here, move nosehtmloutput into test-requirements so that we don't need to do .[test] which also doesn't work with constraints. Needed-By: https://review.openstack.org/550475 Change-Id: I736f79010c2d34e25d41d967a38128c2263ed13f
-
- Feb 07, 2018
-
-
Luong Anh Tuan authored
This patch enable extensions: -[H106] Do not put vim configuration in source files. -[H204] Use assert(Not)Equal to check for equality. -[H205] Use assert(Greater|Less)(Equal) for comparison. Change-Id: I7fa2c8753b2b471f44afe8ee83a4a612ed1b76a9
-
- Jan 06, 2018
-
-
Akihiro Motoki authored
The gate doc/releasenotes jobs do not use tox targets and call sphinx directly, so doc8 check is not asserted in the gate. Considering this, this commit adds doc8 check to pep8 job to ensure doc8 check is applied. Change-Id: I9df403199264de36b1d0997871e32b29a6988c00
-
- Dec 27, 2017
-
-
Akihiro Motoki authored
This patch also adds checks for executable files in pep8 job. nose ignores executable files by default, so it is important to ensure executable flag is not set for test files [1]. openstack_dashboard/test/test_plugins/panel_tests.py was not tested actually and it was broken. This commit fixes it too. [1] http://nose.readthedocs.io/en/latest/usage.html#cmdoption-exe Co-Authored-By:
Ivan Kolodyazhny <e0ne@e0ne.info> Change-Id: I3a124fa2f9f0676b2b43a094e32e3d8b18fa6005
-
- Nov 29, 2017
-
-
Akihiro Motoki authored
Change-Id: I657d3d5cbec9a62b4322b4f6f892ecc0b2912fa4
-
- Nov 22, 2017
-
-
Akihiro Motoki authored
The horizon repo now contains three python modules: openstack_auth, horizon and openstack_dashboard. It is useful if we can specify a specific python module when running 'tox -e pep8'. Change-Id: I35d0f2a762806c52bd2fa0e863db500b4ae2c605
-
- Nov 17, 2017
-
-
chao liu authored
The django.wsgi file should be adjusted to meet pep8 standards and apply pep8 check to django.wsgi automatically. Change-Id: Iaee708e95b7209c5ff19129a98af37914f320bd
-
- Oct 09, 2017
-
-
Ivan Kolodyazhny authored
We don't need license headers in config files. That's why it's safe to skip this check. Change-Id: I1ec3c0ade4377f2ca001e7c48620d76b96caff48
-
- Sep 27, 2017
-
-
Rob Cresswell authored
Moves Django OpenStack Auth content to Horizon, since they are so tightly coupled. This cleans up the development workflow and should make keystone / auth related contributions easier. Implements: blueprint merge-openstack-auth Change-Id: Ia1cdc47bad1ca6e633073a9f9445b0c7f70d05bc
-
- Sep 20, 2017
-
-
Akihiro Motoki authored
To ensure project imports are placed after third party import, we need to specify application-import-names. Previously flake8-import-check checks only standard imports or not. Change-Id: I9beb2105f686dc7d9aebfce8e21c5e182698e2fe
-
- Aug 21, 2017
-
-
Thomas Bechtold authored
It is not strictly needed. Change-Id: I37b2623ec834533a7ecae63084e2c2c04ecc1751
-
- Jul 19, 2017
-
-
Akihiro Motoki authored
doc8 is a linter for documents and used in openstack-manuals. It is better to enforce document linters for simple checking. The current rules are really simple like: - line length check (80 chars) - new line at the end of file Change-Id: I3810df521068ffc97e25a5fc56b72397bf9783bc
-
- Jul 08, 2017
-
-
Akihiro Motoki authored
py27dj18 currently uses Django 1.10 (from upper-constraints.txt). The Django version should be specified explicitly. Change-Id: I23a6dda4da52a0758e2f3e3bff26795c161babb8
-
- Jul 07, 2017
-
-
Michael Dovgal authored
After updating code from actual branch we still use old *.pyc files. It can give an unexpected result, for instance, a lot of tests are broken due to unknown reasons. This patch fixes this issue. Change-Id: I3bdbad9748dc3d94d6d8914156604eab7ad877a0
-