Skip to content

Commit 9c3f892

Browse files
committed
Merge qualified maintenance into the existing contribution guide
2 parents 791f7aa + 4d8b181 commit 9c3f892

24 files changed

Lines changed: 961 additions & 534 deletions

‎.github/workflows/ci.yml‎

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
3333
with:
3434
persist-credentials: false
35-
- uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
35+
- uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
3636
with:
3737
version: ${{ env.UV_VERSION }}
3838
- run: uv python install ${{ env.PYTHON_VERSION }}
@@ -49,7 +49,7 @@ jobs:
4949
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
5050
with:
5151
persist-credentials: false
52-
- uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
52+
- uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
5353
with:
5454
version: ${{ env.UV_VERSION }}
5555
- name: Set up Python
@@ -66,7 +66,7 @@ jobs:
6666
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
6767
with:
6868
persist-credentials: false
69-
- uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
69+
- uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
7070
with:
7171
version: ${{ env.UV_VERSION }}
7272
- name: Set up Python
@@ -92,7 +92,7 @@ jobs:
9292
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
9393
with:
9494
persist-credentials: false
95-
- uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
95+
- uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
9696
with:
9797
version: ${{ env.UV_VERSION }}
9898
- name: Set up Python
@@ -115,7 +115,7 @@ jobs:
115115
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
116116
with:
117117
persist-credentials: false
118-
- uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
118+
- uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
119119
with:
120120
version: ${{ env.UV_VERSION }}
121121
- run: uv python install ${{ env.PYTHON_VERSION }}
@@ -136,7 +136,7 @@ jobs:
136136
with:
137137
fetch-depth: 0
138138
persist-credentials: false
139-
- uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
139+
- uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
140140
with:
141141
version: ${{ env.UV_VERSION }}
142142
- run: uv python install ${{ env.PYTHON_VERSION }}
@@ -160,7 +160,7 @@ jobs:
160160
--expected-commit "${{ github.sha }}" \
161161
--expected-tree "$(git rev-parse 'HEAD^{tree}')"
162162
- name: Upload release candidate
163-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
163+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
164164
with:
165165
name: release-candidate
166166
path: candidate/
@@ -181,14 +181,14 @@ jobs:
181181
with:
182182
fetch-depth: 0
183183
persist-credentials: false
184-
- uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
184+
- uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
185185
with:
186186
version: ${{ env.UV_VERSION }}
187187
- name: Set up Python ${{ matrix.python-version }}
188188
uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
189189
with:
190190
python-version: ${{ matrix.python-version }}
191-
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
191+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
192192
with:
193193
name: release-candidate
194194
path: candidate
@@ -240,7 +240,7 @@ jobs:
240240
with:
241241
fetch-depth: 0
242242
persist-credentials: false
243-
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
243+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
244244
with:
245245
name: release-candidate
246246
path: candidate

‎.github/workflows/docs.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
2727
with:
2828
persist-credentials: false
29-
- uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
29+
- uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
3030
with:
3131
version: ${{ env.UV_VERSION }}
3232
- run: uv python install ${{ env.PYTHON_VERSION }}

‎.github/workflows/ecosystem.yml‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
qualification:
1818
permissions:
1919
contents: read
20-
uses: ml4t/ecosystem/.github/workflows/qualify-library.yml@da2cbb9a9d0b4d2f166ad630470ff7d7a1aa2643 # 2026-09-19 policy snapshot
20+
uses: ml4t/ecosystem/.github/workflows/qualify-library.yml@066dc737a879faea51a5b8a900315441712ea89a # 2026-09-25 policy snapshot
2121
with:
2222
import-package: ml4t.engineer
2323
prerelease-exception: python-315-polars

‎.github/workflows/python315-canary.yml‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
allow-prereleases: true
3232

3333
- name: Install uv
34-
uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
34+
uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
3535
with:
3636
version: "0.10.9"
3737
enable-cache: true
@@ -47,5 +47,5 @@ jobs:
4747
PYTHONPATH: src
4848
run: >-
4949
uv run --isolated --no-project --python 3.15
50-
--with-requirements python315-core.txt --with pytest
50+
--with-requirements python315-core.txt --with pytest --with pytest-cov
5151
pytest tests/test_api.py tests/test_bars.py tests/bars -q

‎.github/workflows/release.yml‎

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ jobs:
7575
needs: validate
7676
permissions:
7777
contents: read
78-
uses: ml4t/ecosystem/.github/workflows/qualify-library.yml@da2cbb9a9d0b4d2f166ad630470ff7d7a1aa2643 # 2026-09-19 policy snapshot
78+
uses: ml4t/ecosystem/.github/workflows/qualify-library.yml@066dc737a879faea51a5b8a900315441712ea89a # 2026-09-25 policy snapshot
7979
with:
8080
import-package: ml4t.engineer
8181
prerelease-exception: python-315-polars
@@ -102,7 +102,7 @@ jobs:
102102
fetch-depth: 0
103103
persist-credentials: false
104104
- name: Download qualified release candidate
105-
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
105+
uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
106106
with:
107107
name: release-candidate
108108
path: candidate
@@ -113,7 +113,7 @@ jobs:
113113
--expected-tree "${{ needs.validate.outputs.tree }}"
114114
--expected-tag "v${{ needs.validate.outputs.version }}"
115115
- name: Retain selected candidate
116-
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
116+
uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2
117117
with:
118118
name: qualified-release-candidate
119119
path: candidate/
@@ -130,13 +130,13 @@ jobs:
130130
with:
131131
ref: ${{ needs.validate.outputs.commit }}
132132
persist-credentials: false
133-
- uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
133+
- uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
134134
with:
135135
version: "0.10.9"
136136
- uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0
137137
with:
138138
python-version: "3.12"
139-
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
139+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
140140
with:
141141
name: qualified-release-candidate
142142
path: candidate
@@ -220,7 +220,7 @@ jobs:
220220
contents: read
221221
id-token: write
222222
steps:
223-
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
223+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
224224
with:
225225
name: qualified-release-candidate
226226
path: candidate
@@ -237,7 +237,7 @@ jobs:
237237
permissions:
238238
contents: write
239239
steps:
240-
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
240+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
241241
with:
242242
name: qualified-release-candidate
243243
path: candidate
@@ -272,10 +272,10 @@ jobs:
272272
ref: ${{ needs.validate.outputs.commit }}
273273
fetch-depth: 0
274274
persist-credentials: false
275-
- uses: astral-sh/setup-uv@bec219d24cd3e171d82865faccec33120bb574f4 # v10.1.0
275+
- uses: astral-sh/setup-uv@1c37ad07a6a961277cf70c0d37d6f313000f5884 # v10.3.0
276276
with:
277277
version: "0.10.9"
278-
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
278+
- uses: actions/download-artifact@9000827ccba6bdab643e8b6fd33ac0654aef8333 # v8.0.2
279279
with:
280280
name: qualified-release-candidate
281281
path: candidate

‎.pre-commit-config.yaml‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
repos:
22
- repo: https://github.com/astral-sh/ruff-pre-commit
3-
rev: v0.16.1
3+
rev: v0.17.0
44
hooks:
55
- id: ruff-format
6-
- id: ruff
6+
types_or: [python, pyi, jupyter]
7+
- id: ruff-check
78
args: [--fix]
89

910
- repo: https://github.com/pre-commit/pre-commit-hooks

‎docs/user-guide/labeling.md‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -426,7 +426,12 @@ result = calendar_aware_labels(
426426
)
427427
```
428428

429-
The calendar prevents forward returns from crossing session breaks (e.g., CME overnight gap from 4:00 PM to 5:00 PM CT).
429+
The calendar prevents forward returns from crossing genuine session breaks, such as the
430+
`CME_Equity` daily maintenance period from 4:00 PM to 5:00 PM CT. Its historical 3:15 PM to
431+
3:30 PM pause applies only before trade date June 28, 2021. Modern labels can cross that
432+
former pause because trading is continuous until 4:00 PM.
433+
See the [CME exchange notice](https://www.cmegroup.com/notices/electronic-trading/2021/06/20210621.html)
434+
for the affected equity-index contracts.
430435

431436
## Sample Weighting
432437

‎pyproject.toml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ store = [
106106

107107
# Trading calendar support
108108
calendars = [
109-
"pandas-market-calendars>=4.0.0",
109+
"pandas-market-calendars>=5.5.0",
110110
]
111111

112112
# Statistical diagnostics
@@ -141,7 +141,7 @@ dev = [
141141
"ipdb>=0.13.0",
142142
"pre-commit>=3.3.0",
143143
"duckdb>=0.9.0",
144-
"pandas-market-calendars>=4.0.0",
144+
"pandas-market-calendars>=5.5.0",
145145
"ta-lib>=0.4.0,<0.8",
146146
"yfinance>=0.2.0",
147147
"lightgbm>=4.0.0",
@@ -162,7 +162,7 @@ docs = [
162162
all = [
163163
"ta-lib>=0.4.0,<0.8",
164164
"duckdb>=0.9.0",
165-
"pandas-market-calendars>=4.0.0",
165+
"pandas-market-calendars>=5.5.0",
166166
"plotly>=5.15.0",
167167
"matplotlib>=3.7.0",
168168
"seaborn>=0.12.0",
@@ -209,7 +209,7 @@ dev = [
209209
"pre-commit>=3.3.0",
210210
"twine>=6.0.0",
211211
"pip-audit>=2.10.1",
212-
"pandas-market-calendars>=4.0.0",
212+
"pandas-market-calendars>=5.5.0",
213213
"duckdb>=0.9.0",
214214
"matplotlib>=3.7.0",
215215
"pyarrow>=14.0.0",

‎src/ml4t/engineer/bars/base.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ def _validate_data(self, data: pl.DataFrame) -> None:
9494
raise DataValidationError("Side values must not be null")
9595
if not data["side"].dtype.is_numeric():
9696
raise DataValidationError("Side column must be numeric")
97-
if not data["side"].is_in([-1, 1]).all():
97+
side = data["side"]
98+
if not ((side == -1) | (side == 1)).all():
9899
raise DataValidationError("Side values must be either -1 or 1")
99100

100101
@staticmethod

0 commit comments

Comments
 (0)