Skip to content

Commit 42a33a5

Browse files
HereAroundlgoettgensaaruni96benlorenz
authoredJan 10, 2025··
FTheoryTools: Use Zenodo data as artifact (#4423)
Co-authored-by: Lars Göttgens <[email protected]> Co-authored-by: Aaruni Kaushik <[email protected]> Co-authored-by: Aaruni Kaushik <[email protected]> Co-authored-by: Benjamin Lorenz <[email protected]>
1 parent 3505630 commit 42a33a5

File tree

6 files changed

+104
-40
lines changed

6 files changed

+104
-40
lines changed
 

‎.github/workflows/CI.yml

+21
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,27 @@ jobs:
120120
with:
121121
token: ${{ secrets.CODECOV_TOKEN }}
122122

123+
extra-long-test:
124+
# Extra long tests
125+
# Only happens during the daily run, triggered by schedule
126+
if: github.event_name == 'schedule'
127+
runs-on: [Linux, RPTU, normal-memory]
128+
steps:
129+
- uses: actions/checkout@v4
130+
with:
131+
fetch-depth: 2
132+
- name: "Set up Julia"
133+
id: setup-julia
134+
uses: julia-actions/setup-julia@v2
135+
with:
136+
version: "1.10"
137+
- name: "Build package"
138+
uses: julia-actions/julia-buildpkg@v1
139+
- name: "set test subgroup"
140+
run: echo "OSCAR_TEST_SUBSET=extra_long" >> $GITHUB_ENV
141+
- name: "Run tests"
142+
uses: julia-actions/julia-runtest@latest
143+
123144
doctest:
124145
runs-on: ${{ matrix.os }}
125146
timeout-minutes: 150

‎Artifacts.toml

+8
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,11 @@
1+
[FTM-1511-03209]
2+
git-tree-sha1 = "ba4c659df6bba8d746d85628bfedf8b77b77047c"
3+
lazy = true
4+
5+
[[FTM-1511-03209.download]]
6+
sha256 = "77f85f1e4a2c3b71963bea169b929dd8c1d9b3cf9b28b616f2c91486636acc22"
7+
url = "https://zenodo.org/records/14611045/files/1511-03209.tar.gz"
8+
19
[QSMDB]
210
git-tree-sha1 = "52686066016440cf2e6e286a923aed887658543c"
311
lazy = true

‎experimental/FTheoryTools/src/AbstractFTheoryModels/methods.jl

+7
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,13 @@ Partially resolved global Tate model over a concrete base -- SU(5)xU(1) restrict
793793
```
794794
"""
795795
function resolve(m::AbstractFTheoryModel, resolution_index::Int)
796+
797+
# For model 1511.03209 and resolution_index = 1, a particular resolution is available from an artifact
798+
if resolution_index == 1 && arxiv_id(m) == "1511.03209"
799+
model_data_path = artifact"FTM-1511-03209/1511-03209-resolved.mrdi"
800+
return load(model_data_path)
801+
end
802+
796803
# To be extended to hypersurface models...
797804
entry_test = (m isa GlobalTateModel) || (m isa WeierstrassModel)
798805
@req entry_test "Resolve currently supported only for Weierstrass and Tate models"

‎experimental/FTheoryTools/src/LiteratureModels/constructors.jl

+8
Original file line numberDiff line numberDiff line change
@@ -248,12 +248,20 @@ function literature_model(model_dict::Dict{String, Any}; model_parameters::Dict{
248248

249249
# (2b) The F-theory model with the largest number of flux vacua needs special attention
250250
if model_dict["arxiv_data"]["id"] == "1511.03209"
251+
252+
model_data_path = artifact"FTM-1511-03209/1511-03209.mrdi"
253+
return load(model_data_path)
254+
255+
# Old code to create this model from scratch. I leave this here, so we can go back if needed.
256+
#=
251257
directory = joinpath(@__DIR__, "Models/1511_03209/1511-03209-base-space.mrdi")
252258
base_space = load(directory)
253259
set_attribute!(base_space, :coordinate_names, ["w$i" for i in 0:100])
254260
model = global_tate_model(base_space, completeness_check = false)
255261
_set_all_attributes(model, model_dict, model_parameters)
256262
return model
263+
=#
264+
257265
end
258266

259267
# (3) Construct the model over concrete or arbitrary base
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
@testset "Test Downloading Artifact and elementary properties" begin
2+
h = literature_model(arxiv_id = "1511.03209")
3+
h_resolved = resolve(h, 1)
4+
5+
@test n_rays(ambient_space(h)) == 104
6+
@test n_rays(ambient_space(h_resolved)) == 310
7+
end

‎test/runtests.jl

+53-40
Original file line numberDiff line numberDiff line change
@@ -91,49 +91,62 @@ sort!(testlist)
9191
Random.shuffle!(Oscar.get_seeded_rng(), testlist)
9292

9393
# tests with the highest number of allocations / runtime / compilation time
94-
# more or less sorted by allocations
95-
test_large = [
96-
"test/Aqua.jl",
97-
"experimental/FTheoryTools/test/weierstrass.jl",
98-
"test/PolyhedralGeometry/timing.jl",
99-
"experimental/GITFans/test/runtests.jl",
100-
"test/AlgebraicGeometry/ToricVarieties/toric_schemes.jl",
101-
"test/AlgebraicGeometry/Schemes/WeilDivisor.jl",
102-
"test/Rings/NumberField.jl",
103-
"test/Serialization/PolynomialsSeries.jl",
104-
"test/AlgebraicGeometry/Schemes/K3.jl",
105-
"test/Groups/forms.jl",
106-
"test/Modules/UngradedModules.jl",
107-
"test/GAP/oscarinterface.jl",
108-
"test/AlgebraicGeometry/Schemes/CoveredProjectiveSchemes.jl",
109-
"test/AlgebraicGeometry/Schemes/CoveredScheme.jl",
110-
"test/AlgebraicGeometry/Schemes/DerivedPushforward.jl",
111-
"test/AlgebraicGeometry/Schemes/MorphismFromRationalFunctions.jl",
112-
"experimental/QuadFormAndIsom/test/runtests.jl",
113-
"experimental/GModule/test/runtests.jl",
114-
"experimental/LieAlgebras/test/LieAlgebraModule-test.jl",
115-
"test/Modules/ModulesGraded.jl",
116-
"test/AlgebraicGeometry/Schemes/EllipticSurface.jl",
117-
]
118-
test_book = [
119-
"test/book/test.jl",
120-
]
121-
122-
test_subset = get(ENV, "OSCAR_TEST_SUBSET", "")
94+
# more or less sorted by allocations are in `long`
95+
# tests that should not be run for pull request CI are in `extra_long`
96+
# (these are run on a custom schedule only)
97+
test_subsets = Dict(
98+
:extra_long => [
99+
"experimental/FTheoryTools/test/FTM-1511-03209.jl",
100+
],
101+
102+
:long => [
103+
"test/Aqua.jl",
104+
"experimental/FTheoryTools/test/weierstrass.jl",
105+
"test/PolyhedralGeometry/timing.jl",
106+
"experimental/GITFans/test/runtests.jl",
107+
"test/AlgebraicGeometry/ToricVarieties/toric_schemes.jl",
108+
"test/AlgebraicGeometry/Schemes/WeilDivisor.jl",
109+
"test/Rings/NumberField.jl",
110+
"test/Serialization/PolynomialsSeries.jl",
111+
"test/AlgebraicGeometry/Schemes/K3.jl",
112+
"test/Groups/forms.jl",
113+
"test/Modules/UngradedModules.jl",
114+
"test/GAP/oscarinterface.jl",
115+
"test/AlgebraicGeometry/Schemes/CoveredProjectiveSchemes.jl",
116+
"test/AlgebraicGeometry/Schemes/CoveredScheme.jl",
117+
"test/AlgebraicGeometry/Schemes/DerivedPushforward.jl",
118+
"test/AlgebraicGeometry/Schemes/MorphismFromRationalFunctions.jl",
119+
"experimental/QuadFormAndIsom/test/runtests.jl",
120+
"experimental/GModule/test/runtests.jl",
121+
"experimental/LieAlgebras/test/LieAlgebraModule-test.jl",
122+
"test/Modules/ModulesGraded.jl",
123+
"test/AlgebraicGeometry/Schemes/EllipticSurface.jl",
124+
],
125+
:book => [
126+
"test/book/test.jl",
127+
]
128+
)
129+
130+
test_subset = Symbol(get(ENV, "OSCAR_TEST_SUBSET", "default"))
123131
if haskey(ENV, "JULIA_PKGEVAL")
124-
test_subset = "short"
132+
test_subset = :short
125133
end
126134

127-
if test_subset == "short"
128-
filter!(x-> !in(relpath(x, Oscar.oscardir), [test_large; test_book]), testlist)
129-
elseif test_subset == "long"
130-
filter!(x-> in(relpath(x, Oscar.oscardir), test_large), testlist)
131-
elseif test_subset == "book"
132-
filter!(x-> in(relpath(x, Oscar.oscardir), test_book), testlist)
133-
elseif test_subset == "" && !(Sys.islinux() && v"1.10" <= VERSION < v"1.11.0-DEV")
134-
# book tests only on 1.10 and linux
135-
@info "Skipping Oscar book tests"
136-
filter!(x-> !in(relpath(x, Oscar.oscardir), test_book), testlist)
135+
if test_subset == :short
136+
# short are all files not in a specific group
137+
filter!(x-> !in(relpath(x, Oscar.oscardir), reduce(vcat, values(test_subsets))), testlist)
138+
elseif haskey(test_subsets, test_subset)
139+
filter!(x-> in(relpath(x, Oscar.oscardir), test_subsets[test_subset]), testlist)
140+
elseif test_subset == :default
141+
# no extra long by default
142+
filter!(x-> !in(relpath(x, Oscar.oscardir), test_subsets[:extra_long]), testlist)
143+
if !(Sys.islinux() && v"1.10" <= VERSION < v"1.11.0-DEV")
144+
# and book tests only on 1.10 and linux
145+
@info "Skipping Oscar book tests"
146+
filter!(x-> !in(relpath(x, Oscar.oscardir), test_subsets[:book]), testlist)
147+
end
148+
else
149+
error("invalid test subset specified via `OSCAR_TEST_SUBSET` environment variable")
137150
end
138151

139152

0 commit comments

Comments
 (0)
Please sign in to comment.