Skip to content

Commit 178d621

Browse files
authored
Release 1.183.0
See release notes.
2 parents f1b643d + 038e93f commit 178d621

File tree

1,325 files changed

+13336
-8743
lines changed

Some content is hidden

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

1,325 files changed

+13336
-8743
lines changed

.github/workflows/build-wheels.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
name: build-wheels
22

3-
# Build wheels on every push to `develop` branch
4-
53
on:
64
push:
7-
branches: [develop]
5+
branches: [nightly]
86

97
jobs:
108
build-wheels:

.github/workflows/build.yml

Lines changed: 101 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
name: build
22

3-
# Build and test NautilusTrader
4-
53
on:
64
push:
7-
branches: [master, develop]
5+
branches: [master, nightly, develop]
86
pull_request:
97
branches: [develop]
108

@@ -14,7 +12,7 @@ jobs:
1412
fail-fast: false
1513
matrix:
1614
arch: [x64]
17-
os: [ubuntu-latest, macos-latest, windows-latest]
15+
os: [ubuntu-latest, windows-latest]
1816
python-version: ["3.10", "3.11", "3.12"]
1917
defaults:
2018
run:
@@ -38,21 +36,11 @@ jobs:
3836
working-directory: ${{ github.workspace }}
3937

4038
- name: Set up Rust tool-chain (Linux, Windows) stable
41-
if: (runner.os == 'Linux') || (runner.os == 'Windows')
4239
uses: actions-rust-lang/[email protected]
4340
with:
4441
toolchain: ${{ env.RUST_VERSION }}
4542
components: rustfmt, clippy
4643

47-
# Work around as actions-rust-lang does not seem to work on macOS yet
48-
- name: Set up Rust tool-chain (macOS) stable
49-
if: runner.os == 'macOS'
50-
uses: actions-rs/toolchain@v1
51-
with:
52-
toolchain: ${{ env.RUST_VERSION }}
53-
override: true
54-
components: rustfmt, clippy
55-
5644
- name: Set up Python environment
5745
uses: actions/setup-python@v4
5846
with:
@@ -99,24 +87,20 @@ jobs:
9987
# pre-commit run --hook-stage manual gitlint-ci
10088
pre-commit run --all-files
10189
102-
- name: Install Redis (macOS)
103-
if: runner.os == 'macOS'
104-
run: |
105-
brew install redis
106-
redis-server --daemonize yes
107-
10890
- name: Install Redis (Linux)
10991
if: runner.os == 'Linux'
11092
run: |
11193
sudo apt-get install redis-server
11294
redis-server --daemonize yes
11395
114-
- name: Run nautilus_core cargo tests (Linux, macOS)
115-
if: (runner.os == 'Linux') || (runner.os == 'macOS')
116-
run: make cargo-test
96+
- name: Run nautilus_core cargo tests (Linux)
97+
if: runner.os == 'Linux'
98+
run: |
99+
cargo install cargo-nextest
100+
make cargo-test
117101
118-
- name: Run tests (Linux, macOS)
119-
if: (runner.os == 'Linux') || (runner.os == 'macOS')
102+
- name: Run tests (Linux)
103+
if: runner.os == 'Linux'
120104
run: |
121105
make pytest
122106
make test-examples
@@ -129,3 +113,95 @@ jobs:
129113
poetry run pytest --ignore=tests/performance_tests --new-first --failed-first
130114
env:
131115
PARALLEL_BUILD: false
116+
117+
build-macos:
118+
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/nightly'
119+
strategy:
120+
fail-fast: false
121+
matrix:
122+
arch: [x64]
123+
os: [macos-latest]
124+
python-version: ["3.10", "3.11", "3.12"]
125+
defaults:
126+
run:
127+
shell: bash
128+
name: build - Python ${{ matrix.python-version }} (${{ matrix.arch }} ${{ matrix.os }})
129+
runs-on: ${{ matrix.os }}
130+
env:
131+
BUILD_MODE: debug
132+
RUST_BACKTRACE: 1
133+
134+
steps:
135+
- name: Checkout repository
136+
uses: actions/checkout@v4
137+
138+
- name: Get Rust version from rust-toolchain.toml
139+
id: rust-version
140+
run: |
141+
version=$(awk -F\" '/version/ {print $2}' nautilus_core/rust-toolchain.toml)
142+
echo "Rust toolchain version $version"
143+
echo "RUST_VERSION=$version" >> $GITHUB_ENV
144+
working-directory: ${{ github.workspace }}
145+
146+
# Work around as actions-rust-lang does not seem to work on macOS yet
147+
- name: Set up Rust tool-chain (macOS) stable
148+
uses: actions-rs/toolchain@v1
149+
with:
150+
toolchain: ${{ env.RUST_VERSION }}
151+
override: true
152+
components: rustfmt, clippy
153+
154+
- name: Set up Python environment
155+
uses: actions/setup-python@v4
156+
with:
157+
python-version: ${{ matrix.python-version }}
158+
159+
- name: Get Poetry version from poetry-version
160+
run: |
161+
version=$(cat poetry-version)
162+
echo "POETRY_VERSION=$version" >> $GITHUB_ENV
163+
164+
- name: Install Poetry
165+
uses: snok/install-poetry@v1
166+
with:
167+
version: ${{ env.POETRY_VERSION }}
168+
169+
- name: Install build dependencies
170+
run: python -m pip install --upgrade pip setuptools wheel pre-commit msgspec
171+
172+
- name: Setup cached pre-commit
173+
id: cached-pre-commit
174+
uses: actions/cache@v3
175+
with:
176+
path: ~/.cache/pre-commit
177+
key: ${{ runner.os }}-${{ matrix.python-version }}-pre-commit-${{ hashFiles('.pre-commit-config.yaml') }}
178+
179+
- name: Set poetry cache-dir
180+
run: echo "POETRY_CACHE_DIR=$(poetry config cache-dir)" >> $GITHUB_ENV
181+
182+
- name: Poetry cache
183+
id: cached-poetry
184+
uses: actions/cache@v3
185+
with:
186+
path: ${{ env.POETRY_CACHE_DIR }}
187+
key: ${{ runner.os }}-${{ matrix.python-version }}-poetry-${{ hashFiles('**/poetry.lock') }}
188+
189+
- name: Run pre-commit
190+
run: |
191+
# pre-commit run --hook-stage manual gitlint-ci
192+
pre-commit run --all-files
193+
194+
- name: Install Redis (macOS)
195+
run: |
196+
brew install redis
197+
redis-server --daemonize yes
198+
199+
- name: Run nautilus_core cargo tests (macOS)
200+
run: |
201+
cargo install cargo-nextest
202+
make cargo-test
203+
204+
- name: Run tests (macOS)
205+
run: |
206+
make pytest
207+
make test-examples

.github/workflows/coverage.yml

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
name: coverage
22

3-
# Run code coverage analysis for NautilusTrader
4-
53
on:
64
push:
7-
branches: [develop]
5+
branches: [nightly]
86

97
jobs:
108
build:
@@ -13,7 +11,7 @@ jobs:
1311
matrix:
1412
arch: [x64]
1513
os: [ubuntu-latest]
16-
python-version: ["3.10"]
14+
python-version: ["3.10"] # Fails on 3.11 due Cython
1715
name: build - Python ${{ matrix.python-version }} (${{ matrix.arch }} ${{ matrix.os }})
1816
runs-on: ${{ matrix.os }}
1917

.github/workflows/docker.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
name: docker
22

3-
# Build NautilusTrader docker images
4-
53
on:
64
push:
7-
branches: [master, develop]
5+
branches: [master, nightly]
86

97
jobs:
108
build-docker-images:
@@ -47,18 +45,18 @@ jobs:
4745
id: branch-name
4846
uses: tj-actions/[email protected]
4947

50-
- name: Build nautilus_trader image (develop)
51-
if: ${{ steps.branch-name.outputs.current_branch == 'develop' }}
52-
id: docker_build_trader_develop
48+
- name: Build nautilus_trader image (nightly)
49+
if: ${{ steps.branch-name.outputs.current_branch == 'nightly' }}
50+
id: docker_build_trader_nightly
5351
uses: docker/build-push-action@v5
5452
with:
5553
file: ".docker/nautilus_trader.dockerfile"
5654
push: true
57-
tags: ghcr.io/${{ github.repository_owner }}/nautilus_trader:develop
55+
tags: ghcr.io/${{ github.repository_owner }}/nautilus_trader:nightly
5856
cache-from: type=gha
5957
cache-to: type=gha
6058
- name: Digest nautilus_trader image
61-
run: echo ${{ steps.docker_build_trader_develop.outputs.digest }}
59+
run: echo ${{ steps.docker_build_trader_nightly.outputs.digest }}
6260

6361
- name: Build nautilus_trader image (latest)
6462
if: ${{ steps.branch-name.outputs.current_branch == 'master' }}
@@ -73,20 +71,20 @@ jobs:
7371
- name: Digest nautilus_trader image
7472
run: echo ${{ steps.docker_build_trader_latest.outputs.digest }}
7573

76-
- name: Build jupyterlab image (develop)
77-
if: ${{ steps.branch-name.outputs.current_branch == 'develop' }}
78-
id: docker_build_jupyterlab_develop
74+
- name: Build jupyterlab image (nightly)
75+
if: ${{ steps.branch-name.outputs.current_branch == 'nightly' }}
76+
id: docker_build_jupyterlab_nightly
7977
uses: docker/build-push-action@v5
8078
with:
8179
file: ".docker/jupyterlab.dockerfile"
8280
push: true
83-
tags: ghcr.io/${{ github.repository_owner }}/jupyterlab:develop
81+
tags: ghcr.io/${{ github.repository_owner }}/jupyterlab:nightly
8482
cache-from: type=gha
8583
cache-to: type=gha
8684
build-args: |
8785
GIT_TAG=${{ steps.branch-name.outputs.current_branch }}
8886
- name: Digest jupyterlab image
89-
run: echo ${{ steps.docker_build_jupyterlab_develop.outputs.digest }}
87+
run: echo ${{ steps.docker_build_jupyterlab_nightly.outputs.digest }}
9088

9189
- name: Build jupyterlab image (latest)
9290
if: ${{ steps.branch-name.outputs.current_branch == 'master' }}

.github/workflows/docs.yml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,8 @@
11
name: docs
22

3-
# Build and deploy the NautilusTrader documentation
4-
53
on:
64
push:
7-
branches: [master, develop]
5+
branches: [nightly]
86

97
jobs:
108
docs:
@@ -75,16 +73,16 @@ jobs:
7573
- name: Add CNAME
7674
run: echo "docs.nautilustrader.io" >> docs/build/html/CNAME
7775

78-
- name: Publish docs (develop)
79-
if: ${{ steps.branch-name.outputs.current_branch == 'develop' }}
76+
- name: Publish docs (nightly)
77+
if: ${{ steps.branch-name.outputs.current_branch == 'nightly' }}
8078
uses: s0/git-publish-subdir-action@develop
8179
env:
8280
REPO: self
8381
BRANCH: gh-pages
8482
FOLDER: docs/build/html
8583
SQUASH_HISTORY: false
8684
GITHUB_TOKEN: ${{ secrets.GHPAGES_ACCESS }}
87-
TARGET_DIR: develop
85+
TARGET_DIR: nightly
8886

8987
- name: Publish docs (latest)
9088
if: ${{ steps.branch-name.outputs.current_branch == 'master' }}

.github/workflows/nightly-merge.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: nightly-merge
2+
3+
on:
4+
push:
5+
branches: [nightly-merge-test]
6+
# schedule:
7+
# - cron: '0 14 * * *' # At 14:00 UTC every day
8+
9+
jobs:
10+
nightly-merge:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout repository
14+
uses: actions/checkout@v4
15+
with:
16+
fetch-depth: 0 # Fetch all history for all branches and tags
17+
18+
# Temporary config before nautilus-bot account
19+
- name: Configure Git
20+
run: |
21+
git config --local user.email "[email protected]"
22+
git config --local user.name "Chris Sellers"
23+
24+
- name: Merge develop into nightly
25+
run: |
26+
git checkout nightly
27+
git merge --no-ff origin/develop -m "Automated merge of develop into nightly"
28+
29+
- name: Push changes
30+
run: |
31+
git push origin nightly

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,10 +33,11 @@
3333
.ruff_cache/
3434
.vscode/
3535

36+
/catalog/
37+
3638
__pycache__
3739
_build/
3840
build/
39-
catalog/
4041
data_catalog/
4142
dist/
4243
env/
@@ -59,6 +60,7 @@ examples/backtest/notebooks/catalog
5960
nautilus_trader/**/.gitignore
6061
nautilus_trader/test_kit/mocks/.nautilus/
6162
tests/test_data/catalog/
63+
tests/unit_tests/persistence/catalog
6264
bench_data/
6365

6466
!tests/integration_tests/adapters/betfair/responses/*.log

.pre-commit-config.yaml

Lines changed: 2 additions & 2 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.12.0
76+
rev: 23.12.1
7777
hooks:
7878
- id: black
7979
types_or: [python, pyi]
@@ -82,7 +82,7 @@ repos:
8282
exclude: "docs/_pygments/monokai.py"
8383

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

0 commit comments

Comments
 (0)