Skip to content

Commit f8f2122

Browse files
authored
Release 1.218.0
See release notes.
2 parents e479ab4 + 4c578a6 commit f8f2122

File tree

815 files changed

+53541
-16598
lines changed

Some content is hidden

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

815 files changed

+53541
-16598
lines changed

.docker/nautilus_trader.dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ ENV PYTHONUNBUFFERED=1 \
66
PIP_DEFAULT_TIMEOUT=100 \
77
PYO3_PYTHON="/usr/local/bin/python3" \
88
PYSETUP_PATH="/opt/pysetup" \
9-
RUST_TOOLCHAIN="stable" \
9+
RUSTUP_TOOLCHAIN="stable" \
1010
BUILD_MODE="release" \
1111
CC="clang"
1212
ENV PATH="/root/.local/bin:/root/.cargo/bin:$PATH"
@@ -16,7 +16,7 @@ FROM base AS builder
1616

1717
# Install build deps
1818
RUN apt-get update && \
19-
apt-get install -y curl clang git libssl-dev make pkg-config && \
19+
apt-get install -y curl clang git libssl-dev make pkg-config capnproto libcapnp-dev && \
2020
apt-get clean && \
2121
rm -rf /var/lib/apt/lists/*
2222

.github/ISSUE_TEMPLATE/bug_report.md

Lines changed: 43 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,46 @@
11
---
2-
name: Bug Report
3-
about: Report a bug here
2+
name: Bug Report
3+
about: Bug – behavior that contradicts the platform’s documented or intended design
44
labels:
55
- bug
66
---
77

88
# Bug Report
99

10-
## Expected Behavior
10+
Use this template only for issues that fit the **Bug** definition.
11+
12+
| Term | Definition |
13+
|-------------------------------|------------|
14+
| **Bug** | Behavior that contradicts the platform’s documented or intended design as per code, docs, or specs. (i.e., the implementation is incorrect.) |
15+
| **Expectation mismatch** | Behavior that follows the platform’s documented or intended design but differs from what you expected. (i.e., the design/spec might be the problem.) |
16+
| **Enhancement request** | A request for new functionality or behavior that is not implied by existing design. (i.e., *“It would be great if the platform could…”*) |
17+
18+
**Note:**
19+
20+
- Submitting this issue automatically applies the `bug` label.
21+
- `bug`-labeled issues are triaged with higher priority because they require corrective implementation work.
22+
- **Expectation mismatches** and design-level concerns should be opened as [Discussions](https://github.com/nautechsystems/nautilus_trader/discussions), or RFCs instead, where they can be validated and discussed to consensus before any work is scheduled.
23+
- The absence of a feature is typically not an expectation mismatch, and should be filed as an enhancement request.
24+
25+
## Confirmation
26+
27+
**Before opening a bug report, please confirm:**
28+
29+
- [ ] I’ve re-read the relevant sections of the documentation.
30+
- [ ] I’ve searched existing issues and discussions to avoid duplicates.
31+
- [ ] I’ve reviewed or skimmed the source code (or examples) to confirm the behavior is not by design.
32+
- [ ] I’ve tested this issue using a recent *development* wheel (`dev` develop or `a` nightly) and can still reproduce it.
33+
34+
Checking a recent development wheel can save time because the issue may already have been fixed.
35+
You can install a development wheel by running:
36+
37+
```bash
38+
pip install -U nautilus_trader --pre --index-url https://packages.nautechsystems.io/simple
39+
```
40+
41+
See the [development-wheels](https://github.com/nautechsystems/nautilus_trader#development-wheels) section for more details.
42+
43+
### Expected Behavior
1144

1245
Add here...
1346

@@ -21,6 +54,13 @@ Add here...
2154
2.
2255
3.
2356

57+
### Code Snippets or Logs
58+
59+
<!-- If applicable, provide relevant code snippets, error logs, or stack traces. Use code blocks for clarity. -->
60+
61+
<!-- Consider starting from our Minimal Reproducible Example template: -->
62+
<!-- https://github.com/nautechsystems/nautilus_trader/tree/develop/examples/other/minimal_reproducible_example -->
63+
2464
### Specifications
2565

2666
- OS platform:

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ blank_issues_enabled: false
22
contact_links:
33
- name: General Questions
44
url: https://github.com/nautechsystems/nautilus_trader/discussions
5-
about: Ask questions like "How do I achieve x?" here.
5+
about: Ask questions like "How do I achieve x?" here
66
- name: Discord
77
url: https://discord.gg/AUWVs3XaCS
8-
about: Chat with contributors and active users of NautilusTrader on our Discord server!
8+
about: Chat with contributors and active users of NautilusTrader on our Discord server

.github/ISSUE_TEMPLATE/rfc.md

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,26 @@
11
---
22
name: RFC (Request for Comments)
3-
about: Propose change or idea for discussion
3+
about: Propose a change or idea for discussion
44
labels:
55
- RFC
66
---
77

88
# RFC: [Title]
99

10+
## What is an RFC?
11+
An RFC (Request for Comments) is a proposal for significant changes or additions to the project,
12+
such as new features, major refactorings, or process improvements. RFCs are meant for ideas that
13+
could have a broad impact and benefit from wider community discussion.
14+
15+
## Before you proceed
16+
17+
- Please search existing issues and discussions to see if your idea has already been proposed or is under consideration.
18+
- To maintain a focused and manageable discussion space, we kindly ask that you limit opening multiple RFCs within a short period (days or weeks). This helps ensure each proposal receives the attention it deserves and prevents overwhelming the community and maintainers.
19+
1020
## Context
1121

1222
What would you like to propose? This could be improvements, refinements, optimizations, process changes, or other significant topics.
1323

1424
### Considerations
1525

16-
What should we keep in mind? Include relevant context, tradeoffs, or concerns.
26+
What should we keep in mind? Include relevant context, such as tradeoffs (e.g., performance vs. complexity), technical feasibility, user impact, or other concerns.

.github/OVERVIEW.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<!--
2+
README for the .github directory: composite actions and workflow definitions.
3+
-->
4+
# GitHub Actions Overview
5+
6+
This directory contains reusable composite actions and workflow definitions for
7+
CI/CD, testing, publishing, and automation within the NautilusTrader repository.
8+
9+
## Composite Actions (`.github/actions`)
10+
11+
- **common-setup**: prepares the environment (OS packages, Rust toolchain, Python,
12+
sccache, mold, pre-commit).
13+
- **common-test-data**: caches large test data under `tests/test_data/large`.
14+
- **common-wheel-build**: builds and installs Python wheels across Linux,
15+
macOS, and Windows for multiple Python versions.
16+
- **publish-wheels**: publishes built wheels to Cloudflare R2, manages old wheel
17+
cleanup and index generation.
18+
- **upload-artifact-wheel**: uploads the latest wheel artifact to GitHub Actions.
19+
20+
## Workflows (`.github/workflows`)
21+
22+
- **build.yml**: runs pre-commit, Rust tests, Python tests, builds wheels on multiple
23+
platforms, and uploads wheel artifacts.
24+
- **build-docs.yml**: dispatches a repository event to trigger the documentation build
25+
on `master` and `nightly` pushes.
26+
- **codeql-analysis.yml**: schedules and runs CodeQL security scans on pull requests
27+
and periodically via cron.
28+
- **coverage.yml**: (optional) coverage report generation for the `nightly` branch.
29+
- **docker.yml**: builds and pushes Docker images (`nautilus_trader`, `jupyterlab`)
30+
for `master` and `nightly` branches using Buildx and QEMU.
31+
- **nightly-merge.yml**: automatically merges `develop` into `nightly` when the
32+
latest `develop` workflows succeed.
33+
- **performance.yml**: runs Rust/Python performance benchmarks on the `nightly` branch
34+
and reports to CodSpeed.
35+
36+
## Security
37+
38+
- **Immutable Action Pinning**: all third-party actions are pinned to specific commit
39+
SHAs to guarantee immutability and reproducibility.
40+
- **Hardened Runners**: most workflows employ `step-security/harden-runner` with an
41+
`egress-policy: audit` to reduce attack surface and monitor outbound traffic.
42+
- **Secret Management**: no secrets or credentials are stored in the repo. AWS, PyPI,
43+
and other credentials are provided via GitHub Secrets and injected at runtime.
44+
- **Code Scanning**: CodeQL is enabled for continuous security analysis.
45+
- **Dependency Pinning**: key tools (pre-commit, Python versions, Rust toolchain,
46+
mold, cargo-nextest) are locked to fixed versions or SHAs.
47+
- **Caching**: caches for sccache, pip/site-packages, pre-commit, and test data
48+
speed up workflows while preserving hermetic builds.
49+
50+
For updates or changes to actions or workflows, please adhere to the repository's
51+
CONTRIBUTING guidelines and maintain these security best practices.

.github/actions/common-setup/action.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ runs:
4242
sudo apt-get update
4343
sudo apt-get install -y curl clang git libssl-dev make pkg-config
4444
sudo apt-get install -y python3-dev libpython3-dev
45+
sudo apt-get install -y capnproto libcapnp-dev
4546
4647
- name: Install mold
4748
# https://github.com/rui314/setup-mold
@@ -67,14 +68,15 @@ runs:
6768
6869
# https://github.com/actions-rust-lang/setup-rust-toolchain
6970
- name: Set up Rust toolchain
70-
uses: actions-rust-lang/setup-rust-toolchain@v1
71+
uses: actions-rust-lang/setup-rust-toolchain@9d7e65c320fdb52dcd45ffaa68deb6c02c8754d9 # v1.12.0
7172
with:
7273
toolchain: ${{ env.TOOLCHAIN }}
7374
components: clippy,rustfmt
7475
override: true
7576

7677
- name: Install cargo-nextest
77-
uses: taiki-e/install-action@v2
78+
# https://github.com/taiki-e/install-action # v2.50.10
79+
uses: taiki-e/install-action@83254c543806f3224380bf1001d6fac8feaf2d0b
7880
with:
7981
tool: nextest
8082

.github/actions/publish-wheels/action.yml

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
name: Publish wheels (R2)
22
description: Publish wheels to Cloudflare R2
3+
inputs:
4+
cleanup-local-dist:
5+
description: 'Cleanup local dist directory after publishing to R2'
6+
required: false
7+
default: 'true'
38

49
runs:
510
using: "composite"
@@ -55,10 +60,17 @@ runs:
5560
run: |
5661
bash ./scripts/ci/publish-wheels-r2-verify-files.sh
5762
58-
- name: Clean up local artifacts
63+
- name: Clean up local dist directory
64+
if: ${{ inputs.cleanup-local-dist == 'true' && success() }}
5965
shell: bash
6066
run: |
6167
set -euo pipefail
62-
ls -lh dist/ || echo "No dist directory found"
63-
rm -rf dist/* 2>/dev/null || true
64-
echo "Cleanup completed"
68+
69+
if [[ -d dist ]]; then
70+
echo "Found dist directory:"
71+
ls -lh dist/
72+
rm -rf dist/*
73+
echo "Cleanup completed"
74+
else
75+
echo "No dist directory found"
76+
fi

.github/pull_request_template.md

Lines changed: 30 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,38 @@
11
# Pull Request
22

3-
Include a summary of the changes.
3+
**NautilusTrader prioritizes correctness and reliability, please follow existing patterns for validation and testing.**
4+
5+
## Summary
6+
7+
<!-- Provide a brief description of *what* changed, *why* it was changed, and the impact on the system or users (2–3 sentences). -->
8+
9+
## Related Issues/PRs
10+
11+
<!-- List any related GitHub issues or PRs (e.g., `Closes #123`, `Related to #456`). -->
412

513
## Type of change
614

7-
Delete options that are not relevant.
15+
<!-- Select all that apply. -->
16+
17+
- [ ] Bug fix (non-breaking)
18+
- [ ] New feature (non-breaking)
19+
- [ ] Breaking change (impacts existing behavior)
20+
- [ ] Documentation update
21+
- [ ] Maintenance / chore
22+
23+
## Breaking change details (if applicable)
24+
25+
<!-- If this is a breaking change, describe the impact and any migration steps required for users or developers. -->
26+
27+
## Release notes
28+
29+
- [ ] I added a concise entry to `RELEASES.md` that follows the existing conventions (when applicable)
30+
31+
## Testing
832

9-
- [ ] Bug fix (non-breaking change which fixes an issue)
10-
- [ ] New feature (non-breaking change which adds functionality)
11-
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
12-
- [ ] This change requires a documentation update
33+
**Ensure new or changed logic is covered by tests.**
1334

14-
## How has this change been tested?
35+
- [ ] Affected code paths are already covered by the test suite
36+
- [ ] I added/updated tests to cover new or changed logic
1537

16-
Describe how this code was/is tested.
38+
<!-- Briefly describe how the changes were tested (e.g., unit tests in `tests/unit/test_file.py`, or *additional* manual testing). -->

0 commit comments

Comments
 (0)