Commit 2560977
Increase test coverage (#486)
* add keyword 'label' to degradation_timeseries_plot, enabling 'left' and 'center' labeling options.
* Update changelog, add pytests, update sphinx documentation
* fix flake8 grumbles
* update pytests to include axes limits
* fix flake8 grumbles
* add 'label' input option to `degradation_year_on_year`. Fixes #459
* add pytests and update changelog.
* flake8 grumbles
* Minor updates to setup.py (constrain scipy<1.16) and refactor degradation_test
* Custom fix for Pandas < 2.0.0 which can't average two columns of timestamps.
* flake8 grumbles
* keep TZ-aware timestamps. Update pytests to specifically test _avg_timestamp_old_Pandas
* flake8 grumbles
* try to UTC localize the pytest...
* Add .asfreq() to get pytests to agree
* switch to calendar.timegm to hopefully remove TZ issues..
* regardless of uncertainty_method, return calc_info{'YoY_values')
* update _right dt labels to correct _left labels in degradation_year_on_year
* update _avg_timestamp_old_Pandas to allow for numeric index instead of timestamp
* add left label option to degradation_year_on_year
* update degradation_year_on_year, index set to either left, center or right. Consistent with #394 - multi_yoy
* update return for default = none uncertainty option
* degradation_year_on_year - go back to single return when uncertainty_value = None to avoid breaking pytests.
* add multi-year aggregation of slopes in degradation_year_on_year
* add multi_yoy kwarg in degradation_year_on_year to toggle the multi-YoY function.
* update plotting for detailed=True, allow usage_of_points > 2
* flake8 grumbles
* update plotting detailed=True for (even) and (odd) number of points coloring
* To allow multi_yoy=True in plotting.degradation_timeseries_plot, resample.mean() the YoY_values.
* flake8 grumbles
* Add warning to degradation_timeseries_plot when multi_YoY=True
* update to warning message in plotting.degradation_timeseries_plot
* fix flake8 grumbles
* nbval fixes from qnguyen345-bare_except_error
* Add pandas 3.0 futurewarning handling
* Try again to solve pandas3.0 futurewarning
* attempt 3 to fix nbval
* Add infer_objects to remove futurewarning
* minor inline comment update
* update plotting tests to be relative value, update ordering of module import in plotting.py, per Copilot review.
* update inline comments and whatsnew docs
* Clean up inline comments per Copilot review
* added multi-YoY pytest - still need to catch warnings
* Add a warnings.catch_warnings to the plotting pytest
* flake8 grumbles
* add multi-YoY=True pytest
* updated changelog
* update changelog
* implement copilot suggestions
* linting
* use s instead of ns for pandas 3 compatibility
* update pandas version comparison
* set matplotlib non-gui backend for tests
* set dtype resolution based on pandas version
* linting import order
* boost degradation.py test coverage
* add tests for error handling in analysis_chain
* update changelog
* update changelog
* exclude coverage reports with suffixes
* Update rdtools/degradation.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
* remove label=None handling, rely on default 'right' behavior
* refactor dt_center tz handling for old pandas
* simplify _avg_timestamp_old_Pandas
* degradation_timeseries_plot: change rolling median min_periods to rolling_days / 4.
* remove degradation_timeseries_plot(label=) and just default to center=True
* update sensor_analysis() and clearsky_analysis() docstrings to discuss passing `label=right` kwargs
* flake8 updates
* Initial commit - multi-YoY notebook
* pretty-print notebook dataframes with tabulate.
* update notebook requirements to silence pandas warnings
* add multi-yoy nb to tutorials
* fix nblink path
* Change the yoy_values index to be named 'dt'. Add new illustrations at the end of the multi-YoY notebook.
* clean up pending changelog
---------
Co-authored-by: cdeline <chris.deline@nrel.gov>
Co-authored-by: Michael Deceglie <mdeceglie@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>1 parent 0294a7e commit 2560977
File tree
2 files changed
+102
-1
lines changed- docs/sphinx/source/changelog
- rdtools/test
2 files changed
+102
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
| 12 | + | |
12 | 13 | | |
13 | 14 | | |
14 | 15 | | |
| |||
27 | 28 | | |
28 | 29 | | |
29 | 30 | | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
30 | 34 | | |
31 | 35 | | |
32 | 36 | | |
| |||
43 | 47 | | |
44 | 48 | | |
45 | 49 | | |
| 50 | + | |
| 51 | + | |
46 | 52 | | |
47 | 53 | | |
48 | 54 | | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
49 | 60 | | |
50 | 61 | | |
51 | 62 | | |
52 | 63 | | |
53 | 64 | | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
54 | 68 | | |
55 | 69 | | |
56 | 70 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1018 | 1018 | | |
1019 | 1019 | | |
1020 | 1020 | | |
| 1021 | + | |
| 1022 | + | |
| 1023 | + | |
| 1024 | + | |
| 1025 | + | |
| 1026 | + | |
| 1027 | + | |
| 1028 | + | |
| 1029 | + | |
| 1030 | + | |
| 1031 | + | |
| 1032 | + | |
| 1033 | + | |
| 1034 | + | |
| 1035 | + | |
| 1036 | + | |
| 1037 | + | |
| 1038 | + | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
| 1042 | + | |
| 1043 | + | |
| 1044 | + | |
| 1045 | + | |
| 1046 | + | |
| 1047 | + | |
| 1048 | + | |
| 1049 | + | |
| 1050 | + | |
| 1051 | + | |
| 1052 | + | |
| 1053 | + | |
| 1054 | + | |
| 1055 | + | |
| 1056 | + | |
| 1057 | + | |
| 1058 | + | |
| 1059 | + | |
| 1060 | + | |
| 1061 | + | |
| 1062 | + | |
| 1063 | + | |
| 1064 | + | |
| 1065 | + | |
| 1066 | + | |
| 1067 | + | |
| 1068 | + | |
| 1069 | + | |
| 1070 | + | |
| 1071 | + | |
| 1072 | + | |
| 1073 | + | |
| 1074 | + | |
| 1075 | + | |
| 1076 | + | |
| 1077 | + | |
| 1078 | + | |
| 1079 | + | |
| 1080 | + | |
| 1081 | + | |
| 1082 | + | |
| 1083 | + | |
| 1084 | + | |
| 1085 | + | |
| 1086 | + | |
| 1087 | + | |
| 1088 | + | |
| 1089 | + | |
| 1090 | + | |
| 1091 | + | |
| 1092 | + | |
| 1093 | + | |
| 1094 | + | |
| 1095 | + | |
| 1096 | + | |
| 1097 | + | |
| 1098 | + | |
| 1099 | + | |
| 1100 | + | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
0 commit comments