From 0d2ef6bbc031f67875aaece81607481c64af681d Mon Sep 17 00:00:00 2001 From: Anchal Gupta Date: Fri, 4 Oct 2024 11:37:32 -0700 Subject: [PATCH] Temporarily removing Fortran90Namelists dep Fortran90Namelists is not registered package with Julia and is being used for only one function in this repo right now: read_b2_boundary_parameters This commit comments out any usage of Fortran90Namelists and removes it from dependency list. Once this package is registered with Julia, this feature will be brought back in. --- Project.toml | 2 -- docs/Project.toml | 1 + docs/src/index.md | 1 - src/SOLPS2imas.jl | 2 +- src/parser.jl | 2 +- test/runtests.jl | 40 ++++++++++++++++++++-------------------- 6 files changed, 23 insertions(+), 25 deletions(-) diff --git a/Project.toml b/Project.toml index 9f032de..9fc2349 100644 --- a/Project.toml +++ b/Project.toml @@ -6,7 +6,6 @@ version = "1.0.3" [deps] ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63" DelimitedFiles = "8bb1440f-4735-579b-a4ab-409b98df4dab" -Fortran90Namelists = "8fb689aa-71ff-4044-8071-0cffc910b57d" IMASdd = "c5a45a97-b3f9-491c-b9a7-aa88c3bc0067" IMASggd = "b7b5e640-9b39-4803-84eb-376048795def" NCDatasets = "85f8d34a-cbdd-5861-8df4-14fed0d494ab" @@ -17,7 +16,6 @@ YAML = "ddb6d928-2868-570f-bddf-ab3f9cf99eb6" [compat] ArgParse = "1" DelimitedFiles = "1.9.1" -Fortran90Namelists = "0.1" IMASdd = "2" IMASggd = "2" NCDatasets = "0.14.4" diff --git a/docs/Project.toml b/docs/Project.toml index dfa65cd..96e1e4c 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -1,2 +1,3 @@ [deps] Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" +SOLPS2imas = "09becab6-0636-4c23-a92a-2b3723265c31" diff --git a/docs/src/index.md b/docs/src/index.md index 9c184f5..2adb145 100644 --- a/docs/src/index.md +++ b/docs/src/index.md @@ -36,7 +36,6 @@ This module uses some parsing functions which can be used standalone as well read_b2_output read_b2mn_output read_b2time_output -read_b2_boundary_parameters ``` ## SOLPS Mesh Tools diff --git a/src/SOLPS2imas.jl b/src/SOLPS2imas.jl index b0abf39..bcc7bf3 100644 --- a/src/SOLPS2imas.jl +++ b/src/SOLPS2imas.jl @@ -6,7 +6,7 @@ using YAML: load_file as YAML_load_file using DelimitedFiles: readdlm import IMASggd: add_subset_element!, get_grid_subset, get_subset_boundary, get_subset_space, subset_do, deepcopy_subset -using Fortran90Namelists +# import Fortran90Namelists: readnml export solps2imas, load_summary_data! diff --git a/src/parser.jl b/src/parser.jl index 65afba4..4bcd73b 100644 --- a/src/parser.jl +++ b/src/parser.jl @@ -1,4 +1,4 @@ -export read_b2_output, read_b2mn_output, read_b2time_output, read_b2_boundary_parameters +export read_b2_output, read_b2mn_output, read_b2time_output # , read_b2_boundary_parameters """ read_b2time_output(filename::String)::Dict{String, Dict{String, Any}} diff --git a/test/runtests.jl b/test/runtests.jl index 4d38d58..76fca78 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -3,7 +3,7 @@ using Test using YAML: load_file as YAML_load_file using ArgParse: ArgParse using IMASdd: IMASdd -import SOLPS2imas: get_grid_subset, read_b2_boundary_parameters +import SOLPS2imas: get_grid_subset # , read_b2_boundary_parameters allowed_rtol = 1e-4 @@ -31,9 +31,9 @@ function parse_commandline() ["--fort"], Dict(:help => "Test triangular mesh generation from fort files", :action => :store_true), - ["--namelist"], - Dict(:help => "Test parsing of namelists", - :action => :store_true), + # ["--namelist"], + # Dict(:help => "Test parsing of namelists", + # :action => :store_true), ) args = ArgParse.parse_args(localARGS, s) if !any(values(args)) # If no flags are set, run all tests @@ -283,20 +283,20 @@ if args["fort"] end end -if args["namelist"] - @testset "Test parsing of namelists" begin - # Basic parameters namelist parsing - testfile = "$(@__DIR__)/../samples/b2.boundary.parameters" - boundary_params = SOLPS2imas.read_b2_boundary_parameters(testfile) - println(boundary_params) - @test boundary_params["power_electrons"] > 0.0 - @test boundary_params["power_ions"] > 0.0 - @test boundary_params["number_of_boundaries"] > - boundary_params["number_of_core_source_boundaries"] +# if args["namelist"] +# @testset "Test parsing of namelists" begin +# # Basic parameters namelist parsing +# testfile = "$(@__DIR__)/../samples/b2.boundary.parameters" +# boundary_params = SOLPS2imas.read_b2_boundary_parameters(testfile) +# println(boundary_params) +# @test boundary_params["power_electrons"] > 0.0 +# @test boundary_params["power_ions"] > 0.0 +# @test boundary_params["number_of_boundaries"] > +# boundary_params["number_of_core_source_boundaries"] - # Using parameters namelist to populate summary data - ids = IMASdd.dd() - SOLPS2imas.load_summary_data!(ids, (testfile, "", "", "")) - @test !(ismissing(ids.summary.heating_current_drive.power_ec, :value)) - end -end +# # Using parameters namelist to populate summary data +# ids = IMASdd.dd() +# SOLPS2imas.load_summary_data!(ids, (testfile, "", "", "")) +# @test !(ismissing(ids.summary.heating_current_drive.power_ec, :value)) +# end +# end