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_dirstr

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_dirstr

The root documentation directory containing conf.py.

Raises
FileNotFoundError

Raised if a conf.py file is not found in the initial directory, or any parents.