Skip to content
Open
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/ci-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
python-version: [3.9, 3.11]
python-version: [3.13]

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pypi-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.11'
python-version: '3.13'
- name: Build package
run: |
python -m pip install --upgrade pip
Expand Down
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ repos:
rev: v3.15.0
hooks:
- id: pyupgrade
args: [--py38-plus]
args: [--py313-plus]

- repo: https://github.com/psf/black
rev: 23.3.0
Expand Down
1 change: 1 addition & 0 deletions .python-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.13.1
2 changes: 1 addition & 1 deletion .readthedocs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ version: 2
build:
os: ubuntu-22.04
tools:
python: "3.10"
python: "3.13"

# Build documentation in the docs/ directory with Sphinx
sphinx:
Expand Down
7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ effort more broadly,** please use citation [^1], which is provided below in BibT

### Requirements

- Python 3.8-3.11 with pip.
- Python 3.13 with pip.

We strongly recommend using the Anaconda Python distribution and creating a new conda environment
for OpenOA. You can download Anaconda through
Expand All @@ -139,7 +139,7 @@ After installing Anaconda (or alternative), create and activate a new conda envi
name "openoa-env":

```bash
conda create --name openoa-env python=3.10
conda create --name openoa-env python=3.13
conda activate openoa-env
```

Expand Down Expand Up @@ -175,8 +175,7 @@ is also allowed).
- `all`: for the complete dependency stack

> **Important**
> If using Python 3.11, install `openoa` only, then reinstall adding the modifiers to reduce
> the amount of time it takes for pip to resolve the dependency stack.
> With Python 3.13, you can install `openoa` with any combination of modifiers directly.

#### Common Installation Issues

Expand Down
7 changes: 6 additions & 1 deletion openoa/utils/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,12 @@ 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)
shifts = [flag.shift(-1 - i, axis=0) for i in range(threshold - 1)]
if shifts:
any_result = shifts[0]
for shift in shifts[1:]:
any_result = any_result | shift
flag = flag | any_result

# Return back a pd.Series if one was provided, else a pd.DataFrame
return flag[col[0]] if to_series else flag
Expand Down
16 changes: 6 additions & 10 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ 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.13"
license = {file = "LICENSE.txt"}
dependencies = [
"scikit-learn>=1.0",
Expand All @@ -19,9 +19,8 @@ dependencies = [
"numpy>=1.24",
"pandas>=2.2",
"pygam>=0.9.0",
"scipy>=1.7,<1.14",
"statsmodels>=0.11; python_version<'3.11'",
"statsmodels>=0.13.3; python_version=='3.11'",
"scipy>=1.7",
"statsmodels>=0.14.1",
"tqdm>=4.28.1",
"matplotlib>=3.6",
"bokeh>=3.3",
Expand Down Expand Up @@ -50,10 +49,7 @@ 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.13",
"Topic :: Scientific/Engineering",
"Topic :: Software Development :: Libraries :: Python Modules",
"Typing :: Typed",
Expand Down Expand Up @@ -140,7 +136,7 @@ filterwarnings = [
[tool.black]
# https://github.com/psf/black
line-length = 100
target-version = ["py38", "py39", "py310"]
target-version = ["py313"]
include = '\.pyi?$'
exclude = '''
# A regex preceded with ^/ will apply only to files and directories
Expand All @@ -166,7 +162,7 @@ exclude = '''
[tool.isort]
# https://github.com/PyCQA/isort
profile = "black"
py_version = 39
py_version = 313
src_paths = ["isort", "test"]
line_length = "100"
length_sort = "True"
Expand Down
25 changes: 25 additions & 0 deletions requirements-py38.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
scikit-learn>=1.0
requests>=2.21.0
eia-python>=1.22
pyproj>=3.5
shapely>=1.8
numpy>=2.1.0
pandas>=2.2.3
pygam>=0.9.0
scipy>=1.14
statsmodels>=0.14.1
tqdm>=4.28.1
matplotlib>=3.8
bokeh>=3.0
attrs>=22.2
pytz
pyyaml
tabulate
ipython
pre-commit
black
isort
flake8
flake8-docstrings
pytest>=5.4.2
pytest-cov>=2.8.1
2 changes: 1 addition & 1 deletion runtime.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
python-3.9
python-3.13
3 changes: 1 addition & 2 deletions sphinx/getting_started/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,7 @@ Additional Dependencies
-----------------------

.. important::
If using Python 3.11, install ``openoa`` only, then reinstall adding the modifiers to reduce
the amount of time it takes for pip to resolve the dependency stack.
With Python 3.13, you can install ``openoa`` with any combination of modifiers directly.

Whether installing from PyPI or source, any combination of the following can be used to install
additional dependencies. For example, the examples requirements can be installed using
Expand Down
3 changes: 1 addition & 2 deletions sphinx/getting_started/install.rst
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,7 @@ at the same time with the following.
pip install "OpenOA[develop]"

.. important::
If using Python 3.11, install ``openoa`` only, then reinstall adding the modifiers to reduce
the amount of time it takes for pip to resolve the dependency stack.
With Python 3.13, you can install ``openoa`` with any combination of modifiers directly.

Additional options:
- `develop`: for linting, automated formatting, and testing
Expand Down
4 changes: 2 additions & 2 deletions sphinx/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ For further information about the features and citations, please see the

## Installation

Compatible with Python 3.8 through 3.11 with pip.
Compatible with Python 3.13 with pip.

We strongly recommend using the Anaconda Python distribution and creating a new conda environment
for OpenOA. You can download Anaconda through
Expand All @@ -90,7 +90,7 @@ After installing Anaconda (or alternative), create and activate a new conda envi
name "openoa-env":

```bash
conda create --name openoa-env python=3.10
conda create --name openoa-env python=3.13
conda activate openoa-env
```

Expand Down
4 changes: 2 additions & 2 deletions test/unit/test_timeseries_toolkit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down
Loading