Commit Graph

51 Commits

Author SHA1 Message Date
Ghanshyam Mann bb7d4b67cb 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: I4c4ec3ef3f6016206cab1ae697985eaef8e95293
2022-04-30 20:30:48 -05:00
Hervé Beraud 45df91ada8 Add doc/requirements
We need to specify doc requirements in doc/requirements.txt
to avoid problems with the pip resolver [1] for the release team [2][3].
Removing specific doc requirements from test-requirements.txt.

The problem here is that this repos haven't doc/requirements.txt file
and by default in this case zuul will use the test-requirements.txt file
to pull requirements [4].

This requirements file contains extra requirements like flake8 that
collided with those allowed in our job environment and so the new pip
resolver fails to install these requirements and the job exits in error.

This project meet the conditions leading to the bug.

[1] http://lists.openstack.org/pipermail/release-job-failures/2021-January/001500.html
[2] http://lists.openstack.org/pipermail/openstack-discuss/2021-January/019611.html
[3] http://lists.openstack.org/pipermail/openstack-discuss/2021-January/019612.html
[4] https://opendev.org/zuul/zuul-jobs/src/branch/master/roles/ensure-sphinx/tasks/main.yaml#L36

Change-Id: Iac7d5ec69724206453c5fc74cbd61efde9b9a1ee
2021-01-11 15:07:40 +01:00
wangzihao feb22145a1 Remove six
Remove all usages of six

Change-Id: I3a5dedade263337aeef12eac1c4daf2f7e82e306
Story: 2008305
Task: 41190
2020-11-03 03:27:56 +00:00
Sean McGinnis b628032342
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: Iff25bf057492ab20c114e9b89a22bed6ca12ba3e
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-24 10:25:56 -05:00
Andreas Jaeger c917387402 Cleanup py27 support
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:
  * Wheel is not needed for python 3 only repo
  * Some other sections are obsolete
- Use sphinx-build everywhere
- Update classifiers
- Update requirements, no need for python_version anymore

Change-Id: I23a3b98e41099b74a4da95cc5c6e2d3171c0809c
2020-04-08 11:43:54 +02:00
Ghanshyam Mann 2504eeda60 [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

python-monascaclient 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

Change-Id: If739012908f458acccba1e40fe6bb8dbd231fca7
2019-12-15 00:40:37 +00:00
pengyuesheng 2fd24a217e Update the constraints url
For more detail, see http://lists.openstack.org/pipermail/openstack-discuss/2019-May/006478.html

Change-Id: I00453b0ca98d8b7146d78149f3c5b327f9b57b97
2019-09-25 14:15:18 +08:00
Corey Bryant 3b9ec1177f 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: I1296a80e7a08504e6e6afba52510085393e68d81
Story: #2005924
Task: #34223
2019-07-05 13:19:27 -04:00
tushargite96 45043b43ce 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 also adds python 3.7.

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

Change-Id: Ie0f55b10077547e9842aa476caff0478068dd059
2019-06-24 14:43:37 +05:30
Zuul eb7083de7b Merge "Replace git.openstack.org URLs with opendev.org URLs" 2019-05-22 10:42:35 +00:00
jacky06 4d6b0fa1c0 Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I9db86cdb44bf72c6aefe63df6dd35e2399844871
2019-05-22 10:50:59 +02:00
Ghanshyam Mann b51a5ab36d 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: I437843a6b6173473ee783de152bae69ec11fb52f
2019-05-14 13:05:51 +02:00
Nguyen Hai Truong 238d565333 Add python 3.6 unit test job
This is a mechanically generated patch to add a unit test job running
under Python 3.6 as part of the python3-first goal.

See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html

Change-Id: I87855a6f53613c733bef10d31afbec223c94e502
2018-11-07 22:35:11 -08:00
Sean McGinnis 08a6de3a29 Remove setup.py check from pep8 job
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 is 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: Ib62cba6a70e67bdd4dacecc694544c829836bad1
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2018-10-30 11:12:47 -05:00
Vieri 68a6d11ef9 Don't quote {posargs} in tox.ini
Quotes around {posargs} cause the entire string to be combined into one
arg that gets passed to stestr. This prevents passing multiple args
(e.g. '--concurrency=16 some-regex')

Change-Id: I8d4a251a15bd60d889b2c5bbace8da02597c4119
2018-10-09 13:58:39 +00:00
Doug Hellmann f12582c9e1 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: Id71f4b7b56203e4de27514cd4e5c740385bd5c66
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-09-26 18:57:08 -04:00
Adrian Czarnecki 1ae64ae9ce Add using requirements.txt to tox tests run
Change-Id: I074061ce9cb597526511b5a3b75a73831c61fd40
2018-08-30 13:19:18 +02:00
Witold Bedyk 742c2ba118 Add syntax check for reStructuredText
Story: 2001980
Task: 23111

Change-Id: Ia7ca8a2a6ce4e33f5d4b2aa64323b0a1ff6e9177
2018-07-23 11:52:04 +00:00
Vu Cong Tuan 1b4d88af33 Remove testrepository and .testr.conf
This commit is a follow-up of "switch to using stestr"
which was merged already [1].
After switch to using stestr, testrepository and .testr.conf
are unnecessary and should be removed.

This patch also switch from "test" to "stestr" for coverage job .

[1] https://review.openstack.org/571716

Change-Id: I6b506a19edf06a5bc40472f84a51eaae98583a62
2018-07-12 08:41:56 +07:00
Doug Hellmann d4541971c3 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: I9c427d9186e3e27b74d790839b1eb623769f57ec
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-06-13 15:39:32 -04:00
Charles Short ff3520baa0 Switch to using stestr
According to Openstack summit session [1] stestr is
maintained project to which all Openstack projects
should migrate.
Let's switch it then.

Also clean up requirements.

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

Change-Id: Ic9317d0d2e71ffcc5012184510b554453a7e322f
Signed-off-by: Charles Short <zulcss@gmail.com>
2018-06-02 21:18:55 -04:00
Amir Mofakhar 1aadb99495 Update pep8 checks
* set the maximum line length to 100
* cleaned up the codes for pep8

Change-Id: Ib4398e601fbf36619a07822b6a616ab13adaa55d
Signed-off-by: Amir Mofakhar <amofakhar@op5.com>
2018-04-10 14:39:23 +02:00
Witold Bedyk 0f853ca2bd Clean up tox.ini
* execute unit tests in lower-contraints job
* move `ostestr` to [testenv] section
* remove redundant configuration
* wrap long lines

Change-Id: I2f698e19f19fb6d37c2062c5d9c2c252a7ad0be1
2018-04-09 10:03:57 +02:00
Doug Hellmann 9dffe7bf93 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: Ic9951e7a4ca88dc5138560d44942d4e6d5851480
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2018-03-22 17:55:26 -04:00
Zuul 6b430941a7 Merge "Avoid tox_install.sh for constraints support" 2017-12-06 14:51:15 +00:00
Andreas Jaeger 15f432fcb1 Avoid tox_install.sh for constraints support
We do not need tox_install.sh, pip can handle constraints itself
and install the project correctly. Thus update tox.ini and remove
the now obsolete tools/tox_install.sh file.

This follows https://review.openstack.org/#/c/508061 to remove
tools/tox_install.sh.

Change-Id: I0da75950181e24e84bcd3e925a47ba06e6cd40bd
2017-12-02 16:54:56 +00:00
kornicameister 6edcdd4af7 Enable client documentation
Commit enables following flavours of client's documentation:
- docs: featuring mainly CLI and Python API
- releasenotes: containing all releases releasenotes

Story: 2001058
Task: 5722

Needed-By: Ie064df6f64ee168ad3b5d2dda949b1d14fa7b9d8
Change-Id: I1b0fa11160d8d7d928b4cfbe358ca8c75ed8dd08
2017-11-21 17:31:06 +01:00
Tomasz Trębski 51bb6b793b Exclude tests from coverage
Tests package should not be included
in the coverage results.

Change-Id: I4dbaba525d695a892ac769cc64dc06ddbf112c4e
2017-08-02 22:09:33 +02:00
Tomasz Trębski 94c5223f02 Integrate client with osc-lib
osc-lib library is foundation on which a CLI client
for openstack can be built. It is meant to facilitate several
aspects, that were previously hard-coded in client:

* keystone communication handling
* supporting multiple authentication methods (not only password)
* common authentication parameters (i.e. environmental OS_*)
* communicating over http with service endpoint
* interactive CLI mode

Thanks to those items, it was possible not only to drop
nearly 3k lines of code and replace them with osc-lib but also
increase reliabity of the client in terms of new openstack releases.
Also it allowed to greatly simpify existing set of unit-tests.
They are now testing only actual logic instead of mocking
entire process of calling shell (i.e. MonascaShell.run(args)) or
mocking HTTP communication. Both items are handled by osc-lib thus
not they are not subject of monascaclient unit tests layers.

Note:
This change is partial integration with osc-lib and its main
purpose is to move the responsibility of:

* keystone communication
* rest-ful communication with service endpoint

to underlying library thus allowing client to implement only
necessary functionality and not supporting boilerplate code,
mentioned above.

Story: 2000995
Task: 4172

Change-Id: I1712a24739438e2d8331a495f18f357749a633c5
2017-07-15 01:37:08 +02:00
Tomasz Trębski f9696d6816 Migrate fully to ostestr
Following commit migrates python-monascaclient
fully to os-testr and oslo.test

Additionally:
- removed mock requirement (unused)
- removed sphinx requirement (unused)

Change-Id: If534134ced5081ccdf40ab7963e087e29672608d
2017-02-20 11:07:46 +01:00
Craig Bryant 9cf6e8b0a5 Turn on bandit check as part of pep8
Add bandit job as part of pep8 in tox.ini

Bandit showed no issues with the current code.

Change-Id: I482544040fa80f33335538404c74f7a075f78237
2017-02-08 13:34:22 -07:00
Jenkins bb48cdb3bd Merge "Use the new copy of tox_install.sh for global constraints support" 2017-01-10 21:24:18 +00:00
xhzhf 7664f93d00 H803 hacking have been deprecated
H803 hacking have been removed since hacking 0.10.
https://github.com/openstack-dev/hacking/blob/master/setup.cfg
So remove H803 ignore statement
Closes-Bug: #1650849

Change-Id: I5e73b975f76f2f837f86eb67f67903e1d748b2dd
2016-12-18 09:51:21 +08:00
Jenkins ec9c445e49 Merge "Add py35 tox environment" 2016-12-06 06:18:47 +00:00
gengchc2 a2da78a356 Delete deprecated Hacking in tox.ini
Some hacking have been removed,so we can delete them.
More details:
    https://github.com/openstack-dev/hacking/blob/master/setup.cfg

Change-Id: I29f12404a275ea80a405472d860d01db470c3bcb
2016-12-04 13:06:37 +08:00
Dirk Mueller 7047a744d8 Add py35 tox environment
Change-Id: I1c8ca6a92b5100975e2cb9fab0417450c34af739
2016-12-04 02:48:43 +01:00
Dirk Mueller 38abce641b Use the new copy of tox_install.sh for global constraints support
global-constraints handling was simplified,  update local copy for
tools/tox_install.sh

Change-Id: I0acb51c73d1fa3ccf9af903f091c968ab7ae42aa
2016-12-03 20:07:43 +01:00
Steve Martinelli 43f63e00de move old apiclient code out of openstack/common
As part of the first community-wide goal [1], teams were asked
to remove the openstack/common package of their projects
if one existed. This was a byproduct of the old oslo-incubator
form of syncing common functionality.

The package, apiclient, was moved to a top level location
and cliutils was moved to the common module. There are no oslo
specific libraries, the recommended solution is to move it
in tree and maintain it there.

[1] http://governance.openstack.org/goals/ocata/remove-incubated-oslo-code.html

Change-Id: If28f22e5ff6002bef8d9dfc27a694d1100535dc9
2016-11-14 07:41:45 -05:00
Andreas Jaeger d1ece8843a Use constraints everywhere
Infra now supports constraints everywhere,
remove now unused workarounds.

For more information about constraints see:
http://lists.openstack.org/pipermail/openstack-dev/2016-August/101474.html

Change-Id: I2992e9d1392397657e29ec7777e93de79c2833ca
2016-08-30 19:53:04 +02:00
Stefan Caraiman 917ecfea4c Fixes H904: wrapping using parantheses
Enabled H904 on tox and changes made in relevant files to adhere to the
H904 guideline.

Change-Id: Ib2c1d64c176843ceca6dec147d5985a8f9a9fc96
2016-07-01 22:41:52 +03:00
Kaiyan Sheng 1c4d13ceee Constraint tox targets with upper-constraints.txt
Client version pin is maintained in upper-constraints.txt file, so we
should replace it in the file with source based specifier before
applying it to pip install, otherwise pip fails with installation can
not be constrained to a version error. Borrowed this solution from
neutronclient project.

Change-Id: Ie3bfab63e092309074a4980831244d90dcb9c7f5
2016-05-19 12:26:33 -06:00
Michael James Hoppal 731a38bdb2 Change tox file
Add upper-constraints and min tox version.

This will prevent taking in packages that
are greater then what is defined in the
upper-constraints

Change-Id: Idcae5d27595762b7b0d203756e9928e6c040353f
2016-04-20 15:55:40 -06:00
Ondřej Nový b98bfd323f 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: I01a68d3ccacbd46998a0371eb9b0d4fbdd00a71a
2015-12-11 21:25:34 +01:00
Jenkins ea2932bf75 Merge "Adding liberty versions of oslo to requirements.txt" 2015-12-11 05:04:40 +00:00
Joe Keen b6e09fff60 Adding liberty versions of oslo to requirements.txt
Adjusting tox so I can properly restrict the oslo libraries before installing
the python-keystoneclient

Change-Id: I7e99ca78d8fde326d2d97b55a790a6c9f911bc70
2015-12-10 16:06:08 -07:00
Haiwei Xu f0dd4ab87f Delete python bytecode before every test run
Bring over the cleaning line from run_tests.sh for the pyc files to
all the tox runs.

This should eliminate the need to clean -x -i to kill pyc files in
your local directory to get tests to pass.

Change-Id: I4e06e17e97c5416e1f9283d5f0a4f5d6338e1ce7
Closes-Bug: #1368661
2015-12-02 13:38:45 +09:00
Christian Berendt 4be03ba6ca Bump hacking to 0.9.x series
Change-Id: I0e223dc5ccb6d9e68564911f986b665bc00d69e8
2014-07-24 11:14:38 +02:00
cindy oneill 1cdcb79917 quote alarm expression dimension values to allow special chars
Change-Id: I559fedf221eb13979308865ed0f199c78fde595c
2014-07-21 17:29:20 -06:00
cindy oneill fffe8692cd Add .gitreview file. pep8 fixes
Change-Id: Ibe974423bd1bc302e4cd416dbef1758374842abf
2014-06-26 09:59:35 -06:00
cindy oneill 9aab4530a2 list and show implemented for alarms and notifications 2014-04-02 16:25:44 -06:00