-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21 from claui/api-docs
Improve API documentation
- Loading branch information
Showing
13 changed files
with
150 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,9 +10,12 @@ | |
# type: ignore | ||
|
||
project = 'Itchcraft' | ||
copyright = '2024 Claudia Pellegrino' | ||
executable = 'itchcraft' | ||
author = 'Claudia Pellegrino <[email protected]>' | ||
description = 'Tech demo for interfacing with heat-based USB insect bite healers' | ||
description = ( | ||
'Tech demo for interfacing with heat-based USB insect bite healers' | ||
) | ||
|
||
# -- General configuration --------------------------------------------------- | ||
# https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration | ||
|
@@ -33,26 +36,38 @@ | |
'special-members', | ||
'imported-members', | ||
] | ||
autoapi_root = 'api' | ||
autoapi_type = 'python' | ||
autodoc_typehints = 'description' | ||
|
||
html_theme = 'sphinx_rtd_theme' | ||
|
||
python_display_short_literal_types = True | ||
python_use_unqualified_type_names = True | ||
|
||
myst_enable_extensions = [ | ||
'deflist', | ||
] | ||
|
||
|
||
def skip_module(app, what, name, obj, skip, options): | ||
if what != 'module': | ||
return skip | ||
if name in [ | ||
'itchcraft.__main__', | ||
'itchcraft.cli', | ||
'itchcraft.fire_workarounds', | ||
'itchcraft.version', | ||
'itchcraft.settings', | ||
]: | ||
return True | ||
if what == 'data': | ||
return skip or name.endswith('.logger') | ||
if what == 'method': | ||
return skip or name.endswith('.__str__') | ||
if what == 'module': | ||
return ( | ||
skip | ||
or name | ||
in [ | ||
'itchcraft.__main__', | ||
'itchcraft.cli', | ||
'itchcraft.fire_workarounds', | ||
'itchcraft.version', | ||
'itchcraft.settings', | ||
] | ||
or obj.obj['relative_path'].startswith('itchcraft/stubs') | ||
) | ||
return skip | ||
|
||
|
||
|
@@ -67,6 +82,7 @@ def setup(sphinx): | |
'**/itchcraft/fire_workarounds/**', | ||
'**/itchcraft/version/**', | ||
'**/itchcraft/settings/**', | ||
'**/itchcraft/stubs/**', | ||
] | ||
|
||
# Man page output | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters