Skip to content

Commit bda809b

Browse files
authored
Merge pull request #262 from JuliaDynamics/hw/bumpversions
fix ci and bump versions
2 parents c61dce7 + 91dcf1d commit bda809b

File tree

9 files changed

+95
-31
lines changed

9 files changed

+95
-31
lines changed

.github/workflows/Documentation.yaml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,9 @@ jobs:
2727
- uses: julia-actions/setup-julia@v2
2828
with:
2929
version: 1
30-
- uses: julia-actions/cache@v2
30+
- name: Load Julia packages from cache
31+
id: julia-cache
32+
uses: julia-actions/cache@v2
3133
- name: Configure doc environment
3234
shell: julia --project=docs --color=yes {0}
3335
run: |
@@ -62,3 +64,11 @@ jobs:
6264
using NetworkDynamics
6365
DocMeta.setdocmeta!(NetworkDynamics, :DocTestSetup, :(using NetworkDynamics); recursive=true)
6466
doctest(NetworkDynamics)
67+
- name: Save Julia depot cache on cancel or failure
68+
id: julia-cache-save
69+
if: cancelled() || failure()
70+
uses: actions/cache/save@v4
71+
with:
72+
path: |
73+
${{ steps.julia-cache.outputs.cache-paths }}
74+
key: ${{ steps.julia-cache.outputs.cache-key }}

.github/workflows/tests.yml

Lines changed: 55 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,21 @@ jobs:
3535
with:
3636
version: ${{ matrix.version }}
3737
arch: ${{ matrix.arch }}
38-
- uses: julia-actions/cache@v2
38+
- name: Load Julia packages from cache
39+
id: julia-cache
40+
uses: julia-actions/cache@v2
3941
- uses: julia-actions/julia-buildpkg@v1
4042
- uses: julia-actions/julia-runtest@v1
4143
with:
4244
coverage: false
45+
- name: Save Julia depot cache on cancel or failure
46+
id: julia-cache-save
47+
if: cancelled() || failure()
48+
uses: actions/cache/save@v4
49+
with:
50+
path: |
51+
${{ steps.julia-cache.outputs.cache-paths }}
52+
key: ${{ steps.julia-cache.outputs.cache-key }}
4353

4454
test-coverage:
4555
name: Test Coverage
@@ -53,7 +63,9 @@ jobs:
5363
with:
5464
version: 1
5565
arch: x64
56-
- uses: julia-actions/cache@v2
66+
- name: Load Julia packages from cache
67+
id: julia-cache
68+
uses: julia-actions/cache@v2
5769
- uses: julia-actions/julia-buildpkg@v1
5870
- uses: julia-actions/julia-runtest@v1
5971
env:
@@ -66,6 +78,14 @@ jobs:
6678
files: lcov.info
6779
token: ${{ secrets.CODECOV_TOKEN }}
6880
fail_ci_if_error: false
81+
- name: Save Julia depot cache on cancel or failure
82+
id: julia-cache-save
83+
if: cancelled() || failure()
84+
uses: actions/cache/save@v4
85+
with:
86+
path: |
87+
${{ steps.julia-cache.outputs.cache-paths }}
88+
key: ${{ steps.julia-cache.outputs.cache-key }}
6989

7090
Inspector-tests:
7191
name: NetworkDynamicsInspector.jl Tests
@@ -93,7 +113,9 @@ jobs:
93113
- uses: julia-actions/setup-julia@v2
94114
with:
95115
version: 1
96-
- uses: julia-actions/cache@v2
116+
- name: Load Julia packages from cache
117+
id: julia-cache
118+
uses: julia-actions/cache@v2
97119
- uses: julia-actions/julia-buildpkg@v1
98120
with:
99121
project: NetworkDynamicsInspector
@@ -108,9 +130,17 @@ jobs:
108130
# files: lcov.info
109131
# token: ${{ secrets.CODECOV_TOKEN }}
110132
# fail_ci_if_error: false
133+
- name: Save Julia depot cache on cancel or failure
134+
id: julia-cache-save
135+
if: cancelled() || failure()
136+
uses: actions/cache/save@v4
137+
with:
138+
path: |
139+
${{ steps.julia-cache.outputs.cache-paths }}
140+
key: ${{ steps.julia-cache.outputs.cache-key }}
111141

112-
pd-test:
113-
name: PowerDynamics.jl test - Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
142+
OpPoDyn-test:
143+
name: OpPoDyn.jl test - Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
114144
runs-on: ${{ matrix.os }}
115145
permissions:
116146
actions: write # needed to allow julia-actions/cache to proactively delete old caches that it has created
@@ -131,19 +161,22 @@ jobs:
131161
version: ${{ matrix.version }}
132162
arch: ${{ matrix.arch }}
133163
- uses: julia-actions/julia-buildpkg@v1
164+
- name: Load Julia packages from cache
165+
id: julia-cache
166+
uses: julia-actions/cache@v2
134167
- uses: actions/checkout@v4
135168
with:
136-
repository: JuliaEnergy/PowerDynamics.jl
137-
path: PowerDynamics.jl
138-
- name: Run PD tests
139-
shell: julia --project=PowerDynamics.jl {0}
169+
repository: JuliaEnergy/OpPoDyn.jl
170+
path: OpPoDyn
171+
- name: Run OpPoDyn tests
172+
shell: julia --project=testenv --color=yes {0}
140173
run: |
141-
import Pkg
174+
using Pkg
142175
try
143-
Pkg.develop(path=".")
144-
Pkg.update()
145-
Pkg.precompile()
146-
Pkg.test()
176+
pkg"dev ."
177+
pkg"dev ./OpPoDyn"
178+
pkg"dev ./OpPoDyn/OpPoDynTesting"
179+
Pkg.test("OpPoDyn"; coverage=false)
147180
catch e
148181
if e isa Pkg.Resolve.ResolverError
149182
@info "Resolve error! No need to test a breaking release..." e
@@ -152,3 +185,11 @@ jobs:
152185
rethrow(e)
153186
end
154187
end
188+
- name: Save Julia depot cache on cancel or failure
189+
id: julia-cache-save
190+
if: cancelled() || failure()
191+
uses: actions/cache/save@v4
192+
with:
193+
path: |
194+
${{ steps.julia-cache.outputs.cache-paths }}
195+
key: ${{ steps.julia-cache.outputs.cache-key }}

NetworkDynamicsInspector/Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ NetworkDynamics = {path = ".."}
2727
NetworkDynamicsInspectorElectronExt = ["Electron"]
2828

2929
[compat]
30-
Bonito = "4.0.0"
30+
Bonito = "4.0.4"
3131
ColorSchemes = "3.29.0"
3232
Colors = "0.13.0"
3333
Downloads = "1.6.0"

NetworkDynamicsInspector/ext/NetworkDynamicsInspectorElectronExt.jl

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ function NDI.close_display(::NDI.ElectronDisp; strict)
2626
end
2727

2828
function get_electron_display()
29+
app = NDI.get_electron_app()
2930
window = NDI.get_electron_window()
3031
# BUG: Electron display cannot be reused
3132
# if isnothing(ELECTRON_DISP[]) || window != ELECTRON_DISP[].window
@@ -34,7 +35,10 @@ function get_electron_display()
3435
# else
3536
# ELECTRON_DISP[]
3637
# end
37-
return HTTPServer.ElectronDisplay(window, HTTPServer.BrowserDisplay(; open_browser=false))
38+
return HTTPServer.ElectronDisplay(
39+
HTTPServer.EWindow(app, window),
40+
HTTPServer.BrowserDisplay(; open_browser=false)
41+
)
3842
end
3943

4044
function NDI.get_electron_window()
@@ -58,14 +62,20 @@ haswindow() = hasapp() && !isempty(windows(ELECTRON_APP[]))
5862

5963
function NDI.get_electron_app()
6064
if !hasapp()
61-
ELECTRON_APP[] = Electron.Application(;
62-
additional_electron_args=[
63-
"--disable-logging",
64-
"--no-sandbox",
65-
"--user-data-dir=$(mktempdir())",
66-
"--disable-features=AccessibilityObjectModel",
67-
],
68-
)
65+
additional_electron_args = [
66+
"--disable-logging",
67+
"--no-sandbox",
68+
"--user-data-dir=$(mktempdir())",
69+
"--disable-features=AccessibilityObjectModel",
70+
"--enable-unsafe-swiftshader", # ← allow SwiftShader fallback
71+
]
72+
if haskey(ENV, "GITHUB_ACTIONS")
73+
append!(additional_electron_args, [
74+
"--use-gl=swiftshader", # ← explicitly request software GL
75+
"--disable-gpu", # ← disable GPU to avoid GPU errors
76+
])
77+
end
78+
ELECTRON_APP[] = Electron.Application(; additional_electron_args)
6979
end
7080
ELECTRON_APP[]
7181
end

NetworkDynamicsInspector/src/graphplot.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -215,8 +215,10 @@ function graphplot_card(app, session)
215215
help = HoverHelp(html"""
216216
<ul>
217217
<li><strong>Click</strong> on a node or edge to select it for timeseries plotting (highlighted plot).</li>
218-
<li><strong>Shift + Click</strong>. only update the element info pane.</li>
219-
<li><strong>Ctrl + Click</strong> resets axis after zoom</li>
218+
<li><strong>Shift+click</strong>: update info pane below.</li>
219+
<li><strong>Ctrl+click</strong>: resets axis after zoom.</li>
220+
<li><strong>Click+drag</strong> or <strong>mousewheel</strong>: zoom in/out.</li>
221+
<li><strong>Rightclick+drag</strong>: pan the graph.</li>
220222
</ul>
221223
""")
222224
Card([WithConfig(fig; resize_to=:parent), help, gp_tooltip_js];

NetworkDynamicsInspector/src/widgets.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,7 @@ function Bonito.jsrender(session::Session, tomselect::TomSelect{T}) where {T}
417417
optgroupField: 'class',
418418
placeholder: $(tomselect.placeholder),
419419
hidePlaceholder: true,
420+
maxOptions: null,
420421
plugins: {},
421422
};
422423
// push remove button to plugins when multi

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ DataFrames = "1"
5757
DiffEqCallbacks = "4.2.2"
5858
DocStringExtensions = "0.9.3"
5959
FastClosures = "0.3.2"
60-
ForwardDiff = "0.10.36"
60+
ForwardDiff = "0.10.36, 1"
6161
Graphs = "1"
6262
InteractiveUtils = "1"
6363
KernelAbstractions = "0.9.18"

src/initialization.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ function initialize_component!(cf; verbose=true, apply_bound_transformation=true
274274
else
275275
resid = init_residual(cf; recalc=true)
276276
if resid < 1e-10
277-
verbose && @info "No free variables! Residual $(LinearAlgebra.norm(resid))"
277+
verbose && @info "No free variables! Residual $(LinearAlgebra.norm(resid))"
278278
else
279279
@warn "No free variables! However model does not appear to be initialized in steady state. Residual $(LinearAlgebra.norm(resid))"
280280
end

test/Project.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,8 @@ DataFrames = "≥0.0.1"
6262
DataInterpolations = "7, 8"
6363
DelimitedFiles = "1.9.1"
6464
DiffEqCallbacks = "4.1.0"
65-
DifferentiationInterface = "0.6.32"
66-
DifferentiationInterfaceTest = "0.9"
65+
DifferentiationInterface = "0.6, 0.7"
66+
DifferentiationInterfaceTest = "0.10"
6767
DynamicQuantities = "1.4.0"
6868
ExplicitImports = "1.10.1"
6969
FiniteDiff = "2.26.2"

0 commit comments

Comments
 (0)