Skip to content

Commit 3c000e9

Browse files
authored
Add Aqua tests and other various improvements (#67)
* Add Aqua tests * Remove non-existing exports * Create `examples/Project.toml` and remove stale deps from main env * Add missing compat bound for test dep * Split test environment into `test/Project.toml` * [CI] Run validation with Julia v1.12 and activate right environment Also, correct list of triggers.
1 parent d1647f5 commit 3c000e9

File tree

8 files changed

+43
-19
lines changed

8 files changed

+43
-19
lines changed

.github/workflows/Validation.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,17 @@ on:
66
- "main"
77
paths:
88
- ".github/workflows/Validation.yml"
9+
- "examples/Project.jl"
10+
- "examples/bomex.jl"
911
- "ext/**"
1012
- "src/**"
1113
- "test/**"
1214
- "Project.toml"
1315
pull_request:
1416
paths:
1517
- ".github/workflows/Validation.yml"
18+
- "examples/Project.jl"
19+
- "examples/bomex.jl"
1620
- "ext/**"
1721
- "src/**"
1822
- "test/**"
@@ -40,7 +44,7 @@ jobs:
4044
fail-fast: false
4145
matrix:
4246
version:
43-
- "min"
47+
- "1.12"
4448
os:
4549
- ubuntu-latest
4650
steps:
@@ -50,17 +54,17 @@ jobs:
5054
version: ${{ matrix.version }}
5155
- uses: julia-actions/cache@v2
5256
id: julia-cache
53-
- name: Add CairoMakie to Project.toml
54-
shell: julia --color=yes --project {0}
57+
- name: Instantiate examples environment
58+
shell: julia --color=yes --project=examples {0}
5559
run: |
5660
using Pkg
57-
Pkg.add("CairoMakie")
61+
Pkg.instantiate()
5862
- name: Run BOMEX example
5963
env:
6064
VALIDATION: "true"
6165
CI: "true"
6266
run: |
63-
julia --color=yes --project=. examples/bomex.jl
67+
julia --color=yes --project=examples examples/bomex.jl
6468
- name: Save Julia depot cache on cancel or failure
6569
id: julia-cache-save
6670
if: cancelled() || failure()

Project.toml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,25 +5,15 @@ authors = ["Navid C. Constantinou <[email protected]>, Gregory L.
55

66
[deps]
77
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
8-
AtmosphericProfilesLibrary = "86bc3604-9858-485a-bdbe-831ec50de11d"
9-
CloudMicrophysics = "6a9e3e04-43cd-43ba-94b9-e8782df3c71b"
108
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
119
KernelAbstractions = "63c18a36-062a-441e-b654-da1e3ab1ce7c"
1210
Oceananigans = "9e8cae18-63c1-5223-a75c-80ca9d6e9a09"
1311
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
1412

1513
[compat]
1614
Adapt = "4.3.0"
17-
AtmosphericProfilesLibrary = "0.1.7"
18-
CloudMicrophysics = "0.22.13, 0.29"
1915
JLD2 = "0.5.13, 0.6"
2016
KernelAbstractions = "0.9"
2117
Oceananigans = "0.100"
2218
Printf = "1"
2319
julia = "1.10.10"
24-
25-
[extras]
26-
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
27-
28-
[targets]
29-
test = ["Test"]

examples/Project.toml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
[deps]
2+
AtmosphericProfilesLibrary = "86bc3604-9858-485a-bdbe-831ec50de11d"
3+
Breeze = "660aa2fb-d4c8-4359-a52c-9c057bc511da"
4+
CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0"
5+
CloudMicrophysics = "6a9e3e04-43cd-43ba-94b9-e8782df3c71b"
6+
GLMakie = "e9467ef8-e4e7-5192-8a1a-b1aee30e663a"
7+
JLD2 = "033835bb-8acc-5ee8-8aae-3f567f8a3819"
8+
Oceananigans = "9e8cae18-63c1-5223-a75c-80ca9d6e9a09"
9+
Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7"
10+
11+
[sources]
12+
Breeze = {path = ".."}
13+
14+
[compat]
15+
AtmosphericProfilesLibrary = "0.1.7"
16+
CloudMicrophysics = "0.22.13, 0.29"

src/Breeze.jl

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ export
1313
AtmosphereModel,
1414
TemperatureField,
1515
IdealGas,
16-
PhaseTransitionConstants,
1716
CondensedPhase,
1817
mixture_gas_constant,
1918
mixture_heat_capacity
@@ -26,7 +25,7 @@ export
2625
Center, Face, Periodic, Bounded, Flat,
2726
RectilinearGrid,
2827
nodes, xnodes, ynodes, znodes,
29-
xnode, ynode, znode,
28+
znode,
3029
xspacings, yspacings, zspacings,
3130
minimum_xspacing, minimum_yspacing, minimum_zspacing,
3231
ImmersedBoundaryGrid, GridFittedBottom, PartialCellBottom, ImmersedBoundaryCondition,
@@ -39,7 +38,7 @@ export
3938
BackgroundField, interior, set!, compute!, regrid!,
4039
Forcing,
4140
FPlane, ConstantCartesianCoriolis, BetaPlane, NonTraditionalBetaPlane,
42-
SmagorinskyLilly, DynamicSmagorinsky, AnisotropicMinimumDissipation,
41+
SmagorinskyLilly, AnisotropicMinimumDissipation,
4342
LagrangianParticles,
4443
conjure_time_step_wizard!,
4544
time_step!, Simulation, run!, Callback, add_callback!, iteration,

src/Thermodynamics/Thermodynamics.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module Thermodynamics
22

33
export ThermodynamicConstants, ReferenceStateConstants, IdealGas,
4-
PhaseTransitionConstants, CondensedPhase,
4+
CondensedPhase,
55
mixture_gas_constant, mixture_heat_capacity
66

77
include("atmosphere_thermodynamics.jl")

test/Project.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
[deps]
2+
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
3+
Oceananigans = "9e8cae18-63c1-5223-a75c-80ca9d6e9a09"
4+
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"
5+
6+
[compat]
7+
Aqua = "0.8"
8+
Oceananigans = "0.100"
9+
Test = "<0.0.1, 1"

test/aqua.jl

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
using Breeze: Breeze
2+
using Aqua: Aqua
3+
4+
Aqua.test_all(Breeze)

test/runtests.jl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ using Test
22
using Breeze
33
using Oceananigans
44

5+
include("aqua.jl")
6+
57
@testset "Breeze.jl" begin
68
@testset "Thermodynamics" begin
79
thermo = ThermodynamicConstants()

0 commit comments

Comments
 (0)