Skip to content

Commit d00fd67

Browse files
authored
Merge pull request #442 from pmorissette/tkp/reg
add numpy/pandas version tests
2 parents 1632271 + bb69750 commit d00fd67

File tree

7 files changed

+139
-91
lines changed

7 files changed

+139
-91
lines changed

.github/workflows/build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
strategy:
2020
matrix:
2121
os: [ubuntu-latest, macos-latest, windows-latest]
22-
python-version: [3.8, 3.9, '3.10', 3.11]
22+
python-version: [3.9, 3.12]
2323

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

.github/workflows/deploy.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ jobs:
1313
strategy:
1414
matrix:
1515
os: [ubuntu-latest, macos-latest, windows-latest]
16-
python-version: [3.8, 3.9, '3.10', 3.11]
16+
python-version: [3.8, 3.9, '3.10', 3.11, 3.12]
1717

1818
steps:
1919
- uses: actions/checkout@v4

.github/workflows/regression.yml

+48
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Regression and Version Tests
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
workflow_dispatch:
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
12+
cancel-in-progress: true
13+
14+
jobs:
15+
build:
16+
runs-on: ${{ matrix.os }}
17+
environment: dev
18+
19+
strategy:
20+
matrix:
21+
python-version: [3.9]
22+
os: [ubuntu-latest]
23+
pandas_version:
24+
- '>=2.2'
25+
- '<2'
26+
numpy_version:
27+
- '<2'
28+
- '>=2'
29+
exclude:
30+
- numpy_version: '>=2'
31+
pandas_version: '<2'
32+
33+
steps:
34+
- uses: actions/checkout@v4
35+
- name: Set up Python ${{ matrix.python-version }}
36+
uses: actions/setup-python@v5
37+
with:
38+
python-version: ${{ matrix.python-version }}
39+
cache: 'pip'
40+
cache-dependency-path: 'setup.py'
41+
42+
- name: Install dependencies
43+
run: |
44+
make develop
45+
python -m pip install -U wheel twine setuptools "numpy${{ matrix.numpy_version }}" "pandas${{ matrix.pandas_version}}"
46+
47+
- name: Test
48+
run: make test

bt/algos.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2260,9 +2260,9 @@ def _setup_risk(self, target, set_history):
22602260

22612261
def _setup_measure(self, target, set_history):
22622262
"""Setup a risk measure within the risk attributes on the node in question"""
2263-
target.risk[self.measure] = np.NaN
2263+
target.risk[self.measure] = np.nan
22642264
if set_history:
2265-
target.risks[self.measure] = np.NaN
2265+
target.risks[self.measure] = np.nan
22662266

22672267
def _set_risk_recursive(self, target, depth, unit_risk_frame):
22682268
set_history = depth < self.history

0 commit comments

Comments
 (0)