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_dir (
str
) – 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_dir – The root documentation directory (
doc/
), containingconf.py
.- Return type:
- Raises:
FileNotFoundError – Raised if a
conf.py
file is not found in the initial directory, or any parents, or in a`doc/
subdirectory.