eta_utility.util_julia module

eta_utility.util_julia.import_jl_file(filename: Path) ModuleType[source]
eta_utility.util_julia.import_jl(importstr: str) ModuleType[source]

Import a julia file into the main namespace. The syntax is equivalent to python import strings. If the import string starts with a ‘.’, the import path is interpreted as relative to the file calling this function. If the import string is absolute, it will use the python sys.path list to look for the file.

The function also makes sure that julia.Main is imported and returns a handle to the module. This way, the imported julia file can be used right away.

Parameters:

importstr – Path to the imported julia package. If the path starts with a ‘.’ this will be relative to the file it is specified in. Otherwise, this will look through python import Path.

eta_utility.util_julia.importstr_to_path(importstr: str, _stack: int = 1) Path[source]

Converts an import string into a python path. The syntax is equivalent to python import strings. If the import string starts with a ‘.’, the import path is interpreted as relative to the file calling this function. If the import string is absolute, it will use the python sys.path list to look for the file.

Parameters:

importstr – Path to the imported julia package (python import string). If the path starts with a ‘.’ this will be relative to the file it is specified in. Otherwise, this will look through the python import paths.

eta_utility.util_julia.update_agent() None[source]

Updates the NSGA2 agent model file

eta_utility.util_julia.install_julia() None[source]

Checks if Julia language is available in the system and install and configure pyjulia. Also install ju_extensions in Julia environmnent.

eta_utility.util_julia.check_julia_package() bool[source]

Check if everything is available and setup correctly to execute modules depending on eta_utility julia extensions. This function raises ImportError if necessary components are missing.

Returns:

True if is installed ImportError if not

eta_utility.util_julia.julia_extensions_available() bool[source]

Check if everything is available and setup correctly to execute modules depending on eta_utility julia extensions. This function returns false if necessary components are missing. It does not provide any indications what is missing.

Returns:

True if julia extensions are correctly installed, false if not.