You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running NuclearToolkit outside its repo is likely a standard approach.
However, this is currently not possible because of the default value of inpf in read_LECs! and of the path manipulation therein (to make the tests work).
Since the code does not run currently run as advertised (i.e. as a package rather than a repo), resolving this issue is necessary for openjournals/joss-reviews#4694.
One approach would be to modify the code as follows:
functionread_LECs!(LECs,idxLECs,dLECs;initialize=false,inpf="LECs.jl")
if initialize
isfile(inpf) || (inpf =joinpath(@__DIR__, inpf))
...endfunctionget_fn_LECs(pottype)
if pottype =="em500n3lo""LECs.jl"elseif pottype =="emn500n3lo""LECs_EMN500N3LO.jl"elseif pottype =="emn500n4lo""LECs_EMN500N4LO.jl"else@error"Unknown potential type" pottype
endend
Note that using include inside a function is a bit surprising. In general, a function like get_fn_LECs would likely return a data-structure (namedtuple?) rather than a path. It would also either call specialized functions directly for each potential or be itself implemented using multiple dispatch over pottype (assuming pottypes is not a string).
The text was updated successfully, but these errors were encountered:
Running NuclearToolkit outside its repo is likely a standard approach.
However, this is currently not possible because of the default value of
inpf
inread_LECs!
and of the path manipulation therein (to make the tests work).Since the code does not run currently run as advertised (i.e. as a package rather than a repo), resolving this issue is necessary for openjournals/joss-reviews#4694.
One approach would be to modify the code as follows:
Note that using include inside a function is a bit surprising. In general, a function like
get_fn_LECs
would likely return a data-structure (namedtuple?) rather than a path. It would also either call specialized functions directly for each potential or be itself implemented using multiple dispatch over pottype (assuming pottypes is not a string).The text was updated successfully, but these errors were encountered: