Skip to content

Commit

Permalink
Merge pull request vnpy#1527 from nanoric/pip_from_oss
Browse files Browse the repository at this point in the history
Pip from oss
  • Loading branch information
vnpy authored Mar 28, 2019
2 parents 29b2911 + 800055b commit 9314907
Show file tree
Hide file tree
Showing 4 changed files with 44 additions and 15 deletions.
17 changes: 7 additions & 10 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ dist: xenial # required for Python >= 3.7 (travis-ci/travis-ci#9069)
python:
- "3.7"

script:
# todo: use python unittest
- mkdir run; cd run; python ../tests/load_all.py

matrix:
include:
- name: "code quality analysis: flake8"
Expand All @@ -23,11 +27,9 @@ matrix:
before_install:
- choco install python3 --version 3.7.2
install:
- python -m pip install --upgrade pip wheel setuptools
- pip install -r requirements.txt
- pip install .
script:
# todo: use python unittest
- mkdir run; cd run; python -c "import vnpy.api.ctp.vnctpmd; import vnpy.api.oes.vnoes; exit(0);"

- name: "pip install under Ubuntu: gcc-8"
before_install:
Expand All @@ -41,10 +43,8 @@ matrix:
- sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-8 90
- sudo update-alternatives --install /usr/bin/gcc cc /usr/bin/gcc-8 90
# Linux install script
- python -m pip install --upgrade pip wheel setuptools
- bash ./install.sh
script:
# todo: use python unittest
- mkdir run; cd run; python -c "import vnpy.api.ctp.vnctpmd; import vnpy.api.oes.vnoes; exit(0);"

- name: "pip install under Ubuntu: gcc-7"
before_install:
Expand All @@ -58,8 +58,5 @@ matrix:
- sudo update-alternatives --install /usr/bin/c++ c++ /usr/bin/g++-7 90
- sudo update-alternatives --install /usr/bin/gcc cc /usr/bin/gcc-7 90
# Linux install script
- python -m pip install --upgrade pip wheel setuptools
- bash ./install.sh
script:
# todo: use python unittest
- mkdir run; cd run; python -c "import vnpy.api.ctp.vnctpmd; import vnpy.api.oes.vnoes; exit(0);"

14 changes: 11 additions & 3 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
PyQt5<5.12
dataclasses; python_version<="3.6"
qdarkstyle
futu-api
requests
websocket-client
peewee
numpy
pandas
matplotlib
seaborn
ta-lib
ibapi
futu-api
tigeropen

# ta-lib
ta-lib; platform_system=="Linux"
https://pip.vnpy.com/colletion/TA_Lib-0.4.17-cp37-cp37m-win_amd64.whl; platform_system=="Windows"

# ibapi
# todo: use cdn instead
https://vnpy-pip.oss-cn-shanghai.aliyuncs.com/colletion/ibapi-9.75.1-py3-none-any.whl

26 changes: 26 additions & 0 deletions tests/load_all.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
# flake8: noqa
import unittest


class ImportTest(unittest.TestCase):

# noinspection PyUnresolvedReferences
def test_import_all(self):
from vnpy.event import EventEngine

from vnpy.trader.engine import MainEngine
from vnpy.trader.ui import MainWindow, create_qapp

from vnpy.gateway.bitmex import BitmexGateway
from vnpy.gateway.futu import FutuGateway
from vnpy.gateway.ib import IbGateway
from vnpy.gateway.ctp import CtpGateway
from vnpy.gateway.tiger import TigerGateway
from vnpy.gateway.oes import OesGateway

from vnpy.app.cta_strategy import CtaStrategyApp
from vnpy.app.csv_loader import CsvLoaderApp


if __name__ == '__main__':
unittest.main()
2 changes: 0 additions & 2 deletions vnpy/app/cta_strategy/ui/widget.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
from typing import Any

from vnpy.event import Event, EventEngine
from vnpy.trader.engine import MainEngine
from vnpy.trader.ui import QtCore, QtGui, QtWidgets
Expand Down

0 comments on commit 9314907

Please sign in to comment.