Repair docs (html, md). Update docstrings
This commit is contained in:
parent
e264750187
commit
6a4ad48577
125 changed files with 3706 additions and 4913 deletions
|
|
@ -41,12 +41,26 @@ html_static_path = ['_static']
|
|||
static_dir = os.path.join(os.path.dirname(__file__), '_static')
|
||||
os.makedirs(static_dir, exist_ok=True)
|
||||
|
||||
# Временная директория данных для сборки документации
|
||||
data_dir = os.path.abspath(os.path.join(os.path.dirname(__file__), '_build', '.sphinx_tmp'))
|
||||
os.makedirs(data_dir, exist_ok=True)
|
||||
|
||||
os.environ.setdefault("GONETS_DATA_DIR", data_dir)
|
||||
os.environ.setdefault("GONETS_USERS_PATH", os.path.join(data_dir, "users.json"))
|
||||
os.environ.setdefault("GONETS_SESSIONS_PATH", os.path.join(data_dir, "sessions.json"))
|
||||
|
||||
config_path = os.path.join(data_dir, "config.ini")
|
||||
if not os.path.exists(config_path):
|
||||
with open(config_path, "w", encoding="utf-8") as config_file:
|
||||
config_file.write("[JWT]\nsecret_key = sphinx-docs-secret\n")
|
||||
os.environ.setdefault("GONETS_CONFIG_PATH", config_path)
|
||||
|
||||
# Мокирование тяжёлых/опциональных модулей для RTD/локальной сборки документации
|
||||
autodoc_mock_imports = [
|
||||
'gi', 'pygobject',
|
||||
'pywifi', 'sdbus', 'sdbus_async', 'sdbus_async.networkmanager',
|
||||
'dbus', 'dbus.mainloop', 'dbus.mainloop.glib',
|
||||
'pydbus', 'mac_vendor_lookup',
|
||||
'pydbus', 'mac_vendor_lookup', 'scapy', 'scapy.layers.l2', 'scapy.sendrecv',
|
||||
# мокирование проблемных локальных модулей при сборке документации
|
||||
'config.init_config',
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue