Allow the retrieval of cost data from forks of technology-data

This commit is contained in:
Koen van Greevenbroek 2024-03-18 10:00:42 +01:00
parent f6f18e1868
commit ce549cd949

View File

@ -25,9 +25,10 @@ if __name__ == "__main__":
set_scenario_config(snakemake)
version = snakemake.params.version
baseurl = (
f"https://raw.githubusercontent.com/PyPSA/technology-data/{version}/outputs/"
)
if "/" in version:
baseurl = f"https://raw.githubusercontent.com/{version}/outputs"
else:
baseurl = f"https://raw.githubusercontent.com/PyPSA/technology-data/{version}/outputs/"
filepath = Path(snakemake.output[0])
url = baseurl + filepath.name