Skip to content

Commit e01da67

Browse files
committed
Merge branch 'release/0.2.0'
2 parents 882f540 + c06b1fd commit e01da67

36 files changed

+2246
-1452
lines changed

.devcontainer/docker-compose.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
version: '3.8'
2+
services:
3+
docker-host:
4+
image: qoomon/docker-host
5+
container_name: ibpy_native.host
6+
deploy:
7+
resources:
8+
limits:
9+
memory: 8M
10+
cap_add: [ 'NET_ADMIN', 'NET_RAW' ]
11+
restart: on-failure
12+
networks:
13+
- ibpy
14+
ibpy:
15+
depends_on: [ docker-host ]
16+
image: devtography/pyvim:py3.7
17+
container_name: ibpy_native
18+
volumes:
19+
- ../:/workspace
20+
working_dir: /workspace
21+
stdin_open: true
22+
tty: true
23+
environment:
24+
- IB_HOST=docker-host
25+
networks:
26+
- ibpy
27+
networks:
28+
ibpy:
29+
name: ibpy_default

.gitignore

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,5 +141,11 @@ cython_debug/
141141
# VSCode settings
142142
.vscode
143143

144+
# Vim files
145+
*.swp
146+
144147
# Not ignore IBAPI
145148
!lib/ib/
149+
150+
# System files
151+
.DS_Store

.pylintrc

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,8 @@ disable=print-statement,
141141
comprehension-escape,
142142
too-many-arguments,
143143
too-many-branches,
144-
too-many-locals
144+
too-many-locals,
145+
no-self-use
145146

146147
# Enable the message, report, category or checker with the given id(s). You can
147148
# either give multiple identifier separated by comma (,) or put this option
@@ -587,7 +588,7 @@ max-returns=6
587588
max-statements=50
588589

589590
# Minimum number of public methods for a class (see R0903).
590-
min-public-methods=2
591+
min-public-methods=1
591592

592593

593594
[EXCEPTIONS]

CHANGELOG.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,49 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
66

77
## [Unreleased]
88

9+
## [v0.2.0] - 2020-09-02
10+
`v0.2.0` is a minor release refactored most of the project to adopt async/await
11+
syntax, added support of streaming live "tick-by-tick" data from IB, and
12+
restructured the project.
13+
14+
### Added
15+
- Module `ibpy_native.utils.datatype` to hold `Enum` or `TypedDict` for types of
16+
function arguments or return objects.
17+
- Listener to receive system notifications from IB (via
18+
`ibpy_native.interfaces.listeners.NotificationListener`) in public class
19+
`ibpy_native.bridge.IBBridge`.
20+
- Corresponding setter `set_on_notify_listener(listener)`.
21+
- Function `ibpy_native.bridge.IBBridge.search_detailed_contracts(contract)` to
22+
search for contracts with complete details from IB's database. This newly
23+
implemented function is recommended to replace the deprecated functions
24+
`get_us_stock_contract(symbol)` & `get_us_future_contract(symbol, contract_month)`
25+
in `IBBridge`.
26+
- Feature of streaming live "tick-by-tick" data from IB via functions
27+
`ibpy_native.bridge.IBBridge.stream_live_ticks(contract, listener, tick_type=ibpy_native.utils.datatype.LiveTicks.LAST)` and
28+
`ibpy_native.bridge.IBBridge.stop_live_ticks_stream(stream_id)`.
29+
30+
### Changed
31+
- Existing code to align the code style with
32+
[Google Python Style Guide](https://google.github.io/styleguide/pyguide.html#s3.16-naming).
33+
- Module files location to group them in corresponding sub-packages.
34+
- Name of classes, variables, and functions to get rid of the prepended double
35+
underscore and prepended single underscore for all non-public classes/members
36+
to mark for internal usage.
37+
- Mechanism of internal queue management.
38+
- Minimum Python version requirement to `3.7` as some of the built-in feature of
39+
`3.7` is being used in the project.
40+
41+
### Deprecated
42+
- Function `ibpy_native.bridge.IBBridge.get_us_stock_contract(symbol)`.
43+
- Function `ibpy_native.bridge.IBBridge.get_us_future_contract(symbol, contract_month)`.
44+
- Script `cmd/fetch_us_historical_ticks.py`. This script might be updated to
45+
work with the refactored functions in future release, but it's not usable for
46+
now.
47+
48+
### Removed
49+
- Argument `timeout` on all APIs implemented (use function
50+
`asyncio.wait_for(aw, timeout, *, loop=None)` for timeout instead if needed).
51+
952
## [v0.1.4] - 2020-06-01
1053
`v0.1.4` is a hotfix release addressing the issue of various errors which will
1154
be raised while fetching the historical ticks.
@@ -84,7 +127,8 @@ returns with `finished` mark as `True` unexpectedly while IB returns less than
84127
1000 records but there're more historical ticks those should be fetched
85128
in next request.
86129

87-
[Unreleased]: https://github.com/Devtography/ibpy_native/compare/v0.1.4...HEAD
130+
[Unreleased]: https://github.com/Devtography/ibpy_native/compare/v0.2.0...HEAD
131+
[v0.2.0]: https://github.com/Devtography/ibpy_native/compare/v0.2.0...v0.1.4
88132
[v0.1.4]: https://github.com/Devtography/ibpy_native/compare/v0.1.4...v0.1.3
89133
[v0.1.3]: https://github.com/Devtography/ibpy_native/compare/v0.1.3...v0.1.2
90134
[v0.1.2]: https://github.com/Devtography/ibpy_native/compare/v0.1.2...v0.1.1

Pipfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ twine = "*"
1414
pytz = "*"
1515
typing-extensions = "*"
1616
pandas = "*"
17+
deprecated = "*"
1718

1819
[requires]
1920
python_version = "3.7"

0 commit comments

Comments
 (0)