Skip to content

Commit

Permalink
Release 1.144.0
Browse files Browse the repository at this point in the history
See release notes.
  • Loading branch information
cjdsellers authored May 10, 2022
2 parents 1540a76 + 949f81c commit 313d769
Show file tree
Hide file tree
Showing 290 changed files with 12,287 additions and 3,140 deletions.
6 changes: 5 additions & 1 deletion .docker/nautilus_trader.dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -9,14 +9,17 @@ ENV PYTHONUNBUFFERED=1 \
POETRY_VIRTUALENVS_CREATE=false \
POETRY_NO_INTERACTION=1 \
PYSETUP_PATH="/opt/pysetup"
ENV PATH="$POETRY_HOME/bin:$PATH"
ENV PATH="/root/.cargo/bin:$POETRY_HOME/bin:$PATH"
WORKDIR $PYSETUP_PATH

FROM base as builder

# Install build deps
RUN apt-get update && apt-get install -y gcc curl

# Install Rust stable
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y

# Install poetry
RUN curl -sSL https://install.python-poetry.org | python3 -

Expand All @@ -25,6 +28,7 @@ COPY poetry.lock pyproject.toml build.py ./
RUN poetry install --no-root --no-dev

# Build nautilus_trader
COPY nautilus_core ./nautilus_core
COPY nautilus_trader ./nautilus_trader
COPY README.md ./
RUN poetry install --no-dev
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

# Rust setup
- name: Set up Rust environment
uses: hecrj/setup-rust-action@v1
with:
rust-version: stable
components: clippy

# Python setup
- name: Set up Python environment
uses: actions/setup-python@v2
Expand Down Expand Up @@ -73,6 +80,11 @@ jobs:
sudo apt-get install redis-server
redis-server --daemonize yes
- name: Install Memurai (Windows)
if: runner.os == 'Windows'
run: |
choco install memurai-developer.install
# Run tests (Linux)
- name: Run tests (Linux)
if: runner.os == 'Linux'
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

# Rust setup
- name: Set up Rust environment
uses: hecrj/setup-rust-action@v1
with:
rust-version: stable
components: clippy

# Python setup
- name: Set up Python environment
uses: actions/setup-python@v2
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

# Rust setup
- name: Set up Rust environment
uses: hecrj/setup-rust-action@v1
with:
rust-version: stable
components: clippy

# Python setup
- name: Set up Python environment
uses: actions/setup-python@v2
Expand Down
33 changes: 31 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,13 @@ jobs:
- name: Checkout repository
uses: actions/checkout@v2

# Rust setup
- name: Set up Rust environment
uses: hecrj/setup-rust-action@v1
with:
rust-version: stable
components: clippy

# Python setup
- name: Set up Python environment
uses: actions/setup-python@v2
Expand All @@ -38,7 +45,7 @@ jobs:
# Test pip installation
- name: Test pip installation
run: pip install .[distributed,docs]
run: pip install .

tag-release:
needs: [ test-pip-install ]
Expand All @@ -53,6 +60,13 @@ jobs:
with:
fetch-depth: 2

# Rust setup
- name: Set up Rust environment
uses: hecrj/setup-rust-action@v1
with:
rust-version: stable
components: clippy

# Python setup
- name: Set up Python environment
uses: actions/setup-python@v2
Expand Down Expand Up @@ -116,13 +130,19 @@ jobs:
name: publish-sdist - Python 3.10 (ubuntu-latest)
runs-on: ubuntu-latest
env:
# Skip build copy to avoid *.so files being copied into the source
SKIP_BUILD_COPY: true

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Rust setup
- name: Set up Rust environment
uses: hecrj/setup-rust-action@v1
with:
rust-version: stable
components: clippy

# Python setup
- name: Set up Python environment
uses: actions/setup-python@v2
Expand Down Expand Up @@ -192,11 +212,20 @@ jobs:
python-version: [ "3.8", "3.9", "3.10" ]
name: publish-wheels - Python ${{ matrix.python-version }} (${{ matrix.os }})
runs-on: ${{ matrix.os }}
env:
CARGO_MODE: release

steps:
- name: Checkout repository
uses: actions/checkout@v2

# Rust setup
- name: Set up Rust environment
uses: hecrj/setup-rust-action@v1
with:
rust-version: stable
components: clippy

# Python setup
- name: Set up Python environment
uses: actions/setup-python@v2
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,4 @@ examples/backtest/notebooks/catalog
nautilus_trader/**/.gitignore
docs/**/*.ipynb
!nautilus_trader/core/pytime.h
!nautilus_core/lib/**/*
27 changes: 22 additions & 5 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
repos:

##############################################################################
# General checks
##############################################################################
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.2.0
hooks:
- id: forbid-new-submodules
- id: fix-encoding-pragma
args: [--remove]
- id: end-of-file-fixer
types_or: [python, cython]
types_or: [python, cython, rust]
- id: trailing-whitespace
types_or: [python, cython]
- id: debug-statements
Expand All @@ -30,8 +32,22 @@ repos:
types_or: [python, cython, rst, markdown]
exclude: "nautilus_trader/adapters/betfair/parsing.py|nautilus_trader/adapters/betfair/execution.py|tests/integration_tests/adapters/betfair/test_kit.py|nautilus_trader/adapters/binance/futures/schemas/user.py"

##############################################################################
# Rust checks
##############################################################################
- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
hooks:
- id: cargo-check
args: ["--manifest-path", "nautilus_core/Cargo.toml"]
- id: clippy
args: ["--manifest-path", "nautilus_core/Cargo.toml"]

##############################################################################
# Python/Cython checks
##############################################################################
- repo: https://github.com/hadialqattan/pycln
rev: v1.3.1
rev: v1.3.2
hooks:
- id: pycln
name: pycln (Python unused imports)
Expand Down Expand Up @@ -61,9 +77,10 @@ repos:
--lines-after-imports=2,
--use-parentheses,
]
exclude: "nautilus_trader/core/rust"

- repo: https://github.com/pre-commit/mirrors-mypy
rev: v0.942
rev: v0.950
hooks:
- id: mypy
args: [
Expand Down Expand Up @@ -105,7 +122,7 @@ repos:
--max-complexity=10,
--max-line-length=150,
--statistics,
--ignore=C101 E203 E252 E402 D100 D101 D102 S101 S403 W503,
--ignore=C101 E203 E252 E402 D100 D101 D102 S101 S403 S404 W503,
--min-python-version=3.8.0
]
- id: flake8
Expand Down
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ clean:
rm -rf cython_debug
rm -rf dist
rm -rf docs/build
find . -name target -type d -exec rm -rf {} +
find . -name .benchmarks -type d -exec rm -rf {} +
find . -name '*.dll' -exec rm {} +
find . -name '*.prof' -exec rm {} +
Expand All @@ -34,9 +35,16 @@ clean:
docs:
poetry run sphinx-build docs docs/build/html -b html

pre-commit:
format:
(cd nautilus_core && cargo fmt)

pre-commit: format
pre-commit run --all-files

update:
(cd nautilus_core && cargo update)
poetry update

docker-build: clean
docker pull ${IMAGE_FULL} || docker pull ${IMAGE}:develop || true
docker build -f .docker/nautilus_trader.dockerfile --platform linux/x86_64 -t ${IMAGE_FULL} .
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@ including FX, Equities, Futures, Options, CFDs, Crypto and Betting - across mult

## Features

- **Fast:** C-level speed through Cython. Asynchronous networking with [uvloop](https://github.com/MagicStack/uvloop)
- **Reliable:** Type safety through Cython. Redis backed performant state persistence
- **Fast:** C-level speed through Rust and Cython. Asynchronous networking with [uvloop](https://github.com/MagicStack/uvloop)
- **Reliable:** Type safety through Rust and Cython. Redis backed performant state persistence
- **Flexible:** OS independent, runs on Linux, macOS, Windows. Deploy using Docker
- **Integrated:** Modular adapters mean any REST, WebSocket, or FIX API can be integrated
- **Advanced:** Time in force `IOC`, `FOK`, `GTD`, `AT_THE_OPEN`, `AT_THE_CLOSE`, advanced order types and conditional triggers. Execution instructions `post-only`, `reduce-only`, and icebergs. Contingency order lists including `OCO`, `OTO`
Expand Down Expand Up @@ -167,7 +167,7 @@ as specified in the `pyproject.toml`. However, we highly recommend installing us
1. Install [rustup](https://rustup.rs/) (the Rust toolchain installer):
- Linux and macOS:
```
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
curl https://sh.rustup.rs -sSf | sh
```
- Windows:
- Download and install [`rustup-init.exe`](https://win.rustup.rs/x86_64)
Expand Down Expand Up @@ -373,7 +373,7 @@ Contributors are also required to sign a standard Contributor License Agreement
---

Copyright (C) 2015-2022 Nautech Systems Pty Ltd. All rights reserved.
https://nautechsystems.io
https://nautilustrader.io

![nautechsystems](https://github.com/nautechsystems/nautilus_trader/blob/develop/docs/_images/ns-logo.png?raw=true "nautechsystems")
<img src="https://github.com/nautechsystems/nautilus_trader/blob/develop/docs/_images/ferris.png" width="128">
30 changes: 29 additions & 1 deletion RELEASES.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,32 @@
# NautilusTrader 1.144.0 Beta

Released on 10th May 2022 (UTC).

### Breaking Changes
- Removed `BacktestEngine.add_ticks()` as redundant with `.add_data()`
- Removed `BacktestEngine.add_bars()` as redundant with `.add_data()`
- Removed `BacktestEngine.add_generic_data()` as redundant with `.add_data()`
- Removed `BacktestEngine.add_order_book_data()` as redundant with `.add_data()`
- Renamed `Position.from_order` to `Position.opening_order_id`
- Renamed `StreamingPersistence` to `StreamingFeatherWriter`
- Renamed `PersistenceConfig` to `StreamingConfig`
- Renamed `PersistenceConfig.flush_interval` to `flush_interval_ms`

### Enhancements
- Added `Actor.publish_signal` for generic dynamic signal data
- Added `WEEK` and `MONTH` bar aggregation options
- Added `Position.closing_order_id` property
- Added `tags` param to `Strategy.submit_order`
- Added optional `check_positon_exists` flag to `Strategy.submit_order`
- Eliminated all use of `unsafe` Rust and C null-terminated byte strings
- The `bypass_logging` config option will also now bypass the `BacktestEngine` logger

### Fixes
- Fixed behaviour of `IOC` and `FOK` time in force instructions
- Fixed Binance bar resolution parsing

---

# NautilusTrader 1.143.0 Beta

Released on 21st April 2022 (UTC).
Expand All @@ -12,7 +41,6 @@ None
- Fixed segfault for `CashAccount.calculate_balance_locked` with no base currency
- Various FeatherWriter fixes


---

# NautilusTrader 1.142.0 Beta
Expand Down
Loading

0 comments on commit 313d769

Please sign in to comment.