pypsa-meets-earth/pypsa-earth
Execution of prepare_gas_network not regulated by __main__
Aperta
#1655 aperta il 6 mar 2024
good first issuepypsa-earth-sec transfer
Metriche repository
- Star
- (351 stelle)
- Metriche merge PR
- (Merge medio 28g 15h) (35 PR mergiate in 30 g)
Descrizione
Describe the feature you'd like to see
The execution of the script of prepare_gas_network does not occur using the typical main, but it is executed at import. Usually we desire something like:
if __name__ == "__main__":
call_func_do_stuff()
but in our case it is a mix:
if __name__ == "__main__":
something()
call_func_do_lots_of_stuff()
That can be difficult to maintain