Skip to content

Commit 7c5e3cb

Browse files
authored
Merge branch 'master' into add-agents-docs
2 parents 762caad + 2ec7730 commit 7c5e3cb

7 files changed

Lines changed: 122 additions & 48 deletions

File tree

.git-blame-ignore-revs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22

33
# Add pre-commit hooks
44
9c1fb5bd9b946c2eaaf1ea882e789efcccf66b53
5+
6+
# Add additional pre-commit hooks
7+
29de56032f5a5bb031eb1145d970c92b53319930

.github/workflows/build-with-clang.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -68,8 +68,8 @@ jobs:
6868
- name: Build mkl-service
6969
run: |
7070
source ${{ env.ONEAPI_ROOT }}/setvars.sh
71-
echo $CMPLR_ROOT
72-
export CC=$CMPLR_ROOT/bin/icx
71+
echo "$CMPLR_ROOT"
72+
export CC="$CMPLR_ROOT/bin/icx"
7373
export CFLAGS="${CFLAGS} -fno-fast-math"
7474
python setup.py develop
7575

.github/workflows/conda-package.yml

Lines changed: 39 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -50,37 +50,37 @@ jobs:
5050
${{ runner.os }}-conda-${{ env.CACHE_NUMBER }}-
5151
5252
- name: Add conda to system path
53-
run: echo $CONDA/bin >> $GITHUB_PATH
53+
run: echo "$CONDA/bin" >> "$GITHUB_PATH"
5454

5555
- name: Install conda-build
5656
run: conda install conda-build
5757

5858
- name: Store conda paths as envs
5959
shell: bash -el {0}
6060
run: |
61-
echo "CONDA_BLD=/usr/share/miniconda/conda-bld/linux-64/" >> $GITHUB_ENV
62-
echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE/" >> $GITHUB_ENV
61+
echo "CONDA_BLD=/usr/share/miniconda/conda-bld/linux-64/" >> "$GITHUB_ENV"
62+
echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE/" >> "$GITHUB_ENV"
6363
6464
- name: Build conda package
6565
run: |
66-
CHANNELS="-c conda-forge -c conda-forge/label/python_rc -c https://software.repos.intel.com/python/conda --override-channels"
67-
VERSIONS="--python ${{ matrix.python }}"
68-
TEST="--no-test"
66+
CHANNELS=(-c conda-forge -c conda-forge/label/python_rc -c https://software.repos.intel.com/python/conda --override-channels)
67+
VERSIONS=(--python "${{ matrix.python }}")
68+
TEST=(--no-test)
6969
7070
conda build \
71-
$TEST \
72-
$VERSIONS \
73-
$CHANNELS \
71+
"${TEST[@]}" \
72+
"${VERSIONS[@]}" \
73+
"${CHANNELS[@]}" \
7474
conda-recipe
7575
7676
- name: Upload artifact
77-
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
77+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
7878
with:
7979
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
8080
path: ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.conda
8181

8282
- name: Upload wheels artifact
83-
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
83+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
8484
with:
8585
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python }}
8686
path: ${{ env.WHEELS_OUTPUT_FOLDER }}mkl_service-*.whl
@@ -127,20 +127,20 @@ jobs:
127127
- name: Store conda paths as envs
128128
shell: bash -el {0}
129129
run: |
130-
echo "CONDA_BLD=$CONDA_PREFIX\\conda-bld\\win-64\\" >> $GITHUB_ENV
131-
echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE\\" >> $GITHUB_ENV
130+
echo "CONDA_BLD=$CONDA_PREFIX\\conda-bld\\win-64\\" >> "$GITHUB_ENV"
131+
echo "WHEELS_OUTPUT_FOLDER=$GITHUB_WORKSPACE\\" >> "$GITHUB_ENV"
132132
133133
- name: Build conda package
134134
run: conda build --no-test --python ${{ matrix.python }} -c https://software.repos.intel.com/python/conda -c conda-forge -c conda-forge/label/python_rc --override-channels conda-recipe
135135

136136
- name: Upload artifact
137-
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
137+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
138138
with:
139139
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
140140
path: ${{ env.CONDA_BLD }}${{ env.PACKAGE_NAME }}-*.conda
141141

142142
- name: Upload wheels artifact
143-
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
143+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
144144
with:
145145
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Wheels Python ${{ matrix.python }}
146146
path: ${{ env.WHEELS_OUTPUT_FOLDER }}mkl_service-*.whl
@@ -160,32 +160,33 @@ jobs:
160160

161161
steps:
162162
- name: Download artifact
163-
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
163+
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
164164
with:
165165
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
166166

167167
- name: Add conda to system path
168-
run: echo $CONDA/bin >> $GITHUB_PATH
168+
run: echo "$CONDA/bin" >> "$GITHUB_PATH"
169169

170170
- name: Install conda-build
171171
run: conda install conda-build
172172

173173
- name: Create conda channel
174174
run: |
175-
mkdir -p $GITHUB_WORKSPACE/channel/linux-64
176-
conda index $GITHUB_WORKSPACE/channel || exit 1
177-
mv ${PACKAGE_NAME}-*.conda $GITHUB_WORKSPACE/channel/linux-64 || exit 1
178-
conda index $GITHUB_WORKSPACE/channel || exit 1
175+
mkdir -p "$GITHUB_WORKSPACE/channel/linux-64"
176+
conda index "$GITHUB_WORKSPACE/channel" || exit 1
177+
mv "${PACKAGE_NAME}"-*.conda "$GITHUB_WORKSPACE/channel/linux-64" || exit 1
178+
conda index "$GITHUB_WORKSPACE/channel" || exit 1
179179
# Test channel
180-
conda search $PACKAGE_NAME -c $GITHUB_WORKSPACE/channel --override-channels --info --json > $GITHUB_WORKSPACE/ver.json
180+
conda search "$PACKAGE_NAME" -c "$GITHUB_WORKSPACE/channel" --override-channels --info --json > "$GITHUB_WORKSPACE/ver.json"
181181
cat ver.json
182182
183183
- name: Collect dependencies
184184
run: |
185-
. $CONDA/etc/profile.d/conda.sh
186-
CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}"
187-
export PACKAGE_VERSION=$(python -c "${VER_SCRIPT1} ${VER_SCRIPT2}")
188-
conda create -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME=${PACKAGE_VERSION} python=${{ matrix.python }} $CHANNELS --only-deps --dry-run > lockfile
185+
. "$CONDA/etc/profile.d/conda.sh"
186+
CHANNELS=(-c "$GITHUB_WORKSPACE/channel" -c conda-forge -c conda-forge/label/python_rc -c https://software.repos.intel.com/python/conda --override-channels)
187+
PACKAGE_VERSION="$(python -c "${VER_SCRIPT1} ${VER_SCRIPT2}")"
188+
export PACKAGE_VERSION
189+
conda create -n "${{ env.TEST_ENV_NAME }}" "$PACKAGE_NAME=$PACKAGE_VERSION" "python=${{ matrix.python }}" "${CHANNELS[@]}" --only-deps --dry-run > lockfile
189190
cat lockfile
190191
191192
- name: Set pkgs_dirs
@@ -206,16 +207,17 @@ jobs:
206207
207208
- name: Install mkl-service
208209
run: |
209-
. $CONDA/etc/profile.d/conda.sh
210-
CHANNELS="-c $GITHUB_WORKSPACE/channel ${{ env.CHANNELS }}"
211-
export PACKAGE_VERSION=$(python -c "${VER_SCRIPT1} ${VER_SCRIPT2}")
212-
conda create -n ${{ env.TEST_ENV_NAME }} $PACKAGE_NAME=${PACKAGE_VERSION} pytest python=${{ matrix.python }} $CHANNELS
210+
. "$CONDA/etc/profile.d/conda.sh"
211+
CHANNELS=(-c "$GITHUB_WORKSPACE/channel" -c conda-forge -c conda-forge/label/python_rc -c https://software.repos.intel.com/python/conda --override-channels)
212+
PACKAGE_VERSION="$(python -c "${VER_SCRIPT1} ${VER_SCRIPT2}")"
213+
export PACKAGE_VERSION
214+
conda create -n "${{ env.TEST_ENV_NAME }}" "$PACKAGE_NAME=$PACKAGE_VERSION" pytest "python=${{ matrix.python }}" "${CHANNELS[@]}"
213215
# Test installed packages
214216
conda list
215217
216218
- name: Run tests
217219
run: |
218-
. $CONDA/etc/profile.d/conda.sh
220+
. "$CONDA/etc/profile.d/conda.sh"
219221
conda activate ${{ env.TEST_ENV_NAME }}
220222
pytest -vv --pyargs ${{ env.MODULE_NAME }}
221223
@@ -234,7 +236,7 @@ jobs:
234236

235237
steps:
236238
- name: Download artifact
237-
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
239+
uses: actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3 # v8.0.0
238240
with:
239241
name: ${{ env.PACKAGE_NAME }} ${{ runner.os }} Python ${{ matrix.python }}
240242
- uses: conda-incubator/setup-miniconda@fc2d68f6413eb2d87b895e92f8584b5b94a10167 # v3.3.0
@@ -250,13 +252,13 @@ jobs:
250252

251253
- name: Create conda channel
252254
run: |
253-
mkdir ${{ env.GITHUB_WORKSPACE }}\channel\win-64
254-
move ${{ env.PACKAGE_NAME }}-*.conda ${{ env.GITHUB_WORKSPACE }}\channel\win-64
255-
python -m conda_index ${{ env.GITHUB_WORKSPACE }}/channel
255+
mkdir ${{ env.GITHUB_WORKSPACE }}/channel/win-64
256+
move ${{ env.PACKAGE_NAME }}-*.conda ${{ env.GITHUB_WORKSPACE }}/channel/win-64
257+
python -m conda_index "${{ env.GITHUB_WORKSPACE }}/channel"
256258
257259
# Test channel
258-
conda search ${{ env.PACKAGE_NAME }} -c ${{ env.GITHUB_WORKSPACE }}/channel --override-channels --info --json > ${{ env.GITHUB_WORKSPACE }}\ver.json
259-
more ${{ env.GITHUB_WORKSPACE }}\ver.json
260+
conda search ${{ env.PACKAGE_NAME }} -c ${{ env.GITHUB_WORKSPACE }}/channel --override-channels --info --json > ${{ env.GITHUB_WORKSPACE }}/ver.json
261+
more ${{ env.GITHUB_WORKSPACE }}/ver.json
260262
261263
- name: Collect dependencies
262264
shell: cmd

.github/workflows/openssf-scorecard.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,14 +61,14 @@ jobs:
6161
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
6262
# format to the repository Actions tab.
6363
- name: "Upload artifact"
64-
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
64+
uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
6565
with:
6666
name: SARIF file
6767
path: results.sarif
6868
retention-days: 14
6969

7070
# Upload the results to GitHub's code scanning dashboard.
7171
- name: "Upload to code-scanning"
72-
uses: github/codeql-action/upload-sarif@9e907b5e64f6b83e7804b09294d44122997950d6 # v4.32.3
72+
uses: github/codeql-action/upload-sarif@0d579ffd059c29b07949a3cce3983f0780820c98 # v4.32.6
7373
with:
7474
sarif_file: results.sarif
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Autoupdate pre-commit
2+
3+
on:
4+
workflow_dispatch:
5+
# To guarantee Maintained check is occasionally updated. See
6+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
7+
schedule:
8+
- cron: '28 2 * * 6' # Saturday at 02:28 UTC
9+
10+
permissions: read-all
11+
12+
jobs:
13+
autoupdate:
14+
name: Autoupdate
15+
16+
runs-on: ubuntu-latest
17+
timeout-minutes: 10
18+
19+
permissions:
20+
# Needed to create a PR with autoupdate changes
21+
contents: write
22+
pull-requests: write
23+
24+
steps:
25+
- name: Checkout mkl-service repo
26+
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
27+
28+
- name: Set up python
29+
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
30+
with:
31+
python-version: '3.14'
32+
33+
- name: Install pre-commit
34+
run: pip install pre-commit
35+
36+
- name: Run pre-commit autoupdate
37+
run: pre-commit autoupdate
38+
39+
- name: Create a PR with autoupdate changes
40+
uses: peter-evans/create-pull-request@c0f553fe549906ede9cf27b5156039d195d2ece0 # v8.1.0
41+
with:
42+
commit-message: 'chore: update pre-commit hooks'
43+
add-paths: .pre-commit-config.yaml
44+
branch: 'bot/pre-commit-autoupdate'
45+
delete-branch: true
46+
title: Weekly pre-commit autoupdate
47+
body: |
48+
This PR updates the `.pre-commit-config.yaml` using `pre-commit autoupdate`.
49+
labels: autoupdate

.github/workflows/pre-commit.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,9 @@ jobs:
1414
steps:
1515
- name: Checkout repo
1616
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
17+
with:
18+
# use commit hash to make "no-commit-to-branch" check passing
19+
ref: ${{ github.sha }}
1720

1821
- name: Set up python
1922
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
@@ -29,9 +32,9 @@ jobs:
2932
3033
- name: Set up clang-format
3134
run: |
32-
sudo apt-get install -y clang-format-14
35+
sudo apt-get install -y clang-format-18
3336
sudo unlink /usr/bin/clang-format
34-
sudo ln -s /usr/bin/clang-format-14 /usr/bin/clang-format
37+
sudo ln -s /usr/bin/clang-format-18 /usr/bin/clang-format
3538
clang-format --version
3639
3740
- name: Run pre-commit checks

.pre-commit-config.yaml

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@ repos:
22
- repo: https://github.com/pre-commit/pre-commit-hooks
33
rev: v6.0.0
44
hooks:
5+
# Git
6+
- id: check-added-large-files
7+
- id: no-commit-to-branch
8+
name: "ensure no direct commit to master/maintenance branches"
9+
args: [--branch, "master", --pattern, "maintenance/.*"]
10+
- id: check-illegal-windows-names
11+
# Contents
512
- id: check-ast
613
- id: check-builtin-literals
714
- id: check-case-conflict
@@ -30,14 +37,14 @@ repos:
3037
- id: text-unicode-replacement-char
3138

3239
- repo: https://github.com/codespell-project/codespell
33-
rev: v2.4.1
40+
rev: v2.4.2
3441
hooks:
3542
- id: codespell
3643
additional_dependencies:
3744
- tomli
3845

3946
- repo: https://github.com/psf/black
40-
rev: 25.9.0
47+
rev: 26.3.0
4148
hooks:
4249
- id: black
4350
exclude: "_vendored/conv_template.py"
@@ -49,7 +56,7 @@ repos:
4956
args: ["-i"]
5057

5158
- repo: https://github.com/MarcoGorelli/cython-lint
52-
rev: v0.17.0
59+
rev: v0.19.0
5360
hooks:
5461
- id: cython-lint
5562
- id: double-quote-cython-strings
@@ -64,7 +71,7 @@ repos:
6471
- flake8-bugbear==24.4.26
6572

6673
- repo: https://github.com/pycqa/isort
67-
rev: 6.1.0
74+
rev: 8.0.1
6875
hooks:
6976
- id: isort
7077
name: isort (python)
@@ -76,7 +83,7 @@ repos:
7683
types: [pyi]
7784

7885
- repo: https://github.com/macisamuele/language-formatters-pre-commit-hooks
79-
rev: v2.15.0
86+
rev: v2.16.0
8087
hooks:
8188
- id: pretty-format-toml
8289
args: [--autofix]
@@ -101,3 +108,13 @@ repos:
101108
rev: 3.0.0
102109
hooks:
103110
- id: shellcheck
111+
112+
- repo: https://github.com/gitleaks/gitleaks
113+
rev: v8.30.0
114+
hooks:
115+
- id: gitleaks
116+
117+
- repo: https://github.com/rhysd/actionlint
118+
rev: v1.7.11
119+
hooks:
120+
- id: actionlint

0 commit comments

Comments
 (0)