Skip to content

Getting Started

odunbar edited this page Mar 8, 2021 · 4 revisions

Python dependencies

We have a dependency on the package scikit-learn, please first install this from here

https://scikit-learn.org/stable/install.html#installation-instructions

If you are installing in a non-default environment you may have to give this environment path to PyCall on first running of the package.

The first time you use the package

Clone the repository, and enter the root directory. Open julia REPL by typing

julia --project

Then instantiate the package with the package manager

]
instantiate
<Backspace>

If this throws errors, see the troubleshooting below

Testing the package

We have a test suite to make sure the package is correctly configured. To run the suite, open the julia REPL and type:

using Test
include("test/runtests.jl")

If all pass then all of the package pieces should work!

Using the Examples

Examples in the repository may have their own project dependencies. Navigate to the root directory examples/example_name and open the Julia REPL with

julia --project

instantiate the example packages/dependencies with

]
instantiate
<Backspace>

To run an example one can then use

include("XYZ_example.jl")

Troubleshooting package management

There is a heavy dependency on the package EnsembleKalmanProcesses, which is also being developed. This may well lead to error instantiating, if this happens, one should redownload the packages as follows. Open the REPL in the base directory

]
rm EnsembleKalmanProcesses
add https://github.com/CliMA/EnsembleKalmanProcesses.jl
<Backspace>

This will be sufficient to compile the package. If running examples, now go to the example directory, open the REPL and perform the following

]
rm EnsembleKalmanProcesses
add https://github.com/CliMA/EnsembleKalmanProcesses.jl
rm CalibrateEmulateSample
add https://github.com/CliMA/CalibrateEmulateSample.jl
<Backspace>

You can add the CalibrateEmulateSample package to your local development etc.

dev /path/to/CalibrateEmulateSample.jl/