Paper Contributions#
Source: examples/catalog/paper_contributions.py
Introduction#
Select a packaged ideation problem and carry its exact prompt lineage and curated sources into the shared paper-contribution contract.
Technical Implementation#
Load writing support by stable problem ID.
Verify that every contribution citation resolves to an exported reference.
Print contribution and reporting-gap identifiers for downstream inspection.
1from __future__ import annotations
2
3import design_research_problems as drp
4
5
6def main() -> None:
7 """Collect and inspect one Experiments-compatible component packet."""
8 packet = drp.collect_problem_paper_contributions("ideation_peanut_shelling")
9 assert packet["schema_version"] == drp.PAPER_CONTRIBUTION_VERSION
10 reference_keys = {reference["key"] for reference in packet["references"]}
11 assert all(set(contribution["citation_keys"]) <= reference_keys for contribution in packet["contributions"])
12
13 print("Paper contribution contract:", drp.PAPER_CONTRIBUTION_VERSION)
14 print("Problem:", packet["source"]["component_id"])
15 print("References:", len(packet["references"]))
16 print(
17 "Contributions:",
18 ", ".join(item["contribution_id"] for item in packet["contributions"]),
19 )
20 print(
21 "Reporting gaps:",
22 ", ".join(item["gap_id"] for item in packet["reporting_gaps"]),
23 )
24
25
26if __name__ == "__main__":
27 main()
Expected Results#
Run Command
PYTHONPATH=src python examples/catalog/paper_contributions.py
Prints contract version 0.1.0, three peanut-shelling references, Background and Methods contributions, and a visible gap for the provisional source record.
References#
docs/paper_contributions.rst