Commit Graph

24 Commits

Author SHA1 Message Date
songwenping 0f5451555b Remove unnecessary unicode prefixes
Change-Id: I0910f62e7feaf928fe0afe4721c5b271d4748449
2022-04-19 19:48:16 +08:00
Hervé Beraud b828910188 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: I8c993d6ffaf869f67713bbbde8632a0143ed0c72
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-09-08 12:33:14 +02:00
Daniel Bengtsson c419298f8f Update openstackdocstheme.
Update to the latest version.

Change-Id: Iea34ae991caf21d02632e31ec8624170c3d1b771
2020-06-09 13:05:54 +02:00
melissaml 08855bd1f9 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: Ic49f4d682e35ca74443b2b288fbcde24bfdb7b42
2020-06-04 14:49:40 +08:00
Zuul 9b81f6fb74 Merge "Add release notes links to doc index" 2020-06-03 10:05:25 +00:00
Andreas Jaeger f716c6798d 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
before the next release removes them. A couple of variables are also
not needed anymore, remove them.

Set openstackdocs_auto_name to use 'project' as name.

Depends-On: https://review.opendev.org/728938
Change-Id: If90af1920749efd1b314884a4b366d6d2c939521
2020-05-18 21:03:54 +02:00
Hervé Beraud d2d78fc10c Add release notes links to doc index
Also uniformize titles to match a common format used on oslo's projects.

Change-Id: I687c647f5b978d87e3a9aa3d788d59d7bce26a21
2020-04-24 12:10:13 +02:00
Hervé Beraud 9e4adf56b2 [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: Icc43428c885853007a6ee9fc4acaf079f6349619
2020-02-03 18:34:40 +01:00
caoyuan fa87c3cdec 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: Iace9acb9bcbc29760de5b5c12b0a92353edde80e
2019-10-24 15:06:57 +08:00
zhangboye 6288709657 Cap sphinx for py2 to match global requirements
Change-Id: I4acfac28080a76de7d051058c1b2897e3d0d66fc
2019-06-06 17:12:47 +08:00
OpenStack Proposal Bot 0ddc7f9a2e Updated from global requirements
Change-Id: Iec75a238ce30b97511cc237d4dd066cb04223dda
2018-03-15 07:50:57 +00:00
ZhongShengping 1b1abbedc3 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: I84da413225e9410be890abf32a22e4409100d7fa
2018-03-02 10:29:49 +08:00
Akihiro Motoki e1f6499c67 rearrange existing documentation to fit the new standard layout
Fixes formatting things related to openstackdocstheme adoption

Change-Id: Ia4272bf073d53ae4075a1b6d860898c0a6121145
2017-07-06 21:53:30 +00:00
Akihiro Motoki ed34d20c38 switch from oslosphinx to openstackdocstheme
Fixes formatting things related to openstackdocstheme adoption

Change-Id: I05a794b806c36b5237fc9a1b6eabaaff802aba0e
2017-07-06 21:53:27 +00:00
John L. Villalovos b69beaef2d Add a title to the API Documentation page
The API Documentation page had a title of "base64". Make it "API
Documentation"

Change-Id: I309374560487762a8a539a70a6478f1123bd3a5c
2016-09-29 12:53:06 -07:00
ZhiQiang Fan 8a71061625 [Trivial] Remove executable privilege of doc/source/conf.py
It is a configuration file, rather than a script.

Change-Id: I930d84c9d3f774bfaf98b11e8ef6189f722fe98c
2016-04-29 20:14:26 +08:00
Victor Stinner e49e812900 Add utilities for base64
Writing a code using the base64 module (of the Python standard
library) working on Python 2.7 and 3.4 requires many checks on the
input and/or output type:

* base64.b64encode() only accepts byte string: text must be
  explicitly encoded to ASCII
* base64.b64decode() returns bytes: output must be decoded from UTF-8
  when text is expected

This change adds two pairs of encode/decode functions:

* encode_as_bytes(), decode_as_bytes(): always return the result as
  a byte string
* encode_as_text(), decode_as_text(): always return the result as a
  text string

Encode functions accept text: text is encoded to UTF-8 by default,
but the encoding is configurable.

Decode functions accept text: text is decoded from ASCII.

decode_as_text() decodes the result from UTF-8 by default, but again
the encoding is configurable.


The new submodule is called "base64" to be able to replace:

    import base64

with:

    from oslo_serialization import base64

If the base64 module of the stdlib is needed, it can be imported as a
different name. Example:

    import base64 as std_base64


The encoding example:

    if isinstance(text, six.text_type):
       text = text.encode('utf-8')
    text_b64 = base64.b64encode(text)
    text_b64 = text_b64.decode('ascii')

can be replaced with:

    text_b64 = base64.encode_as_text(text)


The decoding example:

    if isinstance(encoded, six.text_type):
       encoded = encoded.decode('ascii')
    text = base64.b64decode(encoded)
    text = text.decode('utf-8')

can be replaced with:

    text = base64.decode_as_text(text)

Change-Id: Icf8df9c947bc0c5f4838508b756ed8f53efd9fc4
2015-10-01 14:32:29 +00:00
Joshua Harlow 1bd558f515 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: Id4c5809dbe9c536c14abf8a5b360bdcf4e4713a0
2015-09-25 08:24:53 -07:00
Joshua Harlow 5b4e919879 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: I2a3497bcbf72bc4a0e6fb12f7c2d508bb3a4e6bc
2015-04-07 18:16:48 -07:00
Doug Hellmann e8deb08b7f Move files out of the namespace package
Move the public API out of oslo.serialization to
oslo_serialization. Retain the ability to import from the old namespace
package for backwards compatibility for this release cycle.

bp/drop-namespace-packages

Change-Id: Ic60f809ea00ac77b0753556c6fd00b97e64d57ff
2015-01-05 15:40:06 -05:00
Davanum Srinivas 9498865451 Add history/changelog to docs
Change-Id: I11754deadcf1a56c2c9e3de65447eb3926819fba
2014-09-10 09:54:05 -04:00
Doug Hellmann cea0814cbe Clean up docs before first release
Add basic API documentation and release notes.

Change-Id: I18fc06d23d8e46baf153a150e6af896c7bb67f04
2014-08-25 12:03:48 -04:00
Davanum Srinivas 94bff36bdf Fix docs build to run properly
Change-Id: I7f684bc48c5ce913a5799f78c80bda459cf35f65
2014-08-21 11:47:00 +00:00
Ben Nemec 7e806ce1fe exported from oslo-incubator by graduate.sh 2014-07-14 17:54:12 +00:00