Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
JianghuiDu committed Jul 26, 2023
1 parent a7a3d6a commit 3f29ee6
Showing 1 changed file with 8 additions and 6 deletions.
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# SedTrace
*A Julia package to generate and run models of marine sediment diagenesis.*

| **Documentation** | **Build Status** |
| **Documentation** | **Build Status** |
|:----------------------------------------:|:-----------------------:|
| [![][docs-stable-img]][docs-stable-url] | [![][GHA-img]][GHA-url] |

Expand All @@ -11,20 +11,22 @@
[GHA-url]: https://github.com/JianghuiDu/SedTrace.jl/actions

## Installation
Download and install `Julia` first at https://julialang.org/downloads. Julia version should be 1.7 or above to use `SedTrace`.
`SedTrace` is not registered with the Julia package manager. Install it directly from the GitHub repository. From the Julia REPL, type `]` to enter the `Pkg` REPL mode and run
Download and install `Julia` at https://julialang.org/downloads. Julia version should be 1.7 or above to use `SedTrace`.
`SedTrace` is not registered with the Julia package manager. Install it directly from the GitHub repository. From the Julia terminal (aka the REPL), type `]` to enter the `Pkg` mode and run

```
pkg> add https://github.com/JianghuiDu/SedTrace.jl.git
```
This will also install all the dependency packages. I recommend using [`Julia for Visual Studio Code`](https://www.julia-vscode.org) as the language editor. I also suggest installing the [`MKL`](https://github.com/JuliaLinearAlgebra/MKL.jl) package if you want to accelarate model simulation (at the moment this may not work on macOS with Apple silicon chips).
This will also install all the dependency packages. I also suggest installing the [`MKL`](https://github.com/JuliaLinearAlgebra/MKL.jl) package if you want to accelerate model simulation (at the moment this may not work on macOS with Apple silicon chips).

I suggest using [`Julia for Visual Studio Code`](https://www.julia-vscode.org) as the language editor. Check the link to see how to install and configure the Julia language extension in `Visual Studio Code`. After installation, make sure you tell the path of Julia executable to `Visual Studio Code`. To do so, open `Visual Studio Code`, go to `File/Preferences/Settings` and search for `Julia: Executable Path`. To find the path of Julia executable, you can enter `Sys.BINDIR` from the Julia REPL. The output is the directory containing the executable. You need to append the name of the executable when writing the path, for example `C:/Users/username/AppData/Local/Programs/julia-1.9.2/bin/julia.exe` on Windows, or `/Applications/Julia-1.9.app/Contents/Resources/julia/bin/julia` on macOS.

## First example
Now you can use the preincluded examples to see how `SedTrace` works. Go to the directory where Julia packages are installed. Normally this should be `/users/username/.julia/packages/SedTrace`. Copy the sub-directory `/SedTrace/examples` to a directory of your own choice (`/mydirector/examples`), otherwise you won't be able to execute the examples. Make sure you don't modify anything in the `/.julia` directory.
Now you can use the pre-included examples to see how `SedTrace` works. Go to the directory where Julia packages are installed. Normally this should be `/users/username/.julia/packages/SedTrace`. Copy the sub-directory `/SedTrace/examples` to a directory of your own choice (`/mydirector/examples`), otherwise you won't be able to execute the examples. Make sure you don't modify anything in the `/.julia` directory.

Now use `Visual Studio Code` to open the directory containing the example that you want to check, for example, `/mydirectory/examples/SimpleFe`. Before generating the model, remove all the pre-generated files, including the `.jl` files except `main.SimpleFe.jl`, the `.xlsx` files except `model_config.SimpleFe.xlxs` file, and anything inside the `/SimpleFe/plots` sub-directory (if there is one). Those files were pre-generated by the package creator and you will be able to generate them again later. If you don't remove them you will not be able to overwrite them during code generation because of ownership issues.

Now open `main.SimpleFe.jl`, this is where you call `SedTrace` to generate code and run model simulations based on the inputs from `model_config.SimpleFe.xlxs`. Excute the code in the script line by line. Model code and output will be generated and saved in the `/mydirectory/examples/SimpleFe` directory (i.e., the same ones you just deleted).
Now open `main.SimpleFe.jl`, this is where you call `SedTrace` to generate code and run model simulations based on the inputs from `model_config.SimpleFe.xlxs`. Execute the code in the script line by line. Model code and output will be generated and saved in the `/mydirectory/examples/SimpleFe` directory (i.e., the same ones you just deleted).

For more information, see `Documentation` below.

Expand Down

0 comments on commit 3f29ee6

Please sign in to comment.