You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

conf.py 2.8 kB

3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. import os
  2. import re
  3. import sys
  4. from docutils import nodes
  5. from docutils.parsers.rst import roles
  6. def colored_text_role(role, rawtext, text, lineno, inliner, options={}, content=[]):
  7. node = nodes.inline(rawtext, text, classes=[role])
  8. return [node], []
  9. roles.register_local_role('green-bold', colored_text_role)
  10. roles.register_local_role('blue-bold', colored_text_role)
  11. roles.register_local_role('yellow-bold', colored_text_role)
  12. roles.register_local_role('green', colored_text_role)
  13. roles.register_local_role('blue', colored_text_role)
  14. roles.register_local_role('yellow', colored_text_role)
  15. if "READTHEDOCS" not in os.environ:
  16. sys.path.insert(0, os.path.abspath(".."))
  17. sys.path.append(os.path.abspath("./ABL/"))
  18. project = "ABL"
  19. slug = re.sub(r"\W+", "-", project.lower())
  20. project = "ABL-Package"
  21. copyright = "2023, Author"
  22. author = "Author"
  23. # -- General configuration ---------------------------------------------------
  24. # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
  25. extensions = [
  26. "sphinx.ext.intersphinx",
  27. "sphinx.ext.autodoc",
  28. 'sphinx.ext.autosummary',
  29. "sphinx.ext.mathjax",
  30. "sphinx.ext.viewcode",
  31. "sphinx_rtd_theme",
  32. "recommonmark",
  33. "sphinx_markdown_tables",
  34. "sphinx.ext.napoleon",
  35. "sphinx_copybutton",
  36. ]
  37. templates_path = ["_templates"]
  38. source_suffix = [".rst", ".md"]
  39. exclude_patterns = []
  40. # locale_dirs = ['locale/']
  41. gettext_compact = False
  42. master_doc = "index"
  43. suppress_warnings = ["image.nonlocal_uri"]
  44. pygments_style = "default"
  45. # intersphinx_mapping = {
  46. # 'rtd': ('https://docs.readthedocs.io/en/latest/', None),
  47. # 'sphinx': ('http://www.sphinx-doc.org/en/stable/', None),
  48. # }
  49. html_theme = "sphinx_rtd_theme"
  50. html_theme_options = {"display_version": True}
  51. html_static_path = ["_static"]
  52. html_css_files = ["custom.css"]
  53. # html_theme_path = ["../.."]
  54. # html_logo = "demo/static/logo-wordmark-light.svg"
  55. # html_show_sourcelink = True
  56. htmlhelp_basename = slug
  57. # latex_documents = [
  58. # ('index', '{0}.tex'.format(slug), project, author, 'manual'),
  59. # ]
  60. man_pages = [("index", slug, project, [author], 1)]
  61. texinfo_documents = [
  62. ("index", slug, project, author, slug, project, "Miscellaneous"),
  63. ]
  64. # Extensions to theme docs
  65. def setup(app):
  66. from sphinx.domains.python import PyField
  67. from sphinx.util.docfields import Field
  68. app.add_object_type(
  69. "confval",
  70. "confval",
  71. objname="configuration value",
  72. indextemplate="pair: %s; configuration value",
  73. doc_field_types=[
  74. PyField("type", label=("Type"), has_arg=False, names=("type",), bodyrolename="class"),
  75. Field(
  76. "default",
  77. label=("Default"),
  78. has_arg=False,
  79. names=("default",),
  80. ),
  81. ],
  82. )

An efficient Python toolkit for Abductive Learning (ABL), a novel paradigm that integrates machine learning and logical reasoning in a unified framework.