This module sets the location of the data folder and other global settings.
To change the level of log messages displayed, use e.g.
checkmem(unit='mb', fmt='0.2f', start=0, to_string=True)¶
For use with logger, check current memory usage
Set the data folder and relative path to the user-specified location.
On startup, the datadir and rel_path are set to the conventions used to store data. datadir is the root directory to the data, and relative_path is a list of sub directories to the data –> to change the location of the data the user is able to supply a new root_dir and new relative path. If the user uses a similar directory path model that we use e.g. root_dir/demographics/contact… the user can change datadir without changing relative path, by passing in relative_path = None (default) – note, mostly deprecated but still functional if needed.
- root_dir (str) – new root directory for the data folder to point to
- relative_path (str) – new relative path to the root_dir
path to the updated settings.datadir
Set the number of census brackets – usually 16, 18 or 20.
Check that the data folder can be found.