Commit Graph

11 Commits

Author SHA1 Message Date
Hervé Beraud ff156664e6 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: I9b979afcd45e6a51252ccccb686b01beeb9157f8
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
2020-09-15 14:46:10 +02:00
Andreas Jaeger 78dc56d979 Update docstheme
With version 2.1, we renamed options in the extension, let's use them
here as well.

Increase also requirements for reno and Sphinx.

Change-Id: Ica3cc991ad7bcc1626b805ede57c9c23e2538239
2020-05-15 08:50:51 +02:00
Andreas Jaeger 4ecccf9c0c Do not set html_last_updated_fmt
Since version 1.20 of openstackdocstheme, html_last_updated_fmt does not
need to be set anymore, remove it's setting.

Change-Id: I913b76cc6b3128a420a6fc69e2dc88627d47bbfe
2020-02-22 17:35:46 +01:00
Andreas Jaeger 8715f67645 Do not display "latest" badge if repo is not versioned
We do now display the badge for version even on repos that do not have
branches like https://docs.openstack.org/infra/manual . The reason is
that the test is against series - and we *always* set series, by default
to 'latest'.

Add a new option to disable showing of the badge called display_badge
and use it. Repos can set this as part of html options.

Disable showing the badge for api-ref test document.

Change-Id: I985b49412aa1848b915b8f0a2ff9e95867e420ca
2018-08-18 15:40:41 +02:00
Andreas Jaeger ab2b99c978 Cleanup conf.py
Adapt for current theme options, remove obsolete code.

Change-Id: I900fa3914463147acaf40e81f54f2f80abcac048
2017-07-04 13:47:08 +02:00
Thomas Bechtold af22063ebf Allow using openstackdocstheme without git installed
When building rpm packages, git might not be available in the
build env because it is not needed when building from a sdist tarball.
So make git optional.

Change-Id: I159768799fcf15ed0aea6b8350dd395f632e812d
2017-07-04 13:17:09 +02:00
gecong1973 e765bbff85 Use https instead of http for git.openstack.org
Change-Id: I4e50f8958504616c76dc49f9049e2c5b163f5aa7
2017-02-09 00:17:37 +00:00
Leif Madsen a4a2ed7f99 Add note in README about Python 3 changes
Add a node that explains that for Python 3 you'll need to add a
.decode() function in the gitsha command. Also, note that you
need to import subprocess in the conf.py file.

Change-Id: I1eb42738be74de96fae0940f3e97283351602e95
2017-01-31 15:33:42 +00:00
Anne Gentle b0e3e8a6a4 Fix missing role_id
Error was "No path parameter ``role_id`` found in rest_parameter stanza.:

Basically it means that the parameter role_id is used, but not defined in a corresponding yaml file.

Mailing list post on openstack-dev:
http://lists.openstack.org/pipermail/openstack-dev/2017-January/110606.html for reference.

Change-Id: Id5863a70f2432a2ae22164aa66e29ae739ab3e11
2017-01-30 16:18:55 -06:00
Karen Bradshaw 90fd29b079 Update test API Ref
- Added more content to test the display of method labels,
  url strings, http status code and parameter tables.
- Added 'OpenStack API Documentation' title in titlerow.
  This removes the duplicate title for the API
  references.

Change-Id: Ifdbac89efc91ab023510c466cf0cf97b21a69fbe
2016-10-06 12:05:28 -04:00
Karen Bradshaw 47149987c1 API References dropdown menu
- Adds a theme variable, sidebar_dropdown, to set
  a dropdown menu for the API references.
  To test, uncomment the parameter html_theme_options in
  doc/source/conf.py OR build the API Ref demo docs.
- Adds an API Ref docs demo integrating os-api-ref
  and openstackdocstheme. Tested with webserver:
  python -m SimpleHTTPServer <port_num>.

Change-Id: I346695cd407ecf4efc0a5e00f2c0ccc1ea099ec5
2016-08-22 10:27:45 -05:00