Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 26 additions & 6 deletions julia/MOLE.jl/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,45 @@ This is an implementation written in Julia for the MOLE package. The source file

## Installation

MOLE.jl is not yet available in the Julia's package manager. For now, this repository needs to be cloned locally in order to use the library in Julia.
MOLE.jl is available from the Julia package manager. In Julia, run `using Pkg; Pkg.add("MOLE")` to install it. Alternatively, enter Julia's package mode by pressing `]` and run `add MOLE`.

## Using MOLE.jl

In order to use the MOLE.jl library, first navigate to the location where the repository has been cloned to. Then, go to the `mole/julia/MOLE.jl` sub-directory. From here, you can access the library via the REPL or the command line.
Once installed, load the library in Julia with:

### From the REPL
```julia
using MOLE
```

Then, to run a script such as `myScript.jl`, you can use the following command in the REPL:

```julia
include("path/to/myScript.jl")
```

or run it from the command line:

```sh
julia path/to/myScript.jl
```

### Development and working from source

If you are developing MOLE.jl or working directly from a cloned repository, navigate to the `mole/julia/MOLE.jl` sub-directory. From here, you can access the library via the REPL or the command line.

#### From the REPL

In `mole/julia/MOLE.jl`, start Julia using the command `julia --project=.`. Next, the package library needs to be instantiated and pre-compiled. Enter the `pkg` mode by pressing `]`, then type the commands `instantiate` and `precompile` (one at a time). This should activate the MOLE.jl package and install the necessary dependencies.

Then, to run a script such as myScript.jl, you can use the following command in the REPL:
Then, to run a script such as `myScript.jl`, you can use the following command in the REPL:

```julia
include("path/to/myScript.jl")
```

### From the command line
#### From the command line

In `mole/julia/MOLE.jl`, use the following commands to instatiate and precompile the MOLE package:
In `mole/julia/MOLE.jl`, use the following commands to instantiate and precompile the MOLE package:

```sh
julia --project=. -e 'using Pkg; Pkg.instantiate()'
Expand Down
34 changes: 27 additions & 7 deletions julia/MOLE.jl/docs/src/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,27 +4,47 @@ MOLE is a library that implements high-order mimetic operators to solve partial
This site provides documentation for the Julia implementation of MOLE.
More information can be found on the [main documentation site](https://mole-docs.readthedocs.io/en/main/) and the [GitHub repository](https://github.com/csrc-sdsu/mole).

## Getting Started
## Installation

MOLE.jl is not yet available in the Julia's package manager. For now, this repository needs to be cloned locally in order to use the library.
MOLE.jl is available from the Julia package manager. In Julia, run `using Pkg; Pkg.add("MOLE")` to install it. Alternatively, enter Julia's package mode by pressing `]` and run `add MOLE`.

## Using MOLE.jl

In order to use the MOLE.jl library, first navigate to the location where the repository has been cloned to. Then, go to the `mole/julia/MOLE.jl` sub-directory. From here, you can access the library via the REPL or the command line.
Once installed, load the library in Julia with:

### From the REPL
```julia
using MOLE
```

Then, to run a script such as `myScript.jl`, you can use the following command in the REPL:

```julia
include("path/to/myScript.jl")
```

or run it from the command line:

```sh
julia path/to/myScript.jl
```

### Development and working from source

If you are developing MOLE.jl or working directly from a cloned repository, navigate to the `mole/julia/MOLE.jl` sub-directory. From here, you can access the library via the REPL or the command line.

#### From the REPL

In `mole/julia/MOLE.jl`, start Julia using the command `julia --project=.`. Next, the package library needs to be instantiated and pre-compiled. Enter the `pkg` mode by pressing `]`, then type the commands `instantiate` and `precompile` (one at a time). This should activate the MOLE.jl package and install the necessary dependencies.

Then, to run a script such as myScript.jl, you can use the following command in the REPL:
Then, to run a script such as `myScript.jl`, you can use the following command in the REPL:

```julia
include("path/to/myScript.jl")
```

### From the command line
#### From the command line

In `mole/julia/MOLE.jl`, use the following commands to instatiate and precompile the MOLE package:
In `mole/julia/MOLE.jl`, use the following commands to instantiate and precompile the MOLE package:

```sh
julia --project=. -e 'using Pkg; Pkg.instantiate()'
Expand Down