Commit Graph

483 Commits

Author SHA1 Message Date
Martin A. Brown a06e1955b7 tweak logging outputs, lower some to debug() 2016-03-09 10:06:59 -08:00
Martin A. Brown 68b16b42d8 simplify function docbuild: logging by caller
make the core docbuild function even simpler; have it determine the result
and return it, as well as the individual build success/failure vector
move all logging logic into the caller function, so that script(), publish()
and build() can log whatever they like
2016-03-09 10:00:25 -08:00
Martin A. Brown c66b325530 improving test coverage of driver.py 2016-03-09 09:35:11 -08:00
Martin A. Brown f4367e943f improve testing coverage of driver.py
adjust calling pattern for prepare_{script,build}_mode so that they are easier
to test
embed the creation of build directories into the prepare_build_mode
2016-03-09 09:33:04 -08:00
Martin A. Brown a488ae53de add testing support for new format Asciidoc 2016-03-09 08:09:52 -08:00
Martin A. Brown 631e8fed83 . 2016-03-09 08:09:36 -08:00
Martin A. Brown 0c433d7306 removing text (will be supported by asciidoc) 2016-03-09 07:54:55 -08:00
Martin A. Brown 885d6a12f3 adding support for format asciidoc
simply using DocBook4XML to provide most of the effort
2016-03-09 07:39:14 -08:00
Martin A. Brown 0117209034 better abstraction of --script/--publish complete 2016-03-08 09:47:01 -08:00
Martin A. Brown 7aa99ec502 moving sameFilesystem to utils.py 2016-03-08 09:45:54 -08:00
Martin A. Brown ea2139373c simplify docbuild function; factor out logic
remove the logic from the docbuild function which executes both the --script
generation and the --build generation as the core loop over the document set.
create ancillary functions to prepare the document set for --script mode or
--build mode
add functions to create and remove the build directories in --build mode
add a --publish cleanup function to leave our --builddir clean (unless there
was a failure)
2016-03-08 09:16:46 -08:00
Martin A. Brown ffe327ced0 removing boilerplate; go from asciidoc to docbook45 2016-03-08 09:16:33 -08:00
Martin A. Brown 62c9cef32f docbooksgml needs to know about --script mode 2016-03-08 09:16:12 -08:00
Martin A. Brown ca8b8e211f minor cosmetic improvements to generated shell file 2016-03-08 09:11:09 -08:00
Martin A. Brown 19f04a2c23 adjusting TODO after the work of today 2016-03-07 22:17:47 -08:00
Martin A. Brown f848040e60 improving overall coverage 2016-03-07 22:13:38 -08:00
Martin A. Brown e7794eea20 relocating function 2016-03-07 22:13:23 -08:00
Martin A. Brown b2e01eec73 removing useless vestiage 2016-03-07 22:12:59 -08:00
Martin A. Brown 6a97e4058a improve orphan verbosity testing 2016-03-07 20:01:26 -08:00
Martin A. Brown 0ff6dc5594 support the config.builddir in the testing suite 2016-03-07 20:00:22 -08:00
Martin A. Brown 29674dd7f0 add Asciidoc example to typeguesser 2016-03-07 19:59:48 -08:00
Martin A. Brown 904f0004bd add new coverage for swapdirs; improve coverage, as well 2016-03-07 19:59:27 -08:00
Martin A. Brown c3a2152e6c improve covareg testing of source.py 2016-03-07 19:58:31 -08:00
Martin A. Brown f8bb88c518 improve coverage testing of outputs.py 2016-03-07 19:58:14 -08:00
Martin A. Brown 730010dc5b adding sample Asciidoc document 2016-03-07 19:57:48 -08:00
Martin A. Brown be78491fd6 do not allow None as the b argument (crazy) 2016-03-07 19:57:17 -08:00
Martin A. Brown 99d93fb4ce allow None as the b argument 2016-03-07 19:56:27 -08:00
Martin A. Brown 4fbc08c1be adjust to deal with new action --publish 2016-03-07 18:56:07 -08:00
Martin A. Brown 88f07a1c69 switch from attribute "type" to "doctype" 2016-03-07 18:55:47 -08:00
Martin A. Brown 9dd87b4d7a add an empty entry for "working" attribute 2016-03-07 18:54:32 -08:00
Martin A. Brown bd7b08ce23 OK, so a can be anything, not just a directory 2016-03-07 18:54:08 -08:00
Martin A. Brown 87e1161212 add support to driver for --builddir logic
create the --builddir before building
if --publish, swap the built directory with the output directory
then --remove the old content
2016-03-07 18:52:13 -08:00
Martin A. Brown b2a8ac28d2 adding an empty attribute called "build" 2016-03-07 15:04:54 -08:00
Martin A. Brown 8c6ceba912 adding a function to swap directories 2016-03-07 15:04:16 -08:00
Martin A. Brown 5f24879875 adding a function to swap directories 2016-03-07 15:04:04 -08:00
Martin A. Brown 8064ef71e8 changed the error message 2016-03-07 13:54:55 -08:00
Martin A. Brown 015b3459f4 more refactoring, heading toward --publish
created function removeOrphans() and removeUnknownDoctypes()
and the function runbuild() ugly name; which is called from all three of the
main work functions, build(), publish() and script()
2016-03-07 13:50:15 -08:00
Martin A. Brown a4331ac48e fix the invocation of summary() in the test 2016-03-07 13:24:40 -08:00
Martin A. Brown dab1fc6bbc abstract error-handling; prepare for --publish
abstract the error-handling away from the one-large run() function into each
of the functions (show_doctypes, show_statustypes, detail, summary, etc.)
add the function publish(), which will call build() and ensure success before
running any of the publishing
2016-03-07 13:21:38 -08:00
Martin A. Brown 30d44a75f8 better refactoring of the large "run" method 2016-03-07 12:39:22 -08:00
Martin A. Brown 814dfec181 pep8/pyflakes fixes 2016-03-07 12:12:34 -08:00
Martin A. Brown 76fd27d1fa pep8/pyflakes fixes 2016-03-07 12:10:49 -08:00
Martin A. Brown 517a29b4a8 switch to using os.EX_OK for sys.exit()
also more preparation for switching to use --builddir
2016-03-07 12:02:25 -08:00
Martin A. Brown dfc20c5617 move directory-handling logic to the processor
In preparation for supporting a separate --builddir (allowing minimal
disruption of real output directory during rebuild) factor all output
directory handling logic into the main processor object (BaseDoctype).
Simplify the generate() method.
Centralize all pre-build logic in hook_build_prepare().
Remove all hook logic from the OutputDirectory.
2016-03-07 11:34:09 -08:00
Martin A. Brown c390e71b4a removing all chdir() and resource copying logic
the logic for making sure to chdir() into the build directory has been
sequestered into doctypes/common.py (and output.py); additionally, it is
smarter to put the resource copying logic, there, as well
2016-03-07 10:20:55 -08:00
Martin A. Brown 98b19ac5ce do not mkdir() if we are in --script mode 2016-03-07 10:01:42 -08:00
Martin A. Brown fc4c83307f do not mkdir() if we are in --script mode 2016-03-07 10:01:26 -08:00
Martin A. Brown 99d6232259 simplify text in commented lines 2016-03-07 10:00:51 -08:00
Martin A. Brown f87458c461 rearranging and renaming build setup methods
in preparation for supporting a build-directory, moving the os.chdir() and the
copying of image files into tldp/doctypes/common.py and adding a few hooks in
the main logic for building
2016-03-07 09:50:22 -08:00
Martin A. Brown 7308f331ff parameterize the --resources to copy at build time 2016-03-07 09:39:34 -08:00