Commit Graph

18 Commits

Author SHA1 Message Date
songwenping fa16f4dc6e Remove unnecessary unicode prefixes
All strings are unicode by default in Python 3. No need to mark them as
such.

Change-Id: I506a7bcd8fb3de2088bf37ebbb117896de9ddc77
2022-04-19 15:11:57 +08:00
elajkat f7f3349d6a Add timeout to PrivContext and entrypoint_with_timeout decorator
entrypoint_with_timeout decorator can be used with a timeout parameter,
if the timeout is reached PrivsepTimeout is raised.
The PrivContext has timeout variable, which will be used for all
functions decorated with entrypoint, and PrivsepTimeout is raised if
timeout is reached.

Co-authored-by: Rodolfo Alonso <ralonsoh@redhat.com>
Change-Id: Ie3b1fc255c0c05fd5403b90ef49b954fe397fb77
Related-Bug: #1930401
2021-06-23 09:43:33 +02:00
Hervé Beraud d7f6ddc55c 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: Ic88cf026a74e9da4acaf9e00c50fddd2c8a48fbe
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-09-08 14:17:12 +02:00
melissaml 485f396424 Fix pygments style
New theme of docs respects pygments_style.

more info: http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html

Change-Id: I0027294e6b0af6cbf8edbbde4ca4098e50648229
2020-06-04 14:46:02 +08:00
Zuul 4d7a1fac24 Merge "Add release notes links to doc index" 2020-05-26 13:47:33 +00:00
Andreas Jaeger c9cc428182 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
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: I5511824a7ebba08c330efaf5118f130630aa52ae
2020-05-18 20:53:43 +02:00
Hervé Beraud d854828a5b Add release notes links to doc index
Change-Id: I10e7df90fa268fb79bed39583e5c43eb070ac873
2020-04-16 15:57:50 +02:00
Stephen Finucane 8c6c3db70b trivial: Cleanup Sphinx config file, setup.cfg
Remove unused noise from the former and unused Sphinx configuration from
the latter.

Change-Id: I754f02fd6eb3c1d77ff2580d53685f4a70da8cc6
Signed-off-by: Stephen Finucane <stephenfin@redhat.com>
2020-02-13 15:12:45 +01:00
Hervé Beraud c4d72cfcdf [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: Ia01dfa4bc5d7224bb0f753116cd23bdcc22df146
Sem-Ver: api-break
2020-02-06 10:25:13 +01:00
pengyuesheng 48fe5e3e3f 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: Ib800f8d30c59adc6f46960c5810cba782839a902
2019-11-12 17:11:51 +08:00
caoyuan b99765fd6c 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: I07c753f5070fe887faf4f103b3f46bff59e3d1be
2019-10-24 15:10:31 +08:00
caoyuan 3a8f29ed71 Move doc related modules to doc/requirements.txt
Change-Id: Iedf201e211648452df29fa518c069ecf41a0acf3
2019-07-06 02:15:13 +08:00
Thierry Carrez 6c3a6e27a6 Add more usage documentation
The documentation was a bit too dry. Take some information
from mikal's blogposts and expose them in the user doc section.

Change-Id: I93a91c12e78c5d56913b0953c5a9cfa16e45a265
2019-04-12 08:42:30 +00:00
Cédric Jeanneret 1117ac92c0 Added example blogposts
The usage of privsep isn't really clear nor easy - adding examples
is a good way to avoid bad practices, especially since those two
entries actually provide hints for a common, clean way to use this
library.

Thumb up to Mike Carden for those precious links.

Change-Id: If051ef284ad06aaf44a5eb81242b90af31fdcc06
2018-06-06 07:15:13 +02:00
Doug Hellmann 2574b6c0b7 add sphinx instructions to build API reference docs
Change-Id: I216d6e8ef7afa7c1de47f28a6e33ca0a10975912
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-07-07 14:51:10 -04:00
Doug Hellmann 10b2dbb376 switch from oslosphinx to openstackdocstheme
Change-Id: Ibce1f74853c68bdaeb443700070a90044e8ab28a
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-07-07 14:48:17 -04:00
Doug Hellmann ef456eb5be rearrange existing documentation to follow the new standard layout
Change-Id: I39ed22af7b148cb0e8b37d94d097e6757a3515cf
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-07-07 14:45:14 -04:00
Angus Lees 269a3d277c Initial cookiecutter project
This is the unmodified output of
cookiecutter https://git.openstack.org/openstack-dev/oslo-cookiecutter

Change-Id: I8fbc11c50bbd171b9f99bd9b5ba39eef1f686860
Implements: blueprint privsep
Depends-On: Iee84120f4da14ee3d441933a0e03a67c22fce8d1
Depends-On: Ia4d56747d56dcfe50889ebbdf9d553df13e1b950
2015-10-23 18:51:29 +11:00