| 1 |
|
| 2 |
import importlib.metadata |
| 3 |
import datetime |
| 4 |
import os |
| 5 |
from pathlib import Path |
| 6 |
import sys |
| 7 |
|
| 8 |
extensions = [ |
| 9 |
"sphinx.ext.autodoc", |
| 10 |
"sphinx.ext.coverage", |
| 11 |
"sphinx.ext.viewcode", |
| 12 |
"sphinx_copybutton", |
| 13 |
"sphinx.ext.intersphinx", |
| 14 |
"sphinx.ext.autosectionlabel", |
| 15 |
"sphinx.ext.napoleon", |
| 16 |
"sphinx_autodoc_typehints", |
| 17 |
|
| 18 |
"myst_parser", |
| 19 |
|
| 20 |
"sphinx_tabs.tabs", |
| 21 |
"sphinx-prompt", |
| 22 |
|
| 23 |
|
| 24 |
] |
| 25 |
source_suffix = {".rst": "restructuredtext"} |
| 26 |
master_doc = "index" |
| 27 |
|
| 28 |
project = "recurring-ical-events" |
| 29 |
this_year = datetime.date.today().year |
| 30 |
copyright = f"{this_year}, Nicco Kunzmann & recurring-ical-events contributors" |
| 31 |
release = version = importlib.metadata.version("recurring-ical-events") |
| 32 |
|
| 33 |
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
|
| 38 |
html_theme = "pydata_sphinx_theme" |
| 39 |
html_theme_options = { |
| 40 |
"icon_links": [ |
| 41 |
{ |
| 42 |
"name": "GitHub", |
| 43 |
"url": "https://github.com/niccokunzmann/python-recurring-ical-events", |
| 44 |
"icon": "fa-brands fa-square-github", |
| 45 |
"type": "fontawesome", |
| 46 |
"attributes": { |
| 47 |
"target": "_blank", |
| 48 |
"rel": "noopener me", |
| 49 |
"class": "nav-link custom-fancy-css" |
| 50 |
} |
| 51 |
}, |
| 52 |
{ |
| 53 |
"name": "PyPI", |
| 54 |
"url": "https://pypi.org/project/recurring-ical-events", |
| 55 |
"icon": "fa-solid fa-download", |
| 56 |
"type": "fontawesome", |
| 57 |
"attributes": { |
| 58 |
"target": "_blank", |
| 59 |
"rel": "noopener me", |
| 60 |
"class": "nav-link custom-fancy-css" |
| 61 |
} |
| 62 |
}, |
| 63 |
{ |
| 64 |
"name": "Mastodon", |
| 65 |
"url": "https://toot.wales/tags/RecurringIcalEvents", |
| 66 |
"icon": "fa-brands fa-mastodon", |
| 67 |
"type": "fontawesome", |
| 68 |
"attributes": { |
| 69 |
"target": "_blank", |
| 70 |
"rel": "noopener me", |
| 71 |
"class": "nav-link custom-fancy-css" |
| 72 |
} |
| 73 |
}, |
| 74 |
{ |
| 75 |
"name": "Youtube", |
| 76 |
"url": "https://www.youtube.com/watch?v=nwpS2dCk_Rk&list=PLxMGFFiBKgdb3L550U5EAiCvft2IK08xK", |
| 77 |
"icon": "fa-brands fa-youtube", |
| 78 |
"type": "fontawesome", |
| 79 |
"attributes": { |
| 80 |
"target": "_blank", |
| 81 |
"rel": "noopener me", |
| 82 |
"class": "nav-link custom-fancy-css" |
| 83 |
} |
| 84 |
} |
| 85 |
], |
| 86 |
"navigation_with_keys": True, |
| 87 |
"search_bar_text": "Search", |
| 88 |
"show_nav_level": 2, |
| 89 |
"show_toc_level": 2, |
| 90 |
"use_edit_page_button": True, |
| 91 |
} |
| 92 |
html_context = { |
| 93 |
|
| 94 |
"github_user": "niccokunzmann", |
| 95 |
"github_repo": "python-recurring-ical-events", |
| 96 |
"github_version": "main", |
| 97 |
"doc_path": "docs", |
| 98 |
} |
| 99 |
htmlhelp_basename = "recurring-ical-events-doc" |
| 100 |
pygments_style = "sphinx" |
| 101 |
|
| 102 |
|
| 103 |
|
| 104 |
|
| 105 |
|
| 106 |
|
| 107 |
|
| 108 |
|
| 109 |
|
| 110 |
|
| 111 |
|
| 112 |
|
| 113 |
|
| 114 |
intersphinx_mapping = { |
| 115 |
"python": ("https://docs.python.org/3", None), |
| 116 |
"icalendar": ("https://icalendar.readthedocs.io/en/latest", None), |
| 117 |
"dateutil": ("https://dateutil.readthedocs.io/en/stable/", None), |
| 118 |
} |
| 119 |
|
| 120 |
|
| 121 |
man_pages = [("index", "recurring_ical_events", "recurring_ical_events Documentation", ["Nicco Kunzmann"], 1)] |
| 122 |
|
| 123 |
exclude_patterns = [ |
| 124 |
"venv" |
| 125 |
] |
| 126 |
|
| 127 |
|
| 128 |
linkcheck_retries = 1 |
| 129 |
linkcheck_timeout = 5 |
| 130 |
linkcheck_report_timeouts_as_broken = True |
| 131 |
|
| 132 |
|
| 133 |
autodoc_typehints_format = "short" |
| 134 |
autodoc_preserve_defaults = True |
| 135 |
autodoc_type_aliases = { |
| 136 |
"datetime": "datetime.datetime", |
| 137 |
"date": "datetime.date", |
| 138 |
"timedelta": "datetime.timedelta", |
| 139 |
"Time": "recurring_ical_events.types.Time", |
| 140 |
"DateArgument": "recurring_ical_events.types.DateArgument", |
| 141 |
"UID": "recurring_ical_events.types.UID", |
| 142 |
"Timestamp": "recurring_ical_events.types.Timestamp", |
| 143 |
"RecurrenceID": "recurring_ical_events.types.RecurrenceID", |
| 144 |
"RecurrenceIDs": "recurring_ical_events.types.RecurrenceIDs", |
| 145 |
"Component": "icalendar.cal.Component", |
| 146 |
"Calendar": "icalendar.cal.Calendar", |
| 147 |
"T_COMPONENTS": "recurring_ical_events.query.T_COMPONENTS", |
| 148 |
"OccurrenceID": "recurring_ical_events.occurrence.OccurrenceID", |
| 149 |
"icalendar.Calendar": "icalendar.cal.Calendar", |
| 150 |
} |
| 151 |
|
| 152 |
|
| 153 |
github_username = "niccokunzmann" |
| 154 |
github_repository = "python-recurring-ical-events" |
| 155 |
|
| 156 |
|
| 157 |
|
| 158 |
nitpick_ignore = [ |
| 159 |
|
| 160 |
("py:class", "recurring_ical_events.types.Time"), |
| 161 |
("py:class", "recurring_ical_events.types.UID"), |
| 162 |
("py:class", "recurring_ical_events.types.RecurrenceIDs"), |
| 163 |
("py:class", "Time"), |
| 164 |
("py:class", "UID"), |
| 165 |
("py:class", "RecurrenceID"), |
| 166 |
("py:class", "TypeAliasForwardRef"), |
| 167 |
|
| 168 |
("py:obj", "recurring_ical_events.OccurrenceID.uid"), |
| 169 |
] |
| 170 |
|
| 171 |
|
| 172 |
|
| 173 |
html_title = f"{project} {release}" |
| 174 |
html_short_title = project |
| 175 |
|
| 176 |
|
| 177 |
|
| 178 |
HERE = Path(__file__).parent |
| 179 |
sys.path.insert(0, str(Path(HERE).parent)) |
| 180 |
|