roxieapi.tool_adapter.RoxieToolAdapter module

class roxieapi.tool_adapter.RoxieToolAdapter.RestRoxieToolAdapter(service_url: str, input_files: List[Path], session: Session | None = None)[source]

Bases: RoxieToolAdapter

download_artefact(output_directory: Path, artefact: str) None[source]

A method to download an artefact to the specified output directory.

Parameters:
  • output_directory (Path) – The directory where the artefact will be downloaded.

  • artefact (str) – The name of the artefact to be downloaded.

Returns:

None

get_artefact_list() List[str][source]

Return a list of artefacts available to download.

Returns:

The list of artefacts

run() int[source]

Execute a ROXIE simulation.

class roxieapi.tool_adapter.RoxieToolAdapter.RoxieToolAdapter(input_files: List[Path])[source]

Bases: ABC

A RoxieToolAdapter class with methods to execute a ROXIE model from command line, read figures of merit table and prepare a Lorentz force file.

abstract download_artefact(output_directory: Path, artefact: str) None[source]

A method to download an artefact to the specified output directory.

Parameters:
  • output_directory (Path) – The directory where the artefact will be downloaded.

  • artefact (str) – The name of the artefact to be downloaded.

Returns:

None

download_artefacts(output_directory: Path, *patterns) None[source]

Downloads artefacts based on the given patterns to the specified output directory.

Parameters:
  • output_directory (Path) – The directory where the artefacts will be downloaded.

  • *patterns – Variable length argument list of patterns to filter artefacts.

Returns:

None

abstract get_artefact_list() list[str][source]
abstract run() int[source]

Execute a ROXIE simulation.

class roxieapi.tool_adapter.RoxieToolAdapter.TerminalRoxieToolAdapter(input_files: List[Path], run_in_tmp_folder: bool = True, tmp_path_parent: str | None = None, executable_name: str = 'runroxie', overwrite_arguments: List[str] | None = None)[source]

Bases: RoxieToolAdapter

download_artefact(output_directory: Path, artefact: str) None[source]

A method to download an artefact to the specified output directory.

Parameters:
  • output_directory (Path) – The directory where the artefact will be downloaded.

  • artefact (str) – The name of the artefact to be downloaded.

Returns:

None

get_artefact_list() List[str][source]
run() int[source]

Execute a ROXIE simulation.