Commit Graph

20 Commits

Author SHA1 Message Date
Hervé Beraud 85abe44233 Adding pre-commit
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>
2020-09-03 14:10:56 +02:00
Zuul 2380e79c1c Merge "Add release notes links to doc index" 2020-06-03 09:06:33 +00:00
Andreas Jaeger 9a1b0cecb1 Switch to newer openstackdocstheme and reno versions
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
2020-05-18 21:01:34 +02:00
Hervé Beraud 0df82f89be Add release notes links to doc index
Change-Id: I0fb6aed29d034141db13ec11913b4f5f1f68d6d5
2020-04-16 17:46:06 +02:00
Hervé Beraud 0d84429800 [ussuri][goal] Drop python 2.7 support and testing
OpenStack is dropping the py2.7 support in Ussuri cycle.

Complete discussion & schedule can be found in
-
http://lists.openstack.org/pipermail/openstack-discuss/2019-October/010142.html
- https://etherpad.openstack.org/p/drop-python2-support

Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Change-Id: I99e49c84779439317a9f13307c7e7d2fc092d7fb
Sem-Ver: api-break
2020-02-06 10:26:31 +01:00
Zuul 62bddcec72 Merge "Bump the openstackdocstheme extension to 1.20" 2020-01-09 19:54:32 +00:00
caoyuan 9e70fdadee tox: Keeping going with docs
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
2019-10-26 00:07:16 +08:00
pengyuesheng 6eb5a871d7 Bump the openstackdocstheme extension to 1.20
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
2019-10-12 15:02:30 +08:00
caoyuan c80448dd8b Move doc related modules to doc/requirements.txt
Change-Id: I3d2e5e2322ac8374881f76217e35792efeea073a
2019-07-06 01:31:31 +08:00
jacky06 0430df334a Replace git.openstack.org URLs with opendev.org URLs
Change-Id: I2f218a19be6f8809c396399e48e2d5ed6b3f6fd9
2019-05-27 03:10:08 +00:00
Stephen Finucane d6278ce104 doc: Switch to openstackdocstheme
No reason to still be using oslo.sphinx in this day and age.

Change-Id: I7734f9a636b5435f70659f8bd3d0c2b7e49c78d6
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2018-12-13 14:44:52 +00:00
Stephen Finucane d48ef196d2 doc: Remove crud from conf.py file
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>
2018-12-13 14:44:21 +00:00
Ben Nemec c5079cbc7a Move example implementation to docs
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
2018-10-09 21:56:06 +00:00
Doug Hellmann ac97329770 tighten API for main()
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>
2018-10-08 12:57:32 -04:00
Ben Nemec a2c3f8b81d Improve config handling
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
2018-10-02 14:16:13 -04:00
Ben Nemec a45e26a3f0 Shorten UpgradeCheck class names
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
2018-09-21 21:36:01 +00:00
Ben Nemec 15a5d69812 Add proper documentation
Replace the cookiecutter docs with actual docs that describe the api
and explain how to use the project.

Change-Id: Ica2c76809d22a387993da1e19c75b33f9fe263d4
2018-09-21 21:35:56 +00:00
Ben Nemec 4f9e87ad24 Remove history file from docs
We keep track of this via release notes and there is no changelog
file so this breaks the doc build.
2018-09-13 15:56:12 +00:00
Ben Nemec 574fd4d3ef Migrate to stestr 2018-09-13 15:50:37 +00:00
Ben Nemec d671294399 Initial commit 2018-09-12 17:35:58 +00:00