Skip to content

Commit 976382a

Browse files
committed
Merge remote-tracking branch 'origin/main' into codex/preserve-release-docs-archives
2 parents 91166f5 + 7b53244 commit 976382a

99 files changed

Lines changed: 15982 additions & 861 deletions

File tree

Some content is hidden

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

‎.github/ISSUE_TEMPLATE/bug.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: Bug report
2-
description: Report reproducible incorrect behavior in ecosystem policy or tooling
2+
description: Report reproducible incorrect behavior in ml4t-engineer
33
title: "[Bug]: "
44
labels:
55
- "type: bug"

‎.github/workflows/ci.yml‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,12 @@ jobs:
170170
name: Qualify (${{ matrix.os }}, Python ${{ matrix.python-version }})
171171
runs-on: ${{ matrix.os }}
172172
needs: build-candidate
173-
timeout-minutes: 45
173+
timeout-minutes: ${{ matrix.python-version == '3.15' && 90 || 45 }}
174174
strategy:
175175
fail-fast: false
176176
matrix:
177177
os: [ubuntu-latest, macos-latest, windows-latest]
178-
python-version: ["3.12", "3.13", "3.14"]
178+
python-version: ["3.12", "3.13", "3.14", "3.15"]
179179
steps:
180180
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
181181
with:
@@ -184,6 +184,7 @@ jobs:
184184
- uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
185185
with:
186186
version: ${{ env.UV_VERSION }}
187+
cache-suffix: python-${{ matrix.python-version }}
187188
- name: Set up Python ${{ matrix.python-version }}
188189
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
189190
with:
@@ -213,19 +214,18 @@ jobs:
213214
uv pip install --python .artifact-venv \
214215
--requirements "${{ runner.temp }}/test-requirements.txt"
215216
- name: Import the installed candidate
216-
run: uv run --python .artifact-venv --no-project python -c "import ml4t.engineer"
217+
run: >-
218+
uv run --python .artifact-venv --no-project
219+
python scripts/ci/candidate.py verify-installed candidate --source-root src
217220
- name: Run ty check
218221
run: >-
219222
uv run --python .artifact-venv --no-project
220223
ty check --python-version ${{ matrix.python-version }}
221-
- name: Run the installed-wheel suite repeatedly
224+
- name: Run the installed-wheel suite
222225
shell: bash
223226
run: |
224-
for iteration in {1..10}; do
225-
echo "Installed-wheel suite ${iteration}/10"
226-
uv run --python .artifact-venv --no-project \
227-
python -m pytest tests/ -q --tb=short --no-cov
228-
done
227+
uv run --python .artifact-venv --no-project \
228+
python -m pytest tests/ -q --tb=short --no-cov
229229
- name: Run documented workflows from the installed candidate
230230
run: >-
231231
uv run --python .artifact-venv --no-project

‎.github/workflows/ecosystem.yml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,3 @@ jobs:
2020
uses: ml4t/ecosystem/.github/workflows/qualify-library.yml@066dc737a879faea51a5b8a900315441712ea89a # 2026-09-25 policy snapshot
2121
with:
2222
import-package: ml4t.engineer
23-
prerelease-exception: python-315-polars
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
name: Native stress
2+
3+
on:
4+
pull_request:
5+
branches: [main]
6+
paths:
7+
- "src/ml4t/engineer/features/**"
8+
- "src/ml4t/engineer/core/**"
9+
- "tests/features/**"
10+
- "tests/test_all_features_integration.py"
11+
- "scripts/ci/**"
12+
- ".github/workflows/ci.yml"
13+
- ".github/workflows/native-stress.yml"
14+
- "pyproject.toml"
15+
- "uv.lock"
16+
push:
17+
branches: [main]
18+
paths:
19+
- "src/ml4t/engineer/features/**"
20+
- "src/ml4t/engineer/core/**"
21+
- "tests/features/**"
22+
- "tests/test_all_features_integration.py"
23+
- "scripts/ci/**"
24+
- ".github/workflows/ci.yml"
25+
- ".github/workflows/native-stress.yml"
26+
- "pyproject.toml"
27+
- "uv.lock"
28+
schedule:
29+
- cron: "17 5 * * 1"
30+
workflow_dispatch:
31+
32+
permissions:
33+
contents: read
34+
35+
concurrency:
36+
group: native-stress-${{ github.ref }}
37+
cancel-in-progress: true
38+
39+
jobs:
40+
build:
41+
runs-on: ubuntu-latest
42+
timeout-minutes: 20
43+
outputs:
44+
matrix: ${{ steps.matrix.outputs.matrix }}
45+
steps:
46+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
47+
with:
48+
fetch-depth: 0
49+
persist-credentials: false
50+
- uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884
51+
with:
52+
version: "0.10.9"
53+
- run: uv sync --python 3.12 --dev
54+
- run: uv build --out-dir native-candidate/dist
55+
- name: Bind the stress artifact to the tested revision
56+
run: >-
57+
uv run python scripts/ci/candidate.py create native-candidate
58+
--commit-sha "${{ github.sha }}"
59+
--git-tree "$(git rev-parse 'HEAD^{tree}')"
60+
- id: matrix
61+
run: uv run python scripts/ci/native_stress.py --matrix >> "$GITHUB_OUTPUT"
62+
- uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9
63+
with:
64+
name: native-stress-candidate
65+
path: native-candidate/
66+
if-no-files-found: error
67+
68+
stress:
69+
name: Native stress (${{ matrix.os }}, Python ${{ matrix.python-version }})
70+
runs-on: ${{ matrix.os }}
71+
needs: build
72+
timeout-minutes: ${{ matrix.python-version == '3.15' && 90 || 30 }}
73+
strategy:
74+
fail-fast: false
75+
matrix: ${{ fromJSON(needs.build.outputs.matrix) }}
76+
steps:
77+
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1
78+
with:
79+
fetch-depth: 0
80+
persist-credentials: false
81+
- uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884
82+
with:
83+
version: "0.10.9"
84+
cache-suffix: python-${{ matrix.python-version }}
85+
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97
86+
with:
87+
python-version: ${{ matrix.python-version }}
88+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333
89+
with:
90+
name: native-stress-candidate
91+
path: native-candidate
92+
- name: Verify stress artifact identity
93+
shell: bash
94+
run: >-
95+
python scripts/ci/candidate.py verify native-candidate
96+
--expected-commit "${{ github.sha }}"
97+
--expected-tree "$(git rev-parse 'HEAD^{tree}')"
98+
- name: Install the built wheel with locked test dependencies
99+
shell: bash
100+
run: |
101+
uv export --locked --group dev --extra ta --extra store --extra viz \
102+
--no-emit-project --no-hashes --output-file "${{ runner.temp }}/stress-requirements.txt"
103+
uv venv --python python .artifact-venv
104+
wheel="$(find native-candidate/dist -maxdepth 1 -name '*.whl' -print -quit)"
105+
UV_CACHE_DIR="${{ runner.temp }}/fresh-wheel-cache" \
106+
uv pip install --python .artifact-venv "$wheel"
107+
uv pip install --python .artifact-venv \
108+
--requirements "${{ runner.temp }}/stress-requirements.txt"
109+
- name: Verify actual installed origin and bytes
110+
shell: bash
111+
run: >-
112+
uv run --python .artifact-venv --no-project
113+
python scripts/ci/candidate.py verify-installed native-candidate --source-root src
114+
- name: Run fresh-process native and cold-call regressions
115+
shell: bash
116+
run: >-
117+
uv run --python .artifact-venv --no-project
118+
python scripts/ci/native_stress.py --repetitions 10

‎.github/workflows/release.yml‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,6 @@ jobs:
7878
uses: ml4t/ecosystem/.github/workflows/qualify-library.yml@066dc737a879faea51a5b8a900315441712ea89a # 2026-09-25 policy snapshot
7979
with:
8080
import-package: ml4t.engineer
81-
prerelease-exception: python-315-polars
8281

8382
qualification:
8483
name: Qualify Release Candidate

‎AGENTS.md‎

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ is under `docs/user-guide/`, and the generated API reference is under
3838

3939
## Engineering constraints
4040

41-
- Python 3.12, 3.13, and 3.14 are supported.
41+
- Python 3.12, 3.13, 3.14, and 3.15 are supported.
4242
- Feature computation must preserve the documented DataFrame or LazyFrame
4343
return behavior.
4444
- Changes to registered features must keep implementation, registry metadata,
@@ -61,3 +61,23 @@ uv build
6161
uv run python -c "import ml4t.engineer"
6262
uv run mkdocs build --strict
6363
```
64+
65+
## Maintainer-directed change batching
66+
67+
For our own fixes and agent work directed by the maintainer, use a bounded, coherent PR rather
68+
than one PR per small defect or implementation step. One PR may close several related issues
69+
when the changes serve the same user workflow, subsystem repair or compatibility objective and
70+
can be reviewed and reverted together. Keep implementation, regressions, documentation and
71+
follow-up repairs together; use focused commits and retain evidence for each defect. Do not
72+
create separate issues or PRs merely for individual files, tests, assertions or platform variants.
73+
74+
Split unrelated changes, independently risky or breaking changes, separate ownership boundaries,
75+
and work that needs independent release or rollback decisions. A general maintenance label alone
76+
does not make a batch coherent. Reuse or safely consolidate existing owned submissions instead of
77+
opening overlapping PRs; preserve contributor attribution, recoverable history and other owners'
78+
active work. Do not rewrite or close someone else's work merely to reduce the queue count.
79+
80+
Run focused checks while iterating, then qualify the complete final revision with every applicable
81+
required gate. Group related work before expensive CI; do not weaken checks, bypass review or
82+
claim old-head checks qualify changed code. This maintainer-directed batching rule takes precedence
83+
over a literal one-issue-per-PR reading of contributor intake guidance.

‎README.md‎

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# ml4t-engineer
22

3-
[![Python 3.12-3.14](https://img.shields.io/badge/python-3.12--3.14-blue.svg)](https://www.python.org/downloads/)
3+
[![Python 3.12-3.15](https://img.shields.io/badge/python-3.12--3.15-blue.svg)](https://www.python.org/downloads/)
44
[![PyPI](https://img.shields.io/pypi/v/ml4t-engineer)](https://pypi.org/project/ml4t-engineer/)
55
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://github.com/ml4t/engineer/blob/main/LICENSE)
66

@@ -13,12 +13,19 @@ The core interface uses Polars DataFrames.
1313

1414
## Installation
1515

16-
`ml4t-engineer` supports Python 3.12, 3.13, and 3.14 on Linux, macOS, and Windows.
16+
Development source supports Python 3.12, 3.13, 3.14, and 3.15 on Linux, macOS, and Windows.
17+
Python 3.15 support and the calendar API used below are intended for the 0.2 release.
18+
Release 0.1.6 supports Python 3.12-3.14; use its
19+
[version-matched quick start](https://github.com/ml4t/engineer/tree/v0.1.6#quick-start)
20+
instead of passing the new `calendar` argument to that release.
1721

1822
```bash
1923
pip install ml4t-engineer
2024
```
2125

26+
Until 0.2 is available from PyPI, run the examples below from a
27+
[source checkout](#development) with `uv sync --no-dev`, using that environment's Python.
28+
2229
The quick start uses only core dependencies. Optional extras provide TA-Lib validation,
2330
DuckDB and PyArrow storage, market calendars, visualization, statistics, and ML tools:
2431

@@ -31,9 +38,10 @@ pip install "ml4t-engineer[stats]"
3138
pip install "ml4t-engineer[ml]"
3239
```
3340

34-
TA-Lib requires its native library. The core package does not require an external
35-
service, credentials, or special hardware. Python 3.15 is not supported while the
36-
active Polars compatibility exception applies.
41+
The development `ta` extra uses TA-Lib 0.8.2 or later in the 0.8 series; its wheels
42+
include the native library. For source builds, follow the
43+
[upstream installation guide](https://github.com/TA-Lib/ta-lib-python#installation).
44+
The core package does not require an external service, credentials, or special hardware.
3745

3846
## Quick Start
3947

@@ -56,15 +64,16 @@ ohlcv = pl.DataFrame(
5664
}
5765
)
5866

59-
features = compute_features(ohlcv, ["rsi", "macd", "atr"])
67+
features = compute_features(ohlcv, ["rsi", "macd", "atr"], calendar=None)
6068

6169
assert {"rsi", "macd", "atr"} <= set(features.columns)
6270
assert features.height == ohlcv.height
6371
```
6472

6573
`compute_features()` returns the input columns with the requested feature columns
66-
appended. Use the feature registry to inspect categories and parameters before building
67-
larger pipelines.
74+
appended. This example explicitly uses observation-row mode with `calendar=None`;
75+
periods count rows, not scheduled sessions or elapsed days. Use the feature registry
76+
to inspect categories and parameters before building larger pipelines.
6877

6978
## Supported Workflows
7079

0 commit comments

Comments
 (0)