task/de11-ta62 -- Reproduce the error and capture in unittest
* nparcel/tests/test_loaderdaemon.py new test
  test_start_non_dry_loop_odbc_error to try and reproduce
  the ODBC error.  See Rally DE11 for more detail
task/us93-ta65 -- RETURNS and RETURNS_REFERENCE ORM update - functional

nparcel/table/returns_reference.py
* new RETURNS_REFERENCE ORM

nparcel/table/returns.py
* new RETURNS ORM
task/us93-ta70 -- SQL to extract details from the RETURNS table based
on id - functional

nparcel/dbsession.py
* new attribute db_type that captures the database type (for example,
  ``sqlite`` or ``MSSQL``)

nparcel/table/__init__.py
* update the __init__() signature to accept an alias parameter

nparcel/table/returns_reference.py
* new method reference_nbr_sql() to provide an SQL wrapper to extract
  the returns_reference.reference_nbr of items relating to returns_id

nparcel/table/returns.py
* new method extract_id_sql() SQL wrapper to extract the returns
  against id

nparcel/dbsession.py
* port sqlite library to sqlite3
task/us93-ta67 -- Returns comms templates

nparcel/templates/email_err_ret_html.t
nparcel/templates/email_ret_html.t
nparcel/templates/sms_ret_xml.t
nparcel/templates/subject_ret_html.t
* new returns templates
task/us93-ta68 -- Returns comms trigger

nparcel/comms.py
nparcel/commsdaemon.py
* factor out the comms_dir attribute into nparcel/commsdaemon.py
feature/us-93 -- refactor work across nparcel/comms.py

nparcel/comms.py
* class Comms() now inherits from nparcel.Service() to utilise
  the generic DB connectivity
* __init__() method paramater list converted to varargs
* factor out the template_base attribute as this is now taken from
  nparcel.EmailerBase()

nparcel/commsdaemon.py
* update the _start() method to build a kwargs structure to
  initialise nparcel.Comms()
* refactor the nparcel.Comms() kwargs initialiser with new
  properties sms_api(), email_api() and comms_kwargs()

nparcel/emailer.py
* factor our the template_base attribute as this is now taken from
  nparcel.EmailerBase()

nparcel/emailerbase.py
* make the template_base attribute a part of nparcel.EmailerBase()

nparcel/restemailer.py
* break the multiple inheritance arrangement.  nparcel.Rest is now
  a component class
nparcel/restsmser.py
* nparcel.RestSmser() now has its own instance of the template_base
  attribute so that it can build SMS messages from a templated source
* refactor the create_comms() method so that if the base_dir parameter
  is not None it can override the template_base attribute's value
feature/us-93 -- refactor comms facility config items

nparcel/commsb2cconfig.py
* factor our the comms facility config items into a separate module

nparcel/conf/nparceld.conf
* new config items controlled_templates and uncontrolled_templates
task/us93-ta68 -- Returns comms trigger (update 2)

nparcel/commsdaemon.py
* new attribute controlled_templates list of comms templates that are
  controlled by the delivery period thresholds
* refactor the get_comms_files() method to use the
  nparcel.utils.files.get_directory_files_list() function
* refactor the _start() method so that it can selectively invoke
  get_comms_files() based on templates provided by
  controlled_templates attribute
* integrate reporting so that each iteration presents a stats
  log item
task/us93-ta68 -- Returns comms trigger (update 3)

nparcel/commsdaemon.py
* new attribute controlled_templates that lists
* update the _start() method to build a list of comms events files on
  a combination if controlled_templates and uncontrolled_templates
* update the comms_kwargs property to include a list of
  template_tokens and returns_templates

nparcel/comms.py
* new attribute template_tokens list of template tokens that are
  currently supported
* refactor the parse_comms_filename() method so that all template
  tokens are configurable and we removed the hardwired dependency
  within the code
* new attribute returns_template_tokens that is a list of template
  tokens that extracts template detail from the RETURNS table
* refactor the get_agent_details() method so that the new template_token
  parameter value can control which table is used to build template
  detail
task/us93-ta71 -- Returns comms date/time localisation

nparcel/exporter.py
nparcel/postcode.py
* factor out the convert_timezone() logic into separate module that
  can be leveraged by other modules
* refactor the process() method to localise the returns.created_ts for
  "ret" template types (returns)

nparcel/table/returns.py
* add the state column to the SELECT clause of the extract_id_sql()
  method
task/us93-ta66 -- documentation update
task/de08-ta78 -- npctrl daemoniser control script

nparcel/bin/npctrl
* new control script, npctrl

nparcel/daemonservice.py
* new attribute "facility" that can be leveraged by inheriting classes
  to use in logging messages
task/de08-ta77 -- documentation update
feature/us-93 -- minor tweaks prior to MSSQL DB in UAT
task/us68-ta81 -- FTP Archiving Algorithm

nparcel/ftp.py
* determine the branch archive directory structure based on
  context of the transfer
* refactor the archive_file() method to incorporate the context-based
  branch directory structure
* refactor the xfer_files() method to incorporate the FTP session user
  name into the call to the archive_file() method
task/us68-ta82 -- Create a simple throwaway method to re-archive
existing FTP files

nparcel/ftp.py
* updated the archive_branch() method signature to include the "ymd"
  attribute so override the timestamp token from current time if
  supplied
* new method migrate_archived_files() identify old-style archived files
  and migrate to the new archiving arrangement

nparcel/utils/files.py
* patch bug in the move_file() function as it was ignoring the "err"
  parameter and unconditionally moving aside file that failed the move
Patch bug in the import of dependency pysqlite2
task/us68-ta80 -- documentation update
Merge branch 'dev' of https://github.com/loum/nparcel into dev
Roll over to v0.32