Skip to content

Commit

Permalink
Merge pull request #608 from quantopian/fix_deprs
Browse files Browse the repository at this point in the history
Fix deprecations and remove Bayesian models
  • Loading branch information
twiecki committed Sep 20, 2019
2 parents c35da78 + 33197f6 commit c5ebc00
Show file tree
Hide file tree
Showing 32 changed files with 123 additions and 15,411 deletions.
15 changes: 7 additions & 8 deletions .travis.yml
Expand Up @@ -3,17 +3,18 @@ sudo: false

python:
- 2.7
- 3.6
- 3.7

env:
- PANDAS_VERSION=0.18.1
- PANDAS_VERSION=0.19.2
- PANDAS_VERSION=0.20.3
- PANDAS_VERSION=0.25.0

matrix:
exclude:
- python: 3.6
- python: 3.7
env: PANDAS_VERSION=0.18.1
- python: 2.7
env: PANDAS_VERSION=0.25.0

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

install:
- 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
- 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
- source activate testenv
- pip install nose_parameterized
#- pip install --no-deps git+https://github.com/quantopian/zipline
- pip install -e .[bayesian] -c constraints.txt
- pip install -e .[all]

before_script:
- "flake8 pyfolio"
Expand Down
12 changes: 0 additions & 12 deletions README.md
Expand Up @@ -41,18 +41,6 @@ mkvirtualenv pyfolio
Next, clone this git repository and run `python setup.py develop`
and edit the library files directly.

#### Bayesian tear sheet

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:

```bash
pip install theano
```

```bash
pip install pymc3
```

#### Matplotlib on OSX

If you are on OSX and using a non-framework build of Python, you may need to set your backend:
Expand Down
1 change: 0 additions & 1 deletion constraints.txt

This file was deleted.

1 change: 0 additions & 1 deletion docs/notebooks/bayesian.ipynb

This file was deleted.

1 change: 0 additions & 1 deletion mkdocs.yml
Expand Up @@ -8,7 +8,6 @@ pages:
- Tutorial:
- 'Single stock': 'notebooks/single_stock_example.md'
- 'Zipline algorithm': 'notebooks/zipline_algo_example.md'
- 'Bayesian analysis': 'notebooks/bayesian.md'
- 'Sector analysis': 'notebooks/sector_mappings_example.md'
- 'Round trip analysis': 'notebooks/round_trip_tear_sheet_example.md'
- 'Slippage analysis': 'notebooks/slippage_example.md'
Expand Down
15 changes: 2 additions & 13 deletions pyfolio/__init__.py
@@ -1,30 +1,19 @@
import warnings

from . import utils
from . import timeseries
from . import pos
from . import txn
from . import interesting_periods
from . import capacity
from . import round_trips
from . import risk
from . import perf_attrib

from .tears import * # noqa
from .plotting import * # noqa
from ._version import get_versions

try:
from . import bayesian
except ImportError:
warnings.warn(
"Could not import bayesian submodule due to missing pymc3 dependency.",
ImportWarning)


__version__ = get_versions()['version']
del get_versions

__all__ = ['utils', 'timeseries', 'pos', 'txn', 'bayesian',
__all__ = ['utils', 'timeseries', 'pos', 'txn',
'interesting_periods', 'capacity', 'round_trips',
'risk', 'perf_attrib']
'perf_attrib']

0 comments on commit c5ebc00

Please sign in to comment.