-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #31 from ProjectTorreyPines/dev
Releasing v.0.2.0
- Loading branch information
Showing
13 changed files
with
1,357 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
name = "SD4SOLPS" | ||
uuid = "d8db6f1b-e564-4c04-bba3-ef399f78c070" | ||
authors = ["David Eldon <[email protected]>"] | ||
version = "0.1.0" | ||
version = "0.2.0" | ||
|
||
[deps] | ||
ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63" | ||
Contour = "d38c429a-6771-53c6-b99e-75d170b6e991" | ||
EFIT = "cda752c5-6b03-55a3-9e33-132a441b0c17" | ||
GGDUtils = "b7b5e640-9b39-4803-84eb-376048795def" | ||
Interpolations = "a98d9a8b-a2ab-59e6-89dd-64a1c18fca59" | ||
JSON = "682c06a0-de6a-54ab-a142-c8b1cf79cde6" | ||
OMAS = "91cfaa06-6526-4804-8666-b540b3feef2f" | ||
PhysicalConstants = "5ad8b20f-a522-5ce9-bfc9-ddf1d5bda6ab" | ||
PlotUtils = "995b91a9-d308-5afd-9ec6-746e21dbc043" | ||
Plots = "91a5bcdd-55d7-5caf-9e0b-520d859cae80" | ||
PolygonOps = "647866c9-e3ac-4575-94e7-e3d426903924" | ||
SOLPS2IMAS = "09becab6-0636-4c23-a92a-2b3723265c31" | ||
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2" | ||
Unitful = "1986cc42-f94f-5a68-af5c-568840ba703d" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,3 +9,55 @@ Steps: | |
2) Load equilibrium (that the SOLPS mesh was based on) into IMAS DD format | ||
3) Make assumptions to extend profiles into the core and far SOL, if needed | ||
4) Run synthetic diagnostic models and record output | ||
|
||
|
||
## Installation | ||
|
||
### Using make file | ||
|
||
#### Option 1: Download the [example directory](https://github.com/ProjectTorreyPines/SD4SOLPS.jl/tree/master/example) in this repo: | ||
|
||
```bash | ||
% make help | ||
Help Menu | ||
|
||
make env_with_cloned_repo: Creates a Julia environment with the cloned repositories | ||
make env_with_git_url: 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 Clean: Deletes Project.toml, Manifest.toml, and any cloned repositories for a fresh start | ||
``` | ||
##### Environment with cloned repos | ||
|
||
`make env_with_cloned_repo` will clone all required git repos one level up from your current working directory and use them to define the environment files that will be generated in your working directory. This way, in future you can do `git pull` or change branches to update your working environment. | ||
|
||
##### Static environment with git url | ||
|
||
`make env_with_git_url` will not create local git clones for you, but it will still clone master branches of all the required repos in julia package management directory and will create a static environment for you that will remain tied to the version of packages when this environment was created. | ||
|
||
##### Clean up | ||
|
||
`make clean` or `make Clean` can be used clean up environment files and redo the environment generation. | ||
|
||
#### Option 2: Clone this repo | ||
|
||
```bash | ||
% git clone [email protected]:ProjectTorreyPines/SD4SOLPS.jl.git | ||
% cd example | ||
$ make help | ||
Help Menu | ||
|
||
make env_with_cloned_repo: Creates a Julia environment with the cloned repositories | ||
make env_with_git_url: 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 Clean: Deletes Project.toml, Manifest.toml, and any cloned repositories for a fresh start | ||
``` | ||
|
||
Further options are same as above except for the difference that in case of cloning local copies of repos, they will be kept on same level as where you cloned SD4SOLPS.jl repo. | ||
|
||
### Manual Install | ||
|
||
Refer to the instructions on this [wiki page](https://github.com/ProjectTorreyPines/SD4SOLPS.jl/wiki). | ||
|
||
## Use | ||
|
||
Refer to the instructions on this [wiki page](https://github.com/ProjectTorreyPines/SD4SOLPS.jl/wiki/Demo). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#!/bin/bash | ||
julia -e 'using JuliaFormatter; format(".", verbose=true)' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
*.mesh_ext.json | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
#!/bin/bash | ||
|
||
is_repo=$(git rev-parse --is-inside-work-tree 2>/dev/null) | ||
if [[ ${is_repo} == "true" ]] | ||
then | ||
SD4SOLPS_path="$(git rev-parse --show-toplevel)" | ||
project_path="$(dirname ${SD4SOLPS_path})" | ||
else | ||
SD4SOLPS_path="" | ||
project_path="$(dirname $(pwd))" | ||
fi | ||
echo "Cloning git repositories to "$project_path | ||
orig_path=$(pwd) | ||
cd $project_path | ||
if [[ -z $SD4SOLPS_path ]] | ||
then | ||
git clone [email protected]:ProjectTorreyPines/SD4SOLPS.jl.git | ||
SD4SOLPS_path=$project_path"/SD4SOLPS.jl" | ||
fi | ||
# in a for loop clone SynthDiag.jl SOLPS2IMAS.jl OMAS.jl GGDUtils.jl | ||
for repo in SynthDiag.jl SOLPS2IMAS.jl OMAS.jl GGDUtils.jl | ||
do | ||
if [[ ! -d $repo ]] | ||
then | ||
git clone "[email protected]:ProjectTorreyPines/"$repo".git" | ||
fi | ||
done | ||
cd $orig_path | ||
|
||
echo "Generating Project.toml and Manifest.toml" | ||
OMAS_path=$project_path"/OMAS.jl" | ||
EFIT_url="[email protected]:JuliaFusion/EFIT.jl.git" | ||
julia --project=. -e 'using Pkg; Pkg.develop(path="'$OMAS_path'"); Pkg.instantiate()' | ||
julia --project=. -e 'using Pkg; Pkg.add(url="'$EFIT_url'", rev="master"); Pkg.instantiate()' | ||
for repo in GGDUtils SOLPS2IMAS SynthDiag SD4SOLPS; do | ||
repo_path=$project_path"/"$repo".jl" | ||
julia --project=. -e 'using Pkg; Pkg.develop(path="'${repo_path}'"); Pkg.instantiate()' | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
|
||
echo "Generating Project.toml and Manifest.toml" | ||
OMAS_url="[email protected]:ProjectTorreyPines/OMAS.jl.git" | ||
EFIT_url="[email protected]:JuliaFusion/EFIT.jl.git" | ||
julia --project=. -e 'using Pkg; Pkg.add(url="'$OMAS_url'", rev="master"); Pkg.instantiate()' | ||
julia --project=. -e 'using Pkg; Pkg.add(url="'$EFIT_url'", rev="master"); Pkg.instantiate()' | ||
for repo in GGDUtils SOLPS2IMAS SynthDiag SD4SOLPS; do | ||
repo_url="[email protected]:ProjectTorreyPines/"$repo".jl.git" | ||
julia --project=. -e 'using Pkg; Pkg.add(url="'$repo_url'", rev="master"); Pkg.instantiate()' | ||
done |
Oops, something went wrong.