Skip to content

Commit 68d6caf

Browse files
committed
Fix compat
1 parent 0fea2ae commit 68d6caf

File tree

4 files changed

+11
-12
lines changed

4 files changed

+11
-12
lines changed

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ jobs:
5050
fail-fast: false
5151
matrix:
5252
version:
53-
- "1.9"
5453
- "1" # automatically expands to the latest stable 1.x release of Julia
5554
- "pre"
5655
os:

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ OrderedCollections = "1"
2424
Random = "1"
2525
TestItems = "0.1, 1"
2626
Unrolled = "0.1"
27-
julia = "1.9"
27+
julia = "1.10"
2828

2929
[extras]
3030
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"

src/layers/comparison.jl

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ end
3535
Compute an euclidean norm with domain size `dom_size` of a scalar.
3636
"""
3737
function co_euclidean(x; dom_size, params...)
38-
return co_euclidean_val(x; val=0.0, dom_size)
38+
return co_euclidean_val(x; val = 0.0, dom_size)
3939
end
4040

4141
"""
@@ -48,13 +48,13 @@ co_abs_diff_var_vars(x; nvars, params...) = abs(x - nvars)
4848
co_var_minus_vars(x; nvars)
4949
Return the difference `x - nvars` if positive, `0.0` otherwise, where `nvars` denotes the numbers of variables.
5050
"""
51-
co_var_minus_vars(x; nvars, params...) = co_var_minus_val(x; val=nvars)
51+
co_var_minus_vars(x; nvars, params...) = co_var_minus_val(x; val = nvars)
5252

5353
"""
5454
co_vars_minus_var(x; nvars)
5555
Return the difference `nvars - x` if positive, `0.0` otherwise, where `nvars` denotes the numbers of variables.
5656
"""
57-
co_vars_minus_var(x; nvars, params...) = co_val_minus_var(x; val=nvars)
57+
co_vars_minus_var(x; nvars, params...) = co_val_minus_var(x; val = nvars)
5858

5959

6060
# Parametric layers
@@ -89,7 +89,7 @@ end
8989
comparison_layer(param = false)
9090
Generate the layer of transformations functions of the ICN. Iff `param` value is set, also includes all the parametric comparison with that value. The operations are mutually exclusive, that is only one will be selected.
9191
"""
92-
function comparison_layer(parameters=Vector{Symbol}())
92+
function comparison_layer(parameters = Vector{Symbol}())
9393
comparisons = make_comparisons(:none)
9494

9595
for p in parameters
@@ -123,7 +123,7 @@ end
123123

124124
for (f, results) in funcs_param
125125
for (key, vals) in enumerate(data)
126-
@test f(vals.first; val=vals.second[1]) == results[key]
126+
@test f(vals.first; val = vals.second[1]) == results[key]
127127
end
128128
end
129129

@@ -135,15 +135,15 @@ end
135135

136136
for (f, results) in funcs_vars
137137
for (key, vals) in enumerate(data)
138-
@test f(vals.first, nvars=vals.second[2]) == results[key]
138+
@test f(vals.first, nvars = vals.second[2]) == results[key]
139139
end
140140
end
141141

142142
funcs_val_dom = [CN.co_euclidean_val => [1.4, 2.0]]
143143

144144
for (f, results) in funcs_val_dom
145145
for (key, vals) in enumerate(data)
146-
@test f(vals.first, val=vals.second[1], dom_size=vals.second[2])
146+
@test f(vals.first, val = vals.second[1], dom_size = vals.second[2])
147147
results[key]
148148
end
149149
end
@@ -152,7 +152,7 @@ end
152152

153153
for (f, results) in funcs_dom
154154
for (key, vals) in enumerate(data)
155-
@test f(vals.first, dom_size=vals.second[2]) results[key]
155+
@test f(vals.first, dom_size = vals.second[2]) results[key]
156156
end
157157
end
158158

src/utils.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ end
5757
as_bitvector(n::Int, max_n::Int = n)
5858
Convert an Int to a BitVector of minimal size (relatively to `max_n`).
5959
"""
60-
function as_bitvector(n::Int, max_n::Int=n)
60+
function as_bitvector(n::Int, max_n::Int = n)
6161
nm1 = n - 1
6262
v = falses(ceil(Int, log2(max_n)))
6363
i = 0
@@ -86,7 +86,7 @@ end
8686
reduce_symbols(symbols, sep)
8787
Produce a formatted string that separates the symbols by `sep`. Used internally for `show_composition`.
8888
"""
89-
function reduce_symbols(symbols, sep, parenthesis=true; prefix="")
89+
function reduce_symbols(symbols, sep, parenthesis = true; prefix = "")
9090
str = reduce((x, y) -> "$y$sep$x", map(s -> "$prefix$s", symbols))
9191
return parenthesis ? "[$str]" : str
9292
end

0 commit comments

Comments
 (0)