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: I7ac1599e903577e28fb64bb07a6b984e1ff8a023
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
Sphinx 1.8 introduced [1] the '--keep-going' argument which, as its name
suggests, keeps the build running when it encounters non-fatal errors.
This is exceptionally useful in avoiding a continuous edit-build loop
when undertaking large doc reworks where multiple errors may be
introduced.
[1] https://github.com/sphinx-doc/sphinx/commit/e3483e9b045
Change-Id: Ief136815d6a0e1dfa0b8d1ffb42500fef38e39fe
Use sphinx-build and cleanup unused config.
Switch to openstackdocstheme 1.20.0 and remove obsolete settings from
conf.py files.
Update some RST files, they had wrong indentation.
Change-Id: Iaad2841db809f8a343fb8b1031cf8d0587d70442
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 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: I359d557dbf3438d219bed0303b7a95ad93192f46
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
According to Openstack summit session [1],
stestr is maintained project to which all Openstack projects should migrate.
Let's switch to stestr as other projects have already moved to it.
[1] https://etherpad.openstack.org/p/YVR-python-pti
Change-Id: Ibbad6f4e63efbef4e2e144f3ba4218ce6579371a
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: I483632acf5a68075bbf200ffb172f945e5294cf8
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.
Add missing dev packages for libxml and libxslt to the bindep config
file.
See http://lists.openstack.org/pipermail/openstack-dev/2018-March/128352.html
for more details.
Change-Id: I4a51633916661bdfa926eb231b8e482628887e90
Depends-On: https://review.openstack.org/555034
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Follow https://review.openstack.org/#/c/508061 to remove
tools/tox_install.sh, we can build without it.
Change-Id: Ia27fb4f8a4da8d5ae2755b54c3274402362ae521
This is throwing errors when run which means no one is paying the
slightest bit of attention to it. Just remove the damn thing.
Change-Id: Ia262112f4366a64094a35abc041e542b4513727e
Signed-off-by: Stephen Finucane <sfinucan@redhat.com>
There were a couple of scripts here:
- prettify.py
- remove_trailing_whitespaces.sh
- remove_unnecessary_spaces.py
- retf
Most of them are self-explanatory with the exception of 'retf', which I
don't understand but which looks untouched in years and therefore
useless. For the other three, we have tooling in place to ensure these
"issues" don't get into source control and, even if they did, there's
questionable value in rewriting stuff just to remove excess whitespace.
Kill them all.
Change-Id: Ifbd2d50a669251484056552da21d23906f8d6178
Enable log-a-bug feature and add information on when document was built.
Disable pep8 check for doc/source/conf.py.
Change-Id: Ia86791ac69845572b2fbc536732afcf901bcf203
- add py3 to tox.ini (gate already tests py3)
- move all tests to $GITROOT/test so they can all run
through testr
- add scrapy to test-requirements.txt to support sitemap tests
- move tests from test_items.py to test_sitemap_file.py
- fix broken sitemap tests
- add newton to list of old releases in sitemap_file.py
- ignore flake8 H101 as it returns false positives for Sphinx conf.py
- Use openstackdocstheme for docs
- Update sitemap README
- Restructure repo docs
- fix minor style issues
Change-Id: I22c018149b2eefde6ca5c38c22ac06886fe9a7a8
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 openstack-doc-tools.
Change-Id: I3b7f2f7a18325a9cb0e461e9bac2648c0c27bf4c
There is no this directory openstack/common which was used to keep codes from
oslo-incubator, we have retired oslo-incubator. Removing openstack/commonfrom
all OpenStack code in favor of the Oslo libraries is a project wide goal
for the Ocata release. So don't use this directory any more. We should drop it
for improving searching efficiency.
Change-Id: If2ca9333319fd78a53c73ab313411ed2f17b07f2
Renamed sitemap file to avoid module name conflict
when importing at the sitemap unittest
Added py.test tox environment
Change-Id: I94480e374b29802414b62591a51c04ecd804905e
Closes-Bug: #1387716
The image-api and identity-api repositories are retired, remove
support for building it. This also includes removing the now
obsolete markdown script and the obsolete pandoc-template.docbook.
Change-Id: I619244c755b9f85102743196c8ec5fcc09dc76a6
The pep8 tests does more than calling pep8, rename it to use the new
linters standard job for all lint like jobs.
Change-Id: I027795072ce6fef13026099c3834a0d33ca7f7f7
Depends-On: I7cf4766642dc3e7d7652e6d26ab2f14f9fcd7861
The flow graph and the tests have not been updated in a long time and
don't match the current state of the autohelp* scripts. Remove them as
they are not used and not accurate.
Change-Id: I6225ac8cfc53564c75fa227d08d2ef6adc661390
Python 3.3 support would be dropped by
Infra team from mitaka,CI would no longer be testing it,
so projects should drop it also.
Change-Id: Icddae8a0e1968766e8dcc9abf2de78fdd0791f4b
To solve the problem of "db type could
not be determined" on py34 we have to run first the py34 env to, then, run
py27. This patch puts py34 first on the tox.ini list of envs to avoid this
problem to happen.
Change-Id: I966264e04fbe9441d90c48645df5e6216ca0f4d5
Closes-bug: #1489059
Remove check_output that is in python 2.7 and newer but not in
python 2.6. Thus, we do not support python 2.6 anymore.
Change-Id: Ie953ce43d792b95e348a55fea4665b1ef59b468d
flake8 has support for cyclomatic complexity (Mccabe) currently our
worst offender has a complexity of 28. So
set our max-complexity to 29 so that don't make things any worse.
https://github.com/flintwork/mccabe
Change-Id: Ib6db9de92b3e6e196008580318a2139976610349