-
Notifications
You must be signed in to change notification settings - Fork 204
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Move PyPSA dependency back to the main repository #538
Move PyPSA dependency back to the main repository #538
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome Katia! :D
Rather than installing with pip, can we do it with conda?
Could you change that for pypsa and powerplantmatching as well?
Thanks :)
Agree that it would be better to use conda everywhere. Have tested environment versions where both or one of Such change for For @davide-f would be very grateful for your suggestions on how to handle this environment zoo properly :) An environment-related INFO:snakemake.logging:[Sun Dec 18 17:49:17 2022]
rule build_powerplants:
input: networks/base.nc, configs/powerplantmatching_config.yaml, data/custom_powerplants.csv, resources/osm/clean/africa_all_generators.csv, resources/shapes/gadm_shapes.geojson
output: resources/powerplants.csv, resources/powerplants_osm2pm.csv
log: logs/build_powerplants.log
jobid: 13
reason: Missing output files: resources/powerplants.csv; Input files updated by another job: resources/shapes/gadm_shapes.geojson, resources/osm/clean/africa_all_generators.csv, networks/base.nc
resources: tmpdir=/var/folders/qn/vpndfm21795ckkq89np1ckp40000gn/T, mem_mb=500, mem_mib=477
INFO:snakemake.logging:rule build_powerplants:
input: networks/base.nc, configs/powerplantmatching_config.yaml, data/custom_powerplants.csv, resources/osm/clean/africa_all_generators.csv, resources/shapes/gadm_shapes.geojson
output: resources/powerplants.csv, resources/powerplants_osm2pm.csv
log: logs/build_powerplants.log
jobid: 13
reason: Missing output files: resources/powerplants.csv; Input files updated by another job: resources/shapes/gadm_shapes.geojson, resources/osm/clean/africa_all_generators.csv, networks/base.nc
resources: tmpdir=/var/folders/qn/vpndfm21795ckkq89np1ckp40000gn/T, mem_mb=500, mem_mib=477
INFO:snakemake.logging:
This is the repository path: ~/pypsa-earth
Had to go 0 folder(s) up.
INFO:pypsa.io:Imported network base.nc has buses, lines, transformers
INFO:powerplantmatching.collection:Create combined dataset for BEYONDCOAL, ENTSOE, GEO, GPD, JRC, OPSD, WIKIPEDIA
/Users/ekaterina/opt/miniconda3/envs/pypsa-earth_test3/lib/python3.10/site-packages/powerplantmatching/cleaning.py:170: FutureWarning: In a future version of pandas all arguments of DataFrame.any and Series.any will be keyword-only.
where = df.astype(str).apply(func).any(1)
/Users/ekaterina/opt/miniconda3/envs/pypsa-earth_test3/lib/python3.10/site-packages/powerplantmatching/cleaning.py:170: FutureWarning: In a future version of pandas all arguments of DataFrame.any and Series.any will be keyword-only.
where = df.astype(str).apply(func).any(1)
/Users/ekaterina/opt/miniconda3/envs/pypsa-earth_test3/lib/python3.10/site-packages/powerplantmatching/cleaning.py:170: FutureWarning: In a future version of pandas all arguments of DataFrame.any and Series.any will be keyword-only.
where = df.astype(str).apply(func).any(1)
/Users/ekaterina/opt/miniconda3/envs/pypsa-earth_test3/lib/python3.10/site-packages/powerplantmatching/cleaning.py:170: FutureWarning: In a future version of pandas all arguments of DataFrame.any and Series.any will be keyword-only.
where = df.astype(str).apply(func).any(1)
INFO:powerplantmatching.cleaning:Aggregating blocks in data source 'ENTSOE'.
/Users/ekaterina/opt/miniconda3/envs/pypsa-earth_test3/lib/python3.10/site-packages/powerplantmatching/cleaning.py:170: FutureWarning: In a future version of pandas all arguments of DataFrame.any and Series.any will be keyword-only.
where = df.astype(str).apply(func).any(1)
/Users/ekaterina/opt/miniconda3/envs/pypsa-earth_test3/lib/python3.10/site-packages/powerplantmatching/cleaning.py:170: FutureWarning: In a future version of pandas all arguments of DataFrame.any and Series.any will be keyword-only.
where = df.astype(str).apply(func).any(1)
/Users/ekaterina/opt/miniconda3/envs/pypsa-earth_test3/lib/python3.10/site-packages/powerplantmatching/cleaning.py:170: FutureWarning: In a future version of pandas all arguments of DataFrame.any and Series.any will be keyword-only.
where = df.astype(str).apply(func).any(1)
/Users/ekaterina/opt/miniconda3/envs/pypsa-earth_test3/lib/python3.10/site-packages/powerplantmatching/cleaning.py:170: FutureWarning: In a future version of pandas all arguments of DataFrame.any and Series.any will be keyword-only.
where = df.astype(str).apply(func).any(1)
INFO:powerplantmatching.cleaning:Aggregating blocks in data source 'GEO'.
/Users/ekaterina/opt/miniconda3/envs/pypsa-earth_test3/lib/python3.10/site-packages/powerplantmatching/cleaning.py:170: FutureWarning: In a future version of pandas all arguments of DataFrame.any and Series.any will be keyword-only.
where = df.astype(str).apply(func).any(1)
/Users/ekaterina/opt/miniconda3/envs/pypsa-earth_test3/lib/python3.10/site-packages/powerplantmatching/cleaning.py:170: FutureWarning: In a future version of pandas all arguments of DataFrame.any and Series.any will be keyword-only.
where = df.astype(str).apply(func).any(1)
/Users/ekaterina/opt/miniconda3/envs/pypsa-earth_test3/lib/python3.10/site-packages/powerplantmatching/cleaning.py:170: FutureWarning: In a future version of pandas all arguments of DataFrame.any and Series.any will be keyword-only.
where = df.astype(str).apply(func).any(1)
/Users/ekaterina/opt/miniconda3/envs/pypsa-earth_test3/lib/python3.10/site-packages/powerplantmatching/cleaning.py:170: FutureWarning: In a future version of pandas all arguments of DataFrame.any and Series.any will be keyword-only.
where = df.astype(str).apply(func).any(1)
INFO:powerplantmatching.cleaning:Aggregating blocks in data source 'GPD'.
INFO:powerplantmatching.cleaning:Aggregating blocks in data source 'JRC'.
/Users/ekaterina/opt/miniconda3/envs/pypsa-earth_test3/lib/python3.10/site-packages/powerplantmatching/cleaning.py:170: FutureWarning: In a future version of pandas all arguments of DataFrame.any and Series.any will be keyword-only.
where = df.astype(str).apply(func).any(1)
/Users/ekaterina/opt/miniconda3/envs/pypsa-earth_test3/lib/python3.10/site-packages/powerplantmatching/cleaning.py:170: FutureWarning: In a future version of pandas all arguments of DataFrame.any and Series.any will be keyword-only.
where = df.astype(str).apply(func).any(1)
/Users/ekaterina/opt/miniconda3/envs/pypsa-earth_test3/lib/python3.10/site-packages/powerplantmatching/cleaning.py:170: FutureWarning: In a future version of pandas all arguments of DataFrame.any and Series.any will be keyword-only.
where = df.astype(str).apply(func).any(1)
INFO:powerplantmatching.cleaning:Aggregating blocks in data source 'OPSD'.
INFO:powerplantmatching.cleaning:Aggregating blocks in data source 'WIKIPEDIA'.
INFO:powerplantmatching.matching:Comparing data sources `BEYONDCOAL` and `ENTSOE`
Traceback (most recent call last):
File "~/pypsa-earth/.snakemake/scripts/tmpkaxp6jw7.build_powerplants.py", line 280, in <module>
pm.powerplants(from_url=False, update=True, config_update=config)
File "/Users/ekaterina/opt/miniconda3/envs/pypsa-earth_test3/lib/python3.10/site-packages/powerplantmatching/collection.py", line 218, in matched_data
matched = collect(matching_sources, config=config, **collection_kwargs)
File "/Users/ekaterina/opt/miniconda3/envs/pypsa-earth_test3/lib/python3.10/site-packages/powerplantmatching/collection.py", line 97, in collect
matched = combine_multiple_datasets(dfs, datasets, config=config, **dukeargs)
File "/Users/ekaterina/opt/miniconda3/envs/pypsa-earth_test3/lib/python3.10/site-packages/powerplantmatching/matching.py", line 255, in combine_multiple_datasets
crossmatches = link_multiple_datasets(datasets, labels, config=config, **dukeargs)
File "/Users/ekaterina/opt/miniconda3/envs/pypsa-earth_test3/lib/python3.10/site-packages/powerplantmatching/matching.py", line 203, in link_multiple_datasets
all_matches = parmap(comp_dfs, mapargs)
File "/Users/ekaterina/opt/miniconda3/envs/pypsa-earth_test3/lib/python3.10/site-packages/powerplantmatching/utils.py", line 378, in parmap
return list(map(f, arg_list))
File "/Users/ekaterina/opt/miniconda3/envs/pypsa-earth_test3/lib/python3.10/site-packages/powerplantmatching/matching.py", line 200, in comp_dfs
return compare_two_datasets(dfs_lbs[:2], dfs_lbs[2:], config=config, **dukeargs)
File "/Users/ekaterina/opt/miniconda3/envs/pypsa-earth_test3/lib/python3.10/site-packages/powerplantmatching/matching.py", line 105, in compare_two_datasets
links = pd.concat([country_link(dfs, c) for c in countries])
File "/Users/ekaterina/opt/miniconda3/envs/pypsa-earth_test3/lib/python3.10/site-packages/powerplantmatching/matching.py", line 105, in <listcomp>
links = pd.concat([country_link(dfs, c) for c in countries])
File "/Users/ekaterina/opt/miniconda3/envs/pypsa-earth_test3/lib/python3.10/site-packages/powerplantmatching/matching.py", line 97, in country_link
return duke(
TypeError: duke() got an unexpected keyword argument 'config_update'
[Sun Dec 18 17:51:34 2022]
INFO:snakemake.logging:[Sun Dec 18 17:51:34 2022]
Error in rule build_powerplants:
jobid: 13
input: networks/base.nc, configs/powerplantmatching_config.yaml, data/custom_powerplants.csv, resources/osm/clean/africa_all_generators.csv, resources/shapes/gadm_shapes.geojson
output: resources/powerplants.csv, resources/powerplants_osm2pm.csv
log: logs/build_powerplants.log (check log file(s) for error details)
ERROR:snakemake.logging:Error in rule build_powerplants:
jobid: 13
input: networks/base.nc, configs/powerplantmatching_config.yaml, data/custom_powerplants.csv, resources/osm/clean/africa_all_generators.csv, resources/shapes/gadm_shapes.geojson
output: resources/powerplants.csv, resources/powerplants_osm2pm.csv
log: logs/build_powerplants.log (check log file(s) for error details)
RuleException:
CalledProcessError in file ~/pypsa-earth/Snakefile, line 348:
Command 'set -euo pipefail; /Users/ekaterina/opt/miniconda3/envs/pypsa-earth_test3/bin/python3.10 ~/pypsa-earth/.snakemake/scripts/tmpkaxp6jw7.build_powerplants.py' returned non-zero exit status 1.
File "~/pypsa-earth/Snakefile", line 348, in __rule_build_powerplants
File "/Users/ekaterina/opt/miniconda3/envs/pypsa-earth_test3/lib/python3.10/concurrent/futures/thread.py", line 58, in run
ERROR:snakemake.logging:RuleException:
CalledProcessError in file ~/pypsa-earth/Snakefile, line 348:
Command 'set -euo pipefail; /Users/ekaterina/opt/miniconda3/envs/pypsa-earth_test3/bin/python3.10 ~/pypsa-earth/.snakemake/scripts/tmpkaxp6jw7.build_powerplants.py' returned non-zero exit status 1.
File "~/pypsa-earth/Snakefile", line 348, in __rule_build_powerplants
File "/Users/ekaterina/opt/miniconda3/envs/pypsa-earth_test3/lib/python3.10/concurrent/futures/thread.py", line 58, in run
Removing output files of failed job build_powerplants since they might be corrupted:
resources/powerplants_osm2pm.csv
WARNING:snakemake.logging:Removing output files of failed job build_powerplants since they might be corrupted:
resources/powerplants_osm2pm.csv
Shutting down, this might take some time.
WARNING:snakemake.logging:Shutting down, this might take some time.
Exiting because a job execution failed. Look above for error message
ERROR:snakemake.logging:Exiting because a job execution failed. Look above for error message
Complete log: .snakemake/log/2022-12-18T174640.981617.snakemake.log
WARNING:snakemake.logging:Complete log: .snakemake/log/2022-12-18T174640.981617.snakemake.log |
I think we need to add version constraints for pypsa and ppl to the latest versions. Have you tried that? |
Thank you! Have played a bit with versions constraints. Adding a version constrain on PyPSA works perfectly. As for ppm, specifying |
The problem is that the latest updates of ppl that were in our fork have been merged into main but no ppl release includes them. |
hey @davide-f, I am on it. Expect it to be on pip today, conda latest tomorrow. |
Thank you very much! Fantastic :D |
Good to hear that I am not the only one experiencing this issue. It's actually the same as described in this merged Atlite PR. I am not sure yet what is happening |
TheCI for Linux is now passing. |
Building environment from scratch using the updated specification has fixed the issue with I had a hope it could also resolve #537 but that is not the case yet :) |
Changes proposed in this Pull Request
After merging PyPSA/PyPSA#517 we may git rid on the fork dependency
Checklist
envs/environment.yaml
andenvs/environment.docs.yaml
.config.default.yaml
andconfig.tutorial.yaml
.test/
(note tests are changing the config.tutorial.yaml)doc/configtables/*.csv
and line references are adjusted indoc/configuration.rst
anddoc/tutorial.rst
.doc/release_notes.rst
is amended in the format of previous release notes, including reference to the requested PR.