Silent data mutation, missing provenance in the compile pipeline and DEA URL (404)
まだ誰も着手していません。
評価
- 難易度
- 5/5
- 見積もり時間
- 1週間以上
- 初心者へのやさしさ
- 25/100
- issue の種類
- バグ
- 明瞭さ
- 説明が足りない
- 活発さ
- 静か
- 技術スタック
- python
調査の方向性
scripts/retrieve_data_from_dea.py から始め、python scripts/retrieve_data_from_dea.py を実行して 404 を再現します。次に compile_cost_assumptions.py と、名前が挙げられているパイプライン関数を調べます。snakemake -call --forceall を使って、より広範な問題を確認します。これらの調査結果を焦点を絞った変更に落とし込み、検証、来歴、手動入力の動作をテストまたは監査可能な実行レポートでカバーできれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Checklist
Describe the Bug
Findings from a first-pass review of technology-data v0.15.0, as discussed with @euronion. Listing them together for triage; happy to split into separate focused issues.
1. No validation of output parameters
docs/parameter.csv lists 11 core parameters; the output contains 59. Nothing validates output parameters against a known list, so new or misspelled parameters pass through silently.
2. Hardcoded metadata in compile_cost_assumptions.py
The script holds 6+ hardcoded dicts (dea_sheet_names, uncrtnty_lookup, cost_year_2020, cost_year_2019, source_dict, per-tech usecols). Proposal: move them to a config file, compare against the data at runtime, and report new/missing entries at the end of the run. Same pattern applies to parameters, technologies and units.
3. Imputation is not recorded
.fillna(0), .ffill(), .interpolate() and .mean() are applied silently — the output does not distinguish sourced values from imputed ones. Proposal: tag imputed values in further description or in a dedicated data_quality column.
4. retrieve_data_from_dea.py is broken
It points at the old DEA URL (404). DEA has restructured into 8 category pages under technology-catalogues. The script was never updated (the new URL appears in the v0.14.0 release notes, but data was only downloaded manually) and is not wired into Snakemake.
5. manual_input.csv entries are silently overwritten
add_manual_input uses combine_first so manual values beat DEA data, but later .loc assignments in add_co2_intensity(), add_solar_from_other() and the hardcoded biomass fuel values overwrite manual_input entries unconditionally. These legacy functions predate the manual_input mechanism. Proposal: end the pipeline after data collection + manual input.
6. No per-run data provenance report
Items 1–5 are the same underlying problem: the pipeline mutates data silently. A per-run report covering source coverage, imputations, overrides, unknown parameters and data freshness would make all of it auditable. Combined with dataset versioning, this would let a user reconstruct where any value came from.
Minimal example
Item 4 reproduces on its own:
python scripts/retrieve_data_from_dea.py
The remaining items are observable in the output of a full pipeline run:
snakemake -call --forceall
Error Message
retrieve_data_from_dea.py — the configured DEA URL returns HTTP 404:
None
- 主要言語
- Python
- スター
- 130
- フォーク
- 59
- PR マージ指標
- 30日以内にマージされた PR はありません
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
PyPSA/technology-data のほかの issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
PyPSA/technology-data#271 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
PyPSA/technology-data#284 ·
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
PyPSA/technology-data#283 ·
-
feature
難易度 4/5 3〜5日 初心者へのやさしさ 38/100
PyPSA/technology-data#282 · コメント 4 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 48/100
PyPSA/technology-data#276 · コメント 1 件 ·
PyPSA/technology-data の issue をすべて見る
似ている issue
-
bug ci good first issue
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 76/100
-
documentation
難易度 2/5 半日 初心者へのやさしさ 62/100
inmanta/inmanta-core#10835 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 92/100
-
sponsored
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100