Skip to content

Commit c5ebc00

Browse files
authored
Merge pull request #608 from quantopian/fix_deprs
Fix deprecations and remove Bayesian models
2 parents c35da78 + 33197f6 commit c5ebc00

32 files changed

+123
-15411
lines changed

.travis.yml

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,18 @@ sudo: false
33

44
python:
55
- 2.7
6-
- 3.6
6+
- 3.7
77

88
env:
99
- PANDAS_VERSION=0.18.1
10-
- PANDAS_VERSION=0.19.2
11-
- PANDAS_VERSION=0.20.3
10+
- PANDAS_VERSION=0.25.0
1211

1312
matrix:
1413
exclude:
15-
- python: 3.6
14+
- python: 3.7
1615
env: PANDAS_VERSION=0.18.1
16+
- python: 2.7
17+
env: PANDAS_VERSION=0.25.0
1718

1819
before_install:
1920
# We do this conditionally because it saves us some downloading if the
@@ -35,11 +36,9 @@ before_install:
3536
- cp pyfolio/tests/matplotlibrc .
3637

3738
install:
38-
- conda create -q -n testenv --yes python=$TRAVIS_PYTHON_VERSION ipython pyzmq numpy scipy nose matplotlib pandas=$PANDAS_VERSION Cython patsy flake8 seaborn scikit-learn runipy pytables networkx pandas-datareader matplotlib-tests joblib mkl-service
39+
- conda create -q -n testenv --yes python=$TRAVIS_PYTHON_VERSION ipython numpy scipy nose matplotlib pandas=$PANDAS_VERSION flake8 seaborn scikit-learn runipy pandas-datareader
3940
- source activate testenv
40-
- pip install nose_parameterized
41-
#- pip install --no-deps git+https://github.com/quantopian/zipline
42-
- pip install -e .[bayesian] -c constraints.txt
41+
- pip install -e .[all]
4342

4443
before_script:
4544
- "flake8 pyfolio"

README.md

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -41,18 +41,6 @@ mkvirtualenv pyfolio
4141
Next, clone this git repository and run `python setup.py develop`
4242
and edit the library files directly.
4343

44-
#### Bayesian tear sheet
45-
46-
Generating a [Bayesian tearsheet](https://github.com/quantopian/pyfolio/blob/master/pyfolio/examples/bayesian.ipynb) requires PyMC3 and Theano. You can install these packages with the following commands:
47-
48-
```bash
49-
pip install theano
50-
```
51-
52-
```bash
53-
pip install pymc3
54-
```
55-
5644
#### Matplotlib on OSX
5745

5846
If you are on OSX and using a non-framework build of Python, you may need to set your backend:

constraints.txt

Lines changed: 0 additions & 1 deletion
This file was deleted.

docs/notebooks/bayesian.ipynb

Lines changed: 0 additions & 1 deletion
This file was deleted.

mkdocs.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ pages:
88
- Tutorial:
99
- 'Single stock': 'notebooks/single_stock_example.md'
1010
- 'Zipline algorithm': 'notebooks/zipline_algo_example.md'
11-
- 'Bayesian analysis': 'notebooks/bayesian.md'
1211
- 'Sector analysis': 'notebooks/sector_mappings_example.md'
1312
- 'Round trip analysis': 'notebooks/round_trip_tear_sheet_example.md'
1413
- 'Slippage analysis': 'notebooks/slippage_example.md'

pyfolio/__init__.py

Lines changed: 2 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,19 @@
1-
import warnings
2-
31
from . import utils
42
from . import timeseries
53
from . import pos
64
from . import txn
75
from . import interesting_periods
86
from . import capacity
97
from . import round_trips
10-
from . import risk
118
from . import perf_attrib
129

1310
from .tears import * # noqa
1411
from .plotting import * # noqa
1512
from ._version import get_versions
1613

17-
try:
18-
from . import bayesian
19-
except ImportError:
20-
warnings.warn(
21-
"Could not import bayesian submodule due to missing pymc3 dependency.",
22-
ImportWarning)
23-
24-
2514
__version__ = get_versions()['version']
2615
del get_versions
2716

28-
__all__ = ['utils', 'timeseries', 'pos', 'txn', 'bayesian',
17+
__all__ = ['utils', 'timeseries', 'pos', 'txn',
2918
'interesting_periods', 'capacity', 'round_trips',
30-
'risk', 'perf_attrib']
19+
'perf_attrib']

0 commit comments

Comments
 (0)