Skip to content

Commit b6f18ab

Browse files
authored
Merge branch 'master' into dependabot/github_actions/codecov/codecov-action-4
2 parents a908e5a + ab866b9 commit b6f18ab

File tree

8 files changed

+57
-7
lines changed

8 files changed

+57
-7
lines changed

.github/workflows/CompatHelper.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ jobs:
1818
run: which julia
1919
continue-on-error: true
2020
- name: Install Julia, but only if it is not already available in the PATH
21-
uses: julia-actions/setup-julia@v1
21+
uses: julia-actions/setup-julia@v2
2222
with:
2323
version: '1'
2424
arch: ${{ runner.arch }}

.github/workflows/DocNav.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: Add Navbar
2+
3+
on:
4+
page_build: # Triggers the workflow on push events to gh-pages branch
5+
workflow_dispatch: # Allows manual triggering
6+
schedule:
7+
- cron: '0 0 * * 0' # Runs every week on Sunday at midnight (UTC)
8+
9+
jobs:
10+
add-navbar:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
steps:
15+
- name: Checkout gh-pages
16+
uses: actions/checkout@v4
17+
with:
18+
ref: gh-pages
19+
fetch-depth: 0
20+
21+
- name: Download insert_navbar.sh
22+
run: |
23+
curl -O https://raw.githubusercontent.com/TuringLang/turinglang.github.io/main/assets/scripts/insert_navbar.sh
24+
chmod +x insert_navbar.sh
25+
26+
- name: Update Navbar
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
29+
run: |
30+
git config user.name github-actions[bot]
31+
git config user.email github-actions[bot]@users.noreply.github.com
32+
33+
# Define the URL of the navbar to be used
34+
NAVBAR_URL="https://raw.githubusercontent.com/TuringLang/turinglang.github.io/main/assets/scripts/JuliaGPNavbar.html"
35+
36+
# Update all HTML files in the current directory (gh-pages root)
37+
./insert_navbar.sh . $NAVBAR_URL
38+
39+
# Remove the insert_navbar.sh file
40+
rm insert_navbar.sh
41+
42+
# Check if there are any changes
43+
if [[ -n $(git status -s) ]]; then
44+
git add .
45+
git commit -m "Added navbar and removed insert_navbar.sh"
46+
git push "https://${GITHUB_ACTOR}:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" gh-pages
47+
else
48+
echo "No changes to commit"
49+
fi

.github/workflows/benchmark.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
steps:
1818
# setup
1919
- uses: actions/checkout@v4
20-
- uses: julia-actions/setup-julia@v1
20+
- uses: julia-actions/setup-julia@v2
2121
with:
2222
version: '1.7'
2323
- uses: julia-actions/julia-buildpkg@v1

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,11 +36,11 @@ jobs:
3636
- 'Others'
3737
steps:
3838
- uses: actions/checkout@v4
39-
- uses: julia-actions/setup-julia@v1
39+
- uses: julia-actions/setup-julia@v2
4040
with:
4141
version: ${{ matrix.version }}
4242
arch: ${{ matrix.arch }}
43-
- uses: julia-actions/cache@v1
43+
- uses: julia-actions/cache@v2
4444
- uses: julia-actions/julia-buildpkg@v1
4545
- uses: julia-actions/julia-runtest@v1
4646
with:

.github/workflows/format.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v4
17-
- uses: julia-actions/setup-julia@v1
17+
- uses: julia-actions/setup-julia@v2
1818
with:
1919
version: 1
2020
- run: |

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name = "KernelFunctions"
22
uuid = "ec8451be-7e33-11e9-00cf-bbf324bd1392"
3-
version = "0.10.63"
3+
version = "0.10.64"
44

55
[deps]
66
ChainRulesCore = "d360d2e6-b24c-11e9-a2a3-2a2ae2dbcce4"

src/basekernels/periodic.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ PeriodicKernel(T::DataType, dims::Int=1) = PeriodicKernel(; r=ones(T, dims))
3434

3535
metric::PeriodicKernel) = Sinus.r)
3636

37-
kappa(::PeriodicKernel, d::Real) = exp(-0.5d)
37+
kappa(::PeriodicKernel, d::Real) = exp(-d / 2)
3838

3939
function Base.show(io::IO, κ::PeriodicKernel)
4040
return print(io, "Periodic Kernel, length(r) = $(length.r))")

test/basekernels/periodic.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
@test k(v1, v2) exp(-0.5 * sum(abs2, sinpi.(v1 - v2) ./ r))
99
@test k(v1, v2) == k(v2, v1)
1010
@test PeriodicKernel(3)(v1, v2) == PeriodicKernel(; r=ones(3))(v1, v2)
11+
@test PeriodicKernel(; r=Float32.(r))(Float32.(v1), Float32.(v2)) isa Float32
1112
@test repr(k) == "Periodic Kernel, length(r) = $(length(r))"
1213

1314
# Standardised tests.

0 commit comments

Comments
 (0)