Skip to content

Commit c4262e4

Browse files
authored
Merge branch 'main' into dependabot/github_actions/crate-ci/typos-1.31.1
2 parents 66e2672 + 6f728fe commit c4262e4

File tree

6 files changed

+24
-15
lines changed

6 files changed

+24
-15
lines changed

.github/workflows/CI.yml renamed to .github/workflows/Tests.yml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: CI
1+
name: Tests
22
on:
33
push:
44
tags:
@@ -13,6 +13,10 @@ concurrency:
1313
# Cancel intermediate builds: only if it is a pull request build.
1414
group: ${{ github.workflow }}-${{ github.ref }}
1515
cancel-in-progress: ${{ startsWith(github.ref, 'refs/pull/') }}
16+
17+
env:
18+
JULIA_NUM_THREADS: 11
19+
1620
jobs:
1721
test:
1822
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
@@ -22,6 +26,7 @@ jobs:
2226
actions: write
2327
contents: read
2428
strategy:
29+
fail-fast: false
2530
matrix:
2631
version:
2732
- 'pre'

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Test = "1.10"
2121
OrderedCollections = "1.8"
2222
Aqua = "0.8.11"
2323
ExplicitImports = "1.11"
24-
JET = "0.9.18"
24+
JET = "0.9.18, 0.10.0"
2525
CheckConcreteStructs = "0.1.0"
2626

2727
[extras]

docs/make.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,16 @@ makedocs(;
1616
clean=true,
1717
linkcheck=true,
1818
warnonly=:missing_docs,
19-
draft=!CI,
19+
draft=(!CI),
2020
doctest=false, # We test it in the CI, no need to run it here
2121
)
2222

2323
if CI
2424
deploydocs(;
2525
repo="github.com/QuantumEngineeredSystems/QuestBase.jl",
26-
# devbranch="main",
27-
# target="build",
28-
# branch="gh-pages",
26+
devbranch="main",
27+
target="build",
28+
branch="gh-pages",
2929
push_preview=true,
3030
)
3131
end

src/DifferentialEquation.jl

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,9 @@ $(TYPEDSIGNATURES)
9090
9191
Return the dependent variables of `diff_eom`.
9292
"""
93-
Symbolics.get_variables(diff_eom::DifferentialEquation)::Vector{Num} =
94-
collect(keys(diff_eom.equations))
93+
Symbolics.get_variables(diff_eom::DifferentialEquation)::Vector{Num} = collect(
94+
keys(diff_eom.equations)
95+
)
9596

9697
"""
9798
$(TYPEDSIGNATURES)
@@ -100,8 +101,9 @@ Check if all equations in `diff_eom` are harmonic with respect to `t`. The funct
100101
differential equation system `diff_eom` and a variable `t`, and returns `true` if all equations
101102
are harmonic with respect to `t`, otherwise it returns `false`.
102103
"""
103-
QuestBase.is_harmonic(diff_eom::DifferentialEquation, t::Num)::Bool =
104-
all([is_harmonic(eq, t) for eq in values(diff_eom.equations)])
104+
QuestBase.is_harmonic(diff_eom::DifferentialEquation, t::Num)::Bool = all([
105+
is_harmonic(eq, t) for eq in values(diff_eom.equations)
106+
])
105107

106108
"""
107109
$(TYPEDSIGNATURES)

src/HarmonicEquation.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ mutable struct HarmonicEquation
2121
# use a self-referential constructor with _parameters
2222
function HarmonicEquation(equations, variables, nat_eq)
2323
return (
24-
x = new(
24+
x=new(
2525
equations,
2626
variables,
2727
Num[],
2828
nat_eq,
2929
dummy_symbolic_Jacobian(length(variables)),
3030
);
31-
x.parameters = _parameters(x);
31+
x.parameters=_parameters(x);
3232
x
3333
)
3434
end

src/HarmonicVariable.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,13 +97,15 @@ function QuestBase.substitute_all(vars::Vector{HarmonicVariable}, rules)
9797
end
9898

9999
"Returns the symbols of a `HarmonicVariable`."
100-
get_variables_nums(vars::Vector{Num}) =
100+
function get_variables_nums(vars::Vector{Num})
101101
unique(flatten([Num.(get_variables(x)) for x in vars]))
102+
end
102103

103104
Symbolics.get_variables(var::HarmonicVariable)::Num = Num(first(get_variables(var.symbol)))
104105

105-
Base.isequal(v1::HarmonicVariable, v2::HarmonicVariable)::Bool =
106-
isequal(v1.symbol, v2.symbol)
106+
Base.isequal(v1::HarmonicVariable, v2::HarmonicVariable)::Bool = isequal(
107+
v1.symbol, v2.symbol
108+
)
107109

108110
"The derivative of f w.r.t. x of degree deg"
109111
function d(f::Num, x::Num, deg=1)::Num

0 commit comments

Comments
 (0)