Skip to content

Commit 3ca3c6d

Browse files
committed
merge main and fix conflicts
2 parents e0328fb + 25c2799 commit 3ca3c6d

File tree

12 files changed

+112
-56
lines changed

12 files changed

+112
-56
lines changed

.github/workflows/ci-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
strategy:
2121
matrix:
2222
os: [ubuntu-latest, windows-latest]
23-
python-version: [3.9, 3.12]
23+
python-version: ["3.10", "3.13"]
2424

2525
steps:
2626
- uses: actions/checkout@v4

.pre-commit-config.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
repos:
22
- repo: https://github.com/pycqa/isort
3-
rev: 5.12.0
3+
rev: 7.0.0
44
hooks:
55
- id: isort
66
additional_dependencies: [toml]
@@ -15,21 +15,21 @@ repos:
1515
types: [pyi]
1616

1717
- repo: https://github.com/asottile/pyupgrade
18-
rev: v3.15.0
18+
rev: v3.21.2
1919
hooks:
2020
- id: pyupgrade
2121
args: [--py38-plus]
2222

2323
- repo: https://github.com/psf/black
24-
rev: 23.3.0
24+
rev: 26.1.0
2525
hooks:
2626
- id: black
2727
name: black
2828
stages: [pre-commit]
2929
language_version: python3
3030

3131
- repo: https://github.com/pre-commit/pre-commit-hooks
32-
rev: v4.4.0
32+
rev: v6.0.0
3333
hooks:
3434
- id: trailing-whitespace
3535
- id: end-of-file-fixer
@@ -42,6 +42,6 @@ repos:
4242
args: [--autofix]
4343

4444
- repo: https://github.com/pycqa/flake8
45-
rev: '6.0.0'
45+
rev: '7.3.0'
4646
hooks:
4747
- id: flake8

CHANGELOG.md

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ All notable changes to this project will be documented in this file. If you make
33

44
## Unreleased
55

6-
- Deprecate Python 3.8 support and enable 3.12 support.
76
- Features and updates:
87
- `MonteCarloAEP` updates
98
- Add an `n_jobs` input to the Monte Carlo AEP method to allow for the underlying models to be
@@ -18,6 +17,19 @@ All notable changes to this project will be documented in this file. If you make
1817
- Add a default value for `PlantData`'s `asset_distance_matrix` and `asset_direction_matrix` to
1918
ensure projects not utilizing location data are compatible.
2019

20+
## v3.1.4 - 2026-01-29
21+
22+
- During the custom test collection, convert the `Path` objects to `str` to avoid issues with the
23+
type enforcement of `list[str]` for `args` in Pytest v9.
24+
- Update PyGAM minimum version for its latest update that includes Python 3.10-3.13 support.
25+
- Remove maximum version pins for scipy and statsmodels with the support of the latest Python versions.
26+
- Adds a maximum version for scikit-learn for a change in their `__sklearn_tags__` support.
27+
- Deprecate support for Python 3.8 and 3.9, with additional support for Python 3.12 and 3.13.
28+
- Update the min and max versions to test in the testing CI workflow.
29+
- Utilizes pytest xfail and subtests to manange intermittent and finnicky test failures until a
30+
long-term solution can be implemented.
31+
- Pin Pandas maximum version to the 2.x release cycle.
32+
2133
## v3.1.3 - 2025-01-31
2234

2335
- Pin SciPy to >= 1.7 and <1.14 to avoid an incompatibility error with PyGAM.

README.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,16 @@ Warning OpenOA is a research software library and is released under a BSD-3 lice
4747
to the accompanying [license file](LICENSE.txt) for the full terms. We encourage caution, use of
4848
best practices, and engagement with subject matter experts when performing any data analysis.
4949

50+
51+
## Part of the WETO Stack
52+
53+
OpenOA is primarily developed with the support of the U.S. Department of Energy and is part of the [WETO Software Stack](https://nrel.github.io/WETOStack). For more information and other integrated modeling software, see:
54+
55+
- [Portfolio Overview](https://nrel.github.io/WETOStack/portfolio_analysis/overview.html)
56+
- [Entry Guide](https://nrel.github.io/WETOStack/_static/entry_guide/index.html)
57+
- [Controls and Analysis Workshop](https://nrel.github.io/WETOStack/workshops/user_workshops_2024.html#wind-farm-controls-and-analysis)
58+
59+
5060
### Included Analysis Methods
5161

5262
| Name | Description | Citations |

openoa/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
__version__ = "3.1.3"
1+
__version__ = "3.1.4"
22

33
"""
44
When bumping version, please be sure to also update parameters in sphinx/conf.py

openoa/utils/filters.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,9 @@ def unresponsive_flag(
103103
flag = flag == 0
104104

105105
# Need to flag preceding `threshold` values as well
106-
flag = flag | np.any([flag.shift(-1 - i, axis=0) for i in range(threshold - 1)], axis=0)
106+
flag = flag | np.any(
107+
[flag.shift(-1 - i, axis=0, fill_value=False) for i in range(threshold - 1)], axis=0
108+
)
107109

108110
# Return back a pd.Series if one was provided, else a pd.DataFrame
109111
return flag[col[0]] if to_series else flag

pyproject.toml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,18 +8,18 @@ dynamic = ["version"]
88
authors = [{name = "NREL PRUF OA Team", email = "[email protected]"}]
99
readme = {file = "README.md", content-type = "text/markdown"}
1010
description = "A package for collecting and assigning wind turbine metrics"
11-
requires-python = ">=3.9, <3.13"
11+
requires-python = ">=3.10,<3.14"
1212
license = {file = "LICENSE.txt"}
1313
dependencies = [
14-
"scikit-learn>=1.0",
14+
"scikit-learn>=1.0,<1.7",
1515
"requests>=2.21.0",
1616
"eia-python>=1.22",
1717
"pyproj>=3.5",
1818
"shapely>=1.8",
1919
"numpy>=1.24",
20-
"pandas>=2.2",
21-
"pygam>=0.9.0",
22-
"scipy>=1.7,<1.14",
20+
"pandas>=2.2,<3",
21+
"pygam>=0.11.0",
22+
"scipy>=1.7",
2323
"statsmodels>=0.11; python_version<'3.11'",
2424
"statsmodels>=0.13.3; python_version>='3.11'",
2525
"tqdm>=4.28.1",
@@ -50,10 +50,11 @@ classifiers = [ # https://pypi.org/classifiers/
5050
"Operating System :: OS Independent",
5151
"Programming Language :: Python",
5252
"Programming Language :: Python :: 3 :: Only",
53-
"Programming Language :: Python :: 3.9",
5453
"Programming Language :: Python :: 3.10",
5554
"Programming Language :: Python :: 3.11",
5655
"Programming Language :: Python :: 3.12",
56+
"Programming Language :: Python :: 3.13",
57+
"Programming Language :: Python :: 3.14",
5758
"Topic :: Scientific/Engineering",
5859
"Topic :: Software Development :: Libraries :: Python Modules",
5960
"Typing :: Typed",
@@ -72,7 +73,7 @@ develop = [
7273
"isort",
7374
"flake8",
7475
"flake8-docstrings",
75-
"pytest>=5.4.2",
76+
"pytest>=9",
7677
"pytest-cov>=2.8.1",
7778
]
7879
docs = [
@@ -140,7 +141,7 @@ filterwarnings = [
140141
[tool.black]
141142
# https://github.com/psf/black
142143
line-length = 100
143-
target-version = ["py38", "py39", "py310"]
144+
target-version = ["py310", "py311", "py312", "py313"]
144145
include = '\.pyi?$'
145146
exclude = '''
146147
# A regex preceded with ^/ will apply only to files and directories
@@ -166,7 +167,7 @@ exclude = '''
166167
[tool.isort]
167168
# https://github.com/PyCQA/isort
168169
profile = "black"
169-
py_version = 39
170+
py_version = 310
170171
src_paths = ["isort", "test"]
171172
line_length = "100"
172173
length_sort = "True"

sphinx/index.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,15 @@ the full terms. We encourage caution, use of best practices, and engagement with
2323
experts when performing any data analysis.
2424
```
2525

26+
### Part of the WETO Stack
27+
28+
OpenOA is primarily developed with the support of the U.S. Department of Energy and is part of the [WETO Software Stack](https://nrel.github.io/WETOStack). For more information and other integrated modeling software, see:
29+
30+
- [Portfolio Overview](https://nrel.github.io/WETOStack/portfolio_analysis/overview.html)
31+
- [Entry Guide](https://nrel.github.io/WETOStack/_static/entry_guide/index.html)
32+
- [Controls and Analysis Workshop](https://nrel.github.io/WETOStack/workshops/user_workshops_2024.html#wind-farm-controls-and-analysis)
33+
34+
2635
### Analysis Methods
2736

2837
| Name | Description | Citations |

test/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,8 @@ def pytest_configure(config):
2525
regression = config.getoption("--regression")
2626

2727
# Provide the appropriate directories
28-
unit_tests = [el for el in (ROOT / "unit").iterdir() if el.suffix == ".py"]
29-
regression_tests = [el for el in (ROOT / "regression").iterdir() if el.suffix == ".py"]
28+
unit_tests = [str(el) for el in (ROOT / "unit").iterdir() if el.suffix == ".py"]
29+
regression_tests = [str(el) for el in (ROOT / "regression").iterdir() if el.suffix == ".py"]
3030

3131
# If both, run them all; if neither skip any modifications; otherwise run just the appropriate subset
3232
if regression and unit:

test/regression/long_term_monte_carlo_aep.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ def test_daily_gam(self):
329329
sim_results = self.analysis.results
330330
self.check_simulation_results_gam_daily(sim_results)
331331

332+
@pytest.mark.xfail(reason="Fails intermittently depending, mostly on MacOS.")
332333
def test_daily_gbm(self):
333334
reset_prng()
334335
# ____________________________________________________________________
@@ -484,7 +485,8 @@ def check_process_reanalysis_data_daily(self, df):
484485
print(computed)
485486

486487
for key in expected.keys():
487-
nptest.assert_array_almost_equal(expected[key], computed[key])
488+
with self.subTest(f"checking {key}"):
489+
nptest.assert_array_almost_equal(expected[key], computed[key])
488490

489491
def check_simulation_results_lin_monthly(self, s):
490492
# Make sure AEP results are consistent to six decimal places

0 commit comments

Comments
 (0)