Skip to content

Commit 11c83f4

Browse files
authored
Release 1.125.0
See release notes.
2 parents 4a1492a + 0fef5ea commit 11c83f4

File tree

346 files changed

+13855
-12281
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

346 files changed

+13855
-12281
lines changed

.github/workflows/performance.yml

Lines changed: 14 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ name: performance
33
on:
44
push:
55
branches: [ develop ]
6-
pull_request:
7-
branches: [ develop ]
86

97
jobs:
108
performance:
@@ -49,18 +47,18 @@ jobs:
4947

5048
# Run performance
5149
- name: Run performance tests
52-
run: nox -s performance_tests --reuse-existing-virtualenvs
50+
run: nox -rs performance_tests -- no-parallel
5351

54-
# TODO: Store benchmark results
55-
# - name: Store benchmark result
56-
# uses: rhysd/github-action-benchmark@v1
57-
# with:
58-
# name: Python Benchmark with pytest-benchmark
59-
# tool: "pytest"
60-
# output-file-path: PERF.JSON
61-
# github-token: ${{ secrets.GITHUB_TOKEN }}
62-
# auto-push: true
63-
# # Show alert with commit comment on detecting possible performance regression
64-
# alert-threshold: '200%'
65-
# comment-on-alert: true
66-
# fail-on-alert: true
52+
# Store benchmark results
53+
- name: Store benchmark result
54+
uses: rhysd/github-action-benchmark@v1
55+
with:
56+
name: Benchmark with pytest-benchmark
57+
tool: "pytest"
58+
output-file-path: output.json
59+
github-token: ${{ secrets.GHPAGES_ACCESS }}
60+
auto-push: true
61+
# Show alert with commit comment on detecting possible performance regression
62+
alert-threshold: '200%'
63+
comment-always: true
64+
fail-on-alert: false

.github/workflows/test-tag-publish.yml

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ jobs:
1515
python-version: [ 3.7, 3.8, 3.9 ]
1616
name: test - Python ${{ matrix.python-version }} (${{ matrix.os }})
1717
runs-on: ${{ matrix.os }}
18-
env:
19-
PARALLEL_BUILD: false
2018

2119
steps:
2220
- uses: actions/checkout@v2
@@ -65,7 +63,7 @@ jobs:
6563
6664
# Run tests
6765
- name: Run tests
68-
run: nox -s tests_with_integration --reuse-existing-virtualenvs
66+
run: nox -rs tests_with_integration -- no-parallel
6967

7068

7169
tag_release:
@@ -77,8 +75,6 @@ jobs:
7775
python-version: [ 3.9 ]
7876
name: test-tag-publish - Python ${{ matrix.python-version }} (${{ matrix.os }})
7977
runs-on: ${{ matrix.os }}
80-
env:
81-
PARALLEL_BUILD: false
8278
outputs:
8379
upload_url: ${{ steps.create-release.outputs.upload_url }}
8480

@@ -155,7 +151,6 @@ jobs:
155151
name: publish_sdist - Python ${{ matrix.python-version }} (${{ matrix.os }})
156152
runs-on: ${{ matrix.os }}
157153
env:
158-
PARALLEL_BUILD: false
159154
SKIP_BUILD_COPY: true
160155

161156
steps:
@@ -230,8 +225,6 @@ jobs:
230225
python-version: [ 3.7, 3.8, 3.9 ]
231226
name: publish_wheels - Python ${{ matrix.python-version }} (${{ matrix.os }})
232227
runs-on: ${{ matrix.os }}
233-
env:
234-
PARALLEL_BUILD: false
235228

236229
steps:
237230
- uses: actions/checkout@v2

.github/workflows/test.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,6 @@ jobs:
1717
python-version: [ 3.7, 3.8, 3.9 ]
1818
name: test - Python ${{ matrix.python-version }} (${{ matrix.os }})
1919
runs-on: ${{ matrix.os }}
20-
env:
21-
PARALLEL_BUILD: false
2220

2321
steps:
2422
- uses: actions/checkout@v2
@@ -36,7 +34,7 @@ jobs:
3634
# Test pip installation
3735
- name: Test pip installation
3836
if: runner.os != 'Windows'
39-
run: pip install .[betfair,ccxt,docs,ib,oanda]
37+
run: pip install .[betfair,ccxt,docs,ib]
4038

4139
# Setup Poetry caching
4240
- name: Get Poetry cache dir
@@ -72,4 +70,4 @@ jobs:
7270
7371
# Run tests
7472
- name: Run tests
75-
run: nox -s tests_with_integration --reuse-existing-virtualenvs
73+
run: nox -rs tests_with_integration -- no-parallel

.gitignore

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
*.c
21
*.o
32
*.so
43
*.pyc
@@ -37,4 +36,4 @@ venv*/
3736
.DS_Store
3837
!tests/integration_tests/adapters/betfair/responses/*.log
3938
tests/test_kit/data/catalog/
40-
PERF.JSON
39+
output.json

.pre-commit-config.yaml

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
repos:
22

33
- repo: https://github.com/PyCQA/isort
4-
rev: 5.9.1
4+
rev: 5.9.2
55
hooks:
66
- id: isort
77

@@ -38,6 +38,24 @@ repos:
3838
- id: codespell
3939
description: Checks for common misspellings.
4040
types_or: [python, cython, rst, markdown]
41+
exclude: "nautilus_trader/adapters/betfair/parsing.py"
42+
43+
- repo: https://github.com/pre-commit/mirrors-mypy
44+
rev: v0.910
45+
hooks:
46+
- id: mypy
47+
args: [
48+
--no-strict-optional,
49+
--ignore-missing-imports,
50+
--warn-no-return,
51+
]
52+
additional_dependencies: [
53+
types-frozendict,
54+
types-orjson,
55+
types-pytz,
56+
types-redis,
57+
types-toml,
58+
]
4159

4260
- repo: https://gitlab.com/PyCQA/flake8
4361
rev: 3.9.2
@@ -46,7 +64,6 @@ repos:
4664
name: flake8 (python)
4765
additional_dependencies:
4866
- flake8-bandit
49-
- flake8-black
5067
- flake8-bugbear
5168
- flake8-coding
5269
# - flake8-comprehensions
@@ -63,7 +80,6 @@ repos:
6380
name: flake8 (cython)
6481
additional_dependencies:
6582
- flake8-bandit
66-
- flake8-black
6783
- flake8-bugbear
6884
- flake8-coding
6985
- flake8-comprehensions

README.md

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -98,7 +98,6 @@ The documentation for the latest version of the package can be found at:
9898
| Logo | ID | Status |
9999
|:---:|:---:|:---:|
100100
| [![interactive-brokers](https://github.com/nautechsystems/nautilus_trader/blob/develop/docs/artwork/ib-logo.png?raw=true)](https://interactivebrokers.com) | IB | ![status](https://img.shields.io/badge/Integration-in_progress-orange) |
101-
| [![oanda](https://github.com/nautechsystems/nautilus_trader/blob/develop/docs/artwork/oanda-logo.png?raw=true)](https://oanda.com/) | OANDA | ![status](https://img.shields.io/badge/Integration-in_progress-orange) |
102101
| [![ccxtpro](https://github.com/nautechsystems/nautilus_trader/blob/develop/docs/artwork/ccxtpro-logo.png?raw=true)](https://ccxt.pro/) | CCXT-`exchange_id` | ![status](https://img.shields.io/badge/Integration-testing-yellow) |
103102
| [![binance](https://github.com/nautechsystems/nautilus_trader/blob/develop/docs/artwork/binance-logo.png?raw=true)](https://www.binance.com/) | BINANCE | ![status](https://img.shields.io/badge/Integration-planned-gray) |
104103
| [![bitmex](https://github.com/nautechsystems/nautilus_trader/blob/develop/docs/artwork/bitmex-logo.png?raw=true)](https://www.bitmex.com/) | BITMEX | ![status](https://img.shields.io/badge/Integration-planned-gray) |
@@ -175,7 +174,6 @@ Also, the following optional dependency 'extras' are separately available for in
175174
- `ccxt` for the CCXT Pro adapter.
176175
- `docs` for building the documentation.
177176
- `ib` for the Interactive Brokers adapter.
178-
- `oanda` for the OANDA adapter.
179177

180178
For example, to install including the `ccxt` extra using pip:
181179

@@ -310,10 +308,6 @@ Involvement from the trading community is a goal for this project. All help is w
310308
Developers can open issues on GitHub to discuss proposed enhancements/changes, or
311309
to make bug reports.
312310

313-
Even as some issues are marked with the `help wanted` label - this does not imply
314-
that help is _only_ wanted on those issues. The label indicates where 'extra attention'
315-
is needed.
316-
317311
Please make all pull requests to the `develop` branch.
318312

319313
Refer to the [CONTRIBUTING.md](https://github.com/nautechsystems/nautilus_trader/blob/master/CONTRIBUTING.md) for further information.

RELEASES.md

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,46 @@
1+
# NautilusTrader 1.125.0 Beta - Release Notes
2+
3+
This release introduces a major re-architecture of the internal messaging system.
4+
A common message bus has been implemented which now handles all events via a
5+
PUB/SUB messaging pattern. The next release will see all data being handled by
6+
the message bus, please see the related issue for further details on this enhancement.
7+
8+
Another notable feature is the introduction of the order 'inflight' concept,
9+
which is an order which has been submitted and not yet acknowledged by the
10+
exchange/broker. Several properties on `Order`, and methods on `Cache`, now exist
11+
to support this.
12+
13+
The `Throttler` has been refactored and optimized further. There has also been
14+
extensive reorganization of the model sub-package, standardization of identifiers
15+
on events, along with numerous 'under the hood' cleanups and two bug fixes.
16+
17+
## Breaking Changes
18+
- Renamed `MessageType` enum to `MessageCategory`.
19+
- Renamed `fill.order_side` to `fill.side`.
20+
- Renamed `fill.order_type` to `fill.type`.
21+
- All `Event` serialization due to domain refactorings.
22+
23+
## Enhancements
24+
- Added `MessageBus` class.
25+
- Added `TraderId` to `Order` and `Position`.
26+
- Added `OrderType` to OrderFilled.
27+
- Added unrealized PnL to position events.
28+
- Added order inflight concept to `Order` and `Cache`.
29+
- Improved efficiency of `Throttler`.
30+
- Standardized events `str` and `repr`.
31+
- Standardized commands `str` and `repr`.
32+
- Standardized identifiers on events and objects.
33+
- Improved `Account` `str` and `repr`.
34+
- Using `orjson` over `json` for efficiency.
35+
- Removed redundant `BypassCacheDatabase`.
36+
- Introduced `mypy` to the codebase.
37+
38+
## Fixes
39+
- Fixed backtest log timestamping.
40+
- Fixed backtest duplicate initial account event.
41+
42+
---
43+
144
# NautilusTrader 1.124.0 Beta - Release Notes
245

346
This release sees the expansion of pre-trade risk check options (see

build.py

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,6 @@
2828
# If SKIP_BUILD_COPY is enabled, prevents copying built *.so files back into the source tree
2929
SKIP_BUILD_COPY = bool(os.getenv("SKIP_BUILD_COPY", ""))
3030

31-
print(
32-
f"DEBUG_MODE={DEBUG_MODE}\n"
33-
f"PROFILING_MODE={PROFILING_MODE}\n"
34-
f"ANNOTATION_MODE={ANNOTATION_MODE}\n"
35-
f"PARALLEL_BUILD={PARALLEL_BUILD}\n"
36-
f"SKIP_BUILD_COPY={SKIP_BUILD_COPY}"
37-
)
38-
3931
##########################
4032
# Cython build options #
4133
##########################
@@ -161,6 +153,9 @@ def build(setup_kwargs):
161153

162154
if __name__ == "__main__":
163155
print("")
156+
print("=====================================================================")
157+
print("Nautilus Builder")
158+
print("=====================================================================")
164159

165160
# Work around a Cython problem in Python 3.8.x on macOS
166161
# https://github.com/cython/cython/issues/3262
@@ -174,7 +169,6 @@ def build(setup_kwargs):
174169
except ImportError:
175170
print("multiprocessing not available")
176171

177-
print("Starting build...")
178172
# Note: On macOS (and perhaps other platforms), executable files may be
179173
# universal files containing multiple architectures. To determine the
180174
# “64-bitness” of the current interpreter, it is more reliable to query the
@@ -184,5 +178,14 @@ def build(setup_kwargs):
184178
print(f"Python: {platform.python_version()}")
185179
print(f"Cython: {cython_compiler_version}")
186180
print(f"NumPy: {np.__version__}")
181+
print("")
182+
print("Starting build...")
183+
print(f"DEBUG_MODE={DEBUG_MODE}")
184+
print(f"PROFILING_MODE={PROFILING_MODE}")
185+
print(f"ANNOTATION_MODE={ANNOTATION_MODE}")
186+
print(f"PARALLEL_BUILD={PARALLEL_BUILD}")
187+
print(f"SKIP_BUILD_COPY={SKIP_BUILD_COPY}")
188+
print("")
187189

188190
build({})
191+
print("Build completed\n")

docs/artwork/oanda-logo.png

-8.08 KB
Binary file not shown.

docs/source/api_reference/core.rst

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,6 @@ Core
33

44
.. automodule:: nautilus_trader.core
55

6-
Cache
7-
-----
8-
9-
.. automodule:: nautilus_trader.core.cache
10-
:show-inheritance:
11-
:inherited-members:
12-
:members:
13-
:member-order: bysource
146

157
Datetime
168
--------

0 commit comments

Comments
 (0)