Total Complexity | 0 |
Total Lines | 52 |
Duplicated Lines | 0 % |
Changes | 0 |
1 | import os |
||
2 | import traceback |
||
3 | |||
4 | extensions = [ |
||
5 | "sphinx.ext.autodoc", |
||
6 | "sphinx.ext.autosummary", |
||
7 | "sphinx.ext.coverage", |
||
8 | "sphinx.ext.doctest", |
||
9 | "sphinx.ext.extlinks", |
||
10 | "sphinx.ext.ifconfig", |
||
11 | "sphinx.ext.napoleon", |
||
12 | "sphinx.ext.todo", |
||
13 | "sphinx.ext.viewcode", |
||
14 | ] |
||
15 | source_suffix = ".rst" |
||
16 | master_doc = "index" |
||
17 | project = "Precision-Recall-Gain" |
||
18 | year = "2021-now" |
||
19 | author = "Richard Decal" |
||
20 | copyright = f"{year}, {author}" |
||
21 | try: |
||
22 | from pkg_resources import get_distribution |
||
23 | |||
24 | version = release = get_distribution("precision_recall_gain").version |
||
25 | except Exception: |
||
26 | traceback.print_exc() |
||
27 | version = release = "0.1.3" |
||
28 | |||
29 | pygments_style = "trac" |
||
30 | templates_path = ["."] |
||
31 | extlinks = { |
||
32 | "issue": ("https://github.com/crypdick/precision-recall-gain/issues/%s", "#"), |
||
33 | "pr": ("https://github.com/crypdick/precision-recall-gain/pull/%s", "PR #"), |
||
34 | } |
||
35 | # on_rtd is whether we are on readthedocs.org |
||
36 | on_rtd = os.environ.get("READTHEDOCS", None) == "True" |
||
37 | |||
38 | if not on_rtd: # only set the theme if we are building docs locally |
||
39 | html_theme = "sphinx_rtd_theme" |
||
40 | |||
41 | html_use_smartypants = True |
||
42 | html_last_updated_fmt = "%b %d, %Y" |
||
43 | html_split_index = False |
||
44 | html_sidebars = { |
||
45 | "**": ["searchbox.html", "globaltoc.html", "sourcelink.html"], |
||
46 | } |
||
47 | html_short_title = f"{project}-{version}" |
||
48 | |||
49 | napoleon_use_ivar = True |
||
50 | napoleon_use_rtype = False |
||
51 | napoleon_use_param = False |
||
52 |