Remove Python from public release workflow
This commit is contained in:
@@ -8,7 +8,7 @@ Electoral alliances and blocs are handled in one of two ways:
|
||||
1. **Decomposed via mean-constituent averaging** (N=123 mappings): Shared manifesto data feeds into individual constituent party estimates. The output contains the constituents, not the alliance.
|
||||
2. **Excluded with documented justification** (see "Excluded Alliance Labels" below): Alliance labels with no mappable constituents are dropped from the output.
|
||||
|
||||
A systematic audit of all output parties is provided by `scripts/audit_party_types.py`, which produces `scripts/party_type_audit.csv` classifying every party with evidence. Post-estimation verification in `02_post_estimation.jl` hard-fails if any union/alliance PF ID appears in the output.
|
||||
Post-estimation verification in `02_post_estimation.jl` hard-fails if any union/alliance PF ID appears in the output.
|
||||
|
||||
## Overview
|
||||
|
||||
@@ -339,7 +339,7 @@ These 15 parties have MARPOR entries under both individual (progtype=1/3) and bl
|
||||
|
||||
## Audit Methodology
|
||||
|
||||
The audit script `scripts/audit_party_types.py` systematically checks every party in the output CSV:
|
||||
The union-mapping audit checks every party in the output CSV:
|
||||
|
||||
1. **Union mapping check**: Verifies no `manifesto_pf_id` from `union_mapping.csv` appears in output (hard fail).
|
||||
2. **Constituent check**: Identifies parties that are `expert_pf_id` in the mapping (expected: these are individual constituents of unions).
|
||||
@@ -347,11 +347,4 @@ The audit script `scripts/audit_party_types.py` systematically checks every part
|
||||
4. **Name pattern check**: Scans PartyFacts names for alliance indicators (keywords: alliance, coalition, bloc, front, union, alianza, frente; characters: +, /, &).
|
||||
5. **Classification**: Each party gets one of: `individual_party`, `flagged_for_review`, `error_union_in_output`.
|
||||
|
||||
**To re-run after data updates:**
|
||||
```bash
|
||||
python3 scripts/audit_party_types.py
|
||||
```
|
||||
|
||||
Output: `scripts/party_type_audit.csv` with columns: `party_id`, `name`, `country`, `in_union_mapping_as_union`, `in_union_mapping_as_constituent`, `has_expert_data`, `name_flags`, `classification`, `evidence`.
|
||||
|
||||
**Post-estimation verification** (`02_post_estimation.jl`): After extracting estimates, loads all `manifesto_pf_id` values from `union_mapping.csv` and checks none appear in the output `party_id` column. If any do, the script errors with a hard fail.
|
||||
|
||||
Reference in New Issue
Block a user