Configuration#
The satrain.config module handles configuration management for the SatRain package, including data path configuration and user settings.
satrain.config#
Provides functionality to manage the local configuration of the satrain package.
The local configuration of the satrain package contains only a single entry
named ‘data_path’ and specifies the location at which the training and testing
data is stored.
In order to conserve the satrain configuration between sessions, satrain will
create a config.toml in the user’s configuration folder. By default, the ‘data_path’
will be read from this file. However, the ‘data_path’ read from the configuration file
will be overwritten by the SATRAIN_DATA_PATH environment variable.
- get_data_path() Path[source]#
Get the root of the SatRain data path.
- The satrain data path is determined as follows:
In the absence of any configuration, it defaults to the current working directory.
If a satrain config file exists and it contains a ‘data_path’ entry, this will replace the current working directory determined in the previous step.
Finally, if the ‘SATRAIN_DATA_PATH’ environment variable is set, it will overwrite the settings from the config file.
- Returns:
A Path object pointing to the root of the satrain data path.