How to Use Configuration Files
Purpose
This guide explains how to create and use configuration files that control the behavior of RDEToolKit. By properly configuring configuration files, you can select processing modes, control file saving, and define custom settings.
Prerequisites
Before using configuration files, ensure the following:
- RDEToolKit is installed
- Project directory has been created
- Basic knowledge of YAML or TOML format
Steps
1. Create Configuration File
RDEToolKit automatically searches for configuration files in the following locations and file names:
Supported File Names and Locations
File Name | Location | Format |
---|---|---|
rdeconfig.yaml |
tasksupport/ or project root |
YAML |
rdeconfig.yml |
tasksupport/ or project root |
YAML |
pyproject.toml |
project root | TOML |
Recommended Placement
We recommend placing project-specific settings in tasksupport/rdeconfig.yaml
and development environment-wide settings in pyproject.toml
.
2. Define Basic Settings
Processing Mode Configuration
tasksupport/rdeconfig.yaml | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 |
|
pyproject.toml | |
---|---|
1 2 3 4 5 6 |
|
Configuration Item Details
Setting Item | Type | Default Value | Description |
---|---|---|---|
extended_mode |
string | none | Extended mode ('MultiDataTile' or 'rdeformat') |
save_raw |
boolean | false | Save input files to raw directory |
save_nonshared_raw |
boolean | true | Save input files to nonshared_raw directory |
magic_variable |
boolean | false | Enable Magic Variable functionality |
save_thumbnail_image |
boolean | false | Automatic thumbnail image generation |
3. Processing Mode-Specific Settings
Invoice Mode (Default)
tasksupport/rdeconfig.yaml | |
---|---|
1 2 3 |
|
Multi Data Tile Mode
tasksupport/rdeconfig.yaml | |
---|---|
1 2 3 4 5 |
|
RDE Format Mode
tasksupport/rdeconfig.yaml | |
---|---|
1 2 3 4 |
|
4. Add Custom Settings
Define custom configuration values that can be referenced within structured processing:
tasksupport/rdeconfig.yaml | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 |
|
pyproject.toml | |
---|---|
1 2 3 4 5 6 7 8 9 10 |
|
5. Reference Settings in Structured Processing
How to use created configuration values within structured processing functions:
modules/process.py | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
|
Verification
Verify Configuration File Loading
How to verify that settings are loaded correctly:
test_config.py | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 |
|
Configuration Priority
Priority when multiple configuration files exist:
tasksupport/rdeconfig.yaml
tasksupport/rdeconfig.yml
./rdeconfig.yaml
./rdeconfig.yml
./pyproject.toml
Configuration Conflicts
When the same configuration item is defined in multiple files, the setting from the higher priority file is used.
Troubleshooting
Common Issues and Solutions
YAML Syntax Error
1 |
|
Solution: Check YAML syntax
1 2 3 4 5 6 7 8 9 |
|
Configuration Values Not Applied
Check items: 1. File name spelling mistakes 2. File placement location 3. YAML/TOML syntax errors 4. Incorrect configuration item names
Cannot Access Custom Settings
safe_config_access.py | |
---|---|
1 2 3 4 5 6 7 8 9 10 11 12 |
|
Related Information
For detailed configuration file specifications:
- Magic Variables - Dynamic metadata replacement functionality (see Magic Variables section above)
- API Reference - Configuration-related API specifications