ProjectTorreyPines / GGDUtils.jl

Package holding utilities for Generalized Grid Description (GGD) objects in IMAS datastructure. Primary goals are interpolation and core profile extrapolation.
https://projecttorreypines.github.io/GGDUtils.jl/stable
Apache License 2.0
2 stars 0 forks source link

Make translator between grid subset names and indices #37

Closed dautt-silva closed 6 months ago

dautt-silva commented 6 months ago

Modifty get_grid_subset_with_index. Rename it to get_grid_subset and a a second function that accepts the name as a string. Changes to be committed: modified: src/interpolations.jl modified: src/recipes.jl modified: src/subset_tools.jl

anchal-physics commented 6 months ago

Please run JuliaFormatter.format on edited files to conform to our formatting convention. Normally, if you use VScode, it would automatically do it for you. Alternatively, you can run the following code in the repo directory before committing:

julia -e 'using JuliaFormatter; format(".", verbose=true)'

You might have to install it in your default julia environment. See instructions here. Once you have installed JuliaFormatter in your default julia environment, you can also install a pre-commit in your repo to avoid running this manually. It will then run automatically as you commit your changes. To do this, do the following:

cd GGDUtils.jl
echo "#\!/bin/bash"| cat >> .git/hooks/pre-commit
echo "julia -e 'using JuliaFormatter; format(\".\", verbose=true)'" | cat >> .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit

Then everytime you commit, the formatter will run and will cause an error if it can't format the files.