Skip to content

Commit ef4d72e

Browse files
authored
Release 1.179.0
See release notes.
2 parents ef75e5f + 8015f70 commit ef4d72e

File tree

578 files changed

+33397
-19058
lines changed

Some content is hidden

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

578 files changed

+33397
-19058
lines changed

.docker/jupyterlab.dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
ARG GIT_TAG
22
FROM ghcr.io/nautechsystems/nautilus_trader:$GIT_TAG
33
COPY --from=ghcr.io/nautechsystems/nautilus_data:main /opt/pysetup/catalog /catalog
4-
RUN pip install jupyterlab
4+
RUN pip install jupyterlab datafusion
55
ENV NAUTILUS_PATH="/"
66
CMD ["python", "-m", "jupyterlab", "--port=8888", "--no-browser", "--ip=0.0.0.0", "--allow-root", "-NotebookApp.token=''", "--NotebookApp.password=''", "examples/notebooks"]

.docker/nautilus_trader.dockerfile

+9-7
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,14 @@ WORKDIR $PYSETUP_PATH
1616
FROM base as builder
1717

1818
# Install build deps
19-
RUN apt-get update && apt-get install -y curl clang git libssl-dev make pkg-config
19+
RUN apt-get update && \
20+
apt-get install -y curl clang git libssl-dev make pkg-config && \
21+
apt-get clean && \
22+
rm -rf /var/lib/apt/lists/*
2023

21-
# Install Rust stable
22-
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y
23-
24-
# Install poetry
25-
RUN curl -sSL https://install.python-poetry.org | python3 -
24+
# Install Rust stable and poetry
25+
RUN curl https://sh.rustup.rs -sSf | bash -s -- -y && \
26+
curl -sSL https://install.python-poetry.org | python3 -
2627

2728
# Install package requirements (split step and with --no-root to enable caching)
2829
COPY poetry.lock pyproject.toml build.py ./
@@ -36,10 +37,11 @@ COPY nautilus_trader ./nautilus_trader
3637
COPY README.md ./
3738
RUN poetry install --only main --all-extras
3839
RUN poetry build -f wheel
39-
RUN python -m pip install ./dist/*whl --force
40+
RUN python -m pip install ./dist/*whl --force --no-deps
4041
RUN find /usr/local/lib/python3.11/site-packages -name "*.pyc" -exec rm -f {} \;
4142

4243
# Final application image
4344
FROM base as application
45+
4446
COPY --from=builder /usr/local/lib/python3.11/site-packages /usr/local/lib/python3.11/site-packages
4547
COPY examples ./examples

.github/workflows/build-wheels.yml

+84
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
name: build-wheels
2+
3+
# Build Linux wheels on successful completion of the `coverage` workflow on the `develop` branch
4+
# Temporarily build wheels on every push to `develop` branch
5+
6+
on:
7+
push:
8+
branches: [develop]
9+
10+
jobs:
11+
build-wheels:
12+
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
13+
strategy:
14+
fail-fast: false
15+
matrix:
16+
arch: [x64]
17+
os: [ubuntu-latest]
18+
python-version: ["3.11"]
19+
name: build - Python ${{ matrix.python-version }} (${{ matrix.arch }} ${{ matrix.os }})
20+
runs-on: ${{ matrix.os }}
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
- name: Get Rust version from rust-toolchain.toml
27+
id: rust-version
28+
run: |
29+
version=$(awk -F\" '/version/ {print $2}' nautilus_core/rust-toolchain.toml)
30+
echo "Rust toolchain version $version"
31+
echo "RUST_VERSION=$version" >> $GITHUB_ENV
32+
working-directory: ${{ github.workspace }}
33+
34+
- name: Set up Rust tool-chain (stable)
35+
uses: actions-rust-lang/[email protected]
36+
with:
37+
toolchain: ${{ env.RUST_VERSION }}
38+
components: rustfmt, clippy
39+
40+
- name: Set up Python environment
41+
uses: actions/setup-python@v4
42+
with:
43+
python-version: ${{ matrix.python-version }}
44+
45+
- name: Get Poetry version from poetry-version
46+
run: |
47+
version=$(cat poetry-version)
48+
echo "POETRY_VERSION=$version" >> $GITHUB_ENV
49+
50+
- name: Install Poetry
51+
uses: snok/install-poetry@v1
52+
with:
53+
version: ${{ env.POETRY_VERSION }}
54+
55+
- name: Install build dependencies
56+
run: python -m pip install --upgrade pip setuptools wheel msgspec
57+
58+
- name: Set poetry cache-dir
59+
run: echo "POETRY_CACHE_DIR=$(poetry config cache-dir)" >> $GITHUB_ENV
60+
61+
- name: Poetry cache
62+
id: cached-poetry
63+
uses: actions/cache@v3
64+
with:
65+
path: ${{ env.POETRY_CACHE_DIR }}
66+
key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles('**/poetry.lock') }}
67+
68+
- name: Install / Build
69+
run: |
70+
poetry install
71+
poetry build --format wheel
72+
73+
- name: Set release output
74+
id: vars
75+
run: |
76+
echo "ASSET_PATH=$(find ./dist -mindepth 1 -print -quit)" >> $GITHUB_ENV
77+
cd dist
78+
echo "ASSET_NAME=$(printf '%s\0' * | awk 'BEGIN{RS="\0"} {print; exit}')" >> $GITHUB_ENV
79+
80+
- name: Upload wheel artifact
81+
uses: actions/upload-artifact@v3
82+
with:
83+
name: ${{ env.ASSET_NAME }}
84+
path: ${{ env.ASSET_PATH }}

.github/workflows/build.yml

+28-12
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@ jobs:
1616
arch: [x64]
1717
os: [ubuntu-latest, macos-latest, windows-latest]
1818
python-version: ["3.9", "3.10", "3.11"]
19+
defaults:
20+
run:
21+
shell: bash
1922
name: build - Python ${{ matrix.python-version }} (${{ matrix.arch }} ${{ matrix.os }})
2023
runs-on: ${{ matrix.os }}
2124
env:
@@ -24,21 +27,29 @@ jobs:
2427

2528
steps:
2629
- name: Checkout repository
27-
uses: actions/checkout@v3
30+
uses: actions/checkout@v4
31+
32+
- name: Get Rust version from rust-toolchain.toml
33+
id: rust-version
34+
run: |
35+
version=$(awk -F\" '/version/ {print $2}' nautilus_core/rust-toolchain.toml)
36+
echo "Rust toolchain version $version"
37+
echo "RUST_VERSION=$version" >> $GITHUB_ENV
38+
working-directory: ${{ github.workspace }}
2839

2940
- name: Set up Rust tool-chain (Linux, Windows) stable
3041
if: (runner.os == 'Linux') || (runner.os == 'Windows')
3142
uses: actions-rust-lang/[email protected]
3243
with:
33-
toolchain: stable
44+
toolchain: ${{ env.RUST_VERSION }}
3445
components: rustfmt, clippy
3546

3647
# Work around as actions-rust-lang does not seem to work on macOS yet
3748
- name: Set up Rust tool-chain (macOS) stable
3849
if: runner.os == 'macOS'
3950
uses: actions-rs/toolchain@v1
4051
with:
41-
toolchain: stable
52+
toolchain: ${{ env.RUST_VERSION }}
4253
override: true
4354
components: rustfmt, clippy
4455

@@ -47,8 +58,18 @@ jobs:
4758
with:
4859
python-version: ${{ matrix.python-version }}
4960

61+
- name: Get Poetry version from poetry-version
62+
run: |
63+
version=$(cat poetry-version)
64+
echo "POETRY_VERSION=$version" >> $GITHUB_ENV
65+
66+
- name: Install Poetry
67+
uses: snok/install-poetry@v1
68+
with:
69+
version: ${{ env.POETRY_VERSION }}
70+
5071
- name: Install build dependencies
51-
run: python -m pip install --upgrade pip setuptools wheel pre-commit poetry==1.6.1 msgspec
72+
run: python -m pip install --upgrade pip setuptools wheel pre-commit msgspec
5273

5374
- name: Setup cached pre-commit
5475
id: cached-pre-commit
@@ -57,19 +78,14 @@ jobs:
5778
path: ~/.cache/pre-commit
5879
key: ${{ runner.os }}-${{ matrix.python-version }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
5980

60-
- name: Setup poetry output (Linux, macOS)
61-
if: (runner.os == 'Linux') || (runner.os == 'macOS')
62-
run: echo "dir=$(poetry config cache-dir)" >> $GITHUB_ENV
63-
64-
- name: Setup poetry output (Windows)
65-
if: runner.os == 'Windows'
66-
run: echo "dir=$(poetry config cache-dir)" | Out-File -FilePath $env:GITHUB_ENV -Append >> $GITHUB_ENV
81+
- name: Set poetry cache-dir
82+
run: echo "POETRY_CACHE_DIR=$(poetry config cache-dir)" >> $GITHUB_ENV
6783

6884
- name: Poetry cache
6985
id: cached-poetry
7086
uses: actions/cache@v3
7187
with:
72-
path: ${{ env.dir }}
88+
path: ${{ env.POETRY_CACHE_DIR }}
7389
key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles('**/poetry.lock') }}
7490

7591
- name: Run pre-commit

.github/workflows/codeql-analysis.yml

+3-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ jobs:
1818

1919
steps:
2020
- name: Checkout repository
21-
uses: actions/checkout@v3
21+
uses: actions/checkout@v4
22+
with:
23+
fetch-depth: 1
2224

2325
- name: Initialize CodeQL
2426
uses: github/codeql-action/init@v1

.github/workflows/coverage.yml

+26-7
Original file line numberDiff line numberDiff line change
@@ -19,21 +19,40 @@ jobs:
1919

2020
steps:
2121
- name: Checkout repository
22-
uses: actions/checkout@v3
22+
uses: actions/checkout@v4
2323

24-
- name: Set up Rust tool-chain (stable)
24+
- name: Get Rust version from rust-toolchain.toml
25+
id: rust-version
26+
run: |
27+
version=$(awk -F\" '/version/ {print $2}' nautilus_core/rust-toolchain.toml)
28+
echo "Rust toolchain version $version"
29+
echo "RUST_VERSION=$version" >> $GITHUB_ENV
30+
working-directory: ${{ github.workspace }}
31+
32+
- name: Set up Rust tool-chain (Linux, Windows) stable
33+
if: (runner.os == 'Linux') || (runner.os == 'Windows')
2534
uses: actions-rust-lang/[email protected]
2635
with:
27-
toolchain: stable
36+
toolchain: ${{ env.RUST_VERSION }}
2837
components: rustfmt, clippy
2938

3039
- name: Set up Python environment
3140
uses: actions/setup-python@v4
3241
with:
3342
python-version: ${{ matrix.python-version }}
3443

44+
- name: Get Poetry version from poetry-version
45+
run: |
46+
version=$(cat poetry-version)
47+
echo "POETRY_VERSION=$version" >> $GITHUB_ENV
48+
49+
- name: Install Poetry
50+
uses: snok/install-poetry@v1
51+
with:
52+
version: ${{ env.POETRY_VERSION }}
53+
3554
- name: Install build dependencies
36-
run: python -m pip install --upgrade pip setuptools wheel pre-commit poetry==1.6.1 msgspec
55+
run: python -m pip install --upgrade pip setuptools wheel pre-commit msgspec
3756

3857
- name: Setup cached pre-commit
3958
id: cached-pre-commit
@@ -45,14 +64,14 @@ jobs:
4564
- name: Run pre-commit
4665
run: pre-commit run --all-files
4766

48-
- name: Set poetry output
49-
run: echo "dir=$(poetry config cache-dir)" >> $GITHUB_ENV
67+
- name: Set poetry cache-dir
68+
run: echo "POETRY_CACHE_DIR=$(poetry config cache-dir)" >> $GITHUB_ENV
5069

5170
- name: Poetry cache
5271
id: cached-poetry
5372
uses: actions/cache@v3
5473
with:
55-
path: ${{ env.dir }}
74+
path: ${{ env.POETRY_CACHE_DIR }}
5675
key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles('**/poetry.lock') }}
5776

5877
- name: Install Redis

.github/workflows/docker.yml

+21-8
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,29 @@ jobs:
1515

1616
steps:
1717
- name: Checkout repository
18-
uses: actions/checkout@v3
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 1
21+
22+
- name: Free Disk Space (Ubuntu)
23+
uses: jlumbroso/free-disk-space@main
24+
with:
25+
tool-cache: true
26+
android: false
27+
dotnet: false
28+
haskell: false
29+
large-packages: true
30+
docker-images: true
31+
swap-storage: true
1932

2033
- name: Set up QEMU
21-
uses: docker/setup-qemu-action@v1
34+
uses: docker/setup-qemu-action@v3
2235

2336
- name: Set up Docker Buildx
24-
uses: docker/setup-buildx-action@v1
37+
uses: docker/setup-buildx-action@v3
2538

2639
- name: Login to GHCR
27-
uses: docker/login-action@v1
40+
uses: docker/login-action@v3
2841
with:
2942
registry: ghcr.io
3043
username: ${{ github.repository_owner }}
@@ -37,7 +50,7 @@ jobs:
3750
- name: Build nautilus_trader image (develop)
3851
if: ${{ steps.branch-name.outputs.current_branch == 'develop' }}
3952
id: docker_build_trader_develop
40-
uses: docker/build-push-action@v2
53+
uses: docker/build-push-action@v5
4154
with:
4255
file: ".docker/nautilus_trader.dockerfile"
4356
push: true
@@ -50,7 +63,7 @@ jobs:
5063
- name: Build nautilus_trader image (latest)
5164
if: ${{ steps.branch-name.outputs.current_branch == 'master' }}
5265
id: docker_build_trader_latest
53-
uses: docker/build-push-action@v2
66+
uses: docker/build-push-action@v5
5467
with:
5568
file: ".docker/nautilus_trader.dockerfile"
5669
push: true
@@ -63,7 +76,7 @@ jobs:
6376
- name: Build jupyterlab image (develop)
6477
if: ${{ steps.branch-name.outputs.current_branch == 'develop' }}
6578
id: docker_build_jupyterlab_develop
66-
uses: docker/build-push-action@v2
79+
uses: docker/build-push-action@v5
6780
with:
6881
file: ".docker/jupyterlab.dockerfile"
6982
push: true
@@ -78,7 +91,7 @@ jobs:
7891
- name: Build jupyterlab image (latest)
7992
if: ${{ steps.branch-name.outputs.current_branch == 'master' }}
8093
id: docker_build_jupyterlab_latest
81-
uses: docker/build-push-action@v2
94+
uses: docker/build-push-action@v5
8295
with:
8396
file: ".docker/jupyterlab.dockerfile"
8497
push: true

0 commit comments

Comments
 (0)