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

Adjust .compat.pyam for 1.7 #78

Merged
merged 8 commits into from
Jan 31, 2023
Merged

Adjust .compat.pyam for 1.7 #78

merged 8 commits into from
Jan 31, 2023

Conversation

khaeru
Copy link
Owner

@khaeru khaeru commented Jan 30, 2023

IAMconsortium/pyam#708 / pyam 1.7.0 changed the behaviour of IamDataFrame.to_excel() by passing extra keyword arguments to pandas.ExcelWriter(), where previously they were discarded.

This broke pyam.computations.write_report(), which used merge_cells=True per the pandas documentation. This argument is not accepted by xlsxwriter, which is forced by pyam.

This PR adjusts.

Also:

  • Adjust for mypy no_implicit_optional.
  • Adjust invocation of dask.visualize(): pass the Computer instance itself as an argument and provide the __dask_graph__ and __dask_keys__ dunder methods.

PR checklist

  • Checks all ✅
  • Update documentation N/A
  • Update doc/whatsnew.rst

@khaeru khaeru self-assigned this Jan 30, 2023
@codecov-commenter
Copy link

codecov-commenter commented Jan 30, 2023

Codecov Report

Merging #78 (aa016d1) into main (37f78e1) will not change coverage.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##              main       #78   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           39        39           
  Lines         2964      2968    +4     
=========================================
+ Hits          2964      2968    +4     
Impacted Files Coverage Δ
genno/compat/pyam/computations.py 100.00% <100.00%> (ø)
genno/computations.py 100.00% <100.00%> (ø)
genno/config.py 100.00% <100.00%> (ø)
genno/core/attrseries.py 100.00% <100.00%> (ø)
genno/core/computer.py 100.00% <100.00%> (ø)
genno/core/quantity.py 100.00% <100.00%> (ø)
genno/core/sparsedataarray.py 100.00% <100.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@khaeru khaeru merged commit d73282e into main Jan 31, 2023
@khaeru khaeru deleted the compat/pyam-1.7 branch January 31, 2023 15:29
@khaeru khaeru mentioned this pull request Jan 31, 2023
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.

2 participants