Skip to content

Commit a77b616

Browse files
committed
Modify .gitignore and some improvements to Julia docs
1 parent e0a63fe commit a77b616

File tree

3 files changed

+134
-18
lines changed

3 files changed

+134
-18
lines changed

.gitignore

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,20 @@ venv/
3636
# MATLAB related
3737
*.asv
3838

39+
# Julia related
40+
# Build artifacts for creating documentation generated by the Documenter package
41+
# and running docs/make.jl
42+
julia/MOLE.jl/docs/build/
43+
44+
# File generated by Pkg, the package manager, based on a corresponding Project.toml
45+
# It records a fixed state of all packages used by the project. As such, it should not be
46+
# committed for packages, but should be committed for applications that require a static
47+
# environment (for instance, specific examples).
48+
julia/MOLE.jl/Manifest*.toml
49+
julia/MOLE.jl/test/Manifest*.toml
50+
julia/MOLE.jl/docs/Manifest*.toml
51+
julia/MOLE.jl/examples/Manifest*.toml
52+
3953
# IDE and editor files
4054
.vscode/
4155
.idea/

julia/MOLE.jl/README.md

Lines changed: 65 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,27 +10,83 @@ MOLE.jl is not yet available in the Julia's package manager. For now, this repos
1010

1111
## Using MOLE.jl
1212

13-
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.
13+
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.
1414

1515
### From the REPL
1616

17-
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.
17+
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.
1818

1919
Then, to run a script such as myScript.jl, you can use the following command in the REPL:
20-
> ```include("path/to/myScript.jl")```
20+
21+
```julia
22+
include("path/to/myScript.jl")
23+
```
2124

2225
### From the command line
2326

24-
In ```mole/julia/MOLE.jl```, use the following commands to instatiate and precompile the MOLE package:
27+
In `mole/julia/MOLE.jl`, use the following commands to instatiate and precompile the MOLE package:
2528

26-
> ```julia --project=. -e 'using Pkg; Pkg.instantiate()'```
29+
```sh
30+
julia --project=. -e 'using Pkg; Pkg.instantiate()'
31+
```
2732

28-
> ```julia --project=. -e 'using Pkg; Pkg.precompile()'```
33+
```sh
34+
julia --project=. -e 'using Pkg; Pkg.precompile()'
35+
```
2936

30-
Then, to run a script such as myScript.jl, use the command
37+
Then, to run a script such as `myScript.jl`, use the command
3138

32-
> ```julia --project=. path/to/myScript.jl```
39+
```sh
40+
julia --project=. path/to/myScript.jl
41+
```
3342

3443
## Running the test suite
3544

36-
To run the unit tests, first enter the Julia REPL as in the above section (that is, by running the command ```julia --project=.``` from the directory ```mole/julia/MOLE.jl```). Next, enter the ```pkg``` mode by pressing ```]```, then type the command ```test```. The results of the unit tests should be displayed to your console.
45+
To run the unit tests, first enter the Julia REPL as in the above section (that is, by running the command `julia --project=.` from the directory `mole/julia/MOLE.jl`). Next, enter the `pkg` mode by pressing `]`, then type the command `test`. The results of the unit tests should be displayed to your console.
46+
47+
## Building the documentation
48+
MOLE.jl uses [Documenter.jl](https://documenter.juliadocs.org/stable/) to build its Julia implementation documentation. From the `mole/julia/MOLE.jl` directory, navigate to the `docs/` directory, with
49+
50+
```sh
51+
cd docs/
52+
```
53+
54+
### From the REPL
55+
56+
To build the documentation from the `docs/` directory, start Julia with the command `julia --project=.`. You should see the Julia REPL starting with the `(docs)` environment. Next, enter the `pkg` mode by pressing `]`, and then type the commands `instantiate` and `precompile` (one at a time). This should activate the `docs` environment (specific to build the documentation) and install the necessary dependencies.
57+
58+
Then, to build the documentation you can use the following command in the REPL:
59+
60+
```julia
61+
include("make.jl")
62+
```
63+
64+
### From the command line
65+
To build the documentation from the `docs/` directory, use the following commands to instatiate and precompile the documentation environment:
66+
67+
```sh
68+
julia --project=. -e 'using Pkg; Pkg.instantiate()'
69+
```
70+
71+
```sh
72+
julia --project=. -e 'using Pkg; Pkg.precompile()'
73+
```
74+
75+
Then build the documentation with the command
76+
77+
```sh
78+
julia --project=. make.jl
79+
```
80+
81+
### Preview the documentation
82+
Once you have built the documentation (either from the REPL or the command line), you can inspect the documentation in `docs/build` with the `index.html` file as the homepage.
83+
84+
## Examples
85+
86+
The MOLE library contains examples demonstrating how to use the operators, in a broad range of partial differential equations (PDEs). More information on the mathematical content can be found in the [main MOLE documentation](https://mole-docs.readthedocs.io/en/main/examples/index.html).
87+
88+
Currently, the following examples are available in the MOLE Julia package.
89+
90+
- Elliptic Problems
91+
- 1D Examples
92+
- `elliptic1D`: A script that solves the 1D Poisson's equation with Robin boundary conditions using mimetic operators.

julia/MOLE.jl/docs/src/index.md

Lines changed: 55 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,30 +10,76 @@ MOLE.jl is not yet available in the Julia's package manager. For now, this repos
1010

1111
## Using MOLE.jl
1212

13-
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.
13+
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.
1414

1515
### From the REPL
1616

17-
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.
17+
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.
1818

1919
Then, to run a script such as myScript.jl, you can use the following command in the REPL:
20-
> ```include("path/to/myScript.jl")```
20+
21+
```julia
22+
include("path/to/myScript.jl")
23+
```
2124

2225
### From the command line
2326

24-
In ```mole/julia/MOLE.jl```, use the following commands to instatiate and precompile the MOLE package:
27+
In `mole/julia/MOLE.jl`, use the following commands to instatiate and precompile the MOLE package:
2528

26-
> ```julia --project=. -e 'using Pkg; Pkg.instantiate()'```
29+
```sh
30+
julia --project=. -e 'using Pkg; Pkg.instantiate()'
31+
```
2732

28-
> ```julia --project=. -e 'using Pkg; Pkg.precompile()'```
33+
```sh
34+
julia --project=. -e 'using Pkg; Pkg.precompile()'
35+
```
2936

30-
Then, to run a script such as myScript.jl, use the command
37+
Then, to run a script such as `myScript.jl`, use the command
3138

32-
> ```julia --project=. path/to/myScript.jl```
39+
```sh
40+
julia --project=. path/to/myScript.jl
41+
```
3342

3443
## Running the test suite
3544

36-
To run the unit tests, first enter the Julia REPL as in the above section (that is, by running the command ```julia --project=.``` from the directory ```mole/julia/MOLE.jl```). Next, enter the ```pkg``` mode by pressing ```]```, then type the command ```test```. The results of the unit tests should be displayed to your console.
45+
To run the unit tests, first enter the Julia REPL as in the above section (that is, by running the command `julia --project=.` from the directory `mole/julia/MOLE.jl`). Next, enter the `pkg` mode by pressing `]`, then type the command `test`. The results of the unit tests should be displayed to your console.
46+
47+
## Building the documentation
48+
MOLE.jl uses [Documenter.jl](https://documenter.juliadocs.org/stable/) to build its Julia implementation documentation. From the `mole/julia/MOLE.jl` directory, navigate to the `docs/` directory, with
49+
50+
```sh
51+
cd docs/
52+
```
53+
54+
### From the REPL
55+
56+
To build the documentation from the `docs/` directory, start Julia with the command `julia --project=.`. You should see the Julia REPL starting with the `(docs)` environment. Next, enter the `pkg` mode by pressing `]`, and then type the commands `instantiate` and `precompile` (one at a time). This should activate the `docs` environment (specific to build the documentation) and install the necessary dependencies.
57+
58+
Then, to build the documentation you can use the following command in the REPL:
59+
60+
```julia
61+
include("make.jl")
62+
```
63+
64+
### From the command line
65+
To build the documentation from the `docs/` directory, use the following commands to instatiate and precompile the documentation environment:
66+
67+
```sh
68+
julia --project=. -e 'using Pkg; Pkg.instantiate()'
69+
```
70+
71+
```sh
72+
julia --project=. -e 'using Pkg; Pkg.precompile()'
73+
```
74+
75+
Then build the documentation with the command
76+
77+
```sh
78+
julia --project=. make.jl
79+
```
80+
81+
### Preview the documentation
82+
Once you have built the documentation (either from the REPL or the command line), you can inspect the documentation in `docs/build` with the `index.html` file as the homepage.
3783

3884
## Functions
3985

0 commit comments

Comments
 (0)