0

I have the following directory structure:

+project_name
|
+---project_name
|   |---subpackage
|       |---__init__.py
|       |---api.py
|       |---mock_run.py
|
+---docs
    |---conf.py

I don't want mock_run in my docs so in the conf.py I have:
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store','mock', '**/mock_*', '*/mock_*','mock_run.py']

I run sphinx-apidoc -o docs/ project_name -f -M (I also clean everything like in the make docs makefile).

The file still appears in the docs. What am I doing wrong?

As you can see I've tried many different versions for the for the regex to catch so I believe this is not the problem.

bad_coder
  • 11,289
  • 20
  • 44
  • 72
DeanLa
  • 1,871
  • 3
  • 21
  • 37

1 Answers1

0

seems like the exclude_patterns in the conf.py are not for api-doc but for (maybe) the make html. The solution is to to run the exclude patters for the apidoc in the command line

sphinx-apidoc -o docs/ project_name "**/mock_*" -f -M
DeanLa
  • 1,871
  • 3
  • 21
  • 37