Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

📝 sphinx.ext.extlinks #263

Merged
merged 5 commits into from
Aug 7, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions docs/_static/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
*/


:root {
/* :root {
--body-bg: #292929;
--body-color: #E2E8E4;
}
Expand All @@ -34,6 +34,8 @@
dt:target, span.highlighted {
background-color: transparent;

}
} */


.bd-footer {
display: none;
}
Binary file added docs/_static/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
162 changes: 106 additions & 56 deletions docs/conf.py
Original file line number Diff line number Diff line change
@@ -1,115 +1,165 @@
# Configuration file for the Sphinx documentation builder.


# -- Path setup --------------------------------------------------------------

import os
import sys
from pathlib import Path
from typing import Any, Dict

import sphinx_bootstrap_theme
import pydata_sphinx_theme
from sphinx.application import Sphinx

sys.path.insert(0, os.path.abspath('../'))


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

project = 'dxsp'
project = 'findmyorder'
copyright = '2023, mraniki'
author = 'mraniki'

language = "en"

# -- General configuration ---------------------------------------------------

extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.autosummary',
'sphinx.ext.napoleon',
'sphinx.ext.viewcode',
'sphinx.ext.viewcode',
"sphinx.ext.intersphinx",
"hoverxref.extension",
"sphinx.ext.extlinks",
"sphinx_design",
"myst_parser",
"sphinx_copybutton",
"notfound.extension",
# "autoapi.extension",
]



# -- Extension configuration ---------------------------------------------------

# -- intersphinx ------------

intersphinx_mapping = {
"sphinx": ("https://www.sphinx-doc.org/en/master/", None),
# - :doc:`sphinx:usage/extensions/intersphinx`
"dynaconf": ("https://www.dynaconf.com", None),
"python": ("https://docs.python.org/3", None),
"talky": ("https://talky.readthedocs.io/en/latest/", None),
"talky": ("https://talky.readthedocs.io/en/latest", None),
"talky-dev": ("https://talky.readthedocs.io/en/dev/", None),
"findmyorder": ("https://talky.readthedocs.io/projects/findmyorder/en/latest", None),
"findmyorder": (
"https://talky.readthedocs.io/projects/findmyorder/en/latest", None),
"dxsp": ("https://talky.readthedocs.io/projects/dxsp/en/latest", None),
"iamlistening": ("https://talky.readthedocs.io/projects/iamlistening/en/latest", None),
"iamlistening": (
"https://iamlistening.readthedocs.io/en/latest", None),
"talkytrend": ("https://talky.readthedocs.io/projects/talkytrend/en/latest", None),
"myllm": ("https://talky.readthedocs.io/projects/myllm/en/latest", None),
}

intersphinx_disabled_reftypes = ["*"]

napoleon_google_docstring = True
autosummary_generate = True

# -- hoverxref ----------------

hoverxref_intersphinx = [
'readthedocs',
'sphinx',
'python',
'talky',
'findmyorder',
'dxsp',
'iamlistening',
'talkytrend',
'myllm',

]

# -- autodoc --------------------

autoclass_content = 'both'
autodoc_inherit_docstrings = True
set_type_checking_flag = True
autodoc_member_order = 'bysource'
add_module_names = True

# -- autoapi -------------------

# autoapi_type = "python"
# autoapi_dirs = ['../iamlistening']
# autoapi_keep_files = True
# autoapi_root = "api"
# autoapi_member_order = "groupwise"


# -- napoleon -------------------

napoleon_google_docstring = True

# -- MyST options -----------------

# This allows us to use ::: to denote directives, useful for admonitions
myst_enable_extensions = ["colon_fence", "linkify", "substitution"]
myst_heading_anchors = 2
myst_substitutions = {"rtd": "[Read the Docs](https://readthedocs.org/)"}

master_doc = 'index'
source_suffix = ['.rst', '.md']
templates_path = ["_templates"]
exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"]

# -- Sitemap ----------------------

# ReadTheDocs has its own way of generating sitemaps, etc.
if not os.environ.get("READTHEDOCS"):
extensions += ["sphinx_sitemap"]

# -- Options for HTML output -------------------------------------------------
html_baseurl = os.environ.get("SITEMAP_URL_BASE", "http://127.0.0.1:8000/")
sitemap_locales = [None]
sitemap_url_scheme = "{link}"

html_theme = "bootstrap"

html_theme_path = sphinx_bootstrap_theme.get_html_theme_path()
# -- Options for HTML output --------

html_static_path = ["_static"]
html_logo = '_static/favicon.png'
html_css_files = ["custom.css"]
html_logo = '_static/logo.png'
html_favicon = '_static/favicon.ico'
html_css_files = [
"custom.css",
]
html_show_sphinx = False
html_show_copyright = False
html_theme = "pydata_sphinx_theme"
html_theme_options = {
'navbar_title': " ",
'navbar_site_name': "Talky",
'navbar_sidebarrel': False,
'navbar_pagenav': False,
'globaltoc_depth': 4,
'globaltoc_includehidden': "true",
'navbar_class': "navbar",
'navbar_fixed_top': "true",
'source_link_position': "none",

'bootswatch_theme': "darkly",
'bootstrap_version': "3",

'navbar_links': [
("TalkyTrader", "https://talkytrader.github.io/wiki/",True),
("_menu", "🗿 Talky",[
("🪙 Get started", "https://talky.rtfd.io/01_start",True),
("⚙️ Config", "https://talky.rtfd.io/02_config",True),
]),
("_menu", "🔌 Plugins",[
("👂 IamListening", "https://iamlistening.rtfd.io/", True),
("🔎 FindMyOrder", "https://findmyorder.rtfd.io/", True),
("⛓️ DXSP", "https://dxsp.rtfd.io/", True),
("💱 CEX", "index",True),
("💁 Helper", "index",True),
("📰 Talkytrend", "https://talkytrend.rtfd.io/", True),
]),
("_menu", "➕ More",[
("🆕 What's new?", "https://github.com/mraniki/tt",True),
("💬 Connect", "https://talky.rtfd.io",True),
]),
]
"secondary_sidebar_items": ["page-toc"],
"logo": {
"link": "https://talky.readthedocs.io",
},
"icon_links": [
{
"name": "GitHub",
"url": "https://github.com/mraniki/tt/",
"icon": "fa-brands fa-github",
"type": "fontawesome",
},
{
"name": "Telegram",
"url": "https://t.me/TTTalkyTraderChat/1",
"icon": "fa-brands fa-telegram",
},
{
"name": "Mastodon",
"url": "https://mastodon.social/@MrAniki",
"icon": "fa-brands fa-mastodon",
},
{
"name": "Tips",
"url": "https://coindrop.to/mraniki",
"icon": "fa-solid fa-burger",
},
],

}
html_context = {
"default_mode": "dark",




def setup(app):
app.add_css_file("custom.css")

}
20 changes: 17 additions & 3 deletions docs/index.rst
Original file line number Diff line number Diff line change
@@ -1,18 +1,32 @@
.. _findmyorder_index:

===========
FindMyOrder
===========

.. image:: ../docs/_static/logo-full.png
:width: 200
:alt: logo
:align: right

| Find My order,
| a parsing package to find trading order


User Guide
==========

.. toctree::
:maxdepth: 4

01_start
02_config


Module Reference
================

.. toctree::
:maxdepth: 4

03_module


Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ optional = true
[tool.poetry.group.docs.dependencies]
sphinx = ">=5,<6"
sphinx_bootstrap_theme = "^0.8.1"
sphinxext-remoteliteralinclude = "^0.4.0"
sphinx-hoverxref = "^1.3.0"


[tool.pytest.ini_options]
Expand Down