Skip to content

Commit

Permalink
Release 1.157.0
Browse files Browse the repository at this point in the history
See release notes.
  • Loading branch information
cjdsellers authored Oct 23, 2022
2 parents 0d3b8e4 + 4a8d9ff commit 57f60c1
Show file tree
Hide file tree
Showing 192 changed files with 1,944 additions and 1,295 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
matrix:
arch: [x64, ARM64]
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.9", "3.10"]
name: build - Python ${{ matrix.python-version }} (${{ matrix.arch }} ${{ matrix.os }})
runs-on: ${{ matrix.os }}
env:
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Run pre-commit
run: pre-commit run --all-files

# Setup cached Poetry
# Setup Poetry caching
- name: Get Poetry cache dir
id: cached-poetry-dir
run: echo "::set-output name=dir::$(poetry config cache-dir)"
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
matrix:
arch: [x64]
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.9", "3.10"]
name: build - Python ${{ matrix.python-version }} (${{ matrix.arch }} ${{ matrix.os }})
runs-on: ${{ matrix.os }}
env:
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
- name: Run pre-commit
run: pre-commit run --all-files

# Setup cached Poetry
# Setup Poetry caching
- name: Get Poetry cache dir
id: cached-poetry-dir
run: echo "::set-output name=dir::$(poetry config cache-dir)"
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,13 +55,14 @@ jobs:

# Setup Poetry caching
- name: Get Poetry cache dir
id: cached-poetry
id: cached-poetry-dir
run: echo "::set-output name=dir::$(poetry config cache-dir)"

- name: Poetry/Nox cache
id: cached-poetry
uses: actions/cache@v3
with:
path: ${{ steps.cached-poetry.outputs.dir }}
path: ${{ steps.cached-poetry-dir.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles('**/poetry.lock') }}

# Install and run database dependencies
Expand Down
21 changes: 12 additions & 9 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
matrix:
arch: [x64, ARM64]
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.9", "3.10"]
name: test-pip-install - Python ${{ matrix.python-version }} (${{ matrix.arch }} ${{ matrix.os }})
runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -85,13 +85,14 @@ jobs:

# Setup Poetry caching
- name: Get Poetry cache dir
id: cached-poetry
id: cached-poetry-dir
run: echo "::set-output name=dir::$(poetry config cache-dir)"

- name: Poetry/Nox cache
id: cached-poetry
uses: actions/cache@v3
with:
path: ${{ steps.cached-poetry.outputs.dir }}
path: ${{ steps.cached-poetry-dir.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles('**/poetry.lock') }}

# Install
Expand Down Expand Up @@ -160,13 +161,14 @@ jobs:

# Setup Poetry caching
- name: Get Poetry cache dir
id: cached-poetry
id: cached-poetry-dir
run: echo "::set-output name=dir::$(poetry config cache-dir)"

- name: Poetry/Nox cache
id: cached-poetry
uses: actions/cache@v3
with:
path: ${{ steps.cached-poetry.outputs.dir }}
path: ${{ steps.cached-poetry-dir.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles('**/poetry.lock') }}

# Install / Build
Expand All @@ -175,7 +177,7 @@ jobs:
poetry install
poetry build --format sdist
# Set release output variables
# Set release output
- name: Set output
id: vars
run: |
Expand Down Expand Up @@ -211,7 +213,7 @@ jobs:
matrix:
arch: [x64] # Temporarily pause ARM64 in build matrix
os: [ubuntu-latest, macos-latest, windows-latest]
python-version: ["3.8", "3.9", "3.10"]
python-version: ["3.9", "3.10"]
name: publish-wheels - Python ${{ matrix.python-version }} (${{ matrix.arch }} ${{ matrix.os }})
runs-on: ${{ matrix.os }}
env:
Expand Down Expand Up @@ -243,13 +245,14 @@ jobs:

# Setup Poetry caching
- name: Get Poetry cache dir
id: cached-poetry
id: cached-poetry-dir
run: echo "::set-output name=dir::$(poetry config cache-dir)"

- name: Poetry/Nox cache
id: cached-poetry
uses: actions/cache@v3
with:
path: ${{ steps.cached-poetry.outputs.dir }}
path: ${{ steps.cached-poetry-dir.outputs.dir }}
key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles('**/poetry.lock') }}

# Install / Build
Expand Down
42 changes: 22 additions & 20 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ repos:
- id: check-yaml

- repo: https://github.com/codespell-project/codespell
rev: v2.2.1
rev: v2.2.2
hooks:
- id: codespell
description: Checks for common misspellings.
Expand All @@ -42,31 +42,32 @@ repos:
name: pycln (Python unused imports)
exclude: "nautilus_trader/live/node.py|nautilus_trader/adapters/betfair/execution.py"

- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
types_or: [python, cython]
entry: "isort"
args: ["--settings-file", "pyproject.toml", "."]

- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
args: [
--line-length=100,
]
types_or: [python, pyi]
entry: "black"
args: ["--config", "pyproject.toml"]
exclude: "docs/_pygments/monokai.py"

- repo: https://github.com/pycqa/isort
rev: 5.10.1
hooks:
- id: isort
args: [
--combine-as,
--line-length=100,
--ensure-newline-before-comments,
--force-single-line-imports,
--single-line-exclusions=typing,
--trailing-comma,
--multi-line=3,
--lines-after-imports=2,
--use-parentheses,
]
exclude: "nautilus_trader/core/rust"
# - repo: https://github.com/pre-commit/mirrors-mypy
# rev: v0.982
# hooks:
# - id: mypy
# types_or: [python, pyi]
# entry: "poetry"
# args: ["run", "mypy", "--config", "pyproject.toml"]
# require_serial: true
# exclude: "^nautilus_core/"

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.982
Expand All @@ -82,6 +83,7 @@ repos:
types-frozendict,
types-pytz,
types-redis,
types-requests,
types-toml,
]

Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@

| Platform | Rust | Python |
|:-----------------|:----------|:-------|
| Linux (x86_64) | `1.64.0+` | `3.8+` |
| macOS (x86_64) | `1.64.0+` | `3.8+` |
| Windows (x86_64) | `1.64.0+` | `3.8+` |
| Linux (x86_64) | `1.64.0+` | `3.9+` |
| macOS (x86_64) | `1.64.0+` | `3.9+` |
| Windows (x86_64) | `1.64.0+` | `3.9+` |

- **Website:** https://nautilustrader.io
- **Docs:** https://docs.nautilustrader.io
Expand Down
17 changes: 17 additions & 0 deletions RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
# NautilusTrader 1.157.0 Beta

Released on 24th October (UTC).

### Breaking Changes
- None

### Enhancements
- Added experimental local order emulation for all order types (except `MARKET` and `MARKET_TO_LIMIT`) see docs
- Added `min_latency`, `max_latency` and `avg_latency` to `HttpClient` base class

### Fixes
- Fixed Binance Spot `display_qty` for iceberg orders, thanks @JackMa
- Fixed Binance HTTP client error logging

---

# NautilusTrader 1.156.0 Beta

Released on 19th October 2022 (UTC).
Expand Down
7 changes: 3 additions & 4 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import subprocess
from datetime import datetime
from pathlib import Path
from typing import List

import numpy as np
from Cython.Build import build_ext
Expand Down Expand Up @@ -103,7 +102,7 @@ def _build_rust_libs() -> None:
}


def _build_extensions() -> List[Extension]:
def _build_extensions() -> list[Extension]:
# Regarding the compiler warning: #warning "Using deprecated NumPy API,
# disable it with " "#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION"
# https://stackoverflow.com/questions/52749662/using-deprecated-numpy-api
Expand All @@ -115,7 +114,7 @@ def _build_extensions() -> List[Extension]:

extra_compile_args = []
if BUILD_MODE == "release" and platform.system() != "Windows":
# extra_compile_args.append("-O2") # Temporary to tweak total build size
extra_compile_args.append("-O1") # Temporary to tweak total build size
extra_compile_args.append("-pipe")

extra_link_args = RUST_LIBS
Expand Down Expand Up @@ -145,7 +144,7 @@ def _build_extensions() -> List[Extension]:
]


def _build_distribution(extensions: List[Extension]) -> Distribution:
def _build_distribution(extensions: list[Extension]) -> Distribution:
# Build a Distribution using cythonize()
# Determine the build output directory
if PROFILE_MODE:
Expand Down
4 changes: 2 additions & 2 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,8 @@
"version_dropdown": True,
"version_json": "_static/version.json",
"version_info": {
"1.156.0 (develop)": "https://docs.nautilustrader.io",
"1.155.0 (latest)": "https://docs.nautilustrader.io/latest",
"1.157.0 (develop)": "https://docs.nautilustrader.io",
"1.156.0 (latest)": "https://docs.nautilustrader.io/latest",
},
"table_classes": ["plain"],
}
Expand Down
2 changes: 1 addition & 1 deletion docs/getting_started/installation.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Installation

The package is tested against Python 3.8, 3.9 and 3.10 on 64-bit Linux, macOS and Windows.
The package is tested against Python 3.9 and 3.10 on 64-bit Linux, macOS and Windows.
We recommend running the platform with the latest stable version of Python, and
in a virtual environment to isolate the dependencies.

Expand Down
3 changes: 1 addition & 2 deletions docs/getting_started/quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -253,14 +253,13 @@ configuration and execution is the `BacktestNode` allows running multiple config
parameters or batches of data). We are now ready to run some backtests!

```python
from typing import List
from nautilus_trader.backtest.node import BacktestNode


node = BacktestNode(configs=[config])

# Runs one or many configs synchronously
results: List[BacktestResult] = node.run()
results: list[BacktestResult] = node.run()
```

Now that the run is complete, we can also directly query for the `BacktestEngine`(s) used internally by the `BacktestNode`
Expand Down
Loading

0 comments on commit 57f60c1

Please sign in to comment.