discover_package_doc_dir

documenteer.stackdocs.rootdiscovery.discover_package_doc_dir(initial_dir)

Discover the doc/ dir of a package given an initial directory.

Parameters
initial_dirstr

The inititial directory to search from. In practice, this is often the directory that the user is running the package-docs CLI from. This directory needs to be somewhere inside the package’s repository.

Returns
root_dirstr

The root documentation directory (doc/), containing conf.py.

Raises
FileNotFoundError

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