discover_conf_py_directory#
- documenteer.stackdocs.rootdiscovery.discover_conf_py_directory(initial_dir)#
Discover the directory containing the conf.py file.
This function is useful for building stack docs since it will look in the current working directory and all parents.
- Parameters:
initial_dir (
str
) – The inititial directory to search from. In practice, this is often the directory that the user is running the stack-docs CLI from.- Returns:
root_dir – The root documentation directory containing
conf.py
.- Return type:
- Raises:
FileNotFoundError – Raised if a
conf.py
file is not found in the initial directory, or any parents.