Commit Graph

45 Commits

Author SHA1 Message Date
Jake Yip 452ca7da23 Fix tox
tox4 errors if basepython and python in other envs are different. [1]

Bumped tox minversion as allowlist_externals is only supported in 3.18
[2]

[1] https://github.com/tox-dev/tox/issues/2838
[2] https://github.com/tox-dev/tox/issues/2730

Change-Id: I9d24395a7cc5d8423a58ec1e3ed8468ca6984e77
2023-02-17 15:35:00 +11:00
Ghanshyam Mann 4c63756e4b 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: I54657ef425f274cc6ed860b3600652dfd2c03438
2022-05-11 09:55:21 +00:00
manchandavishal 5be62ae15f Use TOX_CONSTRAINTS_FILE
UPPER_CONSTRAINTS_FILE is old name and deprecated.
This allows to use upper-constraints file as more
readable way instead of UPPER_CONSTRAINTS_FILE=<lower-constraints file>.
For more info. please refer [1].

[1] https://zuul-ci.org/docs/zuul-jobs/python-roles.html#rolevar-tox.tox_constraints_file

Change-Id: I5403b96d4dd0faac9f1295d57a1680a7d452c7b1
2021-02-16 12:32:22 +00:00
manchandavishal a09bcb0623 Update lower-constraints for new pip
This patch bump a series of lower-constraints and
requirements to work with new pip resolver. For
more information please refer [1]. It also fix some
pep8 issues.

[1] http://lists.openstack.org/pipermail/openstack-discuss/2020-December/019285.html

Change-Id: I0ce1e41b6e064866ef1e5e7cf8c55bb8a2cc5963
2020-12-23 13:24:13 +00:00
manchandavishal 417f606dcc 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: Iea3bfeba70fc91c4c5b3f5741111dcd5afa5b324
2020-01-01 21:00:16 +00:00
Akihiro Motoki 56af6c0230 Add requirements.txt to docs reqs
magnum-ui doc generated the module reference,
so requirements.txt should be here to apply upper-constraints.

Change-Id: I12a57a5d8a59dbc958512641a1ef49fee5c81152
2019-12-28 23:30:51 +09:00
Ghanshyam Mann a87c42234d [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

magnum-ui 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: I9630d3da80bd79f3886bc82e891e827238925704
2019-11-16 17:05:46 +00:00
manchandavishal c6a69f3d12 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. For information please refer [1]

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

Change-Id: Ic25ac51fb1134b06a1db148026da17239f43beed
2019-10-05 10:15:16 +00:00
manchandavishal 47e0329f52 Generate PDF documentation
Change-Id: I66add3b35283fdb6337b6dad9d79e852984d471f
Story: 2006093
Task: 35073
2019-09-18 13:54:31 +00:00
manchandavishal 901efd2bfa Update the constraints url
For more detail, see http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

Change-Id: Iacefbee652416ef3f74c663aaf244bfa45d0193c
2019-09-18 11:10:03 +00:00
manchandavishal ec51d61452 Changes for url transition to OpenDev
This commit changes openstack.org URL to opendev.org URL
as discussed here [1]

[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-March/003603.html

Change-Id: I1f9c8b580b6047599d0d5041ca636c6284d907d1
2019-04-25 02:42:05 +00:00
Ghanshyam Mann df9fa72abc 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: I21f0837fafd141cd06e8dbda2797f199bcc027da
2019-04-14 23:07:25 +00:00
jacky06 4618a32fec Update hacking version
Use latest release 1.1.0 and compatible changes w.r.t pep8

Change-Id: I4fbccf98e81ba2ce19210101593011ac3de086ac
2019-01-10 11:29:56 +08:00
Doug Hellmann 5563e4e68c 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: I4d1809663bcfe4539607cbf1e7040110b0cd46ea
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-10-02 00:47:45 +00:00
Shu Muto d07175ca7f Prepare to support python3.6
This patch prepares python3.6 support.

We should add py36-local into tox.ini and support for python3.6
into setup.cfg when we decide to support python3.6 formally.

Change-Id: I3db71b72071d789e8214dcb65b8515b196bbceb0
2018-07-25 06:32:02 +00:00
huang.zhiping d2ed7dfead 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.

To install horizon, check python3 version and set target directory
in postinstall script on package.json.

Change-Id: I321a3555a4d9ae3dafbf1da39d165462933b8c44
Co-Authored-By: Shu Muto <shu.mutow@gmail.com>
2018-07-25 06:31:51 +00:00
Zuul d10b4e9d87 Merge "Modify the 'tox.ini' file" 2018-07-20 01:15:47 +00:00
Qian Min Chen 13686ffedf Modify the 'tox.ini' file
Since the horizon remove the 'run_tests.sh' file,
so there should remove '.venv' from the '.tox.ini' file.

Change-Id: I32fe60fd0f7e76b62d4bac2abde17bcd48b225db
2018-07-17 15:21:24 +08:00
Akihiro Motoki 9190e35dc6 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: Ib6f271d9cc8446875d6284a1f7d9f17aab90c47c
2018-06-13 19:30:57 +09:00
Shu Muto a5d50dd3ed Fix tox jobs and remove tox_helper.sh
Horizon plugins needs horizon on master branch for our
master development and test.

Recent changes in CI infra and horizon force to change horizon
installation, and added tox_helper.sh as trivial fix.

Now, reasonable fix found for horizon plugins,
so this patch fixes them.

Change-Id: Ieae9bfdfed113795c0a7065964781914a2d041ce
Depends-On: I506e9c761ad1af3126db2c4778aa9dbbcf340130
2018-05-14 14:07:31 +09:00
Akihiro Motoki 530ba016ad Follow the new PTI for document build
Comment 7887b3f41a invented a wrong
way which violates the recent PTI. This commit clean them up and
follow the new PTL for documentation build.

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

pbr autodoc is now converted into sphinxcontrib-autodoc.
http://lists.openstack.org/pipermail/openstack-dev/2018-April/129147.html

Change-Id: I158440ef40426593981774307af982028573042b
2018-05-01 23:18:01 +09:00
Shu Muto 7887b3f41a Install Horizon from git repository in tox test
To test UI plugins, we should install recent Horizon
from master branch.

Also, fixed eslint and karma.

To run tox test easily before upload patchset,
adds eslint, karma, docs and releasenotes to envlist.

Change-Id: I82806631e7219eaa2372c2cd62b264056fbea64d
2018-04-13 17:09:23 +09:00
Shu Muto 923acdb53d Drop testenvs using django<=1.10 from tox
Django 1.11 is latest LTS and horizon team drops django<=1.10
from testenvs and requirements. So we drop them.
Instead add py35dj20 testenv for future support.

Change-Id: I2215be8a28f8bc180aeac093418fdb90f9272fdd
2018-03-29 16:14:11 +09:00
Doug Hellmann 70c99a9449 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: I530d7fced04c8e6668e92ed5feb78ae3a863979c
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-22 15:13:47 -04:00
Shu Muto e965dc233e Improve docs build
Starting in Django 1.7, standalone scripts, such as a sphinx build
require that django.setup() be called first. See:
https://docs.djangoproject.com/en/1.8/releases/1.7/#standalone-scripts
It does not always necessary, but it is needed to avoid warnings
when creating autoindex.
Note that horizon no longer generates the autoindex to avoid warnings.

Drops setenv DJANGO_SETTINGS_MODULE in docs env in tox.ini.
DJANGO_SETTINGS_MODULE is configured in doc/source/conf.py,
so there is no need to pass envvar.

Add warning-is-error sphinx setting to avoid doc build warnings.

Change-Id: I2de87c0df05abf589c90fb3ad691322e1125c310
2017-06-27 17:22:07 +09:00
Shu Muto 32aeaeffe6 hacking: Specify white list rules in noqa explicity
If 'noqa' is specified all hacking checks are disabled.
It is better to ignore specific rules explicitly rather than
ignoring all. The recent flake8 supports this [1].

[1] http://flake8.pycqa.org/en/stable/user/ignoring-errors.html

Change-Id: Ieeb62e8d66e626ab2e6cd506ce3a9854c69d5643
2017-06-23 12:53:22 +09:00
Shu Muto 40394040e3 Refresh test environment
To enable py35 tests, refresh test environments.
Also, update docs, remove run_tests.sh that is no longer used.

Change-Id: I9bcf4acdfd4a9811ab2f0fc3bd02898a46fbd112
2017-04-13 15:17:13 +09:00
Cao Xuan Hoang 161a0adbe7 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: I376b2140d7fa9520d976c213bd12dc814c6cf532
2017-02-15 10:48:35 +07:00
Cao Xuan Hoang 1578a7f852 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: Ifaa336eb08c697f022bda17aaf38e39e891a0c72
2017-01-18 13:44:51 +07:00
nizam b67072371e Don't include openstack/common in flake8 exclude list
The directory openstack/common was used to keep codes from
oslo-incubator, we have retired oslo-incubator, so don't use
this directory any more

Change-Id: I7e537a47eff76116101c62e0621b0f3426ee6db6
2016-10-28 19:40:15 +05:30
Shu Muto 1f30c1d2b0 Use Chrome for JS unit tests
PhantomJS has setup issues and is slowing down the gate with false
failures. We should change to Chrome until Phantom is more
reliable, at which point this patch can be reverted.

Change-Id: Ifb3c8f1bcc27ea79151a44b0d044f46e1d856f6d
2016-09-26 18:47:59 +09:00
Jenkins 53b8492a27 Merge "Add reno for releasenotes management" 2016-09-21 05:38:46 +00:00
Shu Muto ac73b67f22 Add reno for releasenotes management
An initial patch to add reno and create a base directory for
release notes

Change-Id: Id3a6f27581c0fafcffa8b63f0d6a51dc01ee0651
2016-09-20 15:19:58 +09:00
Shu Muto 45e42b7c8d Ignore node_modules in pep8
This patch excludes "node_modules" directory from pep8.

Change-Id: I6b04a9ddc66d07831c77f901dde5a1b69d746ca0
2016-09-20 15:07:21 +09:00
Shu Muto a256c034d0 Cleanup the test settings
Karma and coverage tests scatter its result around.
And recently, infra team seems to set a subdirectory called
'cover' for coverage tests by default.

This patch accumulates their results into 'cover' subdirectory.

Change-Id: I9c32da1ffdbb2f3104d9ecd6303f1f92fc0fcda8
2016-09-15 09:53:12 +09:00
Jenkins 38d4423bb3 Merge "Enable test coverage in run_test.sh and tox" 2016-09-13 13:39:14 +00:00
Kenji Ishii 8593eaf9fb Enable test coverage in run_test.sh and tox
About run_test.sh, the report of test coverage seems
not create at the moment.
Also tox for cover doesn't work well.
This patch fix it.

Change-Id: I408b4c053c4290c7a205d892c43cb7cd2bbff641
2016-09-13 17:58:53 +09:00
Shu Muto e1e124fa3e Setup JavaScript test environment
This patch setups JavaScript test environment.
- eslint
  test at local: `tox -e=eslint`
- karma
  test at local: `tox -e=karma`

Change-Id: I08675d8377214c52745ed7928bb58ec460a949b1
Implements: blueprint js-test-env
2016-09-13 09:33:01 +09:00
Rob Cresswell 1b398928f8 Fix tox and tests
Fixes a bunch of missing __init__.py files to make the docs job pass
without warnings, also cleans up tox (to move away from run_tests)

Change-Id: If305c701b4d601e66f1f9987d2dd70d6634ea624
2016-08-30 14:05:11 +01:00
Shu Muto 16cc3e80aa Use upper constraints for all jobs in tox.ini
Openstack infra now supports upper constraints for
all jobs. This patch removes install_command for
upper constraints from all post jobs.

Change-Id: I37fa82d49bcdea0409ec526063c077c32dbf094f
Closes-Bug: #1614117
2016-08-18 17:32:28 +09:00
shu-mutou 35725766f1 tox tests should respect upper-constraints.txt
This will force pip install to use the upper-constraints.txt specified
version of pip modules. When you don't do this, you are out on the
bleeding edge and become unstable everytime some python library in the
wide world changes in a way that you don't expect.

The post jobs can not use constraints file, so override the install
command there.

Change-Id: I4776140ee20ccbddb219c87cb613d48460c3b98e
Closes-Bug: #1563038
2016-04-04 14:02:39 +09:00
xiangxinyong a0c367d995 Remove py27dj17 from tox.ini
The Django version is set to [Django>=1.8,<1.9 # BSD]
in the global-requirements.txt of OpenStack/Requirements.
The tox.ini should remove the py27dj17 like Horizon.
The Django version in the requirement.txt should be updated.

Change-Id: Ib0af7d45ac4ac6e412dd4cb7091c113f5a53ffcf
Closes-Bug: #1552124
2016-03-07 15:00:39 +08:00
shu-mutou 50d44ae0d5 Fix H405 violations
There are a lot of H405 violation codes.
We need to fix the code for avoiding more violations.

Change-Id: I0db7b2276126f60768dde0cdf6ebd8681029ec10
Closes-Bug: #1521899
2016-01-04 12:17:37 +09:00
Ondřej Nový a0ebe18775 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: I05da2ced2030f3ab3d61585d80f802a35fa627c3
2015-12-11 23:04:17 +01:00
Bradley Jones c17cc5beb4 Initial skeleton repo
Add the basic structure for the magnum-ui repository to serve as a 
starting point for contributions. The structure is likely to change
as development progresses.

Change-Id: I5458741e2dd4c3409992315efaa60b33824b4ec8
Implements: blueprint repo-skeleton
2015-09-08 23:02:28 +00:00