Skip to content

Commit

Permalink
Added notes to documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
susuhahnml committed Feb 16, 2024
1 parent e7e0f57 commit 7cd4f96
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 24 deletions.
14 changes: 13 additions & 1 deletion docs/clingraph/syntax.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ Graphs are defined via facts using predicates ``node``, ``edge``,
``graph`` and ``attr``.


.. note:: A custom prefix for the predicate names can be defined to avoid clashes with other existing predicates.
.. note::

A custom prefix for the predicate names can be defined to avoid clashes with other existing predicates.
This is done via command line argument ``--prefix``.

Nodes
=====
Expand Down Expand Up @@ -131,6 +134,15 @@ predicate ``attr``. This predicate will add any attributes accepted
by graphviz (`see here <https://graphviz.org/doc/info/attrs.html>`__)
specified by name-value pairs to the element.

.. note::

Notice that the graphviz documentation specifies which attribute are available for which elements.
Also, in the bottom it states the engine that needs to be used.

For instance, attribute ``pos``, is only avaliable for engines `neato` and `fdp`.
Therfore, one of these engines needs to be selected with with argument ``--engine``.


* ``attr(ELEMENT_TYPE, ELEMENT_ID, ATTR_NAME, ATTR_VALUE).``

* ``ELEMENT_TYPE``: The type of element: can be ``graph``,
Expand Down
64 changes: 41 additions & 23 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,18 +12,28 @@
#
import os
import sys
sys.path.insert(0, os.path.abspath('..'))

sys.path.insert(0, os.path.abspath(".."))
# sys.path.append(os.path.join(os.path.abspath(os.pardir)))
autodoc_mock_imports = ["clingo","clorm","networkx","graphviz","jsonschema","imageio","dot2tex","pandoc"]
autodoc_mock_imports = [
"clingo",
"clorm",
"networkx",
"graphviz",
"jsonschema",
"imageio",
"dot2tex",
"pandoc",
]

# -- Project information -----------------------------------------------------

project = 'clingraph'
copyright = '2022, Susana Hahn'
author = 'Susana Hahn'
project = "clingraph"
copyright = "2022, Susana Hahn"
author = "Susana Hahn"

# The full version, including alpha/beta/rc tags
release = '1.0'
release = "1.0"


# -- General configuration ---------------------------------------------------
Expand All @@ -32,19 +42,18 @@
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'nbsphinx',
"nbsphinx",
"sphinx.ext.extlinks",
"sphinx.ext.mathjax",
"sphinx.ext.todo",
"sphinx.ext.viewcode",
'sphinx.ext.autodoc',
'sphinx.ext.napoleon',
'sphinx.ext.autosectionlabel',
'sphinx.ext.intersphinx',
'furo.sphinxext',
"sphinx.ext.autodoc",
"sphinx.ext.napoleon",
"sphinx.ext.autosectionlabel",
"sphinx.ext.intersphinx",
"furo.sphinxext",
"sphinx_copybutton",
# "sphinx_design",
# "sphinx_inline_tabs"
"myst_parser",
]


Expand All @@ -53,25 +62,25 @@
napoleon_use_admonition_for_references = True

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']
templates_path = ["_templates"]

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for domain files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]


# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'furo'
html_theme = "furo"

html_title = "clingraph"

html_theme_options = {
# 'analytics_id': 'UA-XXXXXXX-1', # Provided by Google in your dashboard
# 'analytics_id': 'UA-XXXXXXX-1', # Provided by Google in your dashboard
"light_logo": "logo-light-mode.png",
"dark_logo": "logo-dark-mode.png",
# 'style_external_links': False,
Expand All @@ -92,19 +101,28 @@
""",
"class": "",
},
]
],
}

html_css_files = [
'css/custom.css',
"css/custom.css",
]

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']
html_static_path = ["_static"]

# -- Options for Markdown files ----------------------------------------------
#

myst_enable_extensions = [
"colon_fence",
"deflist",
]
myst_heading_anchors = 3

add_module_names = False #Class names without full module path
add_module_names = False # Class names without full module path

copybutton_prompt_text = r">>> |\.\.\. |\$ |In \[\d*\]: | {2,5}\.\.\.: | {5,8}: "
copybutton_prompt_is_regexp = True
copybutton_prompt_is_regexp = True
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ doc =
furo
sphinx_inline_tabs
sphinx_copybutton
myst-parser
tex =
dot2tex
gif =
Expand Down

0 comments on commit 7cd4f96

Please sign in to comment.