Commit Graph

31 Commits

Author SHA1 Message Date
songwenping 145f060b51 Remove unnecessary unicode prefixes
Change-Id: I56651c1b83baaf443551686d7e8545eba2a0c7a1
2022-04-19 19:39:35 +08:00
Hervé Beraud b8f713bc79 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: I6ae02d4e52fd812360414e7b8c1c9c4f17230812
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-09-03 14:25:24 +02:00
melissaml 8e85c58bb2 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: I8847feba7669feed9edf9d7f7ba48af26760c298
2020-06-04 15:54:40 +08:00
Andreas Jaeger bfe712511e 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.

openstackdocstheme renames some variables, so follow the renames. A
couple of variables are also not needed anymore, remove them.

Depends-On: https://review.opendev.org/728938
Change-Id: Ifd0f8e57c0052e5102aa914c8326159a72dad43c
2020-05-18 21:08:01 +02:00
Hervé Beraud b1c4f34c38 Add release notes links to doc index
Change-Id: I894f621a66a745570a57a149f9033d0681f52d8c
2020-04-16 15:58:59 +02:00
Stephen Finucane cfc27ef497 Drop python 2.7 support and testing
Ussuri Communtiy-wide goal:
https://governance.openstack.org/tc/goals/selected/ussuri/drop-py27.html

Change-Id: I94e709093e01825069b44b6c485e49a81f8f14c1
Sem-Ver: api-break
2020-01-30 11:37:22 +00:00
caoyuan ec52c3b5dc 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: Id12730272782a7cfda89cba79d40919e2a5ecd24
2019-10-24 13:58:31 +08:00
Zuul e49eca232f Merge "Bump the openstackdocstheme extension to 1.20" 2019-10-17 23:06:39 +00:00
Ben Nemec f6bf926db7 Document management and history of lock files
Something that comes up regularly on the mailing list is the topic
of leftover lock files from interprocess locks. An Oslo developer
then has to explain why they work the way they do, and this is a
not-inconsiderable time suck because it is a complex topic.

This change adds an administrator guide that explains what should
and should not be done with lock files, and provides an FAQ section
to (hopefully) pre-emptively answer many of the common questions
people ask.

Change-Id: I5442806ef2f107e3b7569a79bffdc344769545b0
2019-10-15 22:01:13 +00:00
pengyuesheng a052a044bc 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: Ia04d1de7e10783350e3aa091eab64d1cbd7f070a
2019-10-12 14:46:40 +08:00
pengyuesheng 85c341aced Blacklist sphinx 2.1.0 (autodoc bug)
See https://github.com/sphinx-doc/sphinx/issues/6440 for upstream details

Change-Id: I9defdd3731950af42438ec96d0f1040fe1b5661d
2019-10-10 14:21:36 +08:00
Ben Nemec fac974b1a0 Cap Bandit below 1.6.0 and update Sphinx requirement
Bandit 1.6.0 accidentally changed how the exclusion list option is
handled and breaks our use of it. Cap to the previous version until
Bandit has fixed the problem.

Sphinx 2.0 no longer works on python 2.7, so we need to start capping
it there as well.

Change-Id: Ib340f5822b124e78cd96ee12f9f033d5f313e238
Reference: https://github.com/PyCQA/bandit/pull/489
2019-05-13 17:41:41 +00:00
ZhongShengping 7274bc23f1 Follow the new PTI for document build
For compliance with the Project Testing Interface as described in:

https://governance.openstack.org/tc/reference/project-testing-interface.html

For more detials information, please refer to:

http://lists.openstack.org/pipermail/openstack-dev/2017-December/125710.html

Change-Id: I4b1b023ff2c40f5b31429584fc1a77c0315ed2d9
Co-Authored-By: Stephen Finucane <stephenfin@redhat.com>
2019-04-02 14:28:24 +01:00
Chris Friesen 2b55da68ae Add support for fair locks
This adds support for a "fair" variant of the lock.  When there are
multiple entities within a single process that are blocked waiting
for the lock the fair lock will ensure that they acquire the lock
in FIFO order.

For now at least, when fair locks are in use we don't support
the "semaphores" argument.

If external locks are enabled, the inter-process ordering will be
determined by the underlying OS lock ordering and process scheduling.

Change-Id: I37577becff4978bf643c65fa9bc2d78d342ea35a
2018-11-02 10:40:23 -06:00
Doug Hellmann a04f5f10e1 switch from oslosphinx to openstackdocstheme
Change-Id: Ieadf9b992b269d54dd9c79523d5879b6ad71ba7c
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-07-11 13:49:58 -04:00
Doug Hellmann 9014fdd8d4 rearrange existing documentation to follow the new layout standard
Change-Id: I79d7b97c7e9395f75fa158d870485853418a4db7
Signed-off-by: Doug Hellmann <doug@doughellmann.com>
2017-07-11 13:49:30 -04:00
Yuriy Taraday 7e47d32161 Add doc/ to pep8 check
We had unused imports there, this would prevent us from letting more of
such errors in.

Change-Id: Ie78c18dd3b9ab34370e47eba98b32740e0c83e1d
2016-05-12 14:05:20 +03:00
ChangBo Guo(gcb) 89f890b465 Remove unused import statement
We don't use fnmatch and fileinput, so
remove them.

Change-Id: Ic49f3a03f4ccafcd02c549a6bdb0a3175f9e07e1
2016-05-12 16:34:28 +08:00
Joshua Harlow cbdf411306 Add a few usage examples for lockutils
There was a complaint that the usage examples in oslo.concurrency
are lacking (which they are) so this addresses some of those concerns
by adding a few usage examples (and descriptions).

Change-Id: I0738b898f1235e83a600c7732d70058b3fd3860f
2016-03-17 15:06:53 -07:00
Joshua Harlow 2176f3f473 Move 'history' -> release notes section
This seems to better match what the other oslo
libraries are calling this section, so we might as
well call it that to.

Change-Id: I4a486d0ca61f81413ea398d5955b4027d66ce360
2015-09-25 08:21:05 -07:00
Joshua Harlow 933669ce29 add auto-generated docs for config options
Add automatically generated documentation for the configuration options
using oslo_config.sphinxext.

Change-Id: If7eb94b268bb82e0fcfbac9dfd231ea25ff53b24
2015-09-24 11:31:19 -07:00
Joshua Harlow d04cf66a06 Add pypi download + version badges
Also makes the docs look more like the other
oslo libraries so that the content is easily readable
across projects.

Change-Id: I7b048bc4425197f87436281dd5e46619390c3f43
2015-04-07 21:09:17 +00:00
Sean Dague df35680b67 add watchdog module
This provides the watchdog.watch function which is a contextmanager
that can be used before doing operations that have a high risk of
deadlocking or aberrantly taking huge amounts of time to complete
(which could be the root cause for other issues).

Unit tests require the use of sleep to make the timers pop either
before or after the event in question. There is 1 second buffer that's
encoded into each scenario which should be sufficient for unit tests
(even in busy systems). If that turns into an issue later, the buffer
can be increased (I was only seeing real skew of 1-2 ms locally).

Change-Id: I79e39f8a4aa702627ca39bea3e6fc672134b8a72
2015-01-09 15:38:48 -05:00
Doug Hellmann d59543df4a Clean up API documentation
Use explicit files instead of auto-generating them.

Fail the build on a warning.

Tweak titles and other headings.

Add instructions for using lockutils-wrapper.

Change-Id: Ie92ce14b33180d35d84bbd0998e61b659487481d
2014-12-10 08:31:04 -05:00
Doug Hellmann bca4a0d827 Move out of the oslo namespace package
Move the public API out of oslo.concurrency to oslo_concurrency. Retain
the ability to import from the old namespace package for backwards
compatibility for this release cycle.

bp/drop-namespace-packages

Change-Id: I20d1647b1c3ef8cab3b69eccfe168eeb01703b72
2014-11-14 17:17:25 -05:00
Dan Prince fa52a63e4f Only modify autoindex.rst if it exists
This fixes doc build errors when using older Sphinx versions.

Change-Id: I0ed9bed311d6309257c0a111671d0fea46f5da7c
Closes-bug: #1387343
2014-10-29 20:32:51 -04:00
Jenkins 34f5b81987 Merge "Add history file to documentation" 2014-09-23 04:03:07 +00:00
Davanum Srinivas 17b33061b2 Add code/api documentation
Once we use the pbr based build to generate files, we prune
the indexes to remove references to code we would like to
hide like the common modules and private modules in conf.py.
We reuse the same excluded_patterns variable that is already
used in Sphinx and filter these modules from autoindex.rst

Change-Id: I4baea1efa227ef14bc6706d59ff3dcad93c2eacc
Closes-Bug: #1364140
2014-09-04 22:48:57 -04:00
Doug Hellmann 394de2820d Add history file to documentation
Show the ChangeLog in the history page of the documentation.

Change-Id: I308b6eb1e729e78ae7c8c9e838d62587ac20cf66
2014-09-04 16:17:20 -04:00
Yuriy Taraday 37b90eda3e Fix docs generation
Also add docs environment to tox.ini to simplify local docs generation

Change-Id: Ie0444264e4e02d206ded2c7568d58a26cfec3ae2
2014-08-16 00:15:34 +04:00
Yuriy Taraday 6fc3e6808b exported from oslo-incubator by graduate.sh 2014-08-07 22:26:50 +04:00