Skip to content

Commit

Permalink
Mitigating code-style errors
Browse files Browse the repository at this point in the history
  • Loading branch information
engrosamaali91 committed Nov 29, 2023
1 parent 68d00fa commit 1c8e719
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions doc/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,11 @@
from importlib import import_module
from typing import Dict, Optional


import fsqc

project = 'fsqc'
copyright = '2023, Martin Reuter'
author = 'Martin Reuter'
project = "fsqc"
copyright = "2023, Martin Reuter"
author = "Martin Reuter"
copyright = f"{date.today().year}, {author}"
# release = fsqc.__version__
package = fsqc.__name__
Expand Down Expand Up @@ -115,16 +114,15 @@
intersphinx_timeout = 5



# -- sphinx-issues -----------------------------------------------------------
issues_github_path = gh_url.split("https://github.com/")[-1]

# -- autosectionlabels -------------------------------------------------------
autosectionlabel_prefix_document = True

# -- numpydoc ----------------------------------------------------------------
#numpydoc_class_members_toctree = False
#numpydoc_attributes_as_param_list = False
# numpydoc_class_members_toctree = False
# numpydoc_attributes_as_param_list = False

# x-ref
numpydoc_xref_param_type = True
Expand All @@ -139,7 +137,7 @@
# Scipy
"csc_matrix": "scipy.sparse.csc_matrix",
}
#numpydoc_xref_ignore = {}
# numpydoc_xref_ignore = {}

# validation
# https://numpydoc.readthedocs.io/en/latest/validation.html#validation-checks
Expand Down Expand Up @@ -171,6 +169,8 @@

# Alternative method for linking to code by Osama, not sure which one is better
from urllib.parse import quote


def linkcode_resolve(domain, info):
if domain != "py":
return None
Expand Down Expand Up @@ -232,13 +232,15 @@ def linkcode_resolve(domain, info):
# return url


import os

# -- make sure pandoc gets installed -----------------------------------------
from inspect import getsourcefile
import os

# Get path to directory containing this file, conf.py.
DOCS_DIRECTORY = os.path.dirname(os.path.abspath(getsourcefile(lambda: 0)))


def ensure_pandoc_installed(_):
import pypandoc

Expand All @@ -254,5 +256,6 @@ def ensure_pandoc_installed(_):
delete_installer=True,
)


def setup(app):
app.connect("builder-inited", ensure_pandoc_installed)

0 comments on commit 1c8e719

Please sign in to comment.