Skip to content

Commit

Permalink
Merge pull request #36 from ProjectTorreyPines/make
Browse files Browse the repository at this point in the history
Adding makefile for building Julia environment
  • Loading branch information
anchal-physics authored Feb 16, 2024
2 parents 0e1fb60 + a70a527 commit 7f1f2f2
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 0 deletions.
21 changes: 21 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,24 @@
![Format Check](https://github.com/ProjectTorreyPines/GGDUtils.jl/actions/workflows/format_check.yml/badge.svg)

Package holding utilities for Generalized Grid Description (GGD) objects in IMAS datastructure. Primary goals are interpolation and core profile extrapolation.

## Building julia environment (installation)

After cloning this repo, check the make menu:
```
GGDUtils.jl % make help
Help Menu
make env_with_cloned_repo (or make r): Creates a Julia environment with the cloned repositories
make env_with_git_url (or make u): Creates a Julia environment with the git urls without creating local clones
make clean: Deletes Project.toml and Manifest.toml for a fresh start
```

### make r
This option creates local copies of required private repositories at the same level as current repository and uses them in develop mode to create a Manifest.toml

### make u
This option uses url of required private repositories to create a static Manifest.toml attached to current master branches of these repositories.

### make clean
Deletes Manifest.toml so that environment can be recreated, to update or change the last used method.
24 changes: 24 additions & 0 deletions makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
SHELL := /bin/zsh
help:
@echo "Help Menu"
@echo
@echo "make env_with_cloned_repo (or make r): Creates a Julia environment with the cloned repositories"
@echo "make env_with_git_url (or make u): Creates a Julia environment with the git urls without creating local clones"
@echo "make clean: Deletes Project.toml and Manifest.toml for a fresh start"
@echo

env_with_cloned_repo r:
@echo "Creating Julia environment by creating local clones of dependent repositories"
@echo "Cloning the repositories"
-cd ..; git clone "[email protected]:ProjectTorreyPines/OMAS.jl.git"
@echo "Generating Project.toml and Manifest.toml"
julia --project=. -e 'using Pkg; Pkg.rm("OMAS"); Pkg.develop(path="../OMAS.jl"); Pkg.instantiate()'

env_with_git_url u:
@echo "Creating Julia environment with the git urls without creating local clones"
@echo "Generating Project.toml and Manifest.toml"
julia --project=. -e 'using Pkg; Pkg.rm("OMAS"); Pkg.add(url="[email protected]:ProjectTorreyPines/OMAS.jl.git", rev="master"); Pkg.instantiate()'

clean:
@echo "Deleting Manifest.toml"
-rm Manifest.toml

0 comments on commit 7f1f2f2

Please sign in to comment.