summaryrefslogtreecommitdiff
path: root/tox.ini
Commit message (Collapse)AuthorAgeFilesLines
* Set hash seed to 0 in gendocs environmentJay Faulkner2015-04-071-0/+1
| | | | | | | | | This was done in the venv environment to fix docs builds in the gate, but they still fail randonly locally when using the tox environment to build them. This change ensures the gendocs environment works for generating documentation locally. Change-Id: I41e4af9edaaa76b837a6c92a296b5738c85b632b
* Remove setting language to en_US for 'venv'John L. Villalovos2015-04-011-1/+0
| | | | | | | | | | | Remove setting LANGUAGE=en_US for 'venv' virtualenv. Since the 'venv' environment is not used for unittests and users may want to see messages in their native language in the 'venv' virtualenv. Also makes it consistent with python-ironicclient Change-Id: I1902d162cc7a5a1c8ee2e6a7412096d645277cc0
* Force LANGUAGE=en_US in test runsJohn L. Villalovos2015-03-131-0/+3
| | | | | | | | | | | | | Basically back-porting what was done for Nova in this patch: https://review.openstack.org/#/c/160892/ If your native locale is not en_US and you run tests, some could fail due to the message translation that happens since the assertion messages are in en_US (not translated, just hard-coded in the tests). Note that setting LANG=en_US had no effect. Change-Id: I16fab554612a718871625f688dd5501a69fb3417
* Fix PEP8 E124 & E125 errorsJohn L. Villalovos2015-02-201-1/+1
| | | | | | | | | | Fix PEP8 E124 & E125 errors E124: closing bracket does not match visual indentation E125: continuation line with same indent as next logical line Remove E124 & E125 from the ignore list for flake8 Change-Id: Ia9aee2fb7e0bb6771aad11d3523119944eeb4170
* Fix PEP8 E121 & E122 errorsJohn L. Villalovos2015-02-191-1/+1
| | | | | | | | | | Fix PEP8 E121 & E122 errors E121: continuation line under-indented for hanging indent E122: continuation line missing indentation or outdented Remove E121 & E122 from the ignore list for flake8 Change-Id: If63dd80ee85fc97596492e0b2cb6db9e10458c54
* For flake8 check, make the 'E12' ignore be more granularJohn L. Villalovos2015-02-181-1/+1
| | | | | | | | | | | ignore = E12 means ignore E12* errors. Make it more granular by converting to E121,E122,...,E129 This will make it easier in the future to remove a single ignore and update the code to resolve the issues. Change-Id: Iddff6a826bc7c9ff07643b7408c51f1bd129530c
* dev-quickstart.rst update to add required packagesNaohiro Tamura2014-11-171-1/+1
| | | | | | | | | * added unspecifed required package "python-tox" for Ubuntu/Debian, and removed "py26" from "tox.ini" so that "tox" command doesn't invoke the tests in Python 2.6 environment. Change-Id: I57df22a54fc08f2bb53a17d13b70706952815871 Closes-Bug: #1392304
* Add gendocs tox job for generating the documentationLucas Alvares Gomes2014-11-141-0/+6
| | | | | | | | | | | | | | | We already use tox to generate the sample configuration, run the tests, etc.. This patch is adding a new 'gendocs' tox job for generating the documentation. I always have a hard time remembering the syntax to generate the docs, by adding it to tox I hope it may facilitate it a bit. You can now (re)generate the docs with this tox job: tox -egendocs The quick start guide was also updated with the new command. Change-Id: I6a755c31382310420d706e51a3e014941fd49872
* Enable hacking rule E265jiangfei2014-11-131-2/+1
| | | | | | | | E265 is block comment should start with '# ' Closes-Bug: #1391787 Change-Id: I8f0e142bd14fd201da3b8c39501f9d858a5b051b
* Put a cap on our cyclomatic complexityMichael Davies2014-10-161-0/+1
| | | | | | | | | | | Flake8 has support for McCabe cyclomatic complexity. Ironic's most complex code is at 16 right now, so cap this at 17 to make sure we don't start writing more complex code than what we already have today. Nova is doing similar: https://review.openstack.org/#/c/129125 Change-Id: I99fa26f763ab456d3428951d6a729098a73cf9ef
* Fix E131 PEP8 errorsDavid Shrewsbury2014-10-141-1/+1
| | | | | | | | | | | | | Fixes files with the following error: E131 continuation line unaligned for hanging indent and enables the check in tox.ini. Also enables the E113 check (unexpected indentation) since it seems that was fixed coincidentally with other previous changes. Change-Id: I9270e5df257e12dc903689d8eb6fb03be01c034b
* Enable E111 PEP8 checkDavid Shrewsbury2014-10-131-1/+1
| | | | | | | | | | Fixes files with the PEP8 error: E111 indentation is not a multiple of four and enables the check in tox.ini. Change-Id: I9e4e8d6b59d018367febd9362cbc9bc3e79ebd53
* Fix F812 PEP8 errorDavid Shrewsbury2014-10-131-1/+1
| | | | | | | | | | One file was redefining a variable, thus exposing this PEP8 error: F812 list comprehension redefines 'n' from line 1868 This fixes it and enables the check in tox.ini. Change-Id: Ifa9a2365160db1b8ec80b274f3458cea6bd1f653
* Enable H305 PEP8 checkDavid Shrewsbury2014-10-131-1/+1
| | | | | | | | | | | | Fixes files with the PEP8 error: H305 imports not grouped correctly and enables the check in tox.ini. Import order is: stdlib, 3rd-party, project imports Change-Id: I81fc67bc9f79c514b6f4941a13e44c95badd34e2
* Enable H307 PEP8 checkDavid Shrewsbury2014-10-131-1/+1
| | | | | | | | | | | | | | | | | Fixes files with the PEP8 error: H307 like imports should be grouped together and enables the check in tox.ini. For the modified files, made sure the import order matches the template as described in: http://docs.openstack.org/developer/hacking/#import-order-template This order is currently: stdlib, 3rd-party, and project imports. Change-Id: I4538356c207535b778da1273aadcf3b4a7b20383
* Enable H405 PEP8 checkDavid Shrewsbury2014-10-101-1/+1
| | | | | | | | | | Fixes files with the PEP8 error: H405 multi line docstring summary not separated with an empty line and enables the PEP8 check in tox.ini. Change-Id: I632c89e2a1783be8305a8a8cea7ae9d3bb55b62c
* Enable H702 PEP8 checkDavid Shrewsbury2014-10-101-1/+1
| | | | | | | | | | Fixes files with the PEP8 error: H702 Argument to _, _LI, _LW, _LC, or _LE must be just a string and enables the PEP8 check in tox.ini. Change-Id: I6ca187535981d9809ca221e90de38988601f96e0
* Enable H904 PEP8 checkDavid Shrewsbury2014-10-101-1/+1
| | | | | | | | | | Fixes all files with the PEP8 error: H904 Wrap long lines in parentheses instead of a backslash and enables the PEP8 check in tox.ini. Change-Id: Ie3314487a45d34f59304a5b24eef9488ca3ce35e
* Fix pep8 testYuriy Zveryanskyy2014-10-091-3/+2
| | | | | | | | | For hacking 0.9 "ignore" and "select" options are mutually exclusive, therefore pep8 test always passed. This patch fix this bug and also fix long line in keystone module. Closes-Bug: #1379470 Change-Id: Ie8681caa9891bc4f4e257a8e56dc4a30c6f26723
* Stop running check_uptodate in the pep8 testenvDevananda van der Veen2014-09-291-1/+8
| | | | | | | | | | | | | | | As per this discussion on the mailing list: http://lists.openstack.org/pipermail/openstack-dev/2014-September/047160.html We are going to stop enforcing the correctness of the sample config file, and move to a separate non-voting check test that notifies us when it is no longer accurate, thus prompting a human to correct it. This addresses the issue where config options in dependent libraries (eg. keystone) repeatedly break our gate, without removing the sample config file that deployers benefit from. Change-Id: Ief88a693e4967b32f5f2f71b9a683599527a5129
* Don't write python bytecode while testingLucas Alvares Gomes2014-09-121-0/+1
| | | | | | | | | | | | | | This patch was based on the Nova patch: https://review.openstack.org/#/c/121044 This should reduce the number of times you need to completely delete your tox dir because you have stale pyc files around. In Ironic we have hit this problem a number of times, migrating to oslo.message was a big one that caused a lot of confusion. Closes-Bug: #1368661 Change-Id: I7dda3ad879beff1e494a36144c941a847177c2ef
* Remove bypassing of H302 for gettextutils markersRuby Loo2014-09-111-3/+1
| | | | | | | | | | | | When we used the i18n markers (_, _LE, _LW, etc) from ironic.openstack.common.gettextutils, we bypassed H302 hacking rule for them (via tox.ini file). Now that we've converted to using the markers from oslo.i18n and are no longer using the markers from gettextutils, we can remove the bypass stuff. Change-Id: I26147b69884cd9c075e1cfe38a92e38e861083e7 Closes-Bug: #1368425
* Deprecate Ironic compute driver and sched managerMichael Davies2014-09-091-2/+0
| | | | | | | | | | | | | | | | | | | Updates the Ironic compute driver and scheduler manager so that they subclass the now in-Nova-tree driver classes. This should de-duplicate code maintenance across Nova and Ironic and also provide end users an easier upgrade path (with Deprecation log messages). This patch also removes the old Ironic compute driver tests and classes since those now live in Nova. This patch also removes a line from tox.ini which was copying the second set of unit test outputs; those no longer exist, since we are no longer running unit tests on nova code in this tree. Co-Authored-By: Dan Prince <dprince@redhat.com> Co-Authored-By: Devananda van der Veen <devananda.vdv@gmail.com> Change-Id: Ic194f779eca470e4a4dd8a3fbd31ca5a6f6b4f7e
* Translator functions cleanup part 1Vladyslav Drok2014-09-051-1/+1
| | | | | | | | | | | | | | | | | This part fixes ironic/common folder and tox.ini file. Some modules use _ function for log translation, even when the translated string is passed to e.g. LOG.warn function. This patch fixes it, using translator functions appropriate for corresponding log levels. Translator functions, imported from ironic.openstack.common.gettextutils are now imported from ironic.common.i18n. Translator functions are imported the same way across all modules. All places that are changed conform to http://docs.openstack.org/developer/oslo.i18n/guidelines.html Partial-bug: #1364813 Change-Id: I195d0e256c5412d6d75d2e6c35b19b44f2a0b09f
* Remove gettextutils _ injectionVladyslav Drok2014-08-291-1/+0
| | | | | | | | | | Now that ironic supports oslo.i18n, using the install function to inject _ into the builtin has been deprecated. New i18n common module used instead. In one module _ was imported from gettextutils, now also changed to i18n import. Closes-bug: #1346406 Change-Id: I672a975d479991982c24031e834a26e2c2811890
* Set PYTHONHASHSEED for venv tox environmentAdam Gandelman2014-08-251-0/+1
| | | | | | | | | | | | | We're seeing frequent failures of the docs Jenkins job that appear to be caused by the tox 1.7.2 upgrade and the migration to using PYTHONHASHSEED=random. This overrides the environment in the venv testenv to set PYTHONHASHSEED=0 and allows docs to build successfully. Note that we want to run our tests with a random seed if possible, so this avoids disabling it for the base testenv and only uses non-random for the testenv used by Jenkins for doc builds. Change-Id: I665703c9a002500bc90b90cd268bd3ccff4e3534 Closes-bug: 1361295
* oslo.i18n migrationGhe Rivero2014-07-161-1/+1
| | | | | | | | | | Switch ironic to use oslo.i18n. A new i18n module has been added under ironic with translation globals and imports the necessary functions from oslo.i18n. gettextutils module is still needed in the nova ironic driver. Change-Id: I682228e158132c628166e4d1e334c4003249d112
* Add gettextutils._L* to import_exceptionsEllen Hui2014-07-031-1/+3
| | | | | | | | | | | | | | | | | | | | | | | Using the new logging translation markers (_LI(), _LW(), _LE(), _LC())[1] is problematic because they are not modules. Since the Openstack guidelines only allow modules to be imported[2], the entire gettextutils module must imported in order to use the translation markers. This patch adds all four markers to import_exceptions in tox.ini, so they can be imported individually without failing the pep8 tests. This is already done with the _() marker. With this change, it will be allowable to import marker functions like so: from ironic.openstack.common.gettextutils import _LI from ironic.openstack.common.gettextutils import _LW from ironic.openstack.common.gettextutils import _LE from ironic.openstack.common.gettextutils import _LC [1]http://docs.openstack.org/developer/oslo.i18n/guidelines.html [2]http://docs.openstack.org/developer/hacking/#imports Change-Id: I78192dd7525624174deb8d377996ed3d61b36a8a
* Add genconfig tox job for sample config file generationMathieu Gagné2014-06-231-0/+4
| | | | | | | | | | | | | | | | | | | | | | | If someone tries to run generate_sample.sh outside a venv or without installing project dependencies, you could encounter error messages related to missing or outdated dependencies. This change wraps generate_sample.sh execution in tox. Wrapping it in a tox job makes sure all dependencies found in requirements.txt and test-requirements.txt are properly installed prior to its execution. This change does not propose the removal of the sample config file already in place in the repository and it does not propose adding it to the list of jobs automatically ran by tox. This change is merely the introduction of a more convenient way to execute generate_sample.sh in a proper venv. You can now (re)generate the sample config file with this tox job: tox -egenconfig Change-Id: I1058a306a462ba8349a4433c78070fabd6d03e39
* Test for membership should be 'not in'Christian Berendt2014-06-161-0/+1
| | | | | | Enabled check for PEP8 issue E713. Change-Id: Id41f5f19796a7af8cf4cb52dd7afc2e6ec1ccbc4
* Merge "Update tox.ini to also run nova tests"Jenkins2014-04-071-4/+5
|\
| * Update tox.ini to also run nova testsAdam Gandelman2014-04-041-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This updates testr.conf to allow passing of the tests directory as an environment variable (defaulting to ironic/tests/). Also updates tox.ini to run testr once for ironic/tests and once for ironic/nova/tests/, then combine subunit output. test-requirements.txt is updated to pull in Nova from a tarball, as well as mox and python-ironicclient. Updates the existing Nova driver unit tests to account for recent refactoring and changes in the Nova virt API. Change-Id: Ibefa2e0d3f97512f4da9ace780703fe47467232e Closes-bug: #1299312
* | Use xargs -0 instead of --nullAndreas Jaeger2014-04-031-1/+1
|/ | | | | | This gives compatibility with OS X in the test. Change-Id: I483b4279d0d6a5a6fe4f81b9fb07a838e17e1b0f
* Check that all po/pot files are validAndreas Jaeger2014-03-311-0/+4
| | | | | | | | | Perform minimal checks on po and pot files so that no broken files can get imported. Change-Id: I328fc11c688c16737ae88984e4778483ce5db5ab Co-Authored-By: Clark Boylan <clark.boylan@gmail.com> Related-Bug: #1298645
* Enable pep8 tests for the Nova Ironic DriverLucas Alvares Gomes2014-03-131-1/+1
| | | | | | | | | Enable pep8 tests for the Nova Ironic Driver and fix the current pep8 errors. Being able to run pep8 tests against the driver helps the development because it captures problems like syntax errors, unbound variables, duplicated methods, etc... Change-Id: If1da455bb8669b56267cb3ecf45369d5d83a86b7
* Remove tox locale overridesJeremy Stanley2014-02-101-3/+0
| | | | | | | | | | | | | | | * tox.ini: The LANG, LANGUAGE and LC_ALL environment overrides were introduced originally during the testr migration in an attempt to be conservative about the possibility that locale settings in the calling environment could cause consistency problems for test runs. In actuality, this should be unnecessary and any place where it does cause issues ought to be considered an actual bug. Also, having these in the configuration actively causes older pip to have problems with non-ASCII content in some package metadata files under Python 3, so drop it now. Change-Id: I732b6559574f98fceada099e5e77e5c91095d67c Closes-Bug: #1277495
* Sync config module from osloDevananda van der Veen2013-12-271-1/+1
| | | | | | | | | Add 'config' to openstack-common so that it syncs from Oslo, move tools/conf -> tools/config to be able to sync from Oslo, and then sync the changes which are proposed in oslo-incubator commit Iee6cc05cad70963f2a151f595ac376c9338f5774. Change-Id: I32a80b0e2aa0e26b9fc78b7546c07e102639374e
* Add -U to pip install command in tox.iniJames E. Blair2013-12-111-1/+1
| | | | | | | Ask pip to upgrade packages in the virtualenv so that a long-lived virtualenv is still kept up to date as external dependencies change. Change-Id: Ife76a83be95fed7cc4b99bb50a97277d0751e76c
* Add tools/conf/check_uptodate to tox.iniDevananda van der Veen2013-12-061-0/+1
| | | | | | | | | | | | To ensure that our sample config file, etc/ironic/ironic.conf.sample, does not get out of sync with the code, this patch introduces a check to tox that will compare the proposed ironic.conf.sample to a freshly generated one, and error if they are not identical. Ported from Nova's tools/config/check_uptodate.sh script. Change-Id: Ic2898142754547e32bc4c03d23eca5d6a33721fc Closes-bug: 1255621
* Import HasLength objectLucas Alvares Gomes2013-11-221-1/+1
| | | | | | | The design is for 'assertThat(subject, verb(object))', putting module names in there significantly impedes readability. Change-Id: If508bb38dd9cbea3c1ed8f654531e013a2e24afb
* Import missing gettext _ to fix Sphinx errorHaomeng, Wang2013-11-191-0/+3
| | | | | | | | | | | | We run "python setup.py build_sphinx" to generate the API documents, however encountered a lot of "NameError: name '_' is not defined", which will cause our api.controllers.v1.* objects documents will not be generated by Sphinx, so we are missing these in the document page http://docs.openstack.org/developer/ironic/py-modindex.html. Import missing gettext _ to fix such Sphinx error with this patch. Change-Id: Ie53d96203109b8b95b9734b58d85da41a2d011cf Closes-Bug: #1251011
* Implement db get_[un]associated_nodesDevananda van der Veen2013-10-171-1/+3
| | | | | | | | These method were just stubs. This patch implements them in db/sqlalchemy/api.py, and a subsequent patch will expose this functionality via the API. Change-Id: Iae68cbe3bf4e84a0f47a0770695bed9dae78aa95
* Remove obsolete redhat-eventlet.patchMark McLoughlin2013-10-091-2/+0
| | | | | | | | | | | | | | | | See I62ce43a330d7ae94eda4c7498782a655e63747fa for the gorey details on why this exists. As of this fix: https://github.com/eventlet/eventlet/pull/34 which was released in eventlet 0.13, we no longer need the patch. This has now been removed from oslo-incubator, so this is really just syncing that removal. Change-Id: I84267f3c6726cb2e750f615e107c48b12c6ed353
* Upgrade tox to 1.6ZhiQiang Fan2013-09-301-0/+4
| | | | | | | | | | | tox 1.6 was released, which means that we can now take advantage of the feature we added to it - which is using setup.py develop to install the code into the virtualenv. The logic was taken from run_tests.sh - so the performance issues around using tox vs. using install_venv should now be gone. Change-Id: Ib011a9add595696f5db5fe596db9d3d60f46d038 Fixes-Bug: #1233213
* Remove nova specific testsYuriy Zveryanskyy2013-09-201-1/+1
| | | | | | | | This tests for nova components cannot be started in Ironic. test_ironic_deploy_helper moved, two incompatible tests disabled. Change-Id: I456034bf7bbe3e86630c82ed0d1474c15a9aeee6
* Remove extra pep8/flake8/pyflakes requirementsJoe Gordon2013-07-221-1/+1
| | | | | | | | | | pep8 flake8 and pyflakes are pinned as part of hacking. So they don't need to be pinned here as well. Also add posargs to flake8, so can do things like 'tox -epep8 -- --statistics' Change-Id: Id37949caa5a487cd98b6b85c026689fbd63cb5d8
* Fix pep8 errors and make it pass Jenkins tests.Devananda van der Veen2013-05-161-1/+1
| | | | | | | | | | Fix all existing pep8 errors. Remove install_venv and friends, which were not needed. Add a few ignores for nova code that is yet to be cleaned up. Skip one failing test case, fixed by review 29394. Import contrib/redhat-eventlet.patch from Nova. Change-Id: I46b6ccaa272bd058757064672ce9221263ed7087
* Fixed hacking, pep8 and pyflakes errors.Monty Taylor2013-05-021-1/+1
|
* Added project infrastructure needs.Monty Taylor2013-05-021-0/+34