Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make translator between grid subset names and indices #37

Merged
merged 3 commits into from
Mar 20, 2024
Merged

Conversation

dautt-silva
Copy link

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
Copy link
Collaborator

anchal-physics commented Mar 11, 2024

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.

Copy link
Collaborator

@anchal-physics anchal-physics left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • Format needs fixing
  • Docstring for second method is incorrect
  • Please add example of using get_grid_subset(grid_ggd, grid_subset_name) to demostrate the use to new method.

src/subset_tools.jl Outdated Show resolved Hide resolved
examples/plotting.ipynb Outdated Show resolved Hide resolved
+Alicia Dautt-Silva added 3 commits March 20, 2024 15:58
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

Original Author:    +Alicia Dautt-Silva <dauttsilvaa@omega-a.gat.com>
rebased by: Anchal Gupta <guptaa@fusion.gat.com>
Original Author:    +Alicia Dautt-Silva <dauttsilvaa@omega-a.gat.com>
Rebased by: Anchal Gupta

AG: Such bad commit message.
@anchal-physics anchal-physics merged commit c28f055 into dev Mar 20, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants