--- tocpdeth: 3 --- # Configuration A redun workflow is configured using a configuration file called `.redun/redun.ini` which follows the [INI format](https://en.wikipedia.org/wiki/INI_file)). Here is an example: ```ini [backend] db_uri = sqlite:///redun.db [executors.default] type = local max_workers = 20 [executors.batch] type = aws_batch image = my-docker-image queue = my-aws-batch-queue s3_scratch = s3://my-bucket/my-path/ ``` ## Configuration directory The configuration directory, `.redun/`, is specified by the following (in order of precedence): - Command line option: `redun --config ...` - Environment variable: `export REDUN_CONFIG=` - Filesystem search: Find a directory named `.redun/` starting in the current working directory and proceeding to parent directories. - Lastly, automatically create a configuration directory, `.redun/`, in the current working directory. ## Configuration options Currently, redun supports the following configuration sections and options. ### Scheduler Scheduler options can be configured in the `[scheduler]` section. #### `ignore_warnings` A whitespace-separated string of redun warnings to suppress from logging. Current warning types include: - `namespace`: Task namespaces will be required soon. Until then, it is a warning to not define a namespace for a task. #### `setup_scheduler` A string that specifies the location of a user-defined function for setting up the scheduler. It should follow the syntax `{file_or_module}::{function_name}`, where - `{file_or_module}` should be a filename relative to the `redun.ini` file (e.g. `../workflow.py`), or a python module using dot-syntax (e.g. `workflow_lib.utils.scheduler`). - `{function_name}` should the name of a function, typically `setup_scheduler`. The user function `setup_scheduler()` should take as its first argument `config` (see [Config](redun.config.Config)) and it should return an instantiated `scheduler` (see [Scheduler](redun.scheduler.Scheduler)). ```py from redun.config import Config from redun import Scheduler def setup_scheduler(config: Config) -> Scheduler: scheduler = Scheduler(config=config) # Perform additional setup such as # scheduler.add_executor(...) return scheduler ``` If `setup_scheduler()` has additional arguments, they are automatically parsed from the command line using `--setup