pypsa-meets-earth/pypsa-earth
View on GitHubExecution of prepare_gas_network not regulated by __main__
Open
#1,655 opened on Mar 6, 2024
good first issuepypsa-earth-sec transfer
Repository metrics
- Stars
- (351 stars)
- PR merge metrics
- (PR metrics pending)
Description
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