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.
This commit is contained in:
parent
f55fccd48d
commit
ad96fdfa90
1 changed files with 1 additions and 26 deletions
|
@ -85,13 +85,6 @@ Default is a newly-created directory under your repository.
|
||||||
default=[],
|
default=[],
|
||||||
help="""Path to rewrite rules for the balance sheet.
|
help="""Path to rewrite rules for the balance sheet.
|
||||||
Passed to `balance-sheet-report -r`.
|
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(
|
parser.add_argument(
|
||||||
'audit_year',
|
'audit_year',
|
||||||
|
@ -200,7 +193,6 @@ def main(arglist: Optional[Sequence[str]]=None,
|
||||||
(fund.main, list(common_args('FundReport', next_year))),
|
(fund.main, list(common_args('FundReport', next_year))),
|
||||||
]
|
]
|
||||||
|
|
||||||
returncode = 0
|
|
||||||
books = config.books_loader()
|
books = config.books_loader()
|
||||||
if books is None:
|
if books is None:
|
||||||
logger.critical("no books available to load")
|
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))
|
logger.error("%s: %s reports generated errors", now_s(), len(report_errors))
|
||||||
if not args.force:
|
if not args.force:
|
||||||
return max(report_errors)
|
return max(report_errors)
|
||||||
|
return os.EX_OK
|
||||||
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
|
|
||||||
|
|
||||||
entry_point = cliutil.make_entry_point(__name__, PROGNAME)
|
entry_point = cliutil.make_entry_point(__name__, PROGNAME)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue