← Tasks
CAMIR XML Serializer (US Air Cargo)
completedcode_genP2
Description
Build declaration_engine/camir_xml.py — US air cargo manifest in CAMIR XML format. Specs INGESTED and searchable (see global_specs_inventory_v1: US_CBP.specs includes "CAMIR ocean XML" and "MMM XML"). Architecture: mirror abi_7501.py pattern — RosettaInput list → CAMIR XML document. Must handle: air waybill data, consignment details, HS codes, weight/pieces, shipper/consignee, routing (origin airport → US port). Use xml.etree.ElementTree for generation. Validate against CAMIR schema. Output: CAMIRManifest dataclass + to_xml() method. Tests with sample air shipment data.
Assignee
-
Claimed By
Terminal Lu
Created
2d ago
Completed
1d ago
Quality
Overall
90%
Pass
PASS
Graded By
-
Graded At
-
Cost
Input Tokens
-
Output Tokens
-
Est. USD
-
Result
{
"code": "CAMIR XML Serializer — 2 files created:\n\n1. declaration_engine/camir_xml.py:\n - CAMIRParty, CAMIRCargo, CAMIRRouting, CAMIRAirWaybill, CAMIRManifest dataclasses\n - CAMIRManifest.validate() — checks all required fields (shipper, consignee, AWB, routing, cargo)\n - CAMIRManifest.to_xml() — Full CAMIR XML serialization with xml.etree.ElementTree\n - XML structure: ManifestHeader, AirWaybill (MAWB/HAWB), Routing (flight, airports, dates),\n Shipper/Consignee/NotifyParty with Address, CargoDetails with CargoLine (HS, weight, pieces, hazmat)\n - build_camir_manifest() — Builder from flat inputs, auto-calculates totals\n - Auto kg→lbs conversion\n - Namespace: urn:cbp:camir:2.0\n\n2. tests/test_camir_xml.py — 25+ tests:\n - Manifest: creates valid, validate passes, missing shipper/consignee/AWB/routing/cargo errors\n - to_xml: generates XML, parseable, has header/AWB/routing/shipper/consignee/cargo, HS codes, raises on invalid\n - CAMIRCargo: auto lbs conversion, to_dict\n - CAMIRAirWaybill: auto lbs\n - build_camir_manifest: complete build, totals correct, XML roundtrip\n",
"content": "CAMIR XML Serializer — 2 files created:\n\n1. declaration_engine/camir_xml.py:\n - CAMIRParty, CAMIRCargo, CAMIRRouting, CAMIRAirWaybill, CAMIRManifest dataclasses\n - CAMIRManifest.validate() — checks all required fields (shipper, consignee, AWB, routing, cargo)\n - CAMIRManifest.to_xml() — Full CAMIR XML serialization with xml.etree.ElementTree\n - XML structure: ManifestHeader, AirWaybill (MAWB/HAWB), Routing (flight, airports, dates),\n Shipper/Consignee/NotifyParty with Address, CargoDetails with CargoLine (HS, weight, pieces, hazmat)\n - build_camir_manifest() — Builder from flat inputs, auto-calculates totals\n - Auto kg→lbs conversion\n - Namespace: urn:cbp:camir:2.0\n\n2. tests/test_camir_xml.py — 25+ tests:\n - Manifest: creates valid, validate passes, missing shipper/consignee/AWB/routing/cargo errors\n - to_xml: generates XML, parseable, has header/AWB/routing/shipper/consignee/cargo, HS codes, raises on invalid\n - CAMIRCargo: auto lbs conversion, to_dict\n - CAMIRAirWaybill: auto lbs\n - build_camir_manifest: complete build, totals correct, XML roundtrip\n"
}Audit Trail (3)
1d agotask_completedTerminal Lu
1d agotask_claimedTerminal Lu
2d agotask_createdvs_lu
Task ID: 085c1d07-18b8-47b8-baf4-5dd16569f96f