doxa-study-evidence / tools /finalize_release.py
Giuliocc's picture
Release source-grounded context, event references and study evidence with exact rights and annotation status
dd5f5a4 verified
Raw History Blame Contribute Delete
28.1 kB
"""Create native viewer tables, documentation and an exact public allowlist."""
from collections import Counter
from hashlib import sha256
import json
from pathlib import Path
import shutil
import statistics
import pyarrow as pa
import pyarrow.parquet as pq
HERE = Path(__file__).resolve().parent
STAGE = HERE / "stage"
WORK = HERE / "work"
def dump(path, value):
path.parent.mkdir(parents=True, exist_ok=True)
path.write_text(json.dumps(value, ensure_ascii=False, indent=2) + "\n", encoding="utf-8")
def main():
counts = json.loads((WORK / "counts.json").read_text())
packets = pq.read_table(STAGE / "data/claim_packets/corpus.parquet").to_pylist()
papers = pq.read_table(STAGE / "data/papers/corpus.parquet").to_pylist()
challenges = []
for packet in packets:
for prompt in packet["challenge_prompts"]:
challenges.append({"id": packet["id"] + ":" + prompt["kind"], "packet_id": packet["id"],
"document_id": packet["document_id"], "pmcid": packet["pmcid"], "title": packet["title"],
"kind": prompt["kind"], "question": prompt["question"], "original_claim": packet["claim"],
"source_anchor": prompt["source_anchor"], "gold_answer": None,
"annotation_status": "unannotated", "human_review_count": 0})
references = json.loads((WORK / "retrieval_reference_index.json").read_text())
predictions = json.loads((WORK / "retrieval_predictions.json").read_text())
for name, rows in (("review_prompts", challenges), ("retrieval_reference_index", references), ("retrieval_evaluation", predictions)):
folder = STAGE / "data" / name
folder.mkdir(parents=True, exist_ok=True)
pq.write_table(pa.Table.from_pylist(rows), folder / "corpus.parquet", compression="zstd")
tools = STAGE / "tools"
tools.mkdir(exist_ok=True)
for name in ("build_study.py", "retrieval_benchmark.py", "analyze_retrieval.py", "study_search.py", "validate_study.py", "test_study.py", "finalize_release.py", "requirements.txt", "requirements-retrieval.txt"):
shutil.copy2(HERE / name, tools / name)
for name in ("SCHEMA.md", "ANNOTATION.md"):
shutil.copy2(HERE / name, STAGE / name)
examples = STAGE / "examples"
examples.mkdir(exist_ok=True)
for name in ("search_example_lexical.json", "search_example_hybrid.json"):
if (WORK / name).exists():
shutil.copy2(WORK / name, examples / name)
results = json.loads((WORK / "retrieval_results.json").read_text())
integrity = json.loads((STAGE / "integrity_report.json").read_text())
assert integrity["status"] == "pass" and integrity["paragraphs"] == counts["paragraphs"] and integrity["packets"] == counts["claim_packets"]
for name, fingerprint in integrity["artifact_sha256"].items():
assert sha256((STAGE / name).read_bytes()).hexdigest() == fingerprint
source_manifest_sha = sha256((STAGE / "source_split_manifest.json").read_bytes()).hexdigest()
reproduction = json.loads((WORK / "reproduction_parity_final.json").read_text())
search_checks = json.loads((WORK / "search_validation.json").read_text())
assert reproduction["source_manifest_sha256"] == search_checks["source_manifest_sha256"] == source_manifest_sha
assert reproduction["all_packet_fields_identical"] and all(x["all_result_and_window_source_spans_verified"] for x in search_checks["examples"])
assert "Ran 8 tests" in (WORK / "unit-test-final.log").read_text() and "\nOK" in (WORK / "unit-test-final.log").read_text()
dump(STAGE / "validation_receipts.json", {"source_manifest_sha256": source_manifest_sha, "source_integrity_assertions": integrity["assertions"],
"unit_tests": {"passed": 8, "failed": 0}, "frozen_input_reproduction": reproduction,
"local_search_smoke": search_checks,
"human_retrieval_restore": json.loads((WORK / "retrieval-restore.log").read_text()),
"new_human_reviews": 0})
audit = HERE.parent / "quality/ACADEMIC_RETRIEVAL_INTEGRITY.json"
assert json.loads(audit.read_text())["status"] == "pass"
shutil.copy2(audit, STAGE / "evaluation/independent_retrieval_audit.json")
errors = json.loads((WORK / "retrieval_error_analysis.json").read_text())
metrics = results["methods"]
metric_rows = "\n".join(f"| {name} | {row['human_span_hit@5']:.2%} | {row['complete_human_rationale_set@5']:.2%} | {row['MRR50']:.4f} | {errors['method_failures'][name]['human_span_misses_at5']} |"
for name, row in metrics.items())
coverage = results["source_coverage"]
truncated = sum(x["dense_truncated_units"] for x in coverage)
total_units = sum(x["retrieval_units"] for x in coverage)
topics = Counter(x["corpus_slice"] for x in papers)
languages = Counter(x["language"] for x in papers)
schema = {"version": "0.2.0", "offset_unit": "unicode_code_points", "page_mapping": "null_for_JATS_XML",
"tables": {name: {"path": str(path.relative_to(STAGE)), "rows": pq.read_metadata(path).num_rows,
"arrow_schema": str(pq.read_schema(path))}
for path in sorted((STAGE / "data").glob("*/corpus.parquet")) for name in [path.parent.name]},
"political_packet_annotation_status": "unannotated", "political_packet_gold_label": None,
"political_human_reviews": 0, "trained_model_promoted": False}
dump(STAGE / "schema.json", schema)
dump(STAGE / "summary_statistics.json", {
"claim_characters": {"minimum": min(len(x["claim"]) for x in packets), "median": statistics.median(len(x["claim"]) for x in packets), "maximum": max(len(x["claim"]) for x in packets)},
"focal_paragraph_characters_median": statistics.median(len(x["focal_paragraph"]["quote"]) for x in packets),
"source_prose_characters": sum(len(x["text"]) for x in papers),
"source_slices": dict(topics), "source_languages": dict(languages), "supervised_training_eligible": 0, "gold_evaluation_eligible": 0,
"candidate_unsupervised_training_packets": sum(x["retrieval_unsupervised_eligible"] for x in packets),
"candidate_contexts_are_reference_labels": False,
})
configs = "\n".join(f" - config_name: {name}\n data_files:\n - split: corpus\n path: data/{name}/corpus.parquet" for name in schema["tables"])
card = f'''---
pretty_name: DOXA Study Evidence — exact claims and full-paper context
language:
{chr(10).join(' - ' + language for language in sorted(languages))}
license: other
license_name: source-specific-cc-by-and-cc0
license_link: LICENSE
task_categories:
- text-retrieval
tags:
- political-science
- public-policy
- evidence-retrieval
- scientific-literature
- source-provenance
- tacitus
- doxa
size_categories:
- 1K<n<10K
configs:
{configs}
---
# DOXA · Study evidence
**{counts['claim_packets']:,} verbatim scientific claim/context packets from {counts['papers']:,} licensed full-text papers, with {counts['paragraphs']:,} original paragraphs.** A research foundation from [TACITUS](https://tacitus.me/doxa/) for examining what political and public-policy claims actually say, what their source methods can establish, and what still requires review.
Use this dataset to retrieve Methods, Results and limitations; inspect exact quotations, quantities, citation pointers and original locations; and prepare genuine human evidence annotations. An extracted claim or a similar paragraph is **not** a verified fact, a support label, a political-bias finding or an assessment of its author.
## What is available
| Native configuration | Rows | Purpose |
|---|---:|---|
''' + "\n".join(f"| `{name}` | {table['rows']:,} | " + {
"papers": "Original prose, bibliographic attribution, main-article permissions receipt and source hashes",
"paragraphs": "Exact source passages with hierarchy, XML locators, original offsets and references",
"claim_packets": "Distinct verbatim sentences with separate context candidates and explicit missing coverage",
"review_prompts": "Numerical, causal-scope and requirement-versus-event questions; no gold answers",
"retrieval_reference_index": "Pinned upstream human rationale IDs/offsets/provenance; article/question/rationale text omitted",
"retrieval_evaluation": "Every frozen method/query result with top50 source ranges and independently recomputable metrics",
}[name] + " |" for name, table in schema["tables"].items()) + f'''
The political study packets have **zero completed DOXA human reviews**, `gold_label=null`, and are ineligible for supervised training or gold evaluation. Methods/Results/limitations lists are deterministic retrieval candidates; they may be empty or incomplete. A candidate sentence may report another study, state a hypothesis or quote someone else; attribution and endorsement have not been annotated. Rule-authored review questions have null answers. The separate Evidence Inference index preserves actual upstream physician/verifier annotations and keeps its biomedical task separate.
## Source integrity and rights
Every admitted article has an explicit main-article CC BY or CC0 license checked in its original JATS XML. Versions and text/XML SHA-256 hashes are retained. Paper IDs, original paragraph IDs, Unicode code-point offsets, section hierarchy, bibliography, citation pointers and exact source quotations connect each packet to the original. PDF page numbers are null because XML does not establish a reliable PDF page mapping.
Figure/table content, supplements, third-party reproduced material in excluded XML containers and copyright boilerplate are excluded. A table reference is a pointer to consult at the source, not permission to redistribute that table. Original XML is fetched by exact hash for reproduction and is not bundled, because it may contain additional third-party material. Each source keeps its own license and attribution; this dataset does not replace those rights with a blanket license. See [LICENSE](LICENSE), [SCHEMA.md](SCHEMA.md), and `sources/raw_xml_fetch_receipts.json`.
The original `papers.text` assembly is retained so source offsets stay valid. `paragraphs` is an admitted subset; joining that subset does not reconstruct `papers.text`. A claim's own paragraph and punctuation/whitespace-normalized repetitions of the entire claim are excluded from supporting-context candidates. This blocks obvious self-matches without pretending lexical matches establish entailment.
## Selection and known gaps
The source collection uses the [DOXA research Atlas](https://huggingface.co/datasets/Giuliocc/doxa-research-atlas), with public political/bias/public-policy and research-methodology queries, main-article permission checks and deterministic source selection. Actual source slices are `{dict(topics)}`; source-language metadata is `{dict(languages)}`. The collection is English-dominated and open-access weighted; scientific-cue extraction uses English rules, so non-English extraction recall has not been validated. Europe PMC overrepresents psychology, health-related policy and computational social science. This is not a representative sample of all political positions, countries, genres or academic traditions.
`source_role` is a frozen candidate source role for future annotation, not proof of a fresh labeled evaluation set. `prior_doxa_source` discloses overlap with the prior Atlas metadata. No model is trained from these unannotated claim/context matches. Political neutrality has not been certified: readers can audit consistent criteria, source coverage, provenance and failures, while political viewpoint/stance coverage and independent reviewed labels remain outstanding.
All {counts['quarantined_paragraph_positions']} occurrences in {counts['quarantined_cross_document_duplicate_groups']} normalized-exact cross-document paragraph groups are quarantined from admitted model units and every claim/context. Original source text remains immutable solely as an anchor archive with `whole_document_training_eligible=false`. Reserved development/test units are ineligible for unsupervised fitting. Source neighbors retain original indices, XML ordinal gaps and `originally_adjacent`; a missing paragraph is never silently relabeled as original adjacency. `prior_atlas_metadata` and `prior_atlas_fulltext` separately record earlier catalogue/text presence; neither establishes prior model use. See `duplicate_quarantine.json`, the source manifest and serialized integrity/validation receipts.
## Retrieval results, including failures
The frozen diagnostic uses **{results['query_count']} physician-verified prompts from {results['source_count']} new-to-recorded-DOXA, explicitly licensed biomedical papers**. All were upstream test papers, with prior Atlas PMCID/DOI/title and the entire previously available SciFact corpus title set excluded. It measures retrieval inside a known full paper, not open-world document discovery, political-bias detection, truth verification or medical advice. Base encoder pretraining exposure is unknown.
| Fixed method | Human span hit@5 | Complete verified rationale set@5 | MRR@50 | Misses@5 |
|---|---:|---:|---:|---:|
{metric_rows}
Dense MiniLM and plain RRF performed worse than BM25 at hit@5. A fixed slot-coverage reranker improved the hybrid candidate ordering; it relies on the upstream human-specified outcome/intervention/comparator fields, so this result cannot be transferred to arbitrary political claims. No cross-encoder or claim verifier was trained. The reranker still misses 44 of 197 queries at top5 and regresses on seven BM25 successes.
The reranker-minus-BM25 hit@5 difference is +9.14 percentage points (source-clustered bootstrap, unadjusted 95% interval +2.62 to +16.19 points). Other metrics and uncertainty are all retained in `evaluation/retrieval_results.json`; these intervals are not adjusted for multiple comparisons. A hit covers at least half one human rationale span. Complete-set recall requires at least 95% of every span in one verified annotator/label alternative. Human rationales are not exhaustive: unmarked passages are not automatically false evidence.
The preregistered fixed dense budget truncates {truncated}/{total_units} chunks at 256 tokens; this limitation is measured, not hidden. The search CLI separately supports complete overlapping token windows and returns the exact highest-ranking subspan; its political search examples are developer smoke checks, not new gold accuracy scores. Exploratory post-scoring strata report 112 queries requiring beyond-abstract evidence: hit@5 is 73.21% BM25 and 80.36% fixed rerank. See the complete protocol, source-exclusion/freeze manifests, upstream licenses/annotation process, every ranked prediction, error catalogue and first-scoring receipt under `evaluation/`.
**No political model or full-paper verifier is promoted by this release.** The missing dependency is fresh, independently reviewed, task-matched political full-paper claims with sufficient Methods/Results/limitations evidence and source-disjoint frozen evaluation. [ANNOTATION.md](ANNOTATION.md) provides the concrete review contract.
## Use the data
```python
from datasets import load_dataset
packets = load_dataset("Giuliocc/doxa-study-evidence", "claim_packets", split="corpus")
example = packets[0]
print(example["claim"])
print(example["claim_anchor"]["source_xpath"])
print(example["context_coverage"])
assert example["gold_label"] is None
```
For local search, download this public repository and install `tools/requirements.txt`:
```sh
python tools/study_search.py --data data/paragraphs/corpus.parquet \\
--query "observational political polarization, confounding and causal inference" \\
--method lexical --limit 5
```
Optional local Hugging Face MiniLM dense/hybrid search uses `tools/requirements-retrieval.txt`, the pinned Apache-2.0 base encoder, and no hosted inference. It processes complete paragraphs in overlapping 256-token windows, reports the exact matching subspan and caches local embeddings. This searches candidate evidence; it never returns a support verdict, political-bias probability or presumed author ideology.
Re-extract the frozen source prose and packets, checking exact original XML hashes:
```sh
python tools/build_study.py --input-articles sources/articles.jsonl.gz \\
--raw-xml-dir .cache/xml --fetch-missing-xml \\
--work reproduced/work --stage reproduced/stage
python tools/validate_study.py reproduced/stage
python tools/test_study.py
```
If upstream XML changed, reproduction rejects it rather than silently accepting a different source. Restore the **exact** human retrieval diagnostic locally, rechecking every original source hash, physician/verifier flag and rationale offset:
```sh
python tools/retrieval_benchmark.py restore --public-evaluation-dir evaluation \\
--work reproduced/retrieval/work --stage reproduced/retrieval/stage
python tools/retrieval_benchmark.py evaluate --model-path /path/to/pinned/minilm \\
--work reproduced/retrieval/work --stage reproduced/retrieval/stage
```
`restore` reconstructs the omitted private question/rationale text from pinned upstream files and verifies the original private-query file SHA-256; it does not select replacement sources. A separate automated audit independently recomputed all 788 method/query outcomes and all 21 source-cluster intervals, verified 339 original human rationale rows and checked source/prompt exclusions; its full receipt is `evaluation/independent_retrieval_audit.json`. This automated audit creates no new human labels. To register a new cohort, `prepare` requires the recorded prior-exposure DOXA source manifests in a DOXA source checkout. Collecting new sources or changing settings is a new experiment. No raw article, question or rationale text from the diagnostic is copied into its public index. The original encoder/vector computation took 192.10 seconds on one CPU thread, excluding downloads/model initialization; a later audit replay using cached corpus vectors took 5.74 seconds. These are retrieval diagnostics, not a complete browser PDF-workload latency claim.
Reproducing a source subset must also pass `--quarantine-manifest duplicate_quarantine.json` to `build_study.py`, because cross-document duplicates cannot be discovered from one paper alone. The full frozen release rediscovers the same quarantine from all 320 sources.
## Useful next model work
1. Collect independent political full-paper evidence annotations using the separate proposition/scope, support, numerical and causal fields; preserve disagreement.
2. Freeze article/source/event families and prior exposures before tuning. Retain supported political criticism and dissent as controls.
3. Train retrieval or verifier candidates only on eligible human truth; compare BM25, fixed dense, hybrid and task-specific rerankers on the same untouched references.
4. Measure evidence sufficiency, missing context, calibration, abstention, numeric/causal failure and complete long-document processing cost. Promote only a passing, task-matched candidate.
The current release supplies the source-preserving collection, native viewers, reference-review contract, working retrieval tools and measured failure baseline for that work. All computation and hosting preparation used **$0 new spend**.
## Citation and corrections
Cite the original paper authors and source-specific license for reused passages, plus TACITUS DOXA Study Evidence v0.2.0. For the human retrieval diagnostic, cite Lehman et al. (NAACL 2019), “Inferring Which Medical Treatments Work from Reports of Clinical Trials,” and DeYoung et al. (BioNLP 2020), “Evidence Inference 2.0: More Data, Better Models.” Original upstream annotation-process documentation and MIT notice are retained under `evaluation/`.
Corrections should identify the packet ID, original source version/hash and exact span, describe the problem and provide supporting evidence. Requested reviewer judgments must remain distinguishable from extracted or machine-proposed context. Do not use this corpus to classify an author's beliefs, infer protected attributes, or automate consequential decisions about people.
'''
(STAGE / "README.md").write_text(card, encoding="utf-8")
(STAGE / "LICENSE").write_text('''Source-specific rights apply.
Licensed article prose remains under each original article's explicit CC BY
(specific version recorded per paper) or CC0 license. Preserve original author/title,
source URL, source version and license attribution when reusing text. DOXA
extracts exact prose and adds source anchors and deterministic candidate fields;
these additions do not independently verify the source's assertions.
TACITUS/DOXA-authored metadata, schema and review-prompt contributions are
released under CC BY 4.0: https://creativecommons.org/licenses/by/4.0/.
Original research data, figure/table contents and third-party material are not
relicensed by the article license or by this dataset. Excluded material and raw
XML are not included. A source pointer does not grant reuse rights.
The retrieval diagnostic index preserves Evidence Inference factual annotation
IDs, labels and offsets. The upstream repository's MIT notice is copied in
evaluation/upstream_LICENSE; source article rights remain separate.
Diagnostic article/question/rationale text is not redistributed in that index.
Original DOXA tools in tools/ are under the MIT License:
Copyright (c) 2026 TACITUS / Giulio Catanzariti
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
''', encoding="utf-8")
(STAGE / "queries.sql").write_text('''-- DuckDB with httpfs; pin a release commit in the hf:// URI for frozen work.
SELECT id, title, claim, gold_label, context_coverage
FROM read_parquet('hf://datasets/Giuliocc/doxa-study-evidence/data/claim_packets/corpus.parquet')
WHERE len(numeric_mentions) > 0 LIMIT 20;
SELECT kind, count(*) AS review_questions
FROM read_parquet('hf://datasets/Giuliocc/doxa-study-evidence/data/review_prompts/corpus.parquet')
GROUP BY kind;
SELECT pmcid, title, license.identifier, source_xml_sha256
FROM read_parquet('hf://datasets/Giuliocc/doxa-study-evidence/data/papers/corpus.parquet')
ORDER BY pmcid LIMIT 20;
''', encoding="utf-8")
report = f'''# Academic evidence release report
Local staged release: {counts['papers']} explicitly licensed papers, {counts['paragraphs']} paragraphs, {counts['claim_packets']} distinct claim/context packets and {len(challenges)} rule-authored review questions. Collection target of approximately 300 papers / at least 5,000 packets: **{'met' if counts['targets_met'] else 'not yet met'}**. No completed political human reviews; no supervised/gold-eligible political packets; no trained political verifier promoted. Zero new spend.
The frozen human retrieval diagnostic contains {results['query_count']} prompts from {results['source_count']} papers, with all four methods and all failures retained. BM25 hit@5 68.53%, MiniLM 56.35%, RRF 65.48%, fixed slot reranker 77.66%. The latter requires supplied human outcome/intervention/comparator slots and remains a biomedical retrieval diagnostic. Dense truncation affects {truncated}/{total_units} chunks. The political search smoke uses complete overlapping token windows and exact source spans; it is not an accuracy reference.
Sources, rights, exact spans, candidate self-copy exclusions, annotation provenance and serialized integrity are checked. Independent release quality review is owned separately under expansion_release/quality. Publication is owned by the parent release process. Expected repository: https://huggingface.co/datasets/Giuliocc/doxa-study-evidence . This local report does not claim the URL has been published or verified.
Public files are exclusively under stage/ and its exact publication_manifest.json. Private upstream source caches, raw XML, query/rationale quotations from the biomedical diagnostic, model cache, virtual environments and work logs are excluded. Frozen licensed prose input, rights/source receipts, native Parquet viewers, original tools, protocol/results/failures and annotation instructions are included.
'''
(HERE / "RELEASE_REPORT.md").write_text(report, encoding="utf-8")
(STAGE / "RELEASE_REPORT.md").write_text(report, encoding="utf-8")
allowed = {
"README.md", "LICENSE", "RELEASE_REPORT.md", "SCHEMA.md", "ANNOTATION.md", "counts.json", "exclusions.json",
"schema.json", "summary_statistics.json", "queries.sql", "integrity_report.json", "source_split_manifest.json", "duplicate_quarantine.json", "validation_receipts.json",
"sources/articles.jsonl.gz", "sources/raw_xml_fetch_receipts.json",
"examples/search_example_lexical.json", "examples/search_example_hybrid.json",
*("data/" + name + "/corpus.parquet" for name in schema["tables"]),
*("tools/" + name for name in ("build_study.py", "retrieval_benchmark.py", "analyze_retrieval.py", "study_search.py", "validate_study.py", "test_study.py", "finalize_release.py", "requirements.txt", "requirements-retrieval.txt")),
*("evaluation/" + name for name in ("retrieval_protocol.json", "retrieval_reference_index.json", "retrieval_frozen_manifest.json", "retrieval_source_exclusions.json", "retrieval_results.json", "retrieval_results_first.json", "retrieval_predictions.json", "retrieval_error_analysis.json", "retrieval_failures.json", "first_scoring_receipt.json", "independent_retrieval_audit.json", "upstream_LICENSE", "upstream_README.annotation_process.md", "upstream_annotations_README.md")),
}
actual = {str(path.relative_to(STAGE)) for path in STAGE.rglob("*") if path.is_file() and path.name != "publication_manifest.json"}
assert actual == allowed, {"unexpected": sorted(actual - allowed), "missing": sorted(allowed - actual)}
manifest = [{"path": name, "sha256": sha256((STAGE / name).read_bytes()).hexdigest(), "bytes": (STAGE / name).stat().st_size}
for name in sorted(allowed)]
dump(STAGE / "publication_manifest.json", {"repository": "Giuliocc/doxa-study-evidence", "repository_type": "dataset",
"visibility": "public", "publish_authorization_owner": "parent_release_process",
"files": manifest, "total_bytes": sum(x["bytes"] for x in manifest),
"excluded": ["work/", "cache/", "raw XML", "upstream biomedical question/rationale/article text", "model weights", "credentials"]})
print(json.dumps({"papers": counts['papers'], "packets": counts['claim_packets'], "review_prompts": len(challenges),
"public_files": len(manifest), "public_bytes": sum(x["bytes"] for x in manifest)}, indent=2))
if __name__ == "__main__":
main()