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: I7ac1599e903577e28fb64bb07a6b984e1ff8a023
Signed-off-by: Moisés Guimarães de Medeiros <moguimar@redhat.com>
Switch to openstackdocstheme 2.2.1 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.
Disable openstackdocs_auto_name to use 'project' variable as name.
Change pygments_style to 'native' since old theme version always used
'native' and the theme now respects the setting and using 'sphinx' can
lead to some strange rendering.
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.
See also
http://lists.openstack.org/pipermail/openstack-discuss/2020-May/014971.html
Change-Id: I5f985549671e3b4f8c438f247fae0818d25b21f5
Addressing feedback from
https://review.opendev.org/675762 . These comments are wrong
with current openstackdocstheme, so remove them completely.
Change-Id: Ibfb3a2e37ea5b89ce81caed3e4884ee077e0d967
Use sphinx-build and cleanup unused config.
Switch to openstackdocstheme 1.20.0 and remove obsolete settings from
conf.py files.
Update some RST files, they had wrong indentation.
Change-Id: Iaad2841db809f8a343fb8b1031cf8d0587d70442
Update to use current openstackdocstheme everywhere instead of
oslosphinx, remove now obsolete settings.
Change-Id: I812f72ebf9fb4d96b1031880c44596833da9d384
Remove entries that have no content, rename indices section to search
since that is the remaining entry.
Change-Id: I167caa2cc0e99d370ca3ea10edd96fe1ba482d54
Enable log-a-bug feature and add information on when document was built.
Disable pep8 check for doc/source/conf.py.
Change-Id: Ia86791ac69845572b2fbc536732afcf901bcf203
- add py3 to tox.ini (gate already tests py3)
- move all tests to $GITROOT/test so they can all run
through testr
- add scrapy to test-requirements.txt to support sitemap tests
- move tests from test_items.py to test_sitemap_file.py
- fix broken sitemap tests
- add newton to list of old releases in sitemap_file.py
- ignore flake8 H101 as it returns false positives for Sphinx conf.py
- Use openstackdocstheme for docs
- Update sitemap README
- Restructure repo docs
- fix minor style issues
Change-Id: I22c018149b2eefde6ca5c38c22ac06886fe9a7a8
openstack-doc-test is used for building of DocBook XML files. For index
page generation openstack-indexpage can be used.
Remove openstack-doc-test together with all support files.
Change-Id: I5589bc634e1f630f79b3d6e8bffee939c5300bf2
If multiple check arguments are given, do not exit after first failure
but continue and report all failed tests.
Enhance profile check to not abort after the first error.
Remove option --ignore-errors, this is not needed anymore.
Change-Id: I79996258a5d53b42cd57b11a0940ea4d6d18af5a
Add new option --check-links that checks that links are valid
and reachable.
Change-Id: I1a709bcbf47c7fdfbdc5e4da55457d7ccb70604c
Co-Authored-By: Christian Berendt <berendt@b1-systems.de>
* E265 block comment should start with '# '
* E101 indentation contains mixed spaces and tabs
* W191 indentation contains tabs
* E126 continuation line over-indented for hanging indent
* W391 blank line at end of file
Also enabled doc/ to be checked by flake8 in tox.ini.
Change-Id: I6ef75ccffb94dd2df346e844d351ea477e560a42
Find books that need to be rebuild for api-site better:
* Handle include of wadl resources.
* Handle file layout of api-site.
Add new option --print-unused-files.
Change-Id: I8ad61cf53728e3b5ba71077bf53b1780a2535c2e
www is copied to publish-dir/www but this is not desired when publishing
for our external website - only for drafts.
Add option --publish for publishing to external website
that does not copy www over and also always builds manuals.
Change-Id: I9972a690c6c714fbe028b47ff1da2884d058282b
This allows to ignore files just for syntax and niceness checks
but still use them for calculation of dependencies.
This allows us to handle the training-guide where st-training-guides.xml
should be black-listed for syntax checks but needs to be used for
dependency calculation in delete and build checks.
Change-Id: Ib183e635b623218083447e85fe8a6b0cb278a9e6
Fix error handling in openstack-doc-test, now really abort if an
error occurs. The call to write in the exception was wrong and masked
the exception.
OpenStack infra changed the setup so that we now always destroy a node
after building - and thus have a clean node each time.
Now, when mvn is called, it needs to download lots of files into the
.ml2 repository (previously this was done already).
Now, the cripts start mvn jobs in parallel - and then we get a race
between these downloads and corruption of the .m2 directory.
Avoid this race with waiting for the first build job to finish before
starting further builds.
Add options --parallel/--noparallel to disable parallel building
completely.
Improve debug output.
Related-Bug: #1277082
Change-Id: Ifa62e0bb5b4f655b0d36b9e16bb0bb8adcd4cbd5
Generate a log file build-${book}.log.gz for each book in the top-level
directory.
Also, add --debug option that for now only serializes the built to
see errors in the build_book invocation.
Change-Id: I1d81eaefa15f0d6bc103b9d3adbbf12b092ba7e6
Add a new option -l LANGUAGE to build and publish localized content
that is in generated/$LANGUAGE and copy content to
publish_docs/$LANGUAGE.
Add new option --only-book to build only specific manual.
Read gerrit-doc.properties if exists to pass values to maven.
Change-Id: I6a07fe02428679d0e5e00a4d67f1b11d9c85b262
Copy all generated books to directory publish-docs in the git top-level
so that Jenkins can publish them on docs-draft.
Also copies www directory over if files in it where changed.
The tool now uses a config-file "doc-test-conf" which is expected in the
top-level of the repository.
blueprint draft-docs-on-docs-draft
Change-Id: Iea67050d827407f2f71585372c673f7f1dbccc46
This allows a per-project exceptions file.
Once this is released, the current static file list can be moved
to an openstack-manuals specific file.
This is needed to ignore some files in the database-api repository, see
https://review.openstack.org/67716 and
https://review.openstack.org/#/c/67585.
Change-Id: Iab1c7b11680d9785b202b80fa80805b2069ea896
Related-Bug: #1270267
This allows to ignore directories, e.g.
ignore in compute api the incubation and v1 dirs with:
openstack-doc-test --check-build --api-site \
--ignore-dir=incubation --ignore-dir=openstack-compute-api-1.0
Change-Id: I6bad41543ed2269217a2ed36fcd947b83707daf2
Update for using sphinx package so that documentation
follows the OpenStack python packaging conventions.
This contains an initial man page for the openstack-doc-test
tool.
Change-Id: I8b8ed63c3c7bcfb58f5d8f939a79c3f7c314b969