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>
The mock third party library was needed for mock support in py2
runtimes. Since we now only support py36 and later, we can use the
standard lib unittest.mock module instead.
Change-Id: I453515f347a59f4c6f60e0dcba2c327cf2a40426
This package is not actually used anymore in this repo, so this cleans
this up so it can be removed from global requirements.
Change-Id: I6f6065138760ba8af46f45f45e3a9bb7e8e0f75b
Signed-off-by: Sean McGinnis <sean.mcginnis@gmail.com>
* Update releases: Newton is unmainted; train, ussuri are relased
* We have redirects to some sites, ignore them
* Remove python2 code
* Use https as starting point
Switch repo also to victoria PTI jobs.
Change-Id: I744e725b32a797b0e208ac7e81afe4b8d3578751
Switch to openstackdocstheme 2.2.1 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.
Disable openstackdocs_auto_name to use 'project' variable 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.
See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html
Change-Id: I5f985549671e3b4f8c438f247fae0818d25b21f5
Make a few cleanups:
- Remove python 2.7 stanza from setup.py
- Remove obsolete sections from setup.cfg:
* Wheel is not needed for python 3 only repo
- Update classifiers
Change-Id: I391f53925c1b20d2e8ad1685358c81dcbdaaf34c
The repo is Python 3 now, so update hacking to version 3.0 which
supports Python 3.
Fix problems found by updated hacking version.
Change-Id: I621cc7f472e2666d3422113675b18d838688a434
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
- pbr hasn't need the hook configuration since forever [1]
- The 'wheel' group is renamed to 'bdist_wheel' [2]
- Update the urls to latest
[1] c84876dc0f
[2] f7c9878712
Change-Id: I52e7abcb577e3a9ba61492e84a3c148f6eab4b4a
Addressing feedback from
https://review.opendev.org/675762 . These comments are wrong
with current openstackdocstheme, so remove them completely.
Change-Id: Ibfb3a2e37ea5b89ce81caed3e4884ee077e0d967
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
To simplify publishing of the guide, we don't use the special directory
anymore, remove it for translated documents as well.
Change-Id: I0520314f4946736b78e9d7438d676739c741f7b1
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>
Add new releases, add already stein to not forget about it.
Update regex for releases, we do not publish only to /ocata/
but also to /PROJECT/ocata - tread all these the same.
Change-Id: I8ef454f779904d91e5e79c83c488dcba42ba2150
This is a mechanically generated patch to switch the documentation
jobs to use the new PTI versions of the jobs 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: I442a49ebd6028d25d2e7a1584bb063219a1fc297
Story: #2002586
Task: #24293
This is a mechanically generated patch to complete step 1 of moving
the zuul job settings out of project-config and into each project
repository.
Because there will be a separate patch on each branch, the branch
specifiers for branch-specific jobs have been removed.
Because this patch is generated by a script, there may be some
cosmetic changes to the layout of the YAML file(s) as the contents are
normalized.
See the python3-first goal document for details:
https://governance.openstack.org/tc/goals/stein/python3-first.html
Change-Id: Iad4fd6d059c0bd404c40fa3549339bd3e20538d8
Story: #2002586
Task: #24293
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
Since api-quick-start publish location (api-guide/quick-start) is
different from standard scheme, we need to explicit PUBLISH_DIR
for translated api-quick-start documents.
Change-Id: I36d54d618a7ae0f32f5b8d86488b540f1be997c6