Commit Graph

62 Commits

Author SHA1 Message Date
manchandavishal 4d07066a9e Adjust tox.ini for tox4
OpenStack CI now uses tox4 by default.

- Drop "skipsdist = True".
  When skipsdist=True is specified, a target application is not
  installed into a tox env, but there seems no reason to do so.
  In various other OpenStack projects, a target applicatin needs
  to be installed into a tox vnev, for example, in docs and/or
  linter jobs and it causes failures with tox4. So dropping it
  would avoid potential future failures.
- whitelist_externals replaced with allowlist_externals since
  tox 3.18.0
  whitelist_externals option has been deprecated in
  favor of the new allowlist_externals option[1].

[1] https://github.com/tox-dev/tox/blob/legacy/docs/changelog.rst#v3180-2020-07-23

Change-Id: I478545d83231119fda0661f800246be7680e5190
2023-01-17 23:05:21 +05:30
Ghanshyam Mann 4791c14886 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: I8f4276fbd0f756cf7032822ffb6ca51b4d934478
2022-08-10 15:14:41 +02:00
hejunli 46a5ad1317 Update python testing classifier
Change-Id: Id1fe6281cf2475ca84cd148bfbbd402c16e0b9d8
2021-12-23 20:35:49 +08:00
Andreas Jaeger 944da81279 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
- Add requires on python >= 3.6 to setup.cfg so that pypi and pip
  know about the requirement
- Remove obsolete sections from setup.cfg
- Update requirements, no need for python_version anymore
- Use newer openstackdocstheme version
- Remove install_command from tox.ini, the default is fine
- Use TOX_CONSTRAINTS_FILE instead of UPPER_CONSTRAINTS_FILE since
  the later is obsolete
- Increase lower constraints to fullfill package requests

Change-Id: I7126c2646f272b3f8c568630293a194bc5ba98a9
2020-04-28 21:20:48 +02:00
Sean McGinnis 6b3638e61f
Bump default tox env from py37 to py38
Python 3.8 is now our highest level supported python runtime.
This updates the default tox target environments to swap out
py37 for py38 to make sure local development testing is
covering this version.

This does not impact zuul jobs in any way, nor prevent local
tests against py37. It just changes the default if none is
explicitly provided.

Change-Id: Iaf0aa105ced0f8d5a0dabf8fc25bd7252c602c92
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-24 10:26:00 -05:00
Andreas Jaeger 24e6863ba7 Update hacking for Python3
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.

Fix problems found.

Update local hacking checks for new flake8.

Remove hacking and friends from lower-constraints, it's not needed
there for co-installing.

Change-Id: I3d250ba82cc14f163f4295381b9b9c232486ac9f
2020-03-31 17:38:17 +02:00
manchandavishal bfce75ee8c 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: I5ddd9d5ba23634f110927e385550d97b66fd2542
2020-01-02 20:35:53 +00:00
Ghanshyam Mann aa2bdc68e6 [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

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

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

Depends-On: https://review.opendev.org/#/c/693631/
Change-Id: I9bbca7e2d317090dc2d05d08ccf8c45206cd160c
2019-11-18 12:02:49 +00:00
manchandavishal 3584317a46 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 fix the failed test cases for django2.2 support by replacing
None with an empty string and add renderer argument.
For information please refer [1], [2], [3].

[1] https://review.opendev.org/#/c/681969/
[2] https://github.com/django/django/commit/6fe9c45b725
[3] https://docs.djangoproject.com/en/2.1/releases/2.1/#features-removed-in-2-1
Change-Id: I9a62bb0a56b16cd6caa6cc9bf7db9b85c99ed580
2019-10-18 17:48:25 +00:00
manchandavishal 3a8b05b3a1 Update the constraints url
For more detail, see http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

Change-Id: I92a6bf606061e03dddab3698dba9a940820ab28b
2019-09-19 16:00:23 +00:00
Corey Bryant cce212a951 Limit envlist to py37 for Python 3 Train goal
This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train. The correct zuul jobs are
already in place so this change just limits default 'tox' calls to py37
to save developers time.

See the Train python3-updates goal document for details:
https://governance.openstack.org/tc/goals/train/python3-updates.html

Change-Id: Idc3c4be93f8c01e3b88b00f863bfba90a3f9d4e4
Story: #2005924
Task: #34244
2019-07-11 12:33:23 -04:00
Luigi Toscano d47ed15068 Replace git.openstack.org URLs with opendev.org URLs
Thorough replacement of git.openstack.org URLs with their opendev.org
counterparts.

Change-Id: I83a2db1878b71707752dcd04d7bfb37e884604c0
2019-04-20 13:51:20 +02:00
Ghanshyam Mann 45ef652c22 Dropping the py35 testing
All the integration testing has been moved to
Bionic now[1] and py3.5 is not tested runtime for
Train or stable/stein[2].

As per below ML thread, we are good to drop the py35
testing now:
http://lists.openstack.org/pipermail/openstack-discuss/2019-April/005097.html

[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-April/004647.html
[2]
https://governance.openstack.org/tc/reference/runtimes/stein.html
https://governance.openstack.org/tc/reference/runtimes/train.html

Change-Id: I10ac5a633a2549e8053b5f0f438f692b5efca821
2019-04-16 17:34:27 +00:00
Luigi Toscano 65961853cc Overhaul of the unit test jobs and tox environments
Since Rocky, horizon depends on Django 2.0 when Python 3 is used.
The old sahara-dashboard-tox-py35dj20 and the py35dj20 tox environments
are thus no longer needed.
Add few more jobs:
- the py36 and py37 jobs and the related tox environments;
- a py3/django 1.11 job and tox environment, and set is a voting
  like its Horizon counterpart;
- the tox environment for a django 2.1 job (Horizon provides one as well.)

Finally, don't require the last version of horizon for the py3/django 1.11,
but relies on the stable version (which should provide the proper library
interface, as it happen with the other unit test jobs.)

Change-Id: Ic76b454f36d81a25b40e91a88d131f20a8df12f9
2019-03-07 12:33:15 +01:00
Luigi Toscano bd66017874 Native Zuul v3 dashboard-integration test
- create a native Zuul v3 job, and move it to experimental
  until it works;
- install libav-utils on dpkg systems and enable the capture
  of the video;
- adapt to the changes in OverviewPage:
  * go_to_system_flavorspage -> go_to_admin_compute_flavorspage
  * go_to_compute_imagespage -> go_to_project_compute_imagespage

The job is failing right now, but apart the increased running time,
at least the tests are now executed.

Story: 2001686
Task: 8662

Change-Id: I311203779bd3e6c6660cfe1b84e89c7dc0825c98
2019-02-21 00:47:34 +01:00
Luigi Toscano 6733240dac Few python3 (and 3.6) compatibility improvements
- devstack plugin: run manage.py using $PYTHON (defined by devstack,
  it points to the Python interpreter used by DevStack;
- add an explicit envlist for py36;
- add the classifier for Python 3.6 to setup.cfg;
- bump the minumum tox version to 2.0, which is the de-facto
  minimum version.

Change-Id: I2bce1562b9ac49abf2e80efd3d6df392e40328b1
2018-12-05 22:37:22 +01:00
Akihiro Motoki 72a6a7a94b Switch test runner to django default runner
nose is not actively maintained now and Django default test runner
seems to have enough features.

* Horizon test setting no longer depends on nose and related stuffs.
  This commit cleans up nose related dependencies.
  The change was made in horizon Rocky-3,
  so horizon 14.0.0.0b3 is required at least.
* Integraion tests is marked via django.test.tag mechanism which is
  introduced in Django 1.10.
* Rename filename of test files to names starting with 'test_'
  so that the django test runner can find tests expectedly.
* run_tests.sh is no longer called from tox.ini, so it can be dropped.
  Note that the similar run_tests.sh in horizon was dropped long ago.

Change-Id: I1e5471078cc95031e8819f01100319a9ee2a3a73
2018-08-21 23:16:36 +09:00
Luigi Toscano 465b10e1ef Fix the coverage tox target
It was broken for a long while, since the migration
of the dashboard code into Horizon, and then back
into this repository, as .testr.conf was removed.

Use coverage directly instead of testrepository,
the same way as Horizon does. We should port
the normal test runner to the Django test runner too,
instead of the custom run_tests.sh script, but
that's for another (future) review.

Change-Id: I08966ddc7e891156a1c934bb115ce8a02f77ec83
2018-06-29 14:53:30 +02:00
Vu Cong Tuan a69a197b4c Add py36 testenv
Python 3.6 is installed by default in Ubuntu 18.04 LTS.
Therefore, according to transition plan [1],
we should have py36 testenv ready for it.

[1] https://wiki.ubuntu.com/Python/Python36Transition

Change-Id: I41723a6fed6946af11dc5c639f2529e8c12972be
2018-06-25 09:29:17 +07:00
huang.zhiping 51b8f8d33d 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: Ie09277286885f22f7021d401c55830be32d7624a
2018-06-09 22:54:28 +08:00
Ivan Kolodyazhny 7a3305f35a Use Django 2.0.x for py35dj20 tox environment
Change-Id: Ia7871132c2e72240c8029f3713f4da2caffeeef6
2018-06-05 15:25:00 +00:00
Doug Hellmann b81d74661c 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.

---
sahara-dashboard specific changes:
- sahara-dashboard uses django.urls module which is only available in
  Django 1.11 or later, so the Django min version needs to be bumped to 1.11.
  Horizon Rocky bumped the Django min version
  to >=1.11
- django-babel needs to bumped to 0.6.2 to support Django 1.11 and 2.0.
- nose-exclude needs to bumped to 0.5.0 to run all existing unit tests.

https://review.openstack.org/555402 allows us to bump lower requirements.

Co-Authored-By: Akihiro Motoki <amotoki@gmail.com>
Change-Id: I6cc5d973ea0e586e6fbe2ab4ba1345857722d008
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>
2018-03-26 05:13:19 +09:00
Andreas Jaeger ca02545ad6 Avoid tox-install.sh
Instead of using tox-install.sh, we can install
horizon now directly from pypi - or use the current branch in CI system
using tox-siblings.

Create doc/requirements.txt for doc requirements as well, it's use
currently only for releasenotes. Remove obsolete oslosphinx requirement.
Remove docs environment - this project has no docs, only releasenotes.

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

Change-Id: I72a942149a88183a32afc0440ead7b927bdc93b5
2018-03-14 15:01:10 +01:00
Luigi Toscano 276212fb30 Fix the job set required for Rocky
Horizon in Rocky will only support Django 1.11 and 2.0.
Also, Horizon is trying to be more compatible with Python 3.
See: https://blueprints.launchpad.net/horizon/+spec/django2-support

This require few changes (for master only):
- remove the jobs and the tox entry points for unit tests
  with Django < 1.11 (which started to fail anyway after some
  recent changes in Horizon);
- add a tox target and a corresponding non-voting job which runs
  the unit tests using Django 2.0 with Python 3;
- create a basic job for all non-standard unit tests jobs (even if
  there is just one right now) which improves the set of irrelevant
  files (translations, release notes, documentation).

Change-Id: I8d87fb3bcdb1baa221246ca4fc5edf8ae14f0cb2
2018-03-04 15:41:39 +01:00
Andreas Jaeger 73b44247f2 Align tox_install.sh 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: I93d14b522b2c55e8988c6586e4b5c32cbd151e56
2017-11-22 19:51:31 +01:00
Luigi Toscano 33d9525c1d Fix py27dj110 tox environment: really use Django 1.10
That specific testenv was added before the release of Django 1.10,
so the pip line was not capped and without this change tox installs
the last version (currently 1.11).

Change-Id: Icb669a9e999118f4d4302449d1b0d0ce2abb8c2c
2017-08-01 18:51:06 +02:00
blue55 6cc79c8c30 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: Icd0162ac6bef12b2303c41bc11c917901c6dcade
2017-06-23 10:44:22 +08:00
Ihor Kalnytskyi caaa96f91f Reuse testenv env variables in py27/py35 envs
Due to Tox override mechanism, both py27 and py35 envs do not pass
env variables defined in testenv to tox_install.sh script. Hence,
BRANCH_NAME is not defined and master code of Horizon is always
installed. While it's not critical for sahara-dashboard master branch,
it's crucial for stable branches, especially stable/newton where running
tox -e py27 fails due to fresh Horizon and old its dependencies.

This patch adds inheritance for py27 and py35 envs, so the env variables
defined in testenv will be also defined in these both envs.

Change-Id: I246049d29024b64b50dcdc153a809c9649716287
2017-05-05 16:44:32 +03:00
pawnesh.kumar 549a30c494 Remove support for py34
The gating on python 3.4 is restricted to <= Mitaka. This is due to
the change from Ubuntu Trusty to Xenial, where only python3.5 is
available. There is no need to continue to keep these settings.

Change-Id: Ic28c0a6e8db6d6360c00ec834e474826cc3ada27
2017-03-30 12:29:57 +00:00
Luong Anh Tuan 2963ea3ba2 Indicating the location tests directory in oslo_debug_helper
According to [1], we can passing a "-t" argument to
oslo_debug_helper to indicate the directory where tests
are located. This will solves ImportError exception.

[1] https://docs.openstack.org/developer/oslotest/features.html

Change-Id: I4c9bb211efddbad4f3a8e63c3779f3d62112cd32
Closes-Bug: #1666560
2017-03-10 00:00:06 +07:00
Tony Breeds 978718ab96 Add Constraints support
Adding constraints support to libraries is slightly more complex than
services as the libraries themselves are listed in upper-constraints.txt
which leads to errors that you can't install a specific version and a
constrained version.

This change adds constraints support by also adding a helper script to
edit the constraints to remove sahara-dashboard.

As sahara-dashboard also uses run_tests.sh I've modified that code in
line with the horizon change I9bf85adb5aa2c85d8c0f0f22ac9efe5cac3646c0

Change-Id: Ieb8afdef1e9649b18a4394620e52b9f6ac3d997b
2016-12-22 15:06:30 +11:00
guangpei.liu fac36c6c43 Drop unused directory in tox
The Oslo team has moved all previously incubated code from
the 'openstack/oslo-incubator' repository into separate library
repositories and released those libraries to the Python Package,
so the directory should be removed.

Change-Id: I9b86db737a8b98cf172c5fdf532ebe483b98b7f5
2016-09-12 20:31:30 +08:00
Jenkins 29d69157ca Merge "Add Python 3.5 classifier and venv" 2016-07-25 09:29:37 +00:00
Shu Yingya 804c5488fe 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 py34 venv.

Change-Id: I75cae6b3a810a955b4d81dcda9c9bf920f9e6bd7
2016-07-25 12:06:27 +08:00
Vitaly Gridnev c3bb37841a add py27dj110 testenv
Change-Id: I702f3a92f97f0943909afd8bab636ceac09c5342
2016-07-23 22:22:58 +03:00
Andreas Jaeger c68c29808f List system dependencies for running common tests
Add an other-requirements.txt file containing a cross-platform list
of dependencies needed for running included tox-based tests. Also
include a tox environment for convenience calling the bindep[*]
utility to list any missing system requirements.

This change is self-testing.

For other-requirements.txt see also
http://docs.openstack.org/infra/manual/drivers.html#package-requirements

[*] http://docs.openstack.org/infra/bindep/

Change-Id: Ic0be913d29684a2c825267a023ba70934acb430c
2016-06-29 09:16:45 +02:00
Vitaly Gridnev 4b438255a9 Start using reno for release notes
Change-Id: I9189f580ce0f48d360d251922e70d247aae04e9a
2016-06-08 16:08:42 +03:00
Vitaly Gridnev 9a8b5ff5a5 Add testenv for py34 jobs
Added new testenv for python 34. Currently 2 tests are failed.

Change-Id: Ie62cae2ebb58e357a6327b5925282c1b27412961
2016-03-25 00:09:15 +03:00
Vitaly Gridnev 92b4e66008 Add Django 1.9 testenv
Added django 1.9 testenv and also drop django 1.7 (since
it's no longer in global requirements)

Change-Id: Ifcc98454b1ecff2e230575e710e4237f360583d8
2016-03-24 23:55:41 +03:00
Jenkins a8d915e766 Merge "Install horizon more efficiently" 2016-02-29 10:18:14 +00:00
Akihiro Motoki 64b6e973bd Install horizon more efficiently
This patch introduces a pip install wrapper script which
checks horizon is installed and installs it from efficient way
(try zuul-cloner first and then use the horizon git repo).

This can also avoid a problem reported in bug 1540328.

When run_tests.sh is used, horizon is installed by
the customized install_venv.py now.
run_tests.sh is not directly used in our gate jobs,
so we can always install horizon using git repo.

This idea is borrowed from neutron subpurojects.

Change-Id: Ice304957823ac1d2c63f7c417c0dc9bb9c1fa757
Related-Bug: #1540328
2016-02-17 02:33:47 +09:00
Mark Vanderwiel 27f02dbf33 fix integration test screen shots
Looking at sahara dashboard as model for possibly adding
integration tests to the app-catalog.  Noticed that the
screen shots were not being saved. Adding the +e to the
script allows the screenshot copy to actually work.

The logs from patch set 7 show this working. In that patch
set I forced a screenshot even tho the test was successful.

Change-Id: Iee393a40e8a29943203cb59f6ed669db8f570d4a
2016-02-02 10:19:37 -06:00
David Lyle c6024d2b5d Adding integration test support
Co-Authored-By: Timur Sufiev <tsufiev@mirantis.com>
Depends-On: I99718970af78feeafc25dbb3aa9639ea2cf401ad
Change-Id: I8b6d681d0f517c57ee5f58eaca5754356878b581
2015-12-31 12:56:12 +03:00
David Lyle 6c5898813c Excising Sahara content from Horizon
This plugin moves the current content from the horizon repo to this
plugin repo. The code has been tested in a devstack install using the
following steps:

    1. packaging the plugin: "python setup.cfg sdist"
    2. pip installing the tar.gz in the resulting dist directory
    3.  a. (temporary step) remove existing sahara enabled files from
            horizon
            "rm openstack_dashboard/enabled/_18*.py"
        b. finding the install location and changing to it
            "cp sahara_dashboard/enabled/* /opt/stack/horizon/local/enabled"
    4. in /opt/stack/horizon
        a. python manage.py collectstatic
        b. python manage.py compress
    5. restarting the horizon server

Additionally, you can run the unit tests by:
    ./run_tests.sh

    Note: added script to programmatically remove the old configuration
    files from the targeted horizon install, either in venv or system
    install.

Known issues:
  1. running tests locally emits missing neutron service messages.
  2. plugin code for devstack needs to be added
  3. README is inadequate
  4. integration tests are still in horizon repo
  5. local copy of run_tests is heavy weight, but a better solution is
     not available currently.
  6. localization tooling and strings

Change-Id: Icdce2d3e945e612d368556dd5cea1930194c7b67
2015-11-30 16:40:44 -07:00
Chad Roberts 01d6e53630 Removing all code from previous dashboard incarnation
Clearing out all of the old code from the Sahara
dashboard repo in preparation for bringing the new
code back into the repo for the Mitaka release.

Change-Id: I83cb932c35987ea80ac9233bd355355398b9164b
2015-11-03 11:50:13 -05:00
Christian Berendt f3c15c6f54 Enabled checks for E226, E251, E265
Thoas checks are also enabled in Horizon and should be enabled here as well.

* E226 missing whitespace around arithmetic operator
* E251 unexpected spaces around keyword / parameter equals
* E265 block comment should start with '# '

Change-Id: Ib44fd1b327c23752acfc5b98cd468881b781c816
2014-07-22 13:39:39 +02:00
Christian Berendt 1bc3465a8b Enabled hacking checks H305 and H307
* H305  imports not grouped correctly
* H307  like imports should be grouped together

Change-Id: Icae1c85b4bd7f8f58ca9e0db5bed20de1be02897
2014-07-17 18:15:23 +02:00
Alexander Ignatov 81a8c6e634 Added new hacking version to requirements
* Added hacking>=0.9.1,<0.10 according to change
  I4e5f370607936144c11585453f3b1db7a26eff9c
* Ignored all pep8 errors to work with new version

Change-Id: Ia99d1bbcbacd686d6d9de5aeacc13e6066bf49cc
2014-06-16 09:30:29 +04:00
Chad Roberts 9cc79ab36d Renaming savannadashboard directory to saharadashboard
* Renaming savannadashboard directory to saharadashboard which
also includes updating all of the places where that package
is referenced.
* Also including some renaming in the documentation.
* Changing the name of the top level panel to Sahara
* Changing the name of the top level Dashboard class to SaharaDashboard

Partial-Implements: blueprint savanna-renaming-dashboard

Change-Id: If51b85d22ec7798c214c56189359260198e69374
2014-03-12 13:52:59 -04:00
Nikita Konovalov 879c78fe76 Migrate to testr
Change-Id: If06ed4cd26a7be5cb14af20ba5d79ff849674cf6
2013-12-20 18:35:20 +04:00