Skip to content

Commit

Permalink
FTheoryTools: Use Zenodo data as artifact (#4423)
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
5 people authored Jan 10, 2025
1 parent 3505630 commit 42a33a5
Show file tree
Hide file tree
Showing 6 changed files with 104 additions and 40 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,27 @@ jobs:
with:
token: ${{ secrets.CODECOV_TOKEN }}

extra-long-test:
# Extra long tests
# Only happens during the daily run, triggered by schedule
if: github.event_name == 'schedule'
runs-on: [Linux, RPTU, normal-memory]
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: "Set up Julia"
id: setup-julia
uses: julia-actions/setup-julia@v2
with:
version: "1.10"
- name: "Build package"
uses: julia-actions/julia-buildpkg@v1
- name: "set test subgroup"
run: echo "OSCAR_TEST_SUBSET=extra_long" >> $GITHUB_ENV
- name: "Run tests"
uses: julia-actions/julia-runtest@latest

doctest:
runs-on: ${{ matrix.os }}
timeout-minutes: 150
Expand Down
8 changes: 8 additions & 0 deletions Artifacts.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
[FTM-1511-03209]
git-tree-sha1 = "ba4c659df6bba8d746d85628bfedf8b77b77047c"
lazy = true

[[FTM-1511-03209.download]]
sha256 = "77f85f1e4a2c3b71963bea169b929dd8c1d9b3cf9b28b616f2c91486636acc22"
url = "https://zenodo.org/records/14611045/files/1511-03209.tar.gz"

[QSMDB]
git-tree-sha1 = "52686066016440cf2e6e286a923aed887658543c"
lazy = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -793,6 +793,13 @@ Partially resolved global Tate model over a concrete base -- SU(5)xU(1) restrict
```
"""
function resolve(m::AbstractFTheoryModel, resolution_index::Int)

# For model 1511.03209 and resolution_index = 1, a particular resolution is available from an artifact
if resolution_index == 1 && arxiv_id(m) == "1511.03209"
model_data_path = artifact"FTM-1511-03209/1511-03209-resolved.mrdi"
return load(model_data_path)
end

# To be extended to hypersurface models...
entry_test = (m isa GlobalTateModel) || (m isa WeierstrassModel)
@req entry_test "Resolve currently supported only for Weierstrass and Tate models"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -248,12 +248,20 @@ function literature_model(model_dict::Dict{String, Any}; model_parameters::Dict{

# (2b) The F-theory model with the largest number of flux vacua needs special attention
if model_dict["arxiv_data"]["id"] == "1511.03209"

model_data_path = artifact"FTM-1511-03209/1511-03209.mrdi"
return load(model_data_path)

# Old code to create this model from scratch. I leave this here, so we can go back if needed.
#=
directory = joinpath(@__DIR__, "Models/1511_03209/1511-03209-base-space.mrdi")
base_space = load(directory)
set_attribute!(base_space, :coordinate_names, ["w$i" for i in 0:100])
model = global_tate_model(base_space, completeness_check = false)
_set_all_attributes(model, model_dict, model_parameters)
return model
=#

end

# (3) Construct the model over concrete or arbitrary base
Expand Down
7 changes: 7 additions & 0 deletions experimental/FTheoryTools/test/FTM-1511-03209.jl
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
@testset "Test Downloading Artifact and elementary properties" begin
h = literature_model(arxiv_id = "1511.03209")
h_resolved = resolve(h, 1)

@test n_rays(ambient_space(h)) == 104
@test n_rays(ambient_space(h_resolved)) == 310
end
93 changes: 53 additions & 40 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -91,49 +91,62 @@ sort!(testlist)
Random.shuffle!(Oscar.get_seeded_rng(), testlist)

# tests with the highest number of allocations / runtime / compilation time
# more or less sorted by allocations
test_large = [
"test/Aqua.jl",
"experimental/FTheoryTools/test/weierstrass.jl",
"test/PolyhedralGeometry/timing.jl",
"experimental/GITFans/test/runtests.jl",
"test/AlgebraicGeometry/ToricVarieties/toric_schemes.jl",
"test/AlgebraicGeometry/Schemes/WeilDivisor.jl",
"test/Rings/NumberField.jl",
"test/Serialization/PolynomialsSeries.jl",
"test/AlgebraicGeometry/Schemes/K3.jl",
"test/Groups/forms.jl",
"test/Modules/UngradedModules.jl",
"test/GAP/oscarinterface.jl",
"test/AlgebraicGeometry/Schemes/CoveredProjectiveSchemes.jl",
"test/AlgebraicGeometry/Schemes/CoveredScheme.jl",
"test/AlgebraicGeometry/Schemes/DerivedPushforward.jl",
"test/AlgebraicGeometry/Schemes/MorphismFromRationalFunctions.jl",
"experimental/QuadFormAndIsom/test/runtests.jl",
"experimental/GModule/test/runtests.jl",
"experimental/LieAlgebras/test/LieAlgebraModule-test.jl",
"test/Modules/ModulesGraded.jl",
"test/AlgebraicGeometry/Schemes/EllipticSurface.jl",
]
test_book = [
"test/book/test.jl",
]

test_subset = get(ENV, "OSCAR_TEST_SUBSET", "")
# more or less sorted by allocations are in `long`
# tests that should not be run for pull request CI are in `extra_long`
# (these are run on a custom schedule only)
test_subsets = Dict(
:extra_long => [
"experimental/FTheoryTools/test/FTM-1511-03209.jl",
],

:long => [
"test/Aqua.jl",
"experimental/FTheoryTools/test/weierstrass.jl",
"test/PolyhedralGeometry/timing.jl",
"experimental/GITFans/test/runtests.jl",
"test/AlgebraicGeometry/ToricVarieties/toric_schemes.jl",
"test/AlgebraicGeometry/Schemes/WeilDivisor.jl",
"test/Rings/NumberField.jl",
"test/Serialization/PolynomialsSeries.jl",
"test/AlgebraicGeometry/Schemes/K3.jl",
"test/Groups/forms.jl",
"test/Modules/UngradedModules.jl",
"test/GAP/oscarinterface.jl",
"test/AlgebraicGeometry/Schemes/CoveredProjectiveSchemes.jl",
"test/AlgebraicGeometry/Schemes/CoveredScheme.jl",
"test/AlgebraicGeometry/Schemes/DerivedPushforward.jl",
"test/AlgebraicGeometry/Schemes/MorphismFromRationalFunctions.jl",
"experimental/QuadFormAndIsom/test/runtests.jl",
"experimental/GModule/test/runtests.jl",
"experimental/LieAlgebras/test/LieAlgebraModule-test.jl",
"test/Modules/ModulesGraded.jl",
"test/AlgebraicGeometry/Schemes/EllipticSurface.jl",
],
:book => [
"test/book/test.jl",
]
)

test_subset = Symbol(get(ENV, "OSCAR_TEST_SUBSET", "default"))
if haskey(ENV, "JULIA_PKGEVAL")
test_subset = "short"
test_subset = :short
end

if test_subset == "short"
filter!(x-> !in(relpath(x, Oscar.oscardir), [test_large; test_book]), testlist)
elseif test_subset == "long"
filter!(x-> in(relpath(x, Oscar.oscardir), test_large), testlist)
elseif test_subset == "book"
filter!(x-> in(relpath(x, Oscar.oscardir), test_book), testlist)
elseif test_subset == "" && !(Sys.islinux() && v"1.10" <= VERSION < v"1.11.0-DEV")
# book tests only on 1.10 and linux
@info "Skipping Oscar book tests"
filter!(x-> !in(relpath(x, Oscar.oscardir), test_book), testlist)
if test_subset == :short
# short are all files not in a specific group
filter!(x-> !in(relpath(x, Oscar.oscardir), reduce(vcat, values(test_subsets))), testlist)
elseif haskey(test_subsets, test_subset)
filter!(x-> in(relpath(x, Oscar.oscardir), test_subsets[test_subset]), testlist)
elseif test_subset == :default
# no extra long by default
filter!(x-> !in(relpath(x, Oscar.oscardir), test_subsets[:extra_long]), testlist)
if !(Sys.islinux() && v"1.10" <= VERSION < v"1.11.0-DEV")
# and book tests only on 1.10 and linux
@info "Skipping Oscar book tests"
filter!(x-> !in(relpath(x, Oscar.oscardir), test_subsets[:book]), testlist)
end
else
error("invalid test subset specified via `OSCAR_TEST_SUBSET` environment variable")
end


Expand Down

0 comments on commit 42a33a5

Please sign in to comment.