diff --git a/.github/workflows/ci-tests.yml b/.github/workflows/ci-tests.yml index 9e1487e0..bbbdff13 100644 --- a/.github/workflows/ci-tests.yml +++ b/.github/workflows/ci-tests.yml @@ -20,7 +20,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, windows-latest] - python-version: [3.9, 3.11] + python-version: ["3.10", "3.13"] steps: - uses: actions/checkout@v4 diff --git a/CHANGELOG.md b/CHANGELOG.md index c10559a0..00356d79 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,16 @@ # Changelog All notable changes to this project will be documented in this file. If you make a notable change to the project, please add a line describing the change to the "unreleased" section. The maintainers will make an effort to keep the [Github Releases](https://github.com/NREL/OpenOA/releases) page up to date with this changelog. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/). +## v3.1.4 - 2025-12-24 + +- During the custom test collection, convert the `Path` objects to `str` to avoid issues with the + type enforcement of `list[str]` for `args` in Pytest v9. +- Update PyGAM minimum version for its latest update that includes Python 3.10-3.13 support. +- Remove maximum version pins for scipy and statsmodels with the support of the latest Python versions. +- Adds a maximum version for scikit-learn for a change in their `__sklearn_tags__` support. +- Deprecate support for Python 3.8 and 3.9, with additional support for Python 3.12 and 3.13. +- Update the min and max versions to test in the testing CI workflow. + ## v3.1.3 - 2025-01-31 - Pin SciPy to >= 1.7 and <1.14 to avoid an incompatibility error with PyGAM. diff --git a/openoa/__init__.py b/openoa/__init__.py index 6a4b760a..1e1df7cc 100644 --- a/openoa/__init__.py +++ b/openoa/__init__.py @@ -1,4 +1,4 @@ -__version__ = "3.1.3" +__version__ = "3.1.4" """ When bumping version, please be sure to also update parameters in sphinx/conf.py diff --git a/openoa/utils/filters.py b/openoa/utils/filters.py index a6757719..3d025e4d 100644 --- a/openoa/utils/filters.py +++ b/openoa/utils/filters.py @@ -103,7 +103,9 @@ def unresponsive_flag( flag = flag == 0 # Need to flag preceding `threshold` values as well - flag = flag | np.any([flag.shift(-1 - i, axis=0) for i in range(threshold - 1)], axis=0) + flag = flag | np.any( + [flag.shift(-1 - i, axis=0, fill_value=False) for i in range(threshold - 1)], axis=0 + ) # Return back a pd.Series if one was provided, else a pd.DataFrame return flag[col[0]] if to_series else flag diff --git a/pyproject.toml b/pyproject.toml index 43d144c8..e6a59a88 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -8,20 +8,20 @@ dynamic = ["version"] authors = [{name = "NREL PRUF OA Team", email = "openoa@nrel.gov"}] readme = {file = "README.md", content-type = "text/markdown"} description = "A package for collecting and assigning wind turbine metrics" -requires-python = ">=3.8, <3.12" +requires-python = ">=3.10,<3.14" license = {file = "LICENSE.txt"} dependencies = [ - "scikit-learn>=1.0", + "scikit-learn>=1.0,<1.7", "requests>=2.21.0", "eia-python>=1.22", "pyproj>=3.5", "shapely>=1.8", "numpy>=1.24", "pandas>=2.2", - "pygam>=0.9.0", - "scipy>=1.7,<1.14", + "pygam>=0.11.0", + "scipy>=1.7", "statsmodels>=0.11; python_version<'3.11'", - "statsmodels>=0.13.3; python_version=='3.11'", + "statsmodels>=0.13.3; python_version>='3.11'", "tqdm>=4.28.1", "matplotlib>=3.6", "bokeh>=3.3", @@ -50,10 +50,11 @@ classifiers = [ # https://pypi.org/classifiers/ "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 3 :: Only", - "Programming Language :: Python :: 3.8", - "Programming Language :: Python :: 3.9", "Programming Language :: Python :: 3.10", "Programming Language :: Python :: 3.11", + "Programming Language :: Python :: 3.12", + "Programming Language :: Python :: 3.13", + "Programming Language :: Python :: 3.14", "Topic :: Scientific/Engineering", "Topic :: Software Development :: Libraries :: Python Modules", "Typing :: Typed", diff --git a/test/conftest.py b/test/conftest.py index fd7ccdcf..dd24a7d3 100644 --- a/test/conftest.py +++ b/test/conftest.py @@ -25,8 +25,8 @@ def pytest_configure(config): regression = config.getoption("--regression") # Provide the appropriate directories - unit_tests = [el for el in (ROOT / "unit").iterdir() if el.suffix == ".py"] - regression_tests = [el for el in (ROOT / "regression").iterdir() if el.suffix == ".py"] + unit_tests = [str(el) for el in (ROOT / "unit").iterdir() if el.suffix == ".py"] + regression_tests = [str(el) for el in (ROOT / "regression").iterdir() if el.suffix == ".py"] # If both, run them all; if neither skip any modifications; otherwise run just the appropriate subset if regression and unit: diff --git a/test/unit/test_timeseries_toolkit.py b/test/unit/test_timeseries_toolkit.py index 36d66e48..7260e84b 100644 --- a/test/unit/test_timeseries_toolkit.py +++ b/test/unit/test_timeseries_toolkit.py @@ -145,8 +145,8 @@ def test_percent_nan(self): test_dict = {} # All should be float Series given PlantData requirements - test_dict["a"] = pd.Series([True, 1, 2, 1e5, np.Inf]).astype(float) - test_dict["b"] = pd.Series([False, np.nan, 2, 1e5, np.Inf]).astype(float) + test_dict["a"] = pd.Series([True, 1, 2, 1e5, np.inf]).astype(float) + test_dict["b"] = pd.Series([False, np.nan, 2, 1e5, np.inf]).astype(float) test_dict["c"] = pd.Series([np.nan, 1, 2, 1e5, np.nan]).astype(float) nan_values = {"a": 0.0, "b": 0.2, "c": 0.4}