feat: add us-cpa tax-year source corpus
This commit is contained in:
@@ -6,6 +6,7 @@ import sys
|
||||
from pathlib import Path
|
||||
from typing import Any
|
||||
|
||||
from us_cpa.sources import TaxYearCorpus, bootstrap_irs_catalog
|
||||
|
||||
COMMANDS = (
|
||||
"question",
|
||||
@@ -114,11 +115,15 @@ def main(argv: list[str] | None = None) -> int:
|
||||
return _emit(payload, args.format)
|
||||
|
||||
if args.command == "fetch-year":
|
||||
corpus = TaxYearCorpus()
|
||||
manifest = corpus.download_catalog(args.tax_year, bootstrap_irs_catalog(args.tax_year))
|
||||
payload = {
|
||||
"command": "fetch-year",
|
||||
"format": args.format,
|
||||
"taxYear": args.tax_year,
|
||||
"status": "not_implemented",
|
||||
"status": "downloaded",
|
||||
"sourceCount": manifest["sourceCount"],
|
||||
"manifestPath": corpus.paths_for_year(args.tax_year).manifest_path.as_posix(),
|
||||
}
|
||||
return _emit(payload, args.format)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user