Commit Graph

74 Commits

Author SHA1 Message Date
Dmitry Tantsur 8d52a7789a Avoid a full install in tox environments that do not need it
Usage of usedevelop=True results in all requirements.txt dependencies
always installed (without constraints) even when requirements.txt
is not explicitly added. Override usedevelop for these environments.

Add requirements.txt to the 'docs' environment since it imports
the whole ironic in the process.

Create a separate doc/requirements.txt.

Change-Id: I352f21772ccd68b35806f46851f254edb7c24c60
2020-12-14 14:18:46 +01:00
Riccardo Pittau caf9256b22 Fix lower-constraints with the new pip resolver
Remove pep8 dependencies from test-requirements, they're not
needed there and are hard to constraint properly.

Change lower-constraints to make pip happy and not require infinite
time to calculate dependencies.

Change-Id: Id524ad2bd2994fefadd6a3ad728123a0a1a49dc8
2020-12-10 06:04:30 -08:00
Riccardo Pittau a01d5934da Set safe version of hacking
Versions of hacking from 3.1.0 until 4.0.0 NOT included are supposed
to require a safe version of flake8, so besides normale issues related
to minor version upgrades, we can safely use those versions.
Also forcing pycodestyle versions to be compatible with flake8 installed
by hacking.



Change-Id: Ifff05e128d9224f59fcc957de2dc7b418124eb05
2020-10-19 13:56:25 +00:00
zhangbailin c2224fde50 Bump hacking min version to 3.0.1
flake8 new release 3.8.0 added new checks and gate pep8
job start failing. hacking 3.0.1 fix the pinning of flake8 to
avoid bringing in a new version with new checks.

Though it is fixed in latest hacking but 2.0 and 3.0 has cap for
flake8 as <4.0.0 which mean flake8 new version 3.9.0 can also
break the pep8 job if new check are added.

To avoid similar gate break in future, we need to bump the hacking min
version.

- http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014828.html

Change-Id: I2a903c90d72cd596ef976d9aab478f96a2750680
2020-05-21 07:47:46 +08:00
Andreas Jaeger 68ab6a01b6 Switch to newer openstackdocstheme and reno versions
Switch to openstackdocstheme 2.2.0 and reno 3.1.0 versions. Using
these versions will allow especially:
* Linking from HTML to PDF document
* Allow parallel building of documents
* Fix some rendering problems

Update Sphinx version as well.

Set openstackdocs_pdf_link to link to PDF file. Note that
the link to the published document only works on docs.openstack.org
where the PDF file is placed in the top-level html directory. The
site-preview places the PDF in a pdf directory.

Set openstackdocs_auto_version to not auto-version the documents.

Set openstackdocs_auto_name to use 'project' as name.

Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.

openstackdocstheme renames some variables, so follow the renames
before the next release removes them. A couple of variables are also
not needed anymore, remove them.

Change-Id: I9591e0f0215e9eb790ec2e3ea1a7ccbd55bb76d0
2020-05-20 10:59:56 +02:00
Dmitry Tantsur d580714c63 Remove testresources and testscenarios from test-requirements
I don't even remember why we put them there in the first place..

Change-Id: Id502007917ad7dc64a541a455a1092f2334fdbad
2020-04-28 13:05:58 +02:00
Zuul 1299bdc322 Merge "Upgrade flake8-import-order version to 0.17.1" 2020-04-27 22:53:48 +00:00
Riccardo Pittau 61cd2af2cb Upgrade flake8-import-order version to 0.17.1
Full py3 compatible version.
Add all Python3 modules to stdlib list.
Also includes fix to an enum34 dependency bug.

Change-Id: I26bc2d06e04f85fff05e4af5e0d16e7f9db3a1e7
2020-04-21 15:15:21 +02:00
Andreas Jaeger 1a8c1bb370 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 classifiers
- Update requirements, no need for python_version anymore
- Switch to using sphinx-build with apidoc extension
- Use newer openstackdocstheme version
- Remove Babel requirement, this is not needed.

Change-Id: I4176d8002d45449171aa5f7a7caef196ab7900d0
2020-04-20 08:18:51 +02:00
Sean McGinnis a9f7f67de5
Use unittest.mock instead of third party mock
Now that we no longer support py27, we can use the standard library
unittest.mock module instead of the third party mock lib.

Change-Id: Ic67f09a223ae2d0cb460771a10a4122307afa05b
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
2020-04-18 16:15:28 -05:00
Dmitry Tantsur 1613a6b7ae Move Babel to test-requirements
It's not a runtime requirement, it's only used to extract i18n catalogs.

Change-Id: I29e624c894f84390b23a2d2d7f547e488c82d7e8
2020-04-06 14:55:44 +02:00
Riccardo Pittau 75437072da Bump hacking to 3.0.0
Change-Id: I6adf3234faa93bc186c892d3e9f1a54a6d70d41d
2020-03-30 11:46:20 +02:00
Kaifeng Wang 0e3cd671da Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in ussuri cycle.

ironic-inspector 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://review.opendev.org/#/c/691178/

Change-Id: Ifae00adf782b6a7d71c4dc45a69a9638b8514d30
2019-11-22 11:17:34 +08:00
Zuul e98dd384de Merge "Build pdf doc" 2019-09-13 13:10:25 +00:00
Kaifeng Wang 76cbd2dbbb Build pdf doc
The is one of community goals that each project could produce a
single PDF file. The pdf should be in the output of openstack-tox-docs
job.

TeX packages are required to build PDF locally, following is recommended:

* inkscape
* texlive-latex-base
* texlive-latex-extra
* texlive-fonts-recommended

More about the goal:
https://governance.openstack.org/tc/goals/train/pdf-doc-generation.html
https://etherpad.openstack.org/p/train-pdf-support-goal
https://etherpad.openstack.org/p/pdf-goal-train-common-problems

Change-Id: I784be3f2462184ce951cb27e68e578f8befaa580
2019-09-06 15:58:06 +08:00
Kaifeng Wang 9b92204ef1 Adds job to run inspector in non-standalone mode
The job uses memcached for coordination backend, etcd3gw still has issue
on retrieving members.

Story: 2001842
Task: 30376

Change-Id: I76c359d6835e435968cbfb1a3f4318e73f0203ec
2019-08-22 11:27:45 +08:00
Kaifeng Wang f979456c16 testenv does not install requirements
Fix testenv which only installs test-requirement, also updated
upper constraint url.

mock minimum version is bumped to 3.0.0,
keystonemiddleware minimum version is bumped to 4.18.0.

Change-Id: I162bcf372598c2268c9c5e30947e49eedb0147e3
2019-07-16 10:38:14 +08:00
Kaifeng Wang 52349c6c0a Incorporate bandit support in CI
Change-Id: I1beded7e0198a5b5b43df00a355cf1c59cf2dc27
Story: 2005791
Task: 33563
2019-06-05 08:44:38 +08:00
Riccardo Pittau 3c219475e6 Update sphinx and uncap jsonschema
Following recent changes to global requirements [1], we need
to update sphinx requirements locally.
Also uncapping jsonschema following this [2] change.

[1] If558f184c959e4b63b56dec3ca1571d1034cfe5c
[2] I328cbd8216ec4591e08414dafc9ea099391efd86

Change-Id: If628a93b95cf73cb5af19b847758e9e50c5bf7a8
2019-05-23 12:12:47 +02:00
Anton Arefiev 05a86b3d57 Add API reference
Add initial API reference, which covers all inspector endpoits.

The conf.py and the tox environment are stolen from ironic.

Co-Authored-By: Kaifeng Wang <kaifeng.w@gmail.com>
Change-Id: I5009e8708dcad8ab25380f7bf574125d6e758ef5
2018-10-16 16:50:01 +08:00
Dirk Mueller 9be2d68820 Remove unused pydot3 dependency
https://review.openstack.org/#/c/460938 switched from pydot2
to pydot3, but also removed the last remaining use of pydot2/3.

Drop the dependency alltogether.

Change-Id: I678cbe65a283b7562bef399c34ddde02c500648f
2018-08-08 15:39:08 +02:00
Chuck Short cce25ed22e 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 adjust requirements to pass the gate.

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

Change-Id: I79b2220c20a04e2e33360bc330b5b4b4124caf71
Signed-off-by: Chuck Short <chucks@redhat.com>
2018-07-14 07:49:50 -04:00
Harald Jensås afa03647dd Cap hacking at 1.2.0
In commit 02ece7fc9f hacking
was capped at version 1.1.0 to fix gate issue.

Change I6c76a43353b1beb572dbde78dba4b4a839d45ea7 fixes
the issues with new rules and new defaults in hacking 1.2.0.

Story: 2001985
Task: 22104
Change-Id: Ib912724e83090a72d5c97c6bb2cb41b935265fdb
2018-06-15 13:30:00 +02:00
ghanshyam be3f7eec18 Gate fix: Cap hacking to avoid gate failure
hacking is not capped in g-r and it is in
blacklist for requirement as hacking new version
can break the gate jobs.

Hacking can break gate jobs because of various
reasons:
- There might be new rule addition in hacking
- Some rules becomes default from non-default
- Updates in pycodestyle etc

That was the main reason it was not added in g-r
auto sync also. Most of the project maintained the
compatible and cap the hacking version in
test-requirements.txt and update to new version when
project is ready. Bumping new version might need code
fix also on project side depends on what new in that
version.

If project does not have cap the hacking version then,
there is possibility of gate failure whenever new hacking
version is released by QA team.

Example of such failure in recent release of hacking 1.1.0
- http://lists.openstack.org/pipermail/openstack-dev/2018-May/130282.html

Change-Id: Icc8d1ac4e076e09922c418368df8300404030c3b
2018-05-09 02:45:02 +00:00
OpenStack Proposal Bot 46ec5a2118 Updated from global requirements
Change-Id: I45ab684a0f465d7f9c6c4e172af742a44318a19b
2018-03-15 07:00:30 +00:00
OpenStack Proposal Bot dc254b5659 Updated from global requirements
Change-Id: Ibc1719a9e91c3f99b2394b0d8514ff5b346aa947
2018-01-29 00:09:48 +00:00
OpenStack Proposal Bot 3d3e533828 Updated from global requirements
Change-Id: Iab8f88000247b532d85f3f5b2101dcaa03eaf2c7
2018-01-17 20:35:29 +00:00
OpenStack Proposal Bot ee7a761812 Updated from global requirements
Change-Id: I312c19b8306f542ff03a38e059030976d4017001
2018-01-16 12:29:24 +00:00
John L. Villalovos 2064742523 Update version of flake8-import-order package
Use latest version of flake8-import-order package, like we do in
openstack/ironic

Fix the issues detected by new version.

Change-Id: I3b016e35f98c8f88500824e612838f9923b4c3b9
2017-12-14 11:38:27 -08:00
John L. Villalovos 7dbb7c1721 flake8: Enable some off-by-default checks
Enable the following off-by-default checks:
    * [H204] Use assert(Not)Equal to check for equality.
    * [H205] Use assert(Greater|Less)(Equal) for comparison.

Increase the version of hacking in test-requirements so that can use new
off-by-default checks.

No changes to code were required.

Change-Id: I7fe394d99eee980e90768902b9fc264a8be3fe15
2017-10-16 14:25:15 -07:00
OpenStack Proposal Bot bc87e6edb3 Updated from global requirements
Change-Id: I0e8d57b36ab2b5bb8ceddb3f8ce65c13a3b4bfaf
2017-10-05 18:51:25 +00:00
Pavlo Shchelokovskyy 7625ed68c8 Use ostestr unit test runner
This patch moves ironic-inspector to use 'stestr' test runner
via 'ostestr' wrapper.

Effective changes:

- unit tests are now being run in parallel by default
- 'py*' jobs are not running code coverage measurements,
  which is left for 'cover' job only
- 'cover' job now also produces html reports consumable by upstream CI,
  and fails under 90% of code coverage
- users can leverage all the ostestr/stestr features

Change-Id: I75f539457dbb1d811fdee69de52d1bcee4c6ebe6
Depends-On: Ica838db23b5714c2da1e4313e1a7ece0ca241d44
Closes-Bug: #1666232
2017-10-02 14:28:58 +00:00
OpenStack Proposal Bot adffb3b124 Updated from global requirements
Change-Id: Ic500838a7cbdeeb5076e76a7176d4e2751664ede
2017-09-16 23:13:00 +00:00
OpenStack Proposal Bot 360b194fcf Updated from global requirements
Change-Id: I3aa3d3a94394575fdc75370e26f33181504023c8
2017-09-13 12:51:21 +00:00
OpenStack Proposal Bot 776e3455f7 Updated from global requirements
Change-Id: I33b3a93aa9c8f1b7e191ec050046788267f51980
2017-09-11 21:37:34 +00:00
OpenStack Proposal Bot 0ed098a36a Updated from global requirements
Change-Id: I8344e48c29504ec2bfea64c3a2084647fcfda20b
2017-08-18 11:30:59 +00:00
OpenStack Proposal Bot b4391dec09 Updated from global requirements
Change-Id: If5f45c8838ec5b3b8c511a4c2be6c435ccc0c1fa
2017-07-29 21:44:37 +00:00
dparalen aa5ad2ec16 switch from oslosphinx to openstackdocstheme
Change-Id: I78740d50bcc79137bb7a4172c2695cc670a595ce
Partial-Bug: 1702142
2017-07-10 16:21:56 +02:00
OpenStack Proposal Bot 7fa31ac6be Updated from global requirements
Change-Id: Iee8ab8c240d1acae50cb955d9ff98eb24eced54b
2017-06-30 12:15:39 +00:00
OpenStack Proposal Bot 3a3d344706 Updated from global requirements
Change-Id: If3a60fd614fe251f5395d84a7d8032c7bf81b00b
2017-06-02 21:56:21 +00:00
Jenkins dacd376320 Merge "Bump pydot2 to pydot3" 2017-05-25 14:43:06 +00:00
dparalen b1ce6f9ba3 Bump pydot2 to pydot3
pydot2 is incompatible with python3[1]. Bumping the pydot release (through
the test-requirements.txt) rather than pinning basepython to fix this.

Also updating the states.svg with the tox -egenstates result of running
pydot3

[1] https://github.com/erocarrera/pydot/issues/107

Change-Id: I9aa0e701af3915b39e1a5681c2105a6afb687dd2
Depends-On: I82e3651eefd3186c9e131b0db29a328967fb3161
2017-05-17 16:51:32 +02:00
OpenStack Proposal Bot 095cea52e2 Updated from global requirements
Change-Id: I2d65f56f2c5dbf6aaa719cf0651b5d87f374836a
2017-05-17 13:40:11 +00:00
OpenStack Proposal Bot 23bb748b18 Updated from global requirements
Change-Id: I330b1ba528bc7fda5d603a0af143dabe1c445605
2017-05-15 00:44:59 +00:00
John L. Villalovos ea97d2b733 Use flake8-import-order
Use the flake8 plugin flake8-import-order to check import ordering. It
can do it automatically and don't need reviewers to check it.

Change-Id: I9ced9c297273db0eec6ab3995b663b1e8dffe87d
2017-02-16 10:11:06 -08:00
OpenStack Proposal Bot 5b54f66f7a Updated from global requirements
Change-Id: I04ed7b34c0df6c56ca0ca0f1c7c5f2b7cb741704
2017-02-14 05:51:51 +00:00
John L. Villalovos ba9adaa2f5 Update to hacking 0.12.0 and use new checks
Use hacking 0.12.0

Use the new checks that are available:
    [H106] Don’t put vim configuration in source files.
    [H203] Use assertIs(Not)None to check for None.
    [H904] Delay string interpolations at logging calls.

Fix code so tests pass.

Change-Id: I7b1cd98aeb3bb8f4f01dd1d69d1afcd839749074
2016-11-09 05:37:10 -08:00
Jenkins 4910a25464 Merge "Bump hacking to 0.11.0 in test-requirements" 2016-11-07 13:00:39 +00:00
OpenStack Proposal Bot c30b77f9dc Updated from global requirements
Change-Id: If39e55dde1ef8bd767370707c0ada3984dabf9aa
2016-11-06 01:59:26 +00:00
OpenStack Proposal Bot 739e9c289b Updated from global requirements
Change-Id: I21c90cf3ad7e791cf22ec0f8303e4254d4804115
2016-10-27 12:14:35 +00:00