Skip to content
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

FutureWarning #212

Merged
merged 4 commits into from
Apr 25, 2021
Merged

FutureWarning #212

merged 4 commits into from
Apr 25, 2021

Conversation

martacki
Copy link
Member

The following FutureWarning affects io.py and linopf.py:
Index.__or__ operating as a set operation is deprecated, in the future this will be a logical operation matching Series.__or__. Use index.union(other) instead & Index.__and__ operating as a set operation is deprecated, in the future this will be a logical operation matching Series.__and__. Use index.intersection(other) instead

As suggested, .union() instead of a logical or/ | and .intersection() instead od a logical and/& should avert the problem

If you find other scripts that print the same Warning, comment or include them into this PR? Thanks

@FabianHofmann
Copy link
Collaborator

looks good. Did you have a pytest run? there you see all the deprecation warnings.

@fneum
Copy link
Member

fneum commented Jan 19, 2021

Interesting. Here's the referring issue pandas-dev/pandas#36758. Do not merge yet, as there are many more cases of set operations on pd.Index objects in the code. Can you push them @eb5194? Also, we need to go through PyPSA-Eur and PyPSA-Eur-Sec. Dooh that will make the code verbose.......

@martacki
Copy link
Member Author

martacki commented Jan 20, 2021

Interesting. Here's the referring issue pandas-dev/pandas#36758. Do not merge yet, as there are many more cases of set operations on pd.Index objects in the code. Can you push them @eb5194? Also, we need to go through PyPSA-Eur and PyPSA-Eur-Sec. Dooh that will make the code verbose.......

I can, but it's hard to detect all of them. Suggestions on how I can find all of them?
I ran the pytests, but that only showed one more of this one. However, there are many other DeprecationWarnings. I could try to resolve those as well in the same PR.

@martacki martacki marked this pull request as draft January 20, 2021 06:27
@fneum fneum merged commit a8f36fb into PyPSA:master Apr 25, 2021
@fneum
Copy link
Member

fneum commented Apr 25, 2021

Thanks @martacki. Only found a couple more in the unit commitment section.

fneum added a commit that referenced this pull request Mar 20, 2022
* fix clustering of offwind-ac and offwind-dc in sites option

* add release nodes

* attach renewable assets by location (lat and lon) from OPSD register to network

* adapt default config to changes

* undo changes from a differen PR in cluster_network.py

* undo changes from a different PR, add release notes for this PR

* correct release notes

* add comments for relevant settings in add_electricity.py

* adjust configtable for electricity to OPSD renewable option and add estimate_renewable_capacities_from_capacitiy_stats

* reset cluster_network to HEAD

* add_electricity: Capacity is float

* config: add GB to OPSD_VRE_countries

* review and modify implementation

* update release notes

* Update envs/environment.yaml

Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>

Co-authored-by: martha.frysztacki <eb5194@iai-esm003.iai.kit.edu>
Co-authored-by: eb5194 <martha.frysztacki@kit.edu>
Co-authored-by: Fabian Neumann <fabian.neumann@outlook.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants