Commit Graph

215 Commits

Author SHA1 Message Date
Takashi Kajinami e60fdbeb33 Display coverage report
... for easy reference. Also make sure old data is purged.

Change-Id: Ic5f0ec8e72db3a767625cb72489e396628e0237f
2024-02-07 12:36:33 +09:00
Takashi Kajinami 9ec622d3f9 tox: Drop envdir
tox now always recreates an env although the env is shared using envdir
options.
~~~
$ tox -e genpolicy
genpolicy: recreate env because env type changed from
{'name': 'genconfig', 'type': 'VirtualEnvRunner'} to
{'name': 'genpolicy', 'type': 'VirtualEnvRunner'}
~~~

According to the maintainer of tox, this functionality is not intended
to be supported.
https://github.com/tox-dev/tox/issues/425#issuecomment-1011944293

Change-Id: I1237cfefae5565c495864dd32b95e1f5998385e5
2024-02-02 23:46:53 +09:00
Takashi Kajinami dd046e42f8 Bump hacking
The version currently used is too old.

Also fix E275 "missing whitespace after keyword" newly detected.

Change-Id: I37e88d6b6bd707e9cc626e3625b9c034c7b5c553
2024-01-17 01:22:22 +09:00
niuke f6e1e9cb7f Use py3 as the default runtime for tox
Moving on py3 as the default runtime for tox to avoid to update
this at each new cycle.

Change-Id: I33d95309b6ad5f3eaa7301e88b98881ccb7de783
2023-08-02 09:48:00 +08:00
Zuul 2ec646abff Merge "test: Allow to run a specific test" 2022-07-22 04:29:29 +00:00
Zuul b22a9d6e2d Merge "Drop lower-constraints.txt and its testing" 2022-05-24 09:20:52 +00:00
Ghanshyam Mann 866d4bbcc5 Drop lower-constraints.txt and its testing
As discussed in TC PTG[1] and TC resolution[2], we are
dropping the lower-constraints.txt file and its testing.
We will keep lower bounds in the requirements.txt file but
with a note that these are not tested lower bounds and we
try our best to keep them updated.

[1] https://etherpad.opendev.org/p/tc-zed-ptg#L326
[2] https://governance.openstack.org/tc/resolutions/20220414-drop-lower-constraints.html#proposal

Change-Id: I7dc431aea5d800f000826cb371c4f1e1c89dc302
2022-05-24 14:05:08 +09:00
Akihiro Motoki 1fd73b753e test: Allow to run a specific test
Previously heat-dashboard unit/integration tests always run
the whole set of tests and there is no way to run a specific test.
{posargs} mechanism of tox would help us.

Change-Id: Ia37a2586a9207180c5f3ed85141b2916468f18b8
2022-02-16 19:51:09 +09:00
wu.shiming 0becff560a Changed minversion in tox to 3.18.0
The patch bumps min version of tox to 3.18.0 in order to
replace tox's whitelist_externals by allowlist_externals option:
https://github.com/tox-dev/tox/blob/master/docs/changelog.rst#v3180-2020-07-23

Change-Id: I62d4af00f7d329f38d8f029a9a694a548f2fc8d0
2021-07-06 15:57:52 +08:00
Zuul cbb5414dd1 Merge "Cleanup py27 support" 2020-04-27 16:52:32 +00:00
Andreas Jaeger ddaa0a1e0e Cleanup py27 support
This repo is now testing only with Python 3, so let's make
a few cleanups:
- Remove python 2.7 stanza from setup.py
- Remove obsolete sections from setup.cfg
- Update classifiers
- Update requirements, no need for python_version anymore
- Switch to using sphinx-build
- Use newer openstackdocstheme and Sphinx versions
- Cleanup */source/conf.py to remove now obsolete content.

Change-Id: Icf69fa99ed77a0935062ee4fc8e9c6a195b381e5
2020-04-21 08:24:56 +02:00
Andreas Jaeger 4f8b5ea08b Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Update local hacking checks for new flake8.

Remove hacking and friends from lower-constraints, they are not needed
for installation.

Change-Id: Ib6f30427e736ff488598e80e87ce0a8b39e92f33
2020-04-21 04:57:35 +09:00
Akihiro Motoki bd68639408 Use unittest.mock instead of third party mock
horizon recently switched from the third-party mock to unittest.mock.
This breaks heat-dashboard unit tests somehow.
We no longer support py27 and we can use the standard library
unittest.mock module. Rather than investigating the cause of
the failure, it would be nice to switch to unittest.mock.

horizon dependency is updated to 18.3.1 as unittest.mock is used
since 18.3.0 and 18.3.0 has an issue that it always requires pytest.
lower-constraints is updated to match horizon requirements.

hacking local-check-factory is disabled temporarily due to
the incompatibility with hacking 2.0 or later.
https://review.opendev.org/#/c/715690/ will recover it.

Change-Id: I517d6d7d36410c64bf48ad958b3e2115725a6491
2020-04-21 04:56:58 +09:00
manchandavishal 6b1e864318 Drop Django 1.11 support
Django 1.11 ends its extended support in April 2020 (which is before
Ussuri release), so horizon drops Django 1.11 support in Ussuri.

tox envs for non-primary Django versions are no longer needed in tox.ini
as testing environments for non-primary Django versions are setup in
the zuul jobs now.

horizon>=17.1.0 is required to use Django 2.2. requirements.txt and
lower-constraints.txt are updated accordingly. for more info. please
refer [1].
Depends-On: https://review.opendev.org/#/c/700733/
[1] https://etherpad.openstack.org/p/Enable_Django22_support_in_Horizon_Plugin

Change-Id: Ie197efeb0080c5ad7f223823ff8b1888ff7dc0de
2020-01-21 08:08:19 +01:00
Andreas Jaeger d1c8c6282e Revert accidental tox.ini change
Change I95c81cfd6ab9bc7384c585ef5aa625dad9a57caf added a change
to temporarily disable the tox version check for testing - revert this
part.

Change-Id: Ife42a20edbfd9049e9e1e12e51257004e0711258
2020-01-20 18:19:30 +01:00
Andreas Jaeger 30c4992796 s/assertItemsEqual/assertCountEqual/g
assertItemsEqual was renamed to assertCountEqual in Python 3, and the
testsuite is failing now - rename it.
See also https://six.readthedocs.io/#six.assertCountEqual

This unbreaks the testsuite.

Change-Id: I95c81cfd6ab9bc7384c585ef5aa625dad9a57caf
2020-01-20 16:51:50 +01:00
Zuul 5873b82fb6 Merge "Generate PDF documentation" 2019-12-23 13:54:13 +00:00
manchandavishal 8638a0c7f6 [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

heat-dashboard is ready with python 3 and ok to drop the
python 2.7 support.

Also this patch update minimum tox version in tox.ini file.
Complete discussion & schedule can be found in
- http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Change-Id: I63d6c5dfb2bb312c413b9350fa7c9a01eae6cd0b
2019-12-03 07:36:38 +00:00
manchandavishal a0975b6198 Use Horizon project template for django jobs
Horizon defined a project template 'horizon-non-primary-django-jobs'
for django jobs. This patch use that template to run django jobs
here and also fixes failed test cases for django2.2 support.
For information please refer [1]

[1] https://review.opendev.org/#/c/681969/

Change-Id: I3ab81402633b9abe39e49c3921585db992050540
2019-10-30 17:19:18 +09:00
manchandavishal e064697989 Generate PDF documentation
This commit adds a new tox target to build PDF documentation.
It's a part of community goal, see storyboard for more
information.

Story: 2006083
Task: 34856
2019-10-18 08:34:21 +00:00
manchandavishal c4a840820d Update the constraints url
For more detail, see http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

Change-Id: I4be0695d921a044fabe4977df8eb106bbfabeecf
2019-06-12 17:09:05 +00:00
ricolin 7eb51032e3 Drop use of git.openstack.org
Our cgit instance will be going away and opendev.org is the new
preferred URL for browsing our git repos. Redirects will exist for the
foreseeable future, but it's more efficient to just go directly to the
new locations.

Change-Id: Ia84b464390dbbaaba4c87c4032f5fd21a529f412
Co-Authored-By: Vishal Manchanda <manchandavishal143@gmail.com>
2019-05-22 16:37:13 +05:30
Zuul ff41a8b3e8 Merge "fix tox python3 overrides" 2019-04-22 08:57:54 +00:00
Zuul 1c653b256f Merge "Switch python3 versions of test jobs to match Train PTI" 2019-03-29 17:49:03 +00:00
manchandavishal a7cda44dfe Switch python3 versions of test jobs to match Train PTI
In Train, we will use python 3.6 and 3.7 for python3 runtime
in our gate jobs [1]. This commit drops python 3.5 and adds python 3.7.

Redundant entries in tox.ini are cleanup along with python3.5 removal.

[1] https://governance.openstack.org/tc/reference/runtimes/train.html

Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: Ideb2e7f6e7e3bd0986e5f6d400912a3e4e392e14
2019-03-28 14:02:28 +09:00
jacky06 25415b0e46 Update hacking version
Use latest release 1.1.0 and compatible changes w.r.t pep8

Change-Id: I45befc03377d96c27db8b1d8d78dd7b5bec5ec14
2019-03-27 14:00:03 +08:00
Ivan Kolodyazhny e4a8ab4a11 Add heat-dashboard integration tests
This patch adds basic tests to verify that heat-dashboard is
installed and could be opened.

heat-dashboard-integration-tests job is added in a
non-voting mode.

Depends-On: https://review.openstack.org/634712
Change-Id: I2550d6fcd1ce4e05502f247e227aaec05e762fcb
2019-02-05 09:40:06 +02:00
huang.zhiping 793617c36c 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: I981fa8d52800d24a5007f369ca6df4ffca9be0cb
2019-01-22 02:52:08 +00:00
Zuul eed8b98084 Merge "Add py36 testenv" 2018-08-13 23:58:33 +00:00
irisayame 9c8eed7eda Replace embedded static files with XStatic-*
Remove embedded js/css, add reference in settings,
 add requirement xstatic libs.

Change-Id: I3424e3f965f65eeb4ddcef18a69a7b33918d8a09
Task: #18882
Story: #1753919
2018-07-09 16:02:37 +09:00
Vu Cong Tuan c56db2edce Add py36 testenv
Python 3.6 is installed by default in Ubuntu 18.04 LTS.
Therefore, according to Transition Plan [1],
it'll be handy to have py36 testenv.

For more details, please check Python2 Deprecation Timeline [2]
and Python3-first Goal - Completion Criteria [3].

[1] https://wiki.ubuntu.com/Python/Python36Transition
[2] https://governance.openstack.org/tc/resolutions/20180529-python2-deprecation-timeline.html
[3] https://review.openstack.org/#/c/575933/8/goals/stein/python3-first.rst@42

Change-Id: I2cfd19f5deece8cda8e7ea4b8ee1b747dc5534ef
2018-06-27 11:09:20 +07:00
Akihiro Motoki 850e8741a3 Add python3 django 1.11 job instead of django 2.0 job
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.yaml is updated to consume horizon-openstack-tox-python3-django111
  and drop horizon-openstack-tox-py35dj20.

Change-Id: I90485a472edb5d2446c7e1bc08554fec72b307a0
2018-06-13 00:06:08 +09:00
Akihiro Motoki aa19f2c5f1 Django 2.0 support
Co-Authored-By: Xinni Ge <xinni.ge1990@gmail.com>
Change-Id: I928156149f7152128e7cfa02d1d6c4849bd0e9a4
2018-06-06 20:34:24 +09:00
Doug Hellmann ab78a8de23 add lower-constraints job
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.

Change-Id: Ic5fa4edff518a453941ec3d288f7a859adccec76
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-22 12:43:09 -04:00
Andreas Jaeger 0525d28767 Avoid tox-install.sh
Instead of using tox-install.sh, we can install horizon and neutron
now directly from pypi - or use the current branch in CI system using
tox-siblings.

Update tox.ini for this change and add horizon to requirements file.

Change-Id: I898fb222f5b36714c61e60c222e8b57ddea99df6
2018-03-20 09:42:20 +01:00
ricolin c2740a275a Create doc/requirements.txt
For compliance with the Project Testing Interface as described in:
https://governance.openstack.org/tc/reference/project-testing-interface.html

Refer to:
http://lists.openstack.org/pipermail/openstack-dev/2017-November/124815.html

Change-Id: I32c84f17e4200314fb4a3e2c99d4e04608187a23
2017-12-29 15:02:52 +08:00
Zuul 61a5b7d3b7 Merge "Align tox_install.sh with other projects" 2017-12-06 13:18:00 +00:00
kaz_shinohara 153f16987d Deleted locale dir & Updated babel-django.cfg
To enable translate job correctly, deleted heat-dashboard/locale
directory and updated babel-django.cfg accordingly.
Also fixed tox.ini which included wrong commands for docs build.

Change-Id: Idb7996ded645a8bc8bcb3b7eb08c8754a8492873
2017-12-04 03:02:49 +00:00
Akihiro Motoki 199f0e0b7c Align tox_install.sh with other projects
pip_install.sh is renamed to tox_install.sh to align with other projects.

The tox_install.sh here behaves a bit differently than the others, which
is causing some problems when trying to rework some of the shared gate jobs.
Align it to the form used in other repos.

Change-Id: Ie35d2b33f4bfaa8383c7af9e5ca489b61f7da073
2017-11-30 21:31:48 +09:00
kaz_shinohara a2a56c7062 Add in repo zuul job definition
Add .zuul.yaml file to make sure more flexible zuul job controll by
heat-dashboard team members, apart from project-config repo.
We will keep basic & common jobs in project-config repo,
also heat-dashboard repo will have specific jobs like as multi django
ver jobs.

Change-Id: Ia9084b10bf4bb1941e0eb21b51798c2090b459cc
2017-11-01 21:44:17 +09:00
Keiichi Hikita ad9eba2e20 Add initial files as devstack settings/documents/requirements.
Change-Id: I79e42375151d06dd93a7529b7c6b6c25eafa68df
2017-10-31 15:58:55 +09:00
Keiichi Hikita 6ea30d1100 fix tox.ini 2017-10-06 14:48:22 +09:00
Akihiro Motoki c23d74ce8e flake8-import-order: Ensure to place project imports last
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
2017-09-20 01:19:38 +00:00
Thomas Bechtold 96e75f2336 Make nosehtmloutput an optional test requirement
It is not strictly needed.

Change-Id: I37b2623ec834533a7ecae63084e2c2c04ecc1751
2017-08-21 15:25:44 +02:00
Akihiro Motoki 467a96190c Use doc8 check
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
2017-07-19 10:31:16 +00:00
Akihiro Motoki 3d6022527c Fix py27dj18 definition
py27dj18 currently uses Django 1.10 (from upper-constraints.txt).
The Django version should be specified explicitly.

Change-Id: I23a6dda4da52a0758e2f3e3bff26795c161babb8
2017-07-08 21:02:44 +00:00
Michael Dovgal 7c08192705 Add '*.pyc' clean up for unit_tests
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
2017-07-07 13:42:36 +03:00
Rob Cresswell 8e150351cf Add Django 1.11 tox env
Change-Id: If26325ec260135064e178fa2254ddf7026bbce67
2017-07-05 11:12:16 +01:00
Akihiro Motoki 01f2a69a64 Use flake8-import-order plugin
In reviews we usually check import grouping but it is boring.
By using flake8-import-order plugin, we can avoid this.
This flake8 plugin is already used in tempest.
It enforces loose checking so it sounds good to use.

Note that flake8-import-order version is pinned to avoid unexpected
breakage of pep8 job.

Change-Id: I8ccd05eb70350a2441cc2a4d1eafc09ee690b83b
2017-07-03 08:02:23 +00:00
Akihiro Motoki e065c08e6d Fix H405 (multi line docstring) warnings (openstack_dashboard)
H405: multi line docstring summary not separated with an empty line

Closes-Bug: #1696996

Change-Id: Id895695663b19522d9cdc22f8b012e49680d708b
2017-06-09 16:05:31 +00:00