From ad96fdfa90debb09fd1ec1bcadf3a58c3c6ce237 Mon Sep 17 00:00:00 2001 From: Brett Smith Date: Thu, 17 Sep 2020 10:07:24 -0400 Subject: [PATCH] audit_report: Remove manifest generation. We're basically always going to have a "packet build step," and it makes more sense to have the manifest generated there, since it's the thing that consumes the manifest, rather than here. --- conservancy_beancount/tools/audit_report.py | 27 +-------------------- 1 file changed, 1 insertion(+), 26 deletions(-) diff --git a/conservancy_beancount/tools/audit_report.py b/conservancy_beancount/tools/audit_report.py index 709d1ea..b5e2670 100644 --- a/conservancy_beancount/tools/audit_report.py +++ b/conservancy_beancount/tools/audit_report.py @@ -85,13 +85,6 @@ Default is a newly-created directory under your repository. default=[], help="""Path to rewrite rules for the balance sheet. Passed to `balance-sheet-report -r`. -""") - parser.add_argument( - '--delimiter', '-d', - metavar='TEXT', - default='\\0', - help="""Delimiter for ODF links in the manifest file. -Passed to `extract-odf-links --delimiter`. Default `%(default)s`. """) parser.add_argument( 'audit_year', @@ -200,7 +193,6 @@ def main(arglist: Optional[Sequence[str]]=None, (fund.main, list(common_args('FundReport', next_year))), ] - returncode = 0 books = config.books_loader() if books is None: logger.critical("no books available to load") @@ -232,24 +224,7 @@ def main(arglist: Optional[Sequence[str]]=None, logger.error("%s: %s reports generated errors", now_s(), len(report_errors)) if not args.force: return max(report_errors) - - missing_reports = frozenset( - path for path in output_reports if not path.exists() - ) - if missing_reports: - logger.error("missing expected reports: %s", - ', '.join(path.name for path in missing_reports)) - if not args.force or len(missing_reports) == len(output_reports): - return os.EX_UNAVAILABLE - - arglist = [f'--delimiter={args.delimiter}', f'--jobs={args.jobs}'] - if repo_path is not None: - arglist.append(f'--relative-to={repo_path}') - arglist.extend(str(p) for p in output_reports if p not in missing_reports) - with (args.output_directory / 'MANIFEST.AUTO').open('w') as manifest_file: - returncode = extract_odf_links.main(arglist, manifest_file, stderr) - logger.debug("%s: manifest generated", now_s()) - return returncode + return os.EX_OK entry_point = cliutil.make_entry_point(__name__, PROGNAME)