Skip to content

Commit

Permalink
Update expected figures to use matplotlib 3.5 (#590)
Browse files Browse the repository at this point in the history
* Change to `pytest` instead of `py.test`

* Silence a warning

* Update test images to use matplotlib 3.5

* Add to release notes

* Set "older" matplotlib version in dependency-tests to current version
  • Loading branch information
danielhuppmann authored Nov 24, 2021
1 parent 20df347 commit 732752c
Show file tree
Hide file tree
Showing 9 changed files with 8 additions and 6 deletions.
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")

# 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.

0 comments on commit 732752c

Please sign in to comment.