-
Notifications
You must be signed in to change notification settings - Fork 119
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
scatter plotting tests fail for recent matplotlib version #281
Comments
* Update to build docs locally * Update install.rst * fix printing requirements in `install.rst` * add space (as suggested by @znicholls) * set `matplotlib` requirement as a quickfix for #281
The "quickfix" for this in 7d6b7ef / #280 broke message_ix builds. The last build for iiasa/message_ix#249, Travis build #1167, succeeded; but build #1180 failed just now on OS X with the following error caused by pyam:
Looking at the build log, this failure happens with matplotlib 3.0.2; the previous, successful build was using matplotlib 3.1.1. #280 was merged in between these two builds. I will add a workaround to message_ix by forcing matplotlib to again update to the latest after pyam downgrades it. IMHO, the actual fix should be to adjust pyam to work properly with the latest matplotlib; not to force any other software using pyam to run an outdated matplotlib. |
A few more thoughts about the failure mode here:
When the next release comes out, the workaround in point 5 will get reverted, so point 6/7 cease to happen, python.app will likely get pulled in for message_ix builds, and they may pass even with matplotlib 3.0.2. However, the suggested fix in my previous comment would still be preferred. |
Main changes: - Add message_ix.models module - Adjust tools.add_year for ixmp API changes - Add Scenario._backend, .years_active; delete .remove_solution - Delete Scenario.clone - Use Backend.ms_cat_set_elements - Use Backend.ms_* methods; remove Scenario._jobj shim - Re-add thin Scenario.clone() wrapper - Adjust docs cross-reference to ixmp - Convert Path to str in message_ix.cli - Provide firstmodelyear using Scenario.cat - Update RELEASE_NOTES - Coerce to int in Scenario.firstmodelyear - Remove Scenario._backend (now handled by ixmp) - Adjust add_par signature in testing.make_westeros - Compute years_active in Scenario, rather than using backend - Update documentation; remove parallel copy of ixmp API docs - Move CPLEX optfile code to MESSAGE class; adjust docs - Fix small docs typos - Further docs improvements; remove _init_scenario (no-op) - Proofread docs and comments - Update API docs per @gidden reivew - Further improve API docs Tidy CI files per ixmp: - Fix pip VCS URLs - Update Travis caching and env.sh - Update ci/requirements.txt - Add ci/appveyor-install.ps1 to echo ixmp - On AppVeyor, update pip using conda - On Travis, update pip using conda - Add numpy to explicit requirements - Add conda info to Travis for debugging - Travis: install dependencies using conda - Split requirements.txt - Give conda --yes - Add pip to testing conda env - Install conda-requirements into testing conda env - Install pip-requirements into testing conda environment - Update doc/requirements.txt - Add to conda-requirements - Move JPype, pint, plotnine from conda-req to pip-req - Return JPype to conda-req as JPype1 - Append conda-forge to default channels for JPype - Adjust coveragerc - Return CI to ixmp@master - Work around IAMconsortium/pyam#280 / IAMconsortium/pyam#281
The pyam requirement for an outdated (3.0.2) version of matplotlib is causing difficulties on my system, where another code requires the latest matplotlib. So I am forced to have two conda environments; one for any code using pyam and other one requiring latest matplotlib version. |
A possible quickfix for the build failures discussed by @khaeru could be to tell matplotlib to use a different backend (e.g. https://github.com/znicholls/silicone/blob/2e64d8a8a20b00ec545b280e7e3253feaa51761e/.github/workflows/test-pypi-install.yml#L23) |
Although I fully agree with this (but acknowledge that anything to do with plotting and plotting tests is super hard). |
With
matplotlib version 3.1.1
installed, some pyam plotting tests fail.More specifically,
test_scatter
,test_scatter_variables_with_meta_color
,test_scatter_with_lines
, andtest_scatter_meta
fail, because ofIndexError: list index our of range, pyam\plotting.py:605
when:
With
matplotlib version 3.0.2
all of the aforementioned tests pass.The text was updated successfully, but these errors were encountered: