-
Notifications
You must be signed in to change notification settings - Fork 0
CodeRunner Configuration
CodeRunner global configuration is hierarchical. The hierarchy is:
- The file
coderunner/config.rbin the coderunner gem.
- The file
~/.coderunner/config.rb. - Individual environment variables such as
CODE_RUNNER_NO_REPOorCODE_RUNNER_SYSTEM.
All these are ways of changing the configuration stored in the hash CodeRunner::GLOBAL_OPTIONS.
Here we show how to set an example option: :system. If you are on a high performance computer, you will typically want to get CodeRunner to use the appropriate system configuration module (e.g. which batch launcher to use, etc). You will therefore want to set the :system global option. You can do this in 2 ways:
either edit ~/.coderunner/config.rb
CodeRunner::GLOBAL_OPTIONS[:system] = "archer"
or
export CODE_RUNNER_SYSTEM=archer
The full list of available options and defaults is (see coderunner/config.rb in case this is out of date):
GLOBAL_OPTIONS = {
system: 'generic_linux', # See coderunner/system_modules for more options
short_run_name: false, # If true, use simple run_names like v_id_1
no_repo: true, # Disable CodeRunner repo, true for now as in development
simple_prompt: false, # If true have a less fancy prompt in interactive mode
non_interactive: false, # If true, don't prompt for feedback when executing commands. Use with caution.
}
##Configuring Interactive Mode
The default configuration for CodeRunner interactive mode is in /coderunner/interactive_config.rb. You can add additional configuration (or change things like the prompt) by creating and adding code to the file ~/.coderunner/interactive_config.rb