prompt: We are currently solving the following issue within our repository. Here is the issue text:
  --- BEGIN ISSUE ---
  nipype/conftest.py should be excluded from API documentation
  ### Summary
  
  The auto-generated API docs include `conftest.py`, which has a fixture. Pytest has turned calling a fixture directly into an error, and apparently the fixture is getting called when the docs are generated.
  
  This is what's currently breaking the Circle builds.
  
  
  --- END ISSUE ---
  
  Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
  --- BEGIN FILES ---
  Path: `tools/build_interface_docs.py`
  Content:
  ```
  1 #!/usr/bin/env python
  2 # emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-
  3 # vi: set ft=python sts=4 ts=4 sw=4 et:
  4 """Script to auto-generate interface docs.
  5 """
  6 from __future__ import print_function, unicode_literals
  7 # stdlib imports
  8 import os
  9 import sys
  10 
  11 # *****************************************************************************
  12 if __name__ == '__main__':
  13     nipypepath = os.path.abspath('..')
  14     sys.path.insert(1, nipypepath)
  15     # local imports
  16     from interfacedocgen import InterfaceHelpWriter
  17     package = 'nipype'
  18     outdir = os.path.join('interfaces', 'generated')
  19     docwriter = InterfaceHelpWriter(package)
  20     # Packages that should not be included in generated API docs.
  21     docwriter.package_skip_patterns += [
  22         '\.external$',
  23         '\.fixes$',
  24         '\.utils$',
  25         '\.pipeline',
  26         '\.testing',
  27         '\.caching',
  28         '\.scripts',
  29     ]
  30     # Modules that should not be included in generated API docs.
  31     docwriter.module_skip_patterns += [
  32         '\.version$',
  33         '\.interfaces\.base$',
  34         '\.interfaces\.matlab$',
  35         '\.interfaces\.rest$',
  36         '\.interfaces\.pymvpa$',
  37         '\.interfaces\.slicer\.generate_classes$',
  38         '\.interfaces\.spm\.base$',
  39         '\.interfaces\.traits',
  40         '\.pipeline\.alloy$',
  41         '\.pipeline\.s3_node_wrapper$',
  42         '\.testing',
  43         '\.scripts',
  44     ]
  45     docwriter.class_skip_patterns += [
  46         'AFNICommand',
  47         'ANTS',
  48         'FSLCommand',
  49         'FS',
  50         'Info',
  51         '^SPM',
  52         'Tester',
  53         'Spec$',
  54         'Numpy'
  55         # NipypeTester raises an
  56         # exception when instantiated in
  57         # InterfaceHelpWriter.generate_api_doc
  58         'NipypeTester',
  59     ]
  60     docwriter.write_api_docs(outdir)
  61     docwriter.write_index(outdir, 'gen', relative_to='interfaces')
  62     print('%d files written' % len(docwriter.written_modules))
  63
  ```
  --- END FILES ---
  
  Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.
  
  Here is an example:
  
  ```diff
  diff --git a/examples/server_async.py b/examples/server_async.py
  --- a/examples/server_async.py
  +++ b/examples/server_async.py
  @@ -313,4 +313,4 @@
   
   
   if __name__ == "__main__":
  -    asyncio.run(run_async_server("."), debug=True)
  +    asyncio.run(run_async_server(), debug=True)
  diff --git a/examples/server_sync.py b/examples/server_sync.py
  --- a/examples/server_sync.py
  +++ b/examples/server_sync.py
  @@ -313,5 +313,5 @@
   
   
   if __name__ == "__main__":
  -    server = run_sync_server(".")
  +    server = run_sync_server()
       server.shutdown()
  
  ```
  
golden_diff: diff --git a/tools/build_interface_docs.py b/tools/build_interface_docs.py
  --- a/tools/build_interface_docs.py
  +++ b/tools/build_interface_docs.py
  @@ -41,6 +41,7 @@
           '\.pipeline\.s3_node_wrapper$',
           '\.testing',
           '\.scripts',
  +        '\.conftest',
       ]
       docwriter.class_skip_patterns += [
           'AFNICommand',
  
verification_info: {"golden_diff": "diff --git a/tools/build_interface_docs.py b/tools/build_interface_docs.py\n--- a/tools/build_interface_docs.py\n+++ b/tools/build_interface_docs.py\n@@ -41,6 +41,7 @@\n         '\\.pipeline\\.s3_node_wrapper$',\n         '\\.testing',\n         '\\.scripts',\n+        '\\.conftest',\n     ]\n     docwriter.class_skip_patterns += [\n         'AFNICommand',\n", "issue": "nipype/conftest.py should be excluded from API documentation\n### Summary\r\n\r\nThe auto-generated API docs include `conftest.py`, which has a fixture. Pytest has turned calling a fixture directly into an error, and apparently the fixture is getting called when the docs are generated.\r\n\r\nThis is what's currently breaking the Circle builds.\r\n\n", "before_files": [{"content": "#!/usr/bin/env python\n# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-\n# vi: set ft=python sts=4 ts=4 sw=4 et:\n\"\"\"Script to auto-generate interface docs.\n\"\"\"\nfrom __future__ import print_function, unicode_literals\n# stdlib imports\nimport os\nimport sys\n\n# *****************************************************************************\nif __name__ == '__main__':\n    nipypepath = os.path.abspath('..')\n    sys.path.insert(1, nipypepath)\n    # local imports\n    from interfacedocgen import InterfaceHelpWriter\n    package = 'nipype'\n    outdir = os.path.join('interfaces', 'generated')\n    docwriter = InterfaceHelpWriter(package)\n    # Packages that should not be included in generated API docs.\n    docwriter.package_skip_patterns += [\n        '\\.external$',\n        '\\.fixes$',\n        '\\.utils$',\n        '\\.pipeline',\n        '\\.testing',\n        '\\.caching',\n        '\\.scripts',\n    ]\n    # Modules that should not be included in generated API docs.\n    docwriter.module_skip_patterns += [\n        '\\.version$',\n        '\\.interfaces\\.base$',\n        '\\.interfaces\\.matlab$',\n        '\\.interfaces\\.rest$',\n        '\\.interfaces\\.pymvpa$',\n        '\\.interfaces\\.slicer\\.generate_classes$',\n        '\\.interfaces\\.spm\\.base$',\n        '\\.interfaces\\.traits',\n        '\\.pipeline\\.alloy$',\n        '\\.pipeline\\.s3_node_wrapper$',\n        '\\.testing',\n        '\\.scripts',\n    ]\n    docwriter.class_skip_patterns += [\n        'AFNICommand',\n        'ANTS',\n        'FSLCommand',\n        'FS',\n        'Info',\n        '^SPM',\n        'Tester',\n        'Spec$',\n        'Numpy'\n        # NipypeTester raises an\n        # exception when instantiated in\n        # InterfaceHelpWriter.generate_api_doc\n        'NipypeTester',\n    ]\n    docwriter.write_api_docs(outdir)\n    docwriter.write_index(outdir, 'gen', relative_to='interfaces')\n    print('%d files written' % len(docwriter.written_modules))\n", "path": "tools/build_interface_docs.py"}], "after_files": [{"content": "#!/usr/bin/env python\n# emacs: -*- mode: python; py-indent-offset: 4; indent-tabs-mode: nil -*-\n# vi: set ft=python sts=4 ts=4 sw=4 et:\n\"\"\"Script to auto-generate interface docs.\n\"\"\"\nfrom __future__ import print_function, unicode_literals\n# stdlib imports\nimport os\nimport sys\n\n# *****************************************************************************\nif __name__ == '__main__':\n    nipypepath = os.path.abspath('..')\n    sys.path.insert(1, nipypepath)\n    # local imports\n    from interfacedocgen import InterfaceHelpWriter\n    package = 'nipype'\n    outdir = os.path.join('interfaces', 'generated')\n    docwriter = InterfaceHelpWriter(package)\n    # Packages that should not be included in generated API docs.\n    docwriter.package_skip_patterns += [\n        '\\.external$',\n        '\\.fixes$',\n        '\\.utils$',\n        '\\.pipeline',\n        '\\.testing',\n        '\\.caching',\n        '\\.scripts',\n    ]\n    # Modules that should not be included in generated API docs.\n    docwriter.module_skip_patterns += [\n        '\\.version$',\n        '\\.interfaces\\.base$',\n        '\\.interfaces\\.matlab$',\n        '\\.interfaces\\.rest$',\n        '\\.interfaces\\.pymvpa$',\n        '\\.interfaces\\.slicer\\.generate_classes$',\n        '\\.interfaces\\.spm\\.base$',\n        '\\.interfaces\\.traits',\n        '\\.pipeline\\.alloy$',\n        '\\.pipeline\\.s3_node_wrapper$',\n        '\\.testing',\n        '\\.scripts',\n        '\\.conftest',\n    ]\n    docwriter.class_skip_patterns += [\n        'AFNICommand',\n        'ANTS',\n        'FSLCommand',\n        'FS',\n        'Info',\n        '^SPM',\n        'Tester',\n        'Spec$',\n        'Numpy'\n        # NipypeTester raises an\n        # exception when instantiated in\n        # InterfaceHelpWriter.generate_api_doc\n        'NipypeTester',\n    ]\n    docwriter.write_api_docs(outdir)\n    docwriter.write_index(outdir, 'gen', relative_to='interfaces')\n    print('%d files written' % len(docwriter.written_modules))\n", "path": "tools/build_interface_docs.py"}]}