validate.py did not give any progress ahead of which books are going to
get build which is a bit annoying if you run it locally.
With my patch you see:
$ tools/validate.py
Following files will be validated:
>>> doc/src/docbkx/openstack-network-connectivity-admin/app_demo_routers_with_private_networks.xml
Queuing the following books for building:
openstack-network-connectivity-admin
Building all books now...
>>> Build of book openstack-network-connectivity-admin succeeded.
Change-Id: Ib5dbe41dea7512ea33fd314ca8842bc5e38cf4ba
test.py is a modified copy of validate.py. I introduced a new
name to not cause race conditions with the existing Jenkins
job which actually uses validate.py.
This patch introduces the following new parameters and changes
the default behaviour of the script. By default the script will
do nothing.
--check-build: With this parameter the script tries to build
all books affected by modified files.
--check-syntax: With this parameter the script checks if modified
files are still using valid XML syntax.
--with-niceness: Using this parameter together with --check-syntax
will also check the syntax for niceness issues (for
example trailing whitespaces).
--non-voting: With this parameter set the script always returns 0
as exit code.
Possible Jenkins jobs:
./tools/test.py --check-build
./tools/test.py --check-syntax
./tools/test.py --check-syntax --with-niceness --non-voting
The force parameter is also available (as in validate.py). But
I think it's not meaningful to force the build of all books
or the syntax check of all files because this will result again
in very long runtimes.
We should not use the --non-voting parameter on Jenkins. It should
be possible to simply define non-voting jobs. Then the job is
failed in the review request, but Jenkins still gives +1.
Change-Id: I2ed6f80beb109c60bd7f0ca2417426f776383973
At the moment the validation doesn't take care of books
where the pom.xml is in an other directory than the sources
of the book. This patch will fix this issue.
For example: the pom.xml of basic-install is available at
doc/src/docbkx/basic-install/pom.xml but the sources of the
books are in doc/src/docbkx/basic-install/src. Because
the path to the pom.xml differs from the path of the sources
the validation will not check the files in the sources
directory for xi:include elements.
Change-Id: I3b92c3c4bff46ba6f9ac53b3ec56d24e7caf6ff6
At the moment a wrong check makes it possible that affected books
are build several times. That's not useful and should be changed.
Change-Id: I27c016c6d4ef98fead53609013c46302fa8b67d2
Just a quick run of the autogenerate tool to update the flagmappings and tables for
nova, cinder and neutron
Change-Id: Ic75b54480fc86780577521a7a6faec0335adf400
For example with this patch the following is working without issues:
cd doc/src/docbkx/openstack-network-connectivity-admin
../../../../tools/validate.py
Change-Id: Ie6d610104987eb3be430f9afc4f4cd348a77297d
The recent introduction of the whitespace check has been good for
improving our consistency, however while discussion is ongoing
about how to best manage whitespace, the check should be non-voting.
This patch (intended to be temporary while discussion continues)
changes the script to print when whitespace is wrong,
rather than leaving a -1 vote.
Change-Id: I082aa4418864cd50d087dfe01c3bfff4d6df9f8f
At the moment the validation script simply validates all
files and builds all books afterwards. This results in a
very long runtime (appr. 30 minutes at the moment).
With this patch only modified files are validated and only
affected books are built. A book is affected if one XML
file includes a modified file. If no book is directly
affected all books are built.
In this way, resources can be saved and validation is
performed much faster.
Change-Id: I17dcf119c0bafc4656c9f267f0d3f5ae884ea76e
This patch brings the auto-generate-config doc tool into
the openstack-manuals repo, where it can be used to update
the configuration option tables.
patchset2 fixes obvious things noted by reviewers, likely
needs more fixing.
patchset 4 adds update feature, fixes pep8
patchset 5 removes debugging print
patchset 6 adds warning to tables regarding their
automatically generated nature
patchset 7 updated nova flagmappings for H2 and
adds updated nova tables
patchset 8 adds a seciton in the readme with a worked example
from a recent use of the script
patchset 10 fixes for cinder
patchset 11 testing, fixing
patchset 12 testing, fixing
patchset 13 adds categories to cinder.flagmappings, generates
docbook tables for cinder
patchset 14 adds mappings for neutron, and generates docbook
tables based on these
patchset 15 adds list of bugs this patch will fix
patchset 16 fixes whitespace error in automatically generated tables :(
fixes bug 1192225
Partial-Bug 1207550
Partial-Bug 1207549
fixes bug 1206827
Partial-Bug 1206336
fixes bug 1204484
Partial-Bug 1204205
fixes bug 1202260
fixes bug 1201710
fixes bug 1200794
Partial-Bug 1200740
Partial-Bug 1200418
Partial-Bug 1200047
Partial-Bug 1199209
Partial-Bug 1197657
fixes bug 1197653
fixes bug 1197295
Partial-Bug 1197088
Partial-Bug 1195900
fixes bug 1195560
fixes bug 1195433
Partial-Bug 1192752
fixes bug 1187278
Partial-Bug 1106428
Change-Id: Icd3f4496850c375c9359a10eddb25ab5c722595e
bp:autogenerate-config-tables
This change is also cleaning up all remaining whitespaces
to make the new validation method workable.
Change-Id: I15d288c5faa583aee8b4707b6a04ee2683326fe7
At the moment tools/validate.py exits after it found an
invalid file.
I think it's better to always validate all files and to
exit then if any invalid file was found. This way the
creator of a review request can fix all found issues in
all files and has not to create several patch sets.
Change-Id: Ic5668f0791680802b8cef3b5e1016c9dc76479b9
Modifies tools/validate.py to run "mvn clean generate-sources"
in every directory that has a pom.xml file.
The script will fail with an error if any of the books fail to build.
It will terminate on the first failure.
Fixes bug 1031374
For now, we aren't gating on openstack-training
Change-Id: Ic0136e4245e8e4bfa2e790574e3ec82c944c4b02
In tools/validate.py, check for xml:id attributes.
While testing this, found a file that contained missing xml:id, that
was corrected.
See bug #1181659
Change-Id: I61f61c5f6de87bee8c7bc2eb9e3bfe23426a3adb
This patch added tools used for slicing and merging in translation process.
The patch also includes the POT files for each documents.
The PO files are not included, which can be downloaded from Transifex.
Fixes: bug #1153415
Change-Id: Ia455134c99acb1129e8f10deda0d85867b1ef9a3
With this patch, running the tools/validate.py script will return
no DocBook RelaxNG schema validation failures.
Once this patch lands, and the equivalent lands in stable/folsom,
I will follow up on getting this run automatically by Jenkins so
we can see the results when there are new doc patch proposals.
There were three XML validation failures that were addressed
openstack-compute-admin/rootwrap.xml:
rootwrap.xml had to xml:id values that were the same. These have
been changed so they are different. It turns out this file was not
being included in the documentation at all. I submitted a separate
patch to include it: https://review.openstack.org/20551
openstack-compute-admin/computeconfigure.xml:
computeconfigure.xml had xi:include elements with an 'os' attribute.
This violates the spec, and it doesn't work, either. We had two
lines that looked like this:
<xi:include os="ubuntu" ...>
<xi:include os="rhel;fedora;centos" ...>
and both files were being included in the docs. This was changed so
that only one file is included, and there's a note that has been
added that describes the difference between the two files, which
is very minor (just one parameter).
openstack-ha/ha-guide-docinfo.xml:
This isn't a real XML file, it's a fragment of XML that is used
by a non-standard toolchain. The validation script has been configured
to just ignore it for now.
Change-Id: Ie77218efc56c16b7bf162f5e02fd7a6d99116dc1
Adds a script called tools/validate.py that will check all XML
files against the DocBook 5 RELAX NG schema.
Does not check pom.xml files or files inside of directories named
"target".
Change-Id: I9614f1b10ac2da608a245c7644309a5be38c8995