Split sector_input_files into one input function per sector

Aperta
#902 0 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 2 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
42/100
Tipo di issue
Refactoring
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
markdown, python
Ambito
build-system

Direzione di ricerca

The target is sector_input_files in workflow/rules/build_sector.smk, which holds one if block per sector and is linked in the issue. Read it to see which files each sector uses, and check which files appear in more than one sector, such as the EIA state-to-state pipeline capacity. Done means each sector has its own input function, the shared files are listed once, and the workflow still resolves the same inputs for each sector wildcard. Check with the maintainers first, since the issue relates to #879 and #458.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement good first issue Sector
Feature Request

sector_input_files gathers the inputs of all sectors in one function, with an if block per sector. It's still easy to read, but #879 adds a block for hydrogen, and splitting G into finer sectors (#458) would add more. As it grows, it gets harder to see which sector needs which file.

Suggested Solution

Give each sector a small input function (gas_sector_inputs, hydrogen_sector_inputs, ...) and have sector_input_files merge the ones whose sector is in the wildcard. Files used by more than one sector, like the EIA state-to-state pipeline capacity (gas and hydrogen), would go in a shared part so they are listed once.

Additional Info

From the review of #879: https://github.com/PyPSA/pypsa-usa/pull/879#discussion_r4511851113

Related: #458

Lingua principale
Python
Stelle
154
Fork
58
Merge medio
3g 9h
PR unite (30g)
51

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di PyPSA/pypsa-usa

Tutte le issue di PyPSA/pypsa-usa

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.