timor.utilities.file_locations

Attributes

DEFAULT_TASK_FILTER

__utilities

cache_dir

cache_robot_dir

default_robot_dir

head

module_DBs

package

robots

schema_dir

schemata

test_data

test_data

Functions

clean_caches()

Helper to clean timor caches, e.g., to download all module sets after they have been updated.

get_module_db_files(name)

Returns the filepaths to the database json file and the package folder for names of valid module databases.

get_test_tasks([task_name])

Gives access to all test tasks from the test_data folder.

map2path(p)

Maps strings to paths, but does nothing else s.t. e.g. Django paths are not casted.

Module Contents

timor.utilities.file_locations.DEFAULT_TASK_FILTER
timor.utilities.file_locations.__utilities
timor.utilities.file_locations.cache_dir
timor.utilities.file_locations.cache_robot_dir
timor.utilities.file_locations.clean_caches()

Helper to clean timor caches, e.g., to download all module sets after they have been updated.

timor.utilities.file_locations.default_robot_dir
timor.utilities.file_locations.get_module_db_files(name)

Returns the filepaths to the database json file and the package folder for names of valid module databases.

Parameters:

name (str) – The (folder) name of the module set

Returns:

Path to modules.json (all assets are in the same folder)

Return type:

pathlib.Path

timor.utilities.file_locations.get_test_tasks(task_name=DEFAULT_TASK_FILTER)

Gives access to all test tasks from the test_data folder.

Parameters:

task_name (re.Pattern) – A regular expression pattern that is run against task files to be loaded

Returns:

A dictionary mapping the “kind” of the task or solution file to the matching path.

Return type:

Dict[str, Union[pathlib.Path, List[pathlib.Path]]]

timor.utilities.file_locations.head
timor.utilities.file_locations.map2path(p)

Maps strings to paths, but does nothing else s.t. e.g. Django paths are not casted.

Parameters:

p (Union[str, pathlib.Path])

Return type:

pathlib.Path

timor.utilities.file_locations.module_DBs
timor.utilities.file_locations.package
timor.utilities.file_locations.robots
timor.utilities.file_locations.schema_dir
timor.utilities.file_locations.schemata
timor.utilities.file_locations.test_data
timor.utilities.file_locations.test_data = None