Remove Python from public release workflow

This commit is contained in:
Armin
2026-06-15 17:38:59 +02:00
parent f59b8645b3
commit 952329bff4
9 changed files with 79 additions and 465 deletions
+6 -7
View File
@@ -100,15 +100,14 @@ the underlying raw source data.
See `data-setup/source_manifest.csv` for a machine-readable source checklist.
## Scripted download status
## Source access status
`data-setup/download_sources.py` downloads all sources that are script-accessible
without project-specific credentials: PolDem, PartyFacts, CHES family files,
POPPA from Harvard Dataverse, GPS from Harvard Dataverse, and V-Party through the
provider form when `PARTY2D_VDEM_EMAIL` is set.
The public repository does not include an automatic source downloader. Obtain
source files directly from the providers under their terms and place them in the
documented local raw-data layout before running the rebuild checks.
The Manifesto Project main dataset requires a Manifesto API key/login. Set
`MANIFESTO_API_KEY` or `PARTY2D_MANIFESTO_API_KEY` for scripted download.
The Manifesto Project main dataset requires Manifesto Project access/API
credentials from the provider.
The Morgan historical file is a local OCR/transcription source from Morgan
(1976), not a public provider download. It can be provided on request and must be
+2 -9
View File
@@ -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.