105 Commits

Author SHA1 Message Date
Takashi Kajinami
f0a42eb360 Drop SQLALCHEMY_WARN_20
This environment was used by SQLAlchemy 1.4 and is no longer necessary
since SQLAlchemy was bumped to 2.0 .

Change-Id: I9305910c7ab8a8874410ba921584a221b9a2bfab
2024-09-16 15:27:10 +09:00
Takashi Kajinami
c62d95d424 Add functional test with etcd
Change-Id: I43606301c053c937333ab1454eca5f627682d085
2024-07-05 20:13:33 +09:00
Zuul
448cf4136b Merge "Add functional job with redis enabled" 2024-04-26 09:30:16 +00:00
Takashi Kajinami
f46a54aa95 Add functional job with redis enabled
Some of the "unit" test cases required actual redis running. This
introduces a separate job with actual redis service enabled so that
we run these tests in CI.

Change-Id: I1ddb580e9e8eb34937acba934520a998d249da3c
2024-04-15 19:43:06 +09:00
Takashi Kajinami
ff45bd3d2d Fix update-states target
... and regenerate svg files.

Change-Id: I903774597e07a4184213df284207eeac5f329d5e
2024-04-15 14:43:43 +09:00
Stephen Finucane
384e630e16 tests: Enable SQLAlchemy 2.0 deprecation warnings
Well, sort of. We enable them but immediately filter out the ones we're
actually seeing, the rationale being that we can address these in a
piecemeal fashion without the risk of introducing new issues.

There's a lot more to be done here. However, the work done in oslo.db
[1], nova [2], cinder [2] etc. should provide a guide for how to resolve
the outstanding issues.

[1] https://review.opendev.org/q/topic:sqlalchemy-20+project:openstack/oslo.db
[2] https://review.opendev.org/q/topic:sqlalchemy-20+project:openstack/nova
[3] https://review.opendev.org/q/topic:sqlalchemy-20+project:openstack/cinder

Change-Id: I5b11e63451b0e76969421fa8fe39ac2b920f90ab
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2023-07-14 14:12:05 +01:00
Takashi Kajinami
44f17d005f Remove six
This library no longer supports Python 2, thus usage of six can be
removed. This also removes workaround about pickle library used in
Python 2 only.

Change-Id: I19d298cf0f402d65f0b142dea0bf35cf992332a9
2022-05-18 16:12:37 +09:00
Zuul
f6c7664bad Merge "Use TOX_CONSTRAINTS_FILE" 2021-04-16 17:20:35 +00:00
Zuul
aa6ea83958 Merge "Use py3 as the default runtime for tox" 2021-04-16 17:13:07 +00:00
wu.shiming
c9f6da3ea5 Remove lower-constraints remnants
These were missed in change: Ide5deeb1313552e76468281971f72b7db11d3801

Change-Id: I46311cfaee098dabdb063d6e97145424f707f21f
2021-02-20 09:49:46 +08:00
Hervé Beraud
401ca09570 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>.

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

Change-Id: If9ddf23af3a63ae89ccd8af95fd34a074ce91812
2020-11-04 10:53:45 +01:00
Hervé Beraud
06e6b7d0f8 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.

Wallaby support officially the following runtimes [1]:
- Python 3.6
- Python 3.8

During Victoria Python 3.7 was used as the default runtime [2] however this
version isn't longer officially supported.

[1] https://governance.openstack.org/tc/reference/runtimes/wallaby.html#python-runtimes-for-wallaby
[2] https://governance.openstack.org/tc/reference/runtimes/victoria.html#python-runtimes-for-victoria

Change-Id: I51a863bb5baeb51d5ec7488ddc9dd518ab56a002
2020-11-04 10:06:50 +01:00
Hervé Beraud
7ab39946e7 Adding pre-commit
Introduced changes:
- pre-commit config and rules.
- Add pre-commit to pep8 gate, Flake8 is covered in the pre-commit hooks.
- Applying fixes for pre-commit compliance in all code.

Also commit hash will be used instead of version tags in pre-commit to
prevend arbitrary code from running in developer's machines.

pre-commit will be used to:
- trailing whitespace;
- Replaces or checks mixed line ending (mixed-line-ending);
- Forbid files which have a UTF-8 byte-order marker
  (check-byte-order-marker);
- Checks that non-binary executables have a proper
  shebang (check-executables-have-shebangs);
- Check for files that contain merge conflict strings
  (check-merge-conflict);
- Check for debugger imports and py37+ breakpoint()
  calls in python source (debug-statements);
- Attempts to load all yaml files to verify syntax (check-yaml);
- Run flake8 checks (flake8) (local)

For further details about tests please refer to:
https://github.com/pre-commit/pre-commit-hooks

Change-Id: I3640bb690c552a428ae0e8250adffbc3a51a310e
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-09-08 14:33:38 +02:00
Sean McGinnis
504e3852be
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: I15b8430b4749bd68b5866f6041dd6c9166e795b1
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-24 10:26:04 -05:00
Andreas Jaeger
fc401959ec [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

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

Remove cruft from setup.cfg.
Update hacking so that it works with python3 and silence new warnings.

Change-Id: Id224fc09ac36d2a84e82347530bb5e5d30665803
2020-02-03 21:55:57 +01:00
Corey Bryant
e077956819 Add Python 3 Train unit tests
This is a mechanically generated patch to ensure unit testing is in place
for all of the Tested Runtimes for Train.

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

Change-Id: Iee35ef61a46fd6a318f9b0b1d4e6436d5fd3c008
Story: #2005924
Task: #34234
2019-07-05 15:19:01 -04:00
Elod Illes
a081180238 Add local bindep.txt
As it was announced [1] global bindep-fallback.txt was removed and now
projects need to have a local bindep.txt to be able to install binary
dependencies for testing.

In test jobs the script tools/test-setup.sh is called which requires
mysql and postgres servers and clients to be installed.

[1] http://lists.openstack.org/pipermail/openstack-discuss/2019-June/007272.html

Change-Id: I08797a99c7ba019a4b2dd640a83f45fea8e589bd
2019-06-26 17:25:54 +02:00
liuwei
5965747909 update git.openstack.org to opendev
Change-Id: Ie9f1ca14eed287f3c25553d029d4a4b2ca5274d0
2019-05-22 09:51:19 +01:00
Ghanshyam Mann
bf0ebe6127 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: I0fb9547a3156199a6d2ca66258f7c6afab6d0753
2019-05-22 09:47:27 +01:00
Andreas Jaeger
cd93a63da7 Remove unsused tools/tox_install.sh
The file is not used anymore, remove it.

The last usage of the file was removed in
I4dae402fe37015f0f512d5e9a6426d5f39526347.

Remove also some variables from tox.ini that were used for tox_install
in the past.

Change-Id: I5797efabe1e32df0ad53513400288bd26f833315
2019-05-09 13:45:34 +00:00
Sahid Orentino Ferdjaoui
9a30e5dc37 add python 3.7 unit test job
See ML discussion here [1] for context.

[1] http://lists.openstack.org/pipermail/openstack-dev/2018-October/135626.html

Story: #2004073
Co-authored-by: Corey Bryant <corey.bryant@canonical.com>
Signed-off-by: Sahid Orentino Ferdjaoui <sahid.ferdjaoui@canonical.com>
Change-Id: Ibc7749261119752c4e3a4854c7ce5be52a3b5d26
2019-02-26 15:55:51 +00:00
Doug Hellmann
7e2452e543 add proper pydot3 dependency
Move the dependency out of tox.ini and into requirements.txt where it
can be managed properly.

Depends-On: https://review.openstack.org/590103
Change-Id: Ic69a4c5beb1aed2e49d2f767cb46c324fe0df0f5
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-08-14 12:05:28 -04:00
Ha Manh Dong
a11c88a303 Switch to use stestr for unit test
According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
So we should switch to stestr.

[1] https://etherpad.openstack.org/p/YVR-python-pti

Depends-On: https://review.openstack.org/#/c/589728/
Change-Id: I943a73e22eb23bd52c3a96e75c98b88665474e67
2018-08-13 16:20:18 -04:00
Dirk Mueller
349f79937f Add pydot test dependency
We need to use pydot rather than pydot3 because
of a broken version comparison in networkx, where it rejects
the lower version number of pydot3.

Without this patch the taskflow unit tests which use dot for
rendering graphics are no longer runnable.

Change-Id: I676e4d76627b3ecd0e4a9b896b2b93d652ebb25d
2018-08-09 07:11:52 +02:00
Zuul
a4a90bc5da Merge "give pep8 and docs environments all of the dependencies they need" 2018-06-06 23:36:51 +00:00
Zuul
8368ad18a3 Merge "Drop py34 target in tox.ini" 2018-06-06 23:33:37 +00:00
Doug Hellmann
f2b7bbe41a 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: Id7f0cc773ddc6bdcf464574fc7faa9216db71e09
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-06-06 14:53:49 -04:00
wangqi
7469f3da10 Drop py34 target in tox.ini
We support py35 now.so it is no need to keep
the supoort for py34.

Change-Id: I3dbc5d63c0a4ad5ae9860983cf4d06fb91f1a151
2018-05-28 07:23:22 +00:00
Doug Hellmann
d564d37fac give pep8 and docs environments all of the dependencies they need
Change-Id: Iebd7a1cd0a1ff9eee44fb2a20909f56db90d6430
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-05-14 09:10:30 -04:00
Doug Hellmann
0124bf4919 stop using tox_install.sh
Duplicate the dependencies that are listed in extras and place them in
a test-requirements.txt file so we can install them using the
constraints list.

In order to add the new requirements file, we have to make the constraints
and requirements match each other and the global settings.

Change-Id: I4dae402fe37015f0f512d5e9a6426d5f39526347
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-04-18 11:56:25 -04:00
Doug Hellmann
f244549fae only run doc8 as part of pep8 test job
Change-Id: Id7e8b29fe5ffb9aa410985ce0e5914bdcf4e4df0
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-04-17 16:30:34 -04:00
Doug Hellmann
a91eab24f1 standardize indentation in tox.ini
Try to tidy up the formatting of the configuration file.

Change-Id: Ic492ee63f228b486da492088cd7fcb71d784b2e3
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-04-17 16:30:31 -04:00
Doug Hellmann
f4948aec9d set default python to python3
Set the default python to python3 except for the py27 environment. We
have to set that explicitly to override the new default.

Have py27 and py3* jobs run same commands by removing the commands entry
for py27.

The pep8 rules under python 3 are different, so we need to fix a
couple of issues with blank space. The E721 rule is ignored entirely
because we are not yet using a version of flake8 that supports
ignoring individual rules on specific lines, although the instructions
for that are added so that when we upgrade flake8 to a newer version
we can remove the global rule.

Change-Id: Id236b0632a83a188958130d04f1e9c476c5ace65
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-04-17 16:29:54 -04:00
Doug Hellmann
550375d476 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: I1a0941d79d112b6f4fde22885df985e7caaeb2c3
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-24 21:03:13 -04:00
Andreas Jaeger
6927cc4401 Add doc8 to pep8 environment
OpenStack CI does not run the docs environment, it's just for developer
convenience. Add the doc8 to the general linter environment so that it's
run during automatic testing. The general linter environment is pep8.

Disable testing of history.rst since generated ChangeLog file gives an
error:
"doc/source/user/history.rst:150: D000 Inline emphasis start-string
without end-string."

Readd sphinx to test environment so that doc8 passes tests.

Change-Id: Ia81eac686ff3a82273b1d306596c4731c86c36e6
2017-12-20 13:27:05 +01:00
Andreas Jaeger
760f4414ea Use doc/requirements.txt
The infra jobs expect documentation requirements in either
doc/requirements.txt or test-requirements.txt. Since neither is
available, they currently fail.

Move doc requirements to doc/requirements.txt and use that to
fix releasenotes build. Note that doc/requirements.txt needs some
requirements for code analysis of taskflow.

For the docs environment - which is a developer convenience - use the
same command that is used by OpenStack CI.

Change-Id: Iec65211e5059a4afdd88a45e2c1ac535b8ec97fe
2017-12-20 10:01:39 +01:00
Tony Breeds
09ded16b22 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 taskflow.

Change-Id: I89a14733295748fff2a30f038084d75596204083
2016-12-21 13:45:53 +11:00
Chuck Short
fa627be6d7 Fix typo in tox.ini
Fix typo in tox.ini

Change-Id: I442441cdef8623afda7e5d7b91b50ddc562a06e8
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2016-11-03 14:31:47 +00:00
Chuck Short
536ceb3704 Add reno for release notes management
The release management team have indicated this is their preferred way
to collect release notes in future.

Change-Id: I98383e53b1d78b0bb01b16642d8b8a1b69ad3769
Signed-off-by: Chuck Short <chuck.short@canonical.com>
2016-10-25 20:35:16 -04:00
Joshua Harlow
ad23e3d4ea Change dependency to use flavors
This makes sure we install the correct and only the correct dependencies
when installing taskflow, based on the driver one wants to use.

Change-Id: Id40f73412c76a16152b9a2f853ef9cbbd9e9e231
2016-07-26 17:29:45 -07:00
ChangBo Guo(gcb)
18024a6091 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: I006650a6e67fd54c4823ef560ee26322c2c13428
2016-07-12 17:33:49 +08:00
Ondřej Nový
e2e16592eb 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: I1f758ea8dbac08cef1fa5fc34c0fd21d55a71385
2015-12-11 23:39:27 +01:00
Davanum Srinivas
9e96331a9d Remove python 2.6 and cleanup tox.ini
* Remove support for python 2.6
* Remove skipsdist : Needs to be set only if 
  sdist is expensive
* Remove usedevelop : only needed when skipsdist 
  is set to True
* Remove install_command : We can just use the 
  default, we don't need to override
* Remove setenv : We can just use the default as
  we don't need any extra environment variables
* Remove requirements.txt from deps, as this is
  already added automatically


Change-Id: I3564e6d2dfaf64b573382d776e6a79a442750139
2015-11-16 00:23:21 +00:00
Jenkins
3a876ff74f Merge "Remove dummy/placeholder 'ChangeLog' as its not needed" 2015-09-25 09:25:36 +00:00
Joshua Harlow
e6fc3aeb2f Remove dummy/placeholder 'ChangeLog' as its not needed
Just enforce that `python setup.py build_sphinx` will be the
way to build docs (which also builds a 'ChangeLog') so we don't
need to maintain a dummy file here anymore.

Change-Id: Icec9173c7970d84c105f151ac74dc9080ab3b1f7
2015-09-24 15:01:29 -07:00
Joshua Harlow
ec17ad0d76 Remove ./taskflow/openstack/common as it no longer exists
Change-Id: I3123a6d7cf4323fb111c2b4c5545fd6a1d2fd77b
2015-09-24 11:09:51 -07:00
Joshua Harlow
da28e4c904 Move doc8 to being a normal test requirement in test-requirements.txt
Change-Id: I6d81cc86d422be359f1b2339943bdfe6067ee5da
2015-07-16 08:59:01 -07:00
Joshua Harlow
2e0eac09c4 Remove customized pyX.Y tox requirements
Instead of having custom pyX.Y that test a specific set of
requirements and similar with other tox envs, just enable
more test-requirements directly, in a later change we will
use environment markers to denote the differences.

Also tweaks the jobboard example to bypass/hack a needed eventlet
fix into it so that it actually runs without breaking/never finishing.
A TODO note has been left to eventually (someday?) remove this hack
when it is no longer needed.

Part of fix for bug 1445827

Change-Id: I0fb669f0bdfbe4fe81d89234173f2c3ac4d06de6
2015-05-29 15:47:23 -07:00
Joshua Harlow
fb2b813e38 Remove custom py26/py27 tox venvs no longer used
Change-Id: I522ce82923837e9fd9d0dcf90e70916e85bc65ad
2015-05-12 17:56:39 -07:00
Joshua Harlow
98cb8418d5 Remove tox py33 environment no longer used
This py33 environment is no longer being tested
with in an automated fashion (since the py34 environment
replaces it) so we should just remove it from the tox
ini file.

Change-Id: I3a4040b8a3c656b93b7e0ff2c20bed4119ac7c74
2015-05-09 14:36:29 -07:00