* Replace .testr.conf by .stestr.conf for migration and update
.gitignore, test-requirements.txt and lower-constraints.txt
files accordingly
* Use py3 as the default runtime and 3.18.0 as the minversion
for tox
* Add group_regex to run all tests
Signed-off-by: HeroicHitesh <email.hiteshkumar@gmail.com>
Change-Id: I704356082e2c25d21aff3c5433efa077259b0b1d
This repo is now testing only with Python 3, so let's make
a few cleanups:
- Remove python 2.7 stanza from setup.py
- Remove obsolete sections from setup.cfg
- Update classifiers
- Update requirements, no need for python_version anymore
- Cleanup doc/source/conf.py to remove now obsolete content,
use sphinxcontrib.apidoc to build module index again (this
seems to have been broken when switching to sphinx-build).
- Remove install_command from tox.ini, the default is fine
- Use TOX_CONSTRAINTS_FILE instead of obsolete UPPER_CONSTRAINTS_FILE.
- Update tox.ini for python3 only support.
Change-Id: Id8738ecfb0f578d2a7953c63ffe10779f835bcaf
This reverts commit 6ee2995214 and
e85c2a6f03.
I missed that if you pip install and then run dib-lint, it's not going
to pick up the .yamllint file shipped here. Thus it gives spurious
errors.
The reason for this was simply better duplicate key detection in yaml
files, which caused us problems with the kernel installs. However, at
this point it seems just the old "does it load" test from pyyaml will
be enough.
Change-Id: I87a9fc9bb119cfeffad48fc0fa0df31f0181825d
This gives us better linting of YAML files that just opening them.
This would have detected the duplicate keys in
I34e27d821fbefe274e7b007f37b0bd34db2e1d26.
The .yamllint is taken from zuul-jobs where it is also used as a
fairly sane set of default rules.
A few minor newline fixes are added.
Change-Id: I96d6644ae24f7deb84fa50fefbda0f0d33e0e009
This reverts commit 74317a3445.
What I missed was that "dib-lint" is distributed and people use this
to lint their out-of-tree elements (e.g. project-config). Because
dib-lint runs flake8 that really makes it a valid runtime dependency.
However, I don't think we need to pin to these particular versions of
flake8 in requirements (which I think was causing the original issues,
as it's fairly specific and easily conflicts). It seems to make more
sense to use the current uncapped "hacking" versions; so move them
from test-requirements.txt. Add a note so we don't forget again.
Change-Id: Ic2eee8f5b64c7020e98e0b1ef43a40f24411891a
Flake8 was wrongly listed as a runtime dependency. That mistake messed
system flake8 version. Flake8 is a test requirement not a runtime one.
Also flake8 version is already determined by hacking version, so we
update it to recent version.
Change-Id: Iccd9dc6f2508127f17712d16dfce6538ff83807e
1. Sync sphinx dependency with global requirements. It caps python 2 since
sphinx 2.0 no longer supports Python 2.7.
2. Update some URLs to latest
3. Remove the unnecessary space
Change-Id: I5464be9e055feecd80918f691448acf5f100e701
I noticed that pylint environment doesn't work with Python 3.7; I
guess the pinned version has become incompatible. From the history
the pin is only for Python 2.7 compatability, so just restrict it to
that (with the basepython for the environment set to python3, it's
questionable if we still support pylint with 2.7, but anyway).
Change-Id: I6a916c8422239a4e1b47dcf28a4569f1637cae7a
This review squashes:
Iac9afc7766d3640815dc20cfd6de1245d36a09cc
Ie894b5801bd7b3815432882cd626941e89d9f9a1
We need to do this as we can't fix pylint without networkx as that
failes requirements-chak due to us having a cap on networkx and we can't
uncap networkx as part of tripleo-buildimage installs without
constratints which gets us 2.1 and DIB desn't support 2.x
This is the commit message Iac9afc7766d3640815dc20cfd6de1245d36a09cc
---
One of the pylint dependencies has updated to be python3 only; this
version of pylint correctly caps things so it still works with
python2.
This also exposes that we need to uncap networkx due to
I34045f87ca19c2f184b040f4d89347374cce518b. We should remain on
version 1 for now thanks to upper-constraints, but we need to maintain
the lower-constraint.
---
This is the commit message Ie894b5801bd7b3815432882cd626941e89d9f9a1
---
Support different versions of networkx
Since the entry of networkx 2.0 nodes has a different
behaviour. Checking if dg.nodes is iterable is enough to add
compatibility for new/older versions.
---
Change-Id: I82dc61fac6c156a4f0d574290c7632077aa53195
Add some missing test requirements. I noticed these because pylint
was unhappy about the imports if you look closely.
Also, pylint shouldn't be in deps as it comes from the parent's
"test-requirements.txt" install. We don't need the VIRTUAL_ENV
setting either.
Change-Id: Ie082a058a9d3d51164448410a00d0719b0b37c4a
This is an initial creation of pylint with a basic indent checker.
Small issues corrected. Job added to gate with
Ib554a284e92583cc1d6a5c2219b3922852ca4c73
Change-Id: I7e24d8348db3aef79e1395d12692199a1f80161a
Co-Authored-By: Andreas Florath <andreas@florath.net>
Sphinx 1.5 fails with current pbr (needs new pbr release, see change
I52d45fa0a0d42de690d3a492068f7bb03483a224.
For now, set warnerrors to False to be able to use this.
Also, remove duplicate requirements line.
Also, update to new sphinx version to show that this works.
This is in reaction to the failure in
Ia184446fe34c49a48ca079c828157ea34e662d4b.
Change-Id: I9e7261c4124b71eeb6bddd9e21747b61bbdc16fa
There's a few things going on here
Firstly, we need to install coverage tool in test-requirements
Secondly, .testr.conf has to use PYTHON because the coverage report
works by resetting PYTHON='coverage run ...'
Thirdly, because we call ourselves diskimage-builder but the python
module is diskimage_builder that seems to confuse things. We need to
use "setup.py test" (note, that is different to "setup.py testr"!) to
use the PBR testr wrapper. That exposes a --coverage-package-name
argument that calls the coverage tool with the right argument.
With this I got a coverage report for our unit tests
Change-Id: I9012e18eb7d01bee035140e70afa76c47c27eb01
A sanity check that cache-url does the right thing when presented
with the appropriate curl return codes. This change brings in the
test code for scripts from tripleo-image-elements, which needs to
be factored out into a place both projects can use it.
I'm stubbing out curl so we don't have a dep on curl in our unit
tests, and because I've seen some strange behavior out of curl in
the gate that caused random failures in this test.
Change-Id: I31e6b06b45415feec7285511d07e65eb78d0d045