Skip to content

Commit

Permalink
Add docs for everything except for dictionaries
Browse files Browse the repository at this point in the history
  • Loading branch information
emreozcan committed Nov 10, 2024
1 parent e61db8a commit 9822a4e
Show file tree
Hide file tree
Showing 11 changed files with 760 additions and 56 deletions.
5 changes: 5 additions & 0 deletions docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
'sphinx_copybutton',
'autodoc2',
'sphinx_inline_tabs',
'sphinx_tippy',
]

templates_path = ['_templates']
Expand Down Expand Up @@ -61,6 +62,10 @@
autodoc2_module_all_regexes = [
# r'tdk\..*',
]
autodoc2_hidden_objects = {"inherited", "undoc"}
autodoc2_replace_annotations = [
("tdk.etc.tools.T", "T"),
]

# -- Options for intersphinx
# https://www.sphinx-doc.org/en/master/usage/extensions/intersphinx.html#configuration
Expand Down
23 changes: 22 additions & 1 deletion poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ sphinx-autobuild = "^2024.10.3"
sphinx-autodoc2 = "^0.5.0"
sphinx-copybutton = "^0.5.2"
sphinx-inline-tabs = "^2023.4.21"
sphinx-tippy = "^0.4.3"

[tool.poetry-dynamic-versioning]
enable = true
Expand Down
26 changes: 24 additions & 2 deletions src/tdk/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,26 @@
"""
`tdk` is the top-level package that forms the collection of modules that provide
access to various dictionaries from the Turkish Language Association (TDK)
and tools about the Turkish language.
Each submodule provides access to a different dictionary from the
Turkish Language Association (TDK).
If you do not care about niche dictionaries, you probably want the
{py:mod}`tdk.gts` module, which provides access to the
Güncel Türkçe Sözlük[^gts].
[^gts]: Updated Turkish Dictionary
Each function comes with a synchronous and an asynchronous version.
An async function `foo` has a synchronous counterpart `foo_sync`.
Each function can optionally take an `http_session` parameter to use
an existing [](<inv:#aiohttp.ClientSession>) for the HTTP requests.
If not provided, a new session is created and managed by the function using
[](<#session_maker>).
"""

__version__ = "0.0.0"
"""At runtime, holds the human-readable version of the installed version."""
__version_tuple__ = (0, 0, 0)

from tdk import dictionaries, etc
"""At runtime, holds the version of the installed package as a tuple of ints."""
7 changes: 7 additions & 0 deletions src/tdk/etc/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,8 @@
"""
This subpackage contains additional tools and data to be used with the library.
The submodules within this package are available as aliases in this subpackage,
so you can import them directly from the `tdk.etc` package.
"""

from tdk.etc import alphabet, enums, tools
8 changes: 8 additions & 0 deletions src/tdk/etc/alphabet.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,12 @@
"""
This module containts constants about the Turkish alphabet.
"""

VOWELS = "aeıioöuü"
"""Vowels of the Turkish alphabet in lowercase."""
LONG_VOWELS = "âîû"
"""Vowels of the Turkish alphabet with circumflexes in lowercase."""
CONSONANTS = "bcçdfgğhjklmnprsştvyz"
"""Consonants of the Turkish alphabet in lowercase."""
ALPHABET = "abcçdefgğhıijklmnoöprsştuüvyz"
"""The Turkish alphabet in lowercase."""
Loading

0 comments on commit 9822a4e

Please sign in to comment.