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

Update expected figures to use matplotlib 3.5 #590

Merged
merged 5 commits into from
Nov 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pytest-dependency.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Install specific out-dated version of dependencies
# Update the package requirements when changing minimum dependency versions
# Please also add a section "Dependency changes" to the release notes
run: pip install pandas==1.1.1 numpy==1.19.0 matplotlib==3.2.0 iam-units==2020.4.21 xlrd==2.0
run: pip install pandas==1.1.1 numpy==1.19.0 matplotlib==3.5.0 iam-units==2020.4.21 xlrd==2.0

- name: Install other dependencies and package
run: pip install -e .[tests,deploy,optional_plotting,optional_io_formats,tutorials]
Expand Down
4 changes: 3 additions & 1 deletion RELEASE_NOTES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Next release

- [#590](https://github.com/IAMconsortium/pyam/pull/590) Update expected figures of plotting tests to use matplotlib 3.5
- [#586](https://github.com/IAMconsortium/pyam/pull/586) Improve error reporting for non-numeric data in any value column

# Release v1.2.0

## Highlights
Expand All @@ -16,7 +19,6 @@ was added as a dependency.

## Individual updates

- [#586](https://github.com/IAMconsortium/pyam/pull/586) Improve error reporting for non-numeric data in any value column
- [#585](https://github.com/IAMconsortium/pyam/pull/585) Include revisions to the ORE manuscript source code following acceptance/publication
- [#583](https://github.com/IAMconsortium/pyam/pull/583) Add profiler module for performance benchmarking
- [#579](https://github.com/IAMconsortium/pyam/pull/579) Increase performance of IamDataFrame initialization
Expand Down
2 changes: 1 addition & 1 deletion install.bat
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

python setup.py install

py.test tests
pytest tests

pause
exit
2 changes: 1 addition & 1 deletion pyam/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ def stack(

def as_series(index, name):
_idx = [i[0] for i in index]
return pd.Series([0] * len(index), index=_idx, name=name)
return pd.Series([0] * len(index), index=_idx, name=name, dtype="int")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not clear why this is needed, can you let me know why?

Can this be sent through calling code? e.g., either with

  1. move this dtype up as a kwarg or
  2. add generic **kwargs which then passes through to this series call

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a function only used within this function (see just the following line) to select the rows where a timeseries crosses zero. Adding the dtype explicitly is done just to silence a warning in the log.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Gotcha - won't hold up. But I assume this will not work for non-integer times?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

facepalm reread, and realize no issue here. sorry!


# determine all time-indices where a timeseries crosses 0 and add to data
_rows = pd.concat(
Expand Down
4 changes: 2 additions & 2 deletions tests/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ to be the same version.
## Creating Baseline Images

```
py.test --mpl-generate-path=expected_figs test_plotting.py
pytest --mpl-generate-path=expected_figs test_plotting.py
```

## Running tests

```
py.test --mpl
pytest --mpl
```
Binary file modified tests/expected_figs/test_stackplot_negative.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.