NASA-PDS / deep-archive

PDS Open Archival Information System (OAIS) utilities, including Submission Information Package (SIP) and Archive Information Package (AIP) generators
https://nasa-pds.github.io/deep-archive/
Other
7 stars 4 forks source link

Resolve #77 and #78 #79

Closed nutjob4life closed 3 years ago

nutjob4life commented 3 years ago

Use a temp dir instead of an unlinked temp file and fix arg to calling process on aipgen

Summary

Previously, we were using NamedTemporaryFile to make a temporary file for sqlite3. sqlite3 would close and open this file several times during processing. On Unix, this is fine. On Windows NT or later, the very first "close" on the file would render it unusable by future opens. So instead, we make a temporary directory instead of a file and use a known filename inside of that (#77).

Also, we noticed that there was a redundant args. being referenced in the call to process in aip.py. This fixes that (#78).

Test Data and/or Report

Running tests at level 1
Running zope.testrunner.layer.UnitTests tests:
  Set up zope.testrunner.layer.UnitTests in 0.000 seconds.
  Running:
    10/13 (76.9%) test_logging_arguments (pds.aipgen.tests.test_utils.ArgumentTestCase)usage: 

  Ran 13 tests with 0 failures, 0 errors, 0 skipped in 0.763 seconds.
Tearing down left over layers:
  Tear down zope.testrunner.layer.UnitTests in 0.000 seconds.

Related Issues