Skip to content

Commit f1b643d

Browse files
authored
Release 1.182.0
See release notes.
2 parents 63c191b + d5fb56a commit f1b643d

File tree

383 files changed

+21416
-4217
lines changed

Some content is hidden

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

383 files changed

+21416
-4217
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,12 @@ jobs:
7171
- name: Install build dependencies
7272
run: python -m pip install --upgrade pip setuptools wheel pre-commit msgspec
7373

74+
- name: Install TA-Lib (Linux)
75+
if: runner.os == 'Linux'
76+
run: |
77+
make install-talib
78+
poetry run pip install ta-lib
79+
7480
- name: Setup cached pre-commit
7581
id: cached-pre-commit
7682
uses: actions/cache@v3

.github/workflows/coverage.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ jobs:
3030
working-directory: ${{ github.workspace }}
3131

3232
- name: Set up Rust tool-chain (Linux, Windows) stable
33-
if: (runner.os == 'Linux') || (runner.os == 'Windows')
3433
uses: actions-rust-lang/[email protected]
3534
with:
3635
toolchain: ${{ env.RUST_VERSION }}
@@ -54,6 +53,11 @@ jobs:
5453
- name: Install build dependencies
5554
run: python -m pip install --upgrade pip setuptools wheel pre-commit msgspec
5655

56+
- name: Install TA-Lib (Linux)
57+
run: |
58+
make install-talib
59+
poetry run pip install ta-lib
60+
5761
- name: Setup cached pre-commit
5862
id: cached-pre-commit
5963
uses: actions/cache@v3

.github/workflows/docker.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ jobs:
4545

4646
- name: Get branch name
4747
id: branch-name
48-
uses: tj-actions/branch-names@v6
48+
uses: tj-actions/branch-names@v7.0.7
4949

5050
- name: Build nautilus_trader image (develop)
5151
if: ${{ steps.branch-name.outputs.current_branch == 'develop' }}

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959

6060
- name: Get branch name
6161
id: branch-name
62-
uses: tj-actions/branch-names@v6
62+
uses: tj-actions/branch-names@v7.0.7
6363

6464
- name: Build Python docs
6565
run: make docs-python

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,8 @@
1515
*.key_secret
1616
*.sqlite
1717
*.env
18+
*.tar.gz*
19+
*.zip
1820

1921
.benchmarks*
2022
.coverage*
@@ -41,6 +43,7 @@ env/
4143
log/
4244
logs/
4345
secrets/
46+
ta-lib/
4447
*temp/
4548
*target/
4649
venv*/

.pre-commit-config.yaml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ repos:
7373
types: [python]
7474

7575
- repo: https://github.com/psf/black
76-
rev: 23.11.0
76+
rev: 23.12.0
7777
hooks:
7878
- id: black
7979
types_or: [python, pyi]
@@ -82,13 +82,13 @@ repos:
8282
exclude: "docs/_pygments/monokai.py"
8383

8484
- repo: https://github.com/astral-sh/ruff-pre-commit
85-
rev: v0.1.6
85+
rev: v0.1.9
8686
hooks:
8787
- id: ruff
8888
args: ["--fix"]
8989

9090
- repo: https://github.com/pycqa/isort
91-
rev: 5.12.0
91+
rev: 5.13.2
9292
hooks:
9393
- id: isort
9494
name: isort (cython)
@@ -111,7 +111,7 @@ repos:
111111
]
112112

113113
- repo: https://github.com/pre-commit/mirrors-mypy
114-
rev: v1.7.1
114+
rev: v1.8.0
115115
hooks:
116116
- id: mypy
117117
args: [

Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,10 @@ pytest-coverage:
130130
test-examples:
131131
bash scripts/test-examples.sh
132132

133+
.PHONY: install-talib
134+
install-talib:
135+
bash scripts/install-talib.sh
136+
133137
.PHONY: init-db
134138
init-db:
135139
(cd nautilus_core && cargo run --bin init-db)

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@
1414

1515
| Platform | Rust | Python |
1616
| :----------------- | :------ | :----- |
17-
| `Linux (x86_64)` | 1.74.0+ | 3.10+ |
18-
| `macOS (x86_64)` | 1.74.0+ | 3.10+ |
19-
| `macOS (arm64)` | 1.74.0+ | 3.10+ |
20-
| `Windows (x86_64)` | 1.74.0+ | 3.10+ |
17+
| `Linux (x86_64)` | 1.74.1+ | 3.10+ |
18+
| `macOS (x86_64)` | 1.74.1+ | 3.10+ |
19+
| `macOS (arm64)` | 1.74.1+ | 3.10+ |
20+
| `Windows (x86_64)` | 1.74.1+ | 3.10+ |
2121

2222
- **Website:** https://nautilustrader.io
2323
- **Docs:** https://docs.nautilustrader.io

RELEASES.md

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,43 @@
1+
# NautilusTrader 1.182.0 Beta
2+
3+
Released on 23rd December 2023 (UTC).
4+
5+
### Enhancements
6+
- Added `CacheDatabaseFacade` and `CacheDatabaseAdapter` to abstract backing technology from Python codebase
7+
- Added `RedisCacheDatabase` implemented in Rust with separate MPSC channel thread for insert, update and delete operations
8+
- Added TA-Lib integration, thanks @rsmb7z
9+
- Added `OrderBookDelta` and `OrderBookDeltas` to serializable and publishable types
10+
- Moved `PortfolioFacade` to `Actor`
11+
- Improved `Actor` and `Strategy` usability to be more lenient to mistaken calls to `clock` and `logger` from the constructor (warnings also added to docs)
12+
- Removed `redis` and `hiredis` dependencies from Python codebase
13+
14+
### Breaking Changes
15+
- Changed configuration objects to take stronger types as these are now serializable when registered (rather than primitives)
16+
- Changed `NautilusKernelConfig.trader_id` to type `TraderId`
17+
- Changed `BacktestDataConfig.instrument_id` to type `InstrumentId`
18+
- Changed `ActorConfig.component_id` to type `ComponentId | None`
19+
- Changed `StrategyConfig.strategy_id` to type `StrategyId | None`
20+
- Changed `Instrument`, `OrderFilled` and `AccountState` `info` field serialization due below fix (you'll need to flush your cache)
21+
- Changed `CacheConfig` to take a `DatabaseConfig` (better symmetry with `MessageBusConfig`)
22+
- Changed `RedisCacheDatabase` data structure for currencies from hashset to simpler key-value (you'll need to clear cache or delete all curreny keys)
23+
- Changed `Actor` state loading to now use the standard `Serializer`
24+
- Renamed `register_json_encoding` to `register_config_encoding`
25+
- Renamed `register_json_decoding` to `register_config_decoding`
26+
- Removed `CacheDatabaseConfig` (due above config change)
27+
- Removed `infrastructure` subpackage (now redundant with new Rust implementation)
28+
29+
### Fixes
30+
- Fixed `json` encoding for `CacheDatabaseAdapter` from `info` field serialization fix below
31+
- Fixed `Instrument`, `OrderFilled` and `AccountState` `info` field serialization to retain JSON serializable dicts (rather than double encoding and losing information)
32+
- Fixed Binance Futures `good_till_date` value when `time_in_force` not GTD, such as when strategy is managing the GTD (was incorrectly passing through UNIX milliseconds)
33+
- Fixed `Executor` handling of queued task IDs (was not discarding from queued tasks on completion)
34+
- Fixed `DataEngine` handling of order book snapshots with very small intervals (now handles as short as 20 milliseconds)
35+
- Fixed `BacktestEngine.clear_actors()`, `BacktestEngine.clear_strategies()` and `BacktestEngine.clear_exec_algorithms()`, thanks for reporting @davidsblom
36+
- Fixed `BacktestEngine` OrderEmulator reset, thanks @davidsblom
37+
- Fixed `Throttler.reset` and reset of `RiskEngine` throttlers, thanks @davidsblom
38+
39+
---
40+
141
# NautilusTrader 1.181.0 Beta
242

343
Released on 2nd December (UTC).

build.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -277,15 +277,14 @@ def _strip_unneeded_symbols() -> None:
277277
print("Stripping unneeded symbols from binaries...")
278278
for so in itertools.chain(Path("nautilus_trader").rglob("*.so")):
279279
if platform.system() == "Linux":
280-
strip_cmd = f"strip --strip-unneeded {so}"
280+
strip_cmd = ["strip", "--strip-unneeded", so]
281281
elif platform.system() == "Darwin":
282-
strip_cmd = f"strip -x {so}"
282+
strip_cmd = ["strip", "-x", so]
283283
else:
284284
raise RuntimeError(f"Cannot strip symbols for platform {platform.system()}")
285285
subprocess.run(
286-
strip_cmd,
286+
strip_cmd, # type: ignore [arg-type] # noqa
287287
check=True,
288-
shell=True, # noqa
289288
capture_output=True,
290289
)
291290
except subprocess.CalledProcessError as e:

0 commit comments

Comments
 (0)