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: I8d5290d62b12a7850fc932c3778cc37951dd67ed
Co-authored-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
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.
Remove docs requirements from lower-constraints, they are not needed
during install or test but only for docs building.
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.
Depends-On: https://review.opendev.org/728938
Change-Id: Iec4e4b3ed18e36d8ee1942e45e290ce292e7f881
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: I2831ab17d943638062b709882c7a1cc481e46476
Some options are now automatically configured by the version 1.20:
- project
- html_last_updated_fmt
- latex_engine
- latex_elements
- version
- release.
Change-Id: Ic626d2dc2974ac6ac7b6a816963995915e723ec7
No reason to still be using oslo.sphinx in this day and age.
Change-Id: I7734f9a636b5435f70659f8bd3d0c2b7e49c78d6
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
The 'releasenotes' directory is excluded from pep8 checks like the 'doc'
directory already is.
Change-Id: If8b034fd59e09d7adcf4ac74868ca102445d7458
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
This moves the example implementation from __main__.py to the docs
tree so it isn't confused for production code. A unit test is also
added to ensure that the example is kept up to date with any changes
in the API.
Change-Id: I92aa685f410ae0e56d5d55a15812edaae83c8ff1
Have the caller set up any of their options before passing a
ConfigOpts instance to main() and then let main() take over processing
from there.
Change the check callback argument to take an UpgradeCommands instance
so in the future if there are more commands we can get the callbacks
out of it ourself.
Add a default_config_files option to main() so that applications can
pass locations oslo.config won't find by default.
Change 'category' to 'command'.
Use a closure in _register_cli_options instead of a separate function
that requires a partial.
Change-Id: Ic4f25fd23d424acfcfe185a85bb63abf7d25c39e
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
Many projects need a specific config object (usually the global one)
populated for project code that relies on it. Additionally, we want
to make the code used to initialize the object overrideable so projects
can use their existing code for that. The primary benefit is that
project code has sane defaults for config file locations so in many
cases it won't be necessary to explicitly specify the location. A
very simple default implementation is also provided so the module
still works out of the box too.
Change-Id: If8ce7202bd73793688a0446f069bb4e03547c99e
When this library is used, the classes get referred to as something
like upgradecheck.UpgradeCheckResult, which is redundant and wordy.
Shortening the class names to remove the "UpgradeCheck" part fixes
both problems.
Change-Id: I621434585ed84256b9fe44d88a516d8c27eb05b3
Replace the cookiecutter docs with actual docs that describe the api
and explain how to use the project.
Change-Id: Ica2c76809d22a387993da1e19c75b33f9fe263d4