Skip to content

Commit f560f1f

Browse files
authored
Merge pull request #143 from nichollsh/hn/testsuites
Hn/testsuites
2 parents f4bfe99 + 1435d99 commit f560f1f

8 files changed

Lines changed: 614 additions & 546 deletions

File tree

CITATION.cff

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ authors:
55
given-names: "Harrison"
66
orcid: "https://orcid.org/0000-0002-8368-4641"
77
title: "Convective shutdown in the atmospheres of lava worlds"
8-
version: 1.7.7
8+
version: 1.7.8
99
doi: 10.1093/mnras/stae2772
10-
date-released: 2025-10-16
10+
date-released: 2025-10-21
1111
url: "https://doi.org/10.1093/mnras/stae2772"

Project.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name = "AGNI"
22
uuid = "ede838c1-9ec3-4ebe-8ae8-da4091b3f21c"
33
authors = ["Harrison Nicholls <harrison.nicholls@physics.ox.ac.uk>"]
4-
version = "1.7.8"
4+
version = "1.7.9"
55

66
[deps]
77
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63"

codemeta.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@
1313
"identifier": "",
1414
"codeRepository": "https://github.com/nichollsh/AGNI",
1515
"datePublished": "2024-12-29",
16-
"dateModified": "2025-10-16",
16+
"dateModified": "2025-10-21",
1717
"dateCreated": "2024-09-13",
1818
"description": "An open-source model for extreme atmospheres on rocky exoplanets.",
1919
"keywords": "physics, radiative transfer, exoplanets, astronomy, convection, radiation, planets, atmospheres",
2020
"license": "GPL v3.0",
2121
"title": "AGNI",
22-
"version": "1.7.8"
22+
"version": "1.7.9"
2323
}

deps/build.jl

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,8 +22,10 @@ cd(abspath(RAD_DIR,"julia","lib")) do
2222
end
2323

2424
# Download basic data
25-
println("Get data")
26-
get_data = abspath(ROOT_DIR,"src","get_data.sh")
27-
run(`bash $get_data basic`)
25+
if !("nodata" in ARGS)
26+
println("Get data")
27+
get_data = abspath(ROOT_DIR,"src","get_data.sh")
28+
run(`bash $get_data basic`)
29+
end
2830

2931
println("Build completed")

src/atmosphere.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ module atmosphere
3434
import ..spectrum
3535

3636
# Constants
37-
const AGNI_VERSION::String = "1.7.8" # current agni version
37+
const AGNI_VERSION::String = "1.7.9" # current agni version
3838
const HYDROGRAV_STEPS::Int64 = 40 # num of sub-layers in hydrostatic integration
3939
const SOCVER_minimum::Float64 = 2407.2 # minimum required socrates version
4040

src/get_agni.sh

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@
33

44
set -e
55

6+
# User arguments
7+
if [ -z "$1" ]; then
8+
testsuite="all" # default
9+
else
10+
testsuite="$1" # requested test suite
11+
fi
12+
613
# Update from GitHub
714
echo "Updating from GitHub..."
815
git pull
@@ -15,7 +22,7 @@ if [ -n "$RAD_DIR" ]; then
1522
else
1623
echo "Found SOCRATES path: no"
1724
echo "You need to install SOCRATES AND set the RAD_DIR environment variable"
18-
echo "Check the docs: https://nichollsh.github.io/AGNI/"
25+
echo "Check the docs: https://www.h-nicholls.space/AGNI/"
1926
exit 1
2027
fi
2128

@@ -25,11 +32,11 @@ rm -f Manifest.toml
2532
julia "$root/deps/build.jl"
2633
julia -e 'using Pkg; Pkg.activate("."); Pkg.instantiate()'
2734

28-
# Run tests
35+
# Run tests (suite set by CLI argument)
2936
echo "Running tests..."
3037
dir=$(pwd)
3138
cd $root/test/
32-
julia runtests.jl fast
39+
julia runtests.jl "$testsuite"
3340
cd $dir
3441

3542
echo "Done!"

src/get_data.sh

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,15 +102,25 @@ function zenodo {
102102
mkdir -p $2
103103
wget -qO $tgt $url
104104

105-
# check if command failed
105+
# check if command failed or if file does not exist
106106
if [ $? -ne 0 ]; then
107107
echo "ERROR: Failed to download $1. Issue with wget command"
108-
wget -O - $url
109-
exit 1
108+
elif [[ ! -f "$tgt" ]]; then
109+
echo "ERROR: Failed to download $1. File not found on disk."
110+
else
111+
return 0
110112
fi
111113

112-
# check file exists
113-
if [[ ! -f "$tgt" ]]; then
114+
# try again at downloading the file?
115+
echo "Trying again to download the file"
116+
sleep 1
117+
wget -qO $tgt $url
118+
119+
# check if command failed or if file does not exist
120+
if [ $? -ne 0 ]; then
121+
echo "ERROR: Failed to download $1. Issue with wget command"
122+
exit 1
123+
elif [[ ! -f "$tgt" ]]; then
114124
echo "ERROR: Failed to download $1. File not found on disk."
115125
exit 1
116126
fi
@@ -223,7 +233,7 @@ function handle_request {
223233
anyspec Oak 318
224234
# anyspec Dayspring 16
225235
anyspec Dayspring 48
226-
anyspec Honeyside 256
236+
# anyspec Honeyside 256
227237

228238
zenodo 15721440 $stellar sun.txt
229239

0 commit comments

Comments
 (0)