We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
Add a code of conduct
I keep planning on doing this and not getting around to it so I'm opening an issue. As usual we can probably just copy @ctb: https://github.com/dib-lab/khmer/blob/master/CODE_OF_CONDUCT.rst


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `docs/conf.py`
Content:
```
1 from builtins import str
2 from retriever import VERSION,COPYRIGHT
3 from retriever.lib.repository import check_for_updates
4 from retriever import SCRIPT_LIST
5 
6 # Create the .rst file for the available datasets
7 datasetfile = open("datasets.rst", "w")
8 datasetfile_title = """
9 ==================
10 Datasets Available
11 ==================
12 
13 
14 """
15 check_for_updates()
16 script_list = SCRIPT_LIST()
17 
18 # write the title of dataset rst file
19 datasetfile.write(datasetfile_title)
20 
21 # get info from the scripts
22 for script_num, script in enumerate(script_list, start=1):
23     if script.ref.strip():
24         reference_link = script.ref
25     elif bool(script.urls.values()):
26         reference_link = list(script.urls.values())[0].rpartition('/')[0]
27     else:
28         reference_link = ""
29     datasetfile.write("| " + str(script_num) + ". **{}** \n| shortname: {}\n| reference: {}\n\n".format(script.name, script.shortname, reference_link))
30 datasetfile.close()
31 
32 needs_sphinx = '1.3'
33 
34 # Add any Sphinx extension module names here, as strings.
35 extensions = ['sphinx.ext.autodoc', 'sphinx.ext.napoleon']
36 
37 # Add any paths that contain templates here, relative to this directory.
38 templates_path = ['_templates']
39 
40 # The suffix of source filenames.
41 source_suffix = '.rst'
42 
43 # The encoding of source files.
44 # source_encoding = 'utf-8-sig'
45 
46 # The master toctree document.
47 master_doc = 'index'
48 
49 # General information about the project.
50 project = u'Data Retriever'
51 copyright = COPYRIGHT
52 
53 version = release = VERSION
54 
55 # List of patterns, relative to source directory, that match files and
56 # directories to ignore when looking for source files.
57 exclude_patterns = []
58 
59 # The reST default role (used for this markup: `text`) to use for all documents.
60 #default_role = None
61 
62 # If true, '()' will be appended to :func: etc. cross-reference text.
63 #add_function_parentheses = True
64 
65 # If true, the current module name will be prepended to all description
66 # unit titles (such as .. function::).
67 #add_module_names = True
68 
69 # If true, sectionauthor and moduleauthor directives will be shown in the
70 # output. They are ignored by default.
71 #show_authors = False
72 
73 # The name of the Pygments (syntax highlighting) style to use.
74 pygments_style = 'sphinx'
75 
76 # A list of ignored prefixes for module index sorting.
77 #modindex_common_prefix = []
78 
79 
80 # -- Options for HTML output ---------------------------------------------------
81 
82 # The theme to use for HTML and HTML Help pages.  See the documentation for
83 # a list of builtin themes.
84 html_theme = 'classic'
85 
86 # Theme options are theme-specific and customize the look and feel of a theme
87 # further.  For a list of options available for each theme, see the
88 # documentation.
89 #html_theme_options = {}
90 
91 # Add any paths that contain custom themes here, relative to this directory.
92 #html_theme_path = []
93 
94 # The name for this set of Sphinx documents.  If None, it defaults to
95 # "<project> v<release> documentation".
96 #html_title = None
97 
98 # A shorter title for the navigation bar.  Default is the same as html_title.
99 #html_short_title = None
100 
101 # The name of an image file (relative to this directory) to place at the top
102 # of the sidebar.
103 #html_logo = None
104 
105 # The name of an image file (within the static path) to use as favicon of the
106 # docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32
107 # pixels large.
108 #html_favicon = None
109 
110 # Add any paths that contain custom static files (such as style sheets) here,
111 # relative to this directory. They are copied after the builtin static files,
112 # so a file named "default.css" will overwrite the builtin "default.css".
113 
114 
115 # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
116 # using the given strftime format.
117 #html_last_updated_fmt = '%b %d, %Y'
118 
119 # If true, SmartyPants will be used to convert quotes and dashes to
120 # typographically correct entities.
121 #html_use_smartypants = True
122 
123 # Custom sidebar templates, maps document names to template names.
124 #html_sidebars = {}
125 
126 # Additional templates that should be rendered to pages, maps page names to
127 # template names.
128 #html_additional_pages = {}
129 
130 # If false, no module index is generated.
131 #html_domain_indices = True
132 
133 # If false, no index is generated.
134 #html_use_index = True
135 
136 # If true, the index is split into individual pages for each letter.
137 #html_split_index = False
138 
139 # If true, links to the reST sources are added to the pages.
140 #html_show_sourcelink = True
141 
142 # If true, "Created using Sphinx" is shown in the HTML footer. Default is True.
143 #html_show_sphinx = True
144 
145 # If true, "(C) Copyright ..." is shown in the HTML footer. Default is True.
146 #html_show_copyright = True
147 
148 # If true, an OpenSearch description file will be output, and all pages will
149 # contain a <link> tag referring to it.  The value of this option must be the
150 # base URL from which the finished HTML is served.
151 #html_use_opensearch = ''
152 
153 # This is the file name suffix for HTML files (e.g. ".xhtml").
154 #html_file_suffix = None
155 
156 # Output file base name for HTML help builder.
157 
158 
159 
160 # -- Options for LaTeX output --------------------------------------------------
161 
162 latex_elements = {
163 # The paper size ('letterpaper' or 'a4paper').
164 #'papersize': 'letterpaper',
165 
166 # The font size ('10pt', '11pt' or '12pt').
167 #'pointsize': '10pt',
168 
169 # Additional stuff for the LaTeX preamble.
170 #'preamble': '',
171 }
172 
173 # Grouping the document tree into LaTeX files. List of tuples
174 # (source start file, target name, title, author, documentclass [howto/manual]).
175 
176 # The name of an image file (relative to this directory) to place at the top of
177 # the title page.
178 #latex_logo = None
179 
180 # For "manual" documents, if this is true, then toplevel headings are parts,
181 # not chapters.
182 #latex_use_parts = False
183 
184 # If true, show page references after internal links.
185 #latex_show_pagerefs = False
186 
187 # If true, show URL addresses after external links.
188 #latex_show_urls = False
189 
190 # Documents to append as an appendix to all manuals.
191 #latex_appendices = []
192 
193 # If false, no module index is generated.
194 #latex_domain_indices = True
195 
196 
197 # -- Options for manual page output --------------------------------------------
198 
199 # One entry per manual page. List of tuples
200 
201 # If true, show URL addresses after external links.
202 #man_show_urls = False
203 
204 
205 # -- Options for Texinfo output ------------------------------------------------
206 
207 # Grouping the document tree into Texinfo files. List of tuples
208 # (source start file, target name, title, author,
209 #  dir menu entry, description, category)
210 
211 
212 # Documents to append as an appendix to all manuals.
213 #texinfo_appendices = []
214 
215 # If false, no module index is generated.
216 #texinfo_domain_indices = True
217 
218 # How to display URL addresses: 'footnote', 'no', or 'inline'.
219 #texinfo_show_urls = 'footnote'
220
```

Path: `try_install_all.py`
Content:
```
1 """Attempt to install all datasets into all database management systems
2 
3 This module, when run, attempts to install datasets from all Retriever scripts
4 in the /scripts folder (except for those listed in IGNORE), for each engine in
5 ENGINE_LIST() from __init__.py. In other words, it runs trys to install using
6 all possible combinations of database platform and script and checks to
7 see if there are any errors. It does not check the values in the database.
8 
9 """
10 from __future__ import print_function
11 from __future__ import absolute_import
12 import os
13 import sys
14 from importlib import reload
15 from retriever.lib.tools import choose_engine
16 from retriever import MODULE_LIST, ENGINE_LIST, SCRIPT_LIST
17 
18 reload(sys)
19 if hasattr(sys, 'setdefaultencoding'):
20     sys.setdefaultencoding('latin-1')
21 
22 MODULE_LIST = MODULE_LIST()
23 ENGINE_LIST = ENGINE_LIST()
24 if len(sys.argv) > 1:
25     ENGINE_LIST = [
26                     e for e in ENGINE_LIST
27                     if e.name in sys.argv[1:] or
28                     e.abbreviation in sys.argv[1:]
29     ]
30 SCRIPT_LIST = SCRIPT_LIST()
31 TEST_ENGINES = {}
32 IGNORE = ["AvianBodyMass", "FIA", "Bioclim", "PRISM", "vertnet","NPN", "mammsupertree", "eBirdOD"]
33 IGNORE = [dataset.lower() for dataset in IGNORE]
34 
35 for engine in ENGINE_LIST:
36     opts = {}
37     print("** %s **" % engine.name)
38     opts["engine"] = engine.abbreviation
39 
40     try:
41         TEST_ENGINES[engine.abbreviation] = choose_engine(opts)
42         TEST_ENGINES[engine.abbreviation].get_input()
43         TEST_ENGINES[engine.abbreviation].get_cursor()
44     except:
45         TEST_ENGINES[engine.abbreviation] = None
46         pass
47 
48 errors = []
49 for module in MODULE_LIST:
50     for (key, value) in list(TEST_ENGINES.items()):
51         if module.SCRIPT.shortname.lower() not in IGNORE:
52             if value != None:
53                 print("==>", module.__name__, value.name, "..........", module.SCRIPT.shortname)
54                 try:
55                     module.SCRIPT.download(value)
56                 except KeyboardInterrupt:
57                     pass
58                 except Exception as e:
59                     print("ERROR.")
60                     errors.append((key, module.__name__, e))
61             else:
62                 errors.append((key, "No connection detected......" + module.SCRIPT.shortname))
63 
64 print('')
65 if errors:
66     print("Engine, Dataset, Error")
67     for error in errors:
68         print(error)
69 else:
70     print("All tests passed")
71
```
--- 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()

```

diff --git a/docs/conf.py b/docs/conf.py
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -1,3 +1,13 @@
+from __future__ import print_function
+from __future__ import absolute_import
+from imp import reload
+import sys
+# sys removes the setdefaultencoding method at startup; reload to get it back
+reload(sys)
+if hasattr(sys, 'setdefaultencoding'):
+    # set default encoding to latin-1 to decode source text
+    sys.setdefaultencoding('latin-1')
+
 from builtins import str
 from retriever import VERSION,COPYRIGHT
 from retriever.lib.repository import check_for_updates
diff --git a/try_install_all.py b/try_install_all.py
--- a/try_install_all.py
+++ b/try_install_all.py
@@ -11,7 +11,7 @@
 from __future__ import absolute_import
 import os
 import sys
-from importlib import reload
+from imp import reload
 from retriever.lib.tools import choose_engine
 from retriever import MODULE_LIST, ENGINE_LIST, SCRIPT_LIST

{"golden_diff": "diff --git a/docs/conf.py b/docs/conf.py\n--- a/docs/conf.py\n+++ b/docs/conf.py\n@@ -1,3 +1,13 @@\n+from __future__ import print_function\n+from __future__ import absolute_import\n+from imp import reload\n+import sys\n+# sys removes the setdefaultencoding method at startup; reload to get it back\n+reload(sys)\n+if hasattr(sys, 'setdefaultencoding'):\n+    # set default encoding to latin-1 to decode source text\n+    sys.setdefaultencoding('latin-1')\n+\n from builtins import str\n from retriever import VERSION,COPYRIGHT\n from retriever.lib.repository import check_for_updates\ndiff --git a/try_install_all.py b/try_install_all.py\n--- a/try_install_all.py\n+++ b/try_install_all.py\n@@ -11,7 +11,7 @@\n from __future__ import absolute_import\n import os\n import sys\n-from importlib import reload\n+from imp import reload\n from retriever.lib.tools import choose_engine\n from retriever import MODULE_LIST, ENGINE_LIST, SCRIPT_LIST\n", "issue": "Add a code of conduct\nI keep planning on doing this and not getting around to it so I'm opening an issue. As usual we can probably just copy @ctb: https://github.com/dib-lab/khmer/blob/master/CODE_OF_CONDUCT.rst\n\n", "before_files": [{"content": "from builtins import str\nfrom retriever import VERSION,COPYRIGHT\nfrom retriever.lib.repository import check_for_updates\nfrom retriever import SCRIPT_LIST\n\n# Create the .rst file for the available datasets\ndatasetfile = open(\"datasets.rst\", \"w\")\ndatasetfile_title = \"\"\"\n==================\nDatasets Available\n==================\n\n\n\"\"\"\ncheck_for_updates()\nscript_list = SCRIPT_LIST()\n\n# write the title of dataset rst file\ndatasetfile.write(datasetfile_title)\n\n# get info from the scripts\nfor script_num, script in enumerate(script_list, start=1):\n    if script.ref.strip():\n        reference_link = script.ref\n    elif bool(script.urls.values()):\n        reference_link = list(script.urls.values())[0].rpartition('/')[0]\n    else:\n        reference_link = \"\"\n    datasetfile.write(\"| \" + str(script_num) + \". **{}** \\n| shortname: {}\\n| reference: {}\\n\\n\".format(script.name, script.shortname, reference_link))\ndatasetfile.close()\n\nneeds_sphinx = '1.3'\n\n# Add any Sphinx extension module names here, as strings.\nextensions = ['sphinx.ext.autodoc', 'sphinx.ext.napoleon']\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['_templates']\n\n# The suffix of source filenames.\nsource_suffix = '.rst'\n\n# The encoding of source files.\n# source_encoding = 'utf-8-sig'\n\n# The master toctree document.\nmaster_doc = 'index'\n\n# General information about the project.\nproject = u'Data Retriever'\ncopyright = COPYRIGHT\n\nversion = release = VERSION\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\nexclude_patterns = []\n\n# The reST default role (used for this markup: `text`) to use for all documents.\n#default_role = None\n\n# If true, '()' will be appended to :func: etc. cross-reference text.\n#add_function_parentheses = True\n\n# If true, the current module name will be prepended to all description\n# unit titles (such as .. function::).\n#add_module_names = True\n\n# If true, sectionauthor and moduleauthor directives will be shown in the\n# output. They are ignored by default.\n#show_authors = False\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = 'sphinx'\n\n# A list of ignored prefixes for module index sorting.\n#modindex_common_prefix = []\n\n\n# -- Options for HTML output ---------------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\nhtml_theme = 'classic'\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further.  For a list of options available for each theme, see the\n# documentation.\n#html_theme_options = {}\n\n# Add any paths that contain custom themes here, relative to this directory.\n#html_theme_path = []\n\n# The name for this set of Sphinx documents.  If None, it defaults to\n# \"<project> v<release> documentation\".\n#html_title = None\n\n# A shorter title for the navigation bar.  Default is the same as html_title.\n#html_short_title = None\n\n# The name of an image file (relative to this directory) to place at the top\n# of the sidebar.\n#html_logo = None\n\n# The name of an image file (within the static path) to use as favicon of the\n# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32\n# pixels large.\n#html_favicon = None\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\n\n\n# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,\n# using the given strftime format.\n#html_last_updated_fmt = '%b %d, %Y'\n\n# If true, SmartyPants will be used to convert quotes and dashes to\n# typographically correct entities.\n#html_use_smartypants = True\n\n# Custom sidebar templates, maps document names to template names.\n#html_sidebars = {}\n\n# Additional templates that should be rendered to pages, maps page names to\n# template names.\n#html_additional_pages = {}\n\n# If false, no module index is generated.\n#html_domain_indices = True\n\n# If false, no index is generated.\n#html_use_index = True\n\n# If true, the index is split into individual pages for each letter.\n#html_split_index = False\n\n# If true, links to the reST sources are added to the pages.\n#html_show_sourcelink = True\n\n# If true, \"Created using Sphinx\" is shown in the HTML footer. Default is True.\n#html_show_sphinx = True\n\n# If true, \"(C) Copyright ...\" is shown in the HTML footer. Default is True.\n#html_show_copyright = True\n\n# If true, an OpenSearch description file will be output, and all pages will\n# contain a <link> tag referring to it.  The value of this option must be the\n# base URL from which the finished HTML is served.\n#html_use_opensearch = ''\n\n# This is the file name suffix for HTML files (e.g. \".xhtml\").\n#html_file_suffix = None\n\n# Output file base name for HTML help builder.\n\n\n\n# -- Options for LaTeX output --------------------------------------------------\n\nlatex_elements = {\n# The paper size ('letterpaper' or 'a4paper').\n#'papersize': 'letterpaper',\n\n# The font size ('10pt', '11pt' or '12pt').\n#'pointsize': '10pt',\n\n# Additional stuff for the LaTeX preamble.\n#'preamble': '',\n}\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title, author, documentclass [howto/manual]).\n\n# The name of an image file (relative to this directory) to place at the top of\n# the title page.\n#latex_logo = None\n\n# For \"manual\" documents, if this is true, then toplevel headings are parts,\n# not chapters.\n#latex_use_parts = False\n\n# If true, show page references after internal links.\n#latex_show_pagerefs = False\n\n# If true, show URL addresses after external links.\n#latex_show_urls = False\n\n# Documents to append as an appendix to all manuals.\n#latex_appendices = []\n\n# If false, no module index is generated.\n#latex_domain_indices = True\n\n\n# -- Options for manual page output --------------------------------------------\n\n# One entry per manual page. List of tuples\n\n# If true, show URL addresses after external links.\n#man_show_urls = False\n\n\n# -- Options for Texinfo output ------------------------------------------------\n\n# Grouping the document tree into Texinfo files. List of tuples\n# (source start file, target name, title, author,\n#  dir menu entry, description, category)\n\n\n# Documents to append as an appendix to all manuals.\n#texinfo_appendices = []\n\n# If false, no module index is generated.\n#texinfo_domain_indices = True\n\n# How to display URL addresses: 'footnote', 'no', or 'inline'.\n#texinfo_show_urls = 'footnote'\n", "path": "docs/conf.py"}, {"content": "\"\"\"Attempt to install all datasets into all database management systems\n\nThis module, when run, attempts to install datasets from all Retriever scripts\nin the /scripts folder (except for those listed in IGNORE), for each engine in\nENGINE_LIST() from __init__.py. In other words, it runs trys to install using\nall possible combinations of database platform and script and checks to\nsee if there are any errors. It does not check the values in the database.\n\n\"\"\"\nfrom __future__ import print_function\nfrom __future__ import absolute_import\nimport os\nimport sys\nfrom importlib import reload\nfrom retriever.lib.tools import choose_engine\nfrom retriever import MODULE_LIST, ENGINE_LIST, SCRIPT_LIST\n\nreload(sys)\nif hasattr(sys, 'setdefaultencoding'):\n    sys.setdefaultencoding('latin-1')\n\nMODULE_LIST = MODULE_LIST()\nENGINE_LIST = ENGINE_LIST()\nif len(sys.argv) > 1:\n    ENGINE_LIST = [\n                    e for e in ENGINE_LIST\n                    if e.name in sys.argv[1:] or\n                    e.abbreviation in sys.argv[1:]\n    ]\nSCRIPT_LIST = SCRIPT_LIST()\nTEST_ENGINES = {}\nIGNORE = [\"AvianBodyMass\", \"FIA\", \"Bioclim\", \"PRISM\", \"vertnet\",\"NPN\", \"mammsupertree\", \"eBirdOD\"]\nIGNORE = [dataset.lower() for dataset in IGNORE]\n\nfor engine in ENGINE_LIST:\n    opts = {}\n    print(\"** %s **\" % engine.name)\n    opts[\"engine\"] = engine.abbreviation\n\n    try:\n        TEST_ENGINES[engine.abbreviation] = choose_engine(opts)\n        TEST_ENGINES[engine.abbreviation].get_input()\n        TEST_ENGINES[engine.abbreviation].get_cursor()\n    except:\n        TEST_ENGINES[engine.abbreviation] = None\n        pass\n\nerrors = []\nfor module in MODULE_LIST:\n    for (key, value) in list(TEST_ENGINES.items()):\n        if module.SCRIPT.shortname.lower() not in IGNORE:\n            if value != None:\n                print(\"==>\", module.__name__, value.name, \"..........\", module.SCRIPT.shortname)\n                try:\n                    module.SCRIPT.download(value)\n                except KeyboardInterrupt:\n                    pass\n                except Exception as e:\n                    print(\"ERROR.\")\n                    errors.append((key, module.__name__, e))\n            else:\n                errors.append((key, \"No connection detected......\" + module.SCRIPT.shortname))\n\nprint('')\nif errors:\n    print(\"Engine, Dataset, Error\")\n    for error in errors:\n        print(error)\nelse:\n    print(\"All tests passed\")\n", "path": "try_install_all.py"}], "after_files": [{"content": "from __future__ import print_function\nfrom __future__ import absolute_import\nfrom imp import reload\nimport sys\n# sys removes the setdefaultencoding method at startup; reload to get it back\nreload(sys)\nif hasattr(sys, 'setdefaultencoding'):\n    # set default encoding to latin-1 to decode source text\n    sys.setdefaultencoding('latin-1')\n\nfrom builtins import str\nfrom retriever import VERSION,COPYRIGHT\nfrom retriever.lib.repository import check_for_updates\nfrom retriever import SCRIPT_LIST\n\n# Create the .rst file for the available datasets\ndatasetfile = open(\"datasets.rst\", \"w\")\ndatasetfile_title = \"\"\"\n==================\nDatasets Available\n==================\n\n\n\"\"\"\ncheck_for_updates()\nscript_list = SCRIPT_LIST()\n\n# write the title of dataset rst file\ndatasetfile.write(datasetfile_title)\n\n# get info from the scripts\nfor script_num, script in enumerate(script_list, start=1):\n    if script.ref.strip():\n        reference_link = script.ref\n    elif bool(script.urls.values()):\n        reference_link = list(script.urls.values())[0].rpartition('/')[0]\n    else:\n        reference_link = \"\"\n    datasetfile.write(\"| \" + str(script_num) + \". **{}** \\n| shortname: {}\\n| reference: {}\\n\\n\".format(script.name, script.shortname, reference_link))\ndatasetfile.close()\n\nneeds_sphinx = '1.3'\n\n# Add any Sphinx extension module names here, as strings.\nextensions = ['sphinx.ext.autodoc', 'sphinx.ext.napoleon']\n\n# Add any paths that contain templates here, relative to this directory.\ntemplates_path = ['_templates']\n\n# The suffix of source filenames.\nsource_suffix = '.rst'\n\n# The encoding of source files.\n# source_encoding = 'utf-8-sig'\n\n# The master toctree document.\nmaster_doc = 'index'\n\n# General information about the project.\nproject = u'Data Retriever'\ncopyright = COPYRIGHT\n\nversion = release = VERSION\n\n# List of patterns, relative to source directory, that match files and\n# directories to ignore when looking for source files.\nexclude_patterns = []\n\n# The reST default role (used for this markup: `text`) to use for all documents.\n#default_role = None\n\n# If true, '()' will be appended to :func: etc. cross-reference text.\n#add_function_parentheses = True\n\n# If true, the current module name will be prepended to all description\n# unit titles (such as .. function::).\n#add_module_names = True\n\n# If true, sectionauthor and moduleauthor directives will be shown in the\n# output. They are ignored by default.\n#show_authors = False\n\n# The name of the Pygments (syntax highlighting) style to use.\npygments_style = 'sphinx'\n\n# A list of ignored prefixes for module index sorting.\n#modindex_common_prefix = []\n\n\n# -- Options for HTML output ---------------------------------------------------\n\n# The theme to use for HTML and HTML Help pages.  See the documentation for\n# a list of builtin themes.\nhtml_theme = 'classic'\n\n# Theme options are theme-specific and customize the look and feel of a theme\n# further.  For a list of options available for each theme, see the\n# documentation.\n#html_theme_options = {}\n\n# Add any paths that contain custom themes here, relative to this directory.\n#html_theme_path = []\n\n# The name for this set of Sphinx documents.  If None, it defaults to\n# \"<project> v<release> documentation\".\n#html_title = None\n\n# A shorter title for the navigation bar.  Default is the same as html_title.\n#html_short_title = None\n\n# The name of an image file (relative to this directory) to place at the top\n# of the sidebar.\n#html_logo = None\n\n# The name of an image file (within the static path) to use as favicon of the\n# docs.  This file should be a Windows icon file (.ico) being 16x16 or 32x32\n# pixels large.\n#html_favicon = None\n\n# Add any paths that contain custom static files (such as style sheets) here,\n# relative to this directory. They are copied after the builtin static files,\n# so a file named \"default.css\" will overwrite the builtin \"default.css\".\n\n\n# If not '', a 'Last updated on:' timestamp is inserted at every page bottom,\n# using the given strftime format.\n#html_last_updated_fmt = '%b %d, %Y'\n\n# If true, SmartyPants will be used to convert quotes and dashes to\n# typographically correct entities.\n#html_use_smartypants = True\n\n# Custom sidebar templates, maps document names to template names.\n#html_sidebars = {}\n\n# Additional templates that should be rendered to pages, maps page names to\n# template names.\n#html_additional_pages = {}\n\n# If false, no module index is generated.\n#html_domain_indices = True\n\n# If false, no index is generated.\n#html_use_index = True\n\n# If true, the index is split into individual pages for each letter.\n#html_split_index = False\n\n# If true, links to the reST sources are added to the pages.\n#html_show_sourcelink = True\n\n# If true, \"Created using Sphinx\" is shown in the HTML footer. Default is True.\n#html_show_sphinx = True\n\n# If true, \"(C) Copyright ...\" is shown in the HTML footer. Default is True.\n#html_show_copyright = True\n\n# If true, an OpenSearch description file will be output, and all pages will\n# contain a <link> tag referring to it.  The value of this option must be the\n# base URL from which the finished HTML is served.\n#html_use_opensearch = ''\n\n# This is the file name suffix for HTML files (e.g. \".xhtml\").\n#html_file_suffix = None\n\n# Output file base name for HTML help builder.\n\n\n\n# -- Options for LaTeX output --------------------------------------------------\n\nlatex_elements = {\n# The paper size ('letterpaper' or 'a4paper').\n#'papersize': 'letterpaper',\n\n# The font size ('10pt', '11pt' or '12pt').\n#'pointsize': '10pt',\n\n# Additional stuff for the LaTeX preamble.\n#'preamble': '',\n}\n\n# Grouping the document tree into LaTeX files. List of tuples\n# (source start file, target name, title, author, documentclass [howto/manual]).\n\n# The name of an image file (relative to this directory) to place at the top of\n# the title page.\n#latex_logo = None\n\n# For \"manual\" documents, if this is true, then toplevel headings are parts,\n# not chapters.\n#latex_use_parts = False\n\n# If true, show page references after internal links.\n#latex_show_pagerefs = False\n\n# If true, show URL addresses after external links.\n#latex_show_urls = False\n\n# Documents to append as an appendix to all manuals.\n#latex_appendices = []\n\n# If false, no module index is generated.\n#latex_domain_indices = True\n\n\n# -- Options for manual page output --------------------------------------------\n\n# One entry per manual page. List of tuples\n\n# If true, show URL addresses after external links.\n#man_show_urls = False\n\n\n# -- Options for Texinfo output ------------------------------------------------\n\n# Grouping the document tree into Texinfo files. List of tuples\n# (source start file, target name, title, author,\n#  dir menu entry, description, category)\n\n\n# Documents to append as an appendix to all manuals.\n#texinfo_appendices = []\n\n# If false, no module index is generated.\n#texinfo_domain_indices = True\n\n# How to display URL addresses: 'footnote', 'no', or 'inline'.\n#texinfo_show_urls = 'footnote'\n", "path": "docs/conf.py"}, {"content": "\"\"\"Attempt to install all datasets into all database management systems\n\nThis module, when run, attempts to install datasets from all Retriever scripts\nin the /scripts folder (except for those listed in IGNORE), for each engine in\nENGINE_LIST() from __init__.py. In other words, it runs trys to install using\nall possible combinations of database platform and script and checks to\nsee if there are any errors. It does not check the values in the database.\n\n\"\"\"\nfrom __future__ import print_function\nfrom __future__ import absolute_import\nimport os\nimport sys\nfrom imp import reload\nfrom retriever.lib.tools import choose_engine\nfrom retriever import MODULE_LIST, ENGINE_LIST, SCRIPT_LIST\n\nreload(sys)\nif hasattr(sys, 'setdefaultencoding'):\n    sys.setdefaultencoding('latin-1')\n\nMODULE_LIST = MODULE_LIST()\nENGINE_LIST = ENGINE_LIST()\nif len(sys.argv) > 1:\n    ENGINE_LIST = [\n                    e for e in ENGINE_LIST\n                    if e.name in sys.argv[1:] or\n                    e.abbreviation in sys.argv[1:]\n    ]\nSCRIPT_LIST = SCRIPT_LIST()\nTEST_ENGINES = {}\nIGNORE = [\"AvianBodyMass\", \"FIA\", \"Bioclim\", \"PRISM\", \"vertnet\",\"NPN\", \"mammsupertree\", \"eBirdOD\"]\nIGNORE = [dataset.lower() for dataset in IGNORE]\n\nfor engine in ENGINE_LIST:\n    opts = {}\n    print(\"** %s **\" % engine.name)\n    opts[\"engine\"] = engine.abbreviation\n\n    try:\n        TEST_ENGINES[engine.abbreviation] = choose_engine(opts)\n        TEST_ENGINES[engine.abbreviation].get_input()\n        TEST_ENGINES[engine.abbreviation].get_cursor()\n    except:\n        TEST_ENGINES[engine.abbreviation] = None\n        pass\n\nerrors = []\nfor module in MODULE_LIST:\n    for (key, value) in list(TEST_ENGINES.items()):\n        if module.SCRIPT.shortname.lower() not in IGNORE:\n            if value != None:\n                print(\"==>\", module.__name__, value.name, \"..........\", module.SCRIPT.shortname)\n                try:\n                    module.SCRIPT.download(value)\n                except KeyboardInterrupt:\n                    pass\n                except Exception as e:\n                    print(\"ERROR.\")\n                    errors.append((key, module.__name__, e))\n            else:\n                errors.append((key, \"No connection detected......\" + module.SCRIPT.shortname))\n\nprint('')\nif errors:\n    print(\"Engine, Dataset, Error\")\n    for error in errors:\n        print(error)\nelse:\n    print(\"All tests passed\")\n", "path": "try_install_all.py"}]}