Skip to content

Commit 15b9dbc

Browse files
committed
Fix data type check function, update version
1 parent 6d3b14a commit 15b9dbc

File tree

3 files changed

+9
-6
lines changed

3 files changed

+9
-6
lines changed

README.md

+3-4
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,11 @@
99
Optopsy is a nimble backtesting and statistics library for option strategies, it is designed to answer questions like
1010
"How do vertical spreads perform on the SPX?" or "Which strikes and/or expiration dates should I choose to make the most potential profit?"
1111

12-
**This library is currently being rewritten and is in beta state, use at your own risk**
13-
1412
## Supported Option Strategies
1513
* Calls/Puts
1614
* Straddles/Strangles
17-
* Butterflies/Iron Condors (WIP)
15+
* Butterflies (WIP)
16+
* Iron Condors (WIP)
1817
* Many more to follow
1918

2019
## Documentation
@@ -30,7 +29,7 @@ You will need Python 3.6 or newer and Pandas 0.23.1 or newer and Numpy 1.14.3 or
3029

3130
### Installation
3231
```
33-
pip install optopsy==2.0.0b2
32+
pip install optopsy==2.0.0
3433
```
3534

3635
### Example

setup.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
description="Python Backtesting library for options trading strategies",
66
long_description=open("README.md").read(),
77
long_description_content_type="text/markdown",
8-
version="2.0.0b2",
8+
version="2.0.0",
99
url="https://github.com/michaelchu/optopsy",
1010
author="Michael Chu",
1111
author_email="[email protected]",

tests/test_checks.py

+5-1
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@ def test_check_data_types():
5858
invalid_cols = {"some_col": ["some val"]}
5959
invalid_types = {"underlying_symbol": [123]}
6060

61-
with pytest.raises(ValueError):
61+
with pytest.raises(ValueError, match="Expected column"):
6262
op._check_data_types(pd.DataFrame(invalid_cols))
63+
64+
with pytest.raises(
65+
ValueError, match="underlying_symbol does not match expected types"
66+
):
6367
op._check_data_types(pd.DataFrame(invalid_types))

0 commit comments

Comments
 (0)