Commit Graph

217 Commits

Author SHA1 Message Date
Martin A. Brown 7d3843c535 adding a bunch of docstring docs 2016-02-18 13:58:53 -08:00
Martin A. Brown 28f7a8468c minor documentation fixes 2016-02-18 13:58:30 -08:00
Martin A. Brown 809ddc545b adding # -*- coding: utf8 -*- 2016-02-18 13:25:02 -08:00
Martin A. Brown bf768d0277 adding basic docstrings 2016-02-18 13:22:48 -08:00
Martin A. Brown 605b57a1ea sorted(), so dirs and docs are processed stably
use sorted() on the sourcedirs and the contents of each directory so that the
directories are always handled in order and the documents are also handled in
order
adjust logging also to refer to "Source collection dir" rather than just "dir"
2016-02-18 09:17:25 -08:00
Martin A. Brown 20ae6bd25c add stem to logging entries
for consistency, make sure that stem is included on logging lines
2016-02-18 09:16:45 -08:00
Martin A. Brown a34738301f removing extraneous logging entry 2016-02-18 09:16:37 -08:00
Martin A. Brown d643883e50 change name_index to name_indexhtml; adapt tests
also minor logging adjustments for clarity and consistency
2016-02-18 09:15:47 -08:00
Martin A. Brown 62198e5973 in execute, before Popen, ensure cmd[0] has +x
rename is_executable() to isexecutable()
adjust testing code to match change to execute()
2016-02-18 09:13:46 -08:00
Martin A. Brown 2550047d23 pep8/pyflakes corrections 2016-02-17 19:38:27 -08:00
Martin A. Brown 875e2b2c23 pep8/pyflakes corrections 2016-02-17 19:36:52 -08:00
Martin A. Brown ef355ad8fb add inventory category for broken outputs 2016-02-17 19:30:25 -08:00
Martin A. Brown d3b6ad8e56 add iscomplete property to OutputDirectory 2016-02-17 19:19:48 -08:00
Martin A. Brown ffc0ad6547 improve readability, parallelism of methods by inverting logic 2016-02-17 19:05:23 -08:00
Martin A. Brown 1039dea0e6 let the prebuild_hook call clean 2016-02-17 19:04:51 -08:00
Martin A. Brown eed25efbba simplify cleaning; add (unused) name_epub 2016-02-17 19:04:21 -08:00
Martin A. Brown f5a65cf843 put stem in logging like many other logging lines 2016-02-17 19:03:37 -08:00
Martin A. Brown fd3b931423 include hooks for prebuild and postbuild states 2016-02-17 18:31:51 -08:00
Martin A. Brown bc810dd36c deal with the ENOENT problem in statfiles() 2016-02-17 18:16:20 -08:00
Martin A. Brown a0de081099 minor logging tweaking 2016-02-17 17:56:42 -08:00
Martin A. Brown 54a8477a33 renaming to inventory.py (and affected tests) 2016-02-17 16:39:42 -08:00
Martin A. Brown c425c2a8e8 completed first round of testing of driver code 2016-02-17 13:50:55 -08:00
Martin A. Brown 2825263f20 flipping the stem/dirname arguments 2016-02-17 13:50:31 -08:00
Martin A. Brown 2bcb55e2a0 flipping the stem/dirname arguments 2016-02-17 13:50:06 -08:00
Martin A. Brown 2b0b241019 adjusting format names 2016-02-17 13:49:33 -08:00
Martin A. Brown a8284f3afa repair mtime comparison logic
repair mtime comparison logic for source and output directories after
generalizing the statfiles() function in utils.py
add a __repr__ to the Inventory object
2016-02-17 12:04:37 -08:00
Martin A. Brown 46edc205e0 factor out the call to os.stat(); broken links 2016-02-17 11:31:08 -08:00
Martin A. Brown 9301a54ab2 switch to using statfiles 2016-02-17 11:19:48 -08:00
Martin A. Brown 515595cac9 improve statfiles, deprecate ill-conceived fileset
statfiles now returns a dict() of statinfo and can handle relative paths
2016-02-17 11:18:47 -08:00
Martin A. Brown 57ae52abde simplify addfile, remove unused "content" feature 2016-02-17 10:19:23 -08:00
Martin A. Brown f72583fca6 improve and generalize statfiles and getfileset
statfiles is the heavy lifter; call os.stat() while walking the directory
simplify getfileset; use the keys returned in the statinfo dict()
2016-02-17 10:17:19 -08:00
Martin A. Brown 01be89c949 pep8 fixes 2016-02-17 09:12:07 -08:00
Martin A. Brown c99dbefa92 shorter __repr__ can fit on one line 2016-02-17 08:35:53 -08:00
Martin A. Brown c1ccc544a3 adjust logic into an inventory object 2016-02-17 08:35:36 -08:00
Martin A. Brown bc1c154108 inital commit of driver file for handling the porcelain logic 2016-02-17 00:22:31 -08:00
Martin A. Brown dab2f1f8b1 adding support for documents to know their status 2016-02-17 00:17:49 -08:00
Martin A. Brown 8a1afb6e24 allow creation of empty OutputCollection; fixes
Allow creation of an empty OutputCollection so that the object can be handed
around in driver.py for higher-level document wrangling.
Also, repair one inobvious statement, thank you pep8/pyflakes
2016-02-16 23:43:07 -08:00
Martin A. Brown 23a5e40d52 shortening knowndoctypes to kdt 2016-02-16 23:42:57 -08:00
Martin A. Brown 6e3362b9aa a bunch of filesystem stat()ing functions 2016-02-16 23:42:22 -08:00
Martin A. Brown f17d164b52 allow creation of empty SourceCollection; fixes
Allow creation of an empty SourceCollection, which can be handed around in the
driver to allow for higher-level document wrangling
fix bad, always-failing directory check (thank you, testing)
clarify handling of documents living in a directory and the generation of the
fileset
2016-02-16 23:40:09 -08:00
Martin A. Brown f39237d307 removing commented block that lives in superclass, BaseDoctype 2016-02-16 23:39:56 -08:00
Martin A. Brown d91f253bd4 pep8 and pyflakes fixes 2016-02-16 19:55:40 -08:00
Martin A. Brown 9845e90a39 adding testing for execute and new function getfileset 2016-02-16 19:52:07 -08:00
Martin A. Brown b23a2ef1c5 adapt to changes in tldptesttools 2016-02-16 14:15:46 -08:00
Martin A. Brown ce060fc5d0 improving coverage of cases in OutputDirectory and OutputCollection 2016-02-16 14:15:15 -08:00
Martin A. Brown fbb6e56929 fixes found during testing
should standardize on IOError for errno.ENOENT across the package
adhere to standard choice of logging message
make sure to skip a non-directory in OutputCollection ("continue")
2016-02-16 14:13:17 -08:00
Martin A. Brown b9defe3e8b more genericization of testing code 2016-02-16 14:12:42 -08:00
Martin A. Brown 8ae6cf7d69 renaming examples.sources to example.sources 2016-02-16 11:11:37 -08:00
Martin A. Brown 9df21df31a renaming examples.examples to examples.sources 2016-02-16 11:10:32 -08:00
Martin A. Brown d392965862 factoring out common testing utilities
renamed TestSourceCollection to TestToolsFilesystem for use in
testing both sources.py and outputs.py
2016-02-16 10:57:44 -08:00