-
Notifications
You must be signed in to change notification settings - Fork 86
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 #100 from tmbo/kiancross-add-docs
Random docs changes
- Loading branch information
Showing
40 changed files
with
1,487 additions
and
801 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
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 |
---|---|---|
@@ -0,0 +1,90 @@ | ||
import json | ||
import os | ||
import sys | ||
import traceback | ||
|
||
sys.path.insert(0, os.path.abspath("../")) | ||
from questionary import __version__ | ||
|
||
project = "Questionary" | ||
copyright = "2020, Questionary" | ||
author = "Questionary" | ||
|
||
version = __version__ | ||
release = __version__ | ||
|
||
extensions = [ | ||
"sphinx.ext.autodoc", | ||
"sphinx.ext.intersphinx", | ||
"sphinx.ext.viewcode", | ||
"sphinx.ext.napoleon", | ||
"sphinx_copybutton", | ||
"sphinx_autodoc_typehints", | ||
] | ||
|
||
nitpick_ignore = [ | ||
("py:class", "questionary.prompts.common.Choice"), | ||
("py:class", "questionary.question.Question"), | ||
("py:class", "questionary.form.Form"), | ||
] | ||
|
||
autodoc_typehints = "description" | ||
|
||
copybutton_prompt_text = r">>> |\.\.\. |\$ " | ||
copybutton_prompt_is_regexp = True | ||
|
||
html_theme = "sphinx_rtd_theme" | ||
|
||
html_theme_options = { | ||
"navigation_depth": 2, | ||
} | ||
|
||
intersphinx_mapping = { | ||
"python": ("https://docs.python.org/3", None), | ||
"prompt_toolkit": ("https://python-prompt-toolkit.readthedocs.io/en/master/", None), | ||
} | ||
|
||
autodoc_member_order = "alphabetical" | ||
|
||
# TODO: remove as soon as we upgrade to sphinx 4.0 | ||
# Borrowed from https://github.com/sphinx-doc/sphinx/issues/5603 | ||
intersphinx_aliases = { | ||
("py:class", "prompt_toolkit.styles.style.Style"): ( | ||
"py:class", | ||
"prompt_toolkit.styles.Style", | ||
), | ||
("py:class", "prompt_toolkit.shortcuts.prompt.CompleteStyle"): ( | ||
"py:class", | ||
"prompt_toolkit.shortcuts.CompleteStyle", | ||
), | ||
("py:class", "prompt_toolkit.completion.base.Completer"): ( | ||
"py:class", | ||
"prompt_toolkit.completion.Completer", | ||
), | ||
("py:class", "prompt_toolkit.lexers.base.Lexer"): ( | ||
"py:class", | ||
"prompt_toolkit.lexers.Lexer", | ||
), | ||
} | ||
|
||
|
||
def add_intersphinx_aliases_to_inv(app): | ||
from sphinx.ext.intersphinx import InventoryAdapter | ||
|
||
inventories = InventoryAdapter(app.builder.env) | ||
|
||
for alias, target in app.config.intersphinx_aliases.items(): | ||
alias_domain, alias_name = alias | ||
target_domain, target_name = target | ||
|
||
try: | ||
found = inventories.main_inventory[target_domain][target_name] | ||
inventories.main_inventory[alias_domain][alias_name] = found | ||
except KeyError as e: | ||
traceback.print_exc() | ||
continue | ||
|
||
|
||
def setup(app): | ||
app.add_config_value("intersphinx_aliases", {}, "env") | ||
app.connect("builder-inited", add_intersphinx_aliases_to_inv) |
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 |
---|---|---|
@@ -0,0 +1,67 @@ | ||
*********** | ||
Questionary | ||
*********** | ||
|
||
.. image:: https://img.shields.io/pypi/v/questionary.svg | ||
:target: https://pypi.org/project/questionary/ | ||
:alt: Version | ||
|
||
.. image:: https://img.shields.io/pypi/l/questionary.svg | ||
:target: # | ||
:alt: License | ||
|
||
.. image:: https://img.shields.io/pypi/pyversions/questionary.svg | ||
:target: https://pypi.python.org/pypi/questionary | ||
:alt: Supported Python Versions | ||
|
||
✨ Questionary is a Python library for effortlessly building pretty command line interfaces ✨ | ||
|
||
It makes it very easy to query your user for input. You need your user to | ||
confirm a destructive action or enter a file path? We've got you covered: | ||
|
||
.. image:: images/example.gif | ||
|
||
Creating your first prompt is just a few key strokes away | ||
|
||
.. code-block:: python3 | ||
import questionary | ||
first_name = questionary.text("What's your first name").ask() | ||
This prompt will ask the user to provide free text input and the result is | ||
stored in ``first_name``. | ||
|
||
You can install Questionary using pip (for details, head over to the :ref:`installation` page): | ||
|
||
.. code-block:: console | ||
$ pip install questionary | ||
Ready to go? Check out the :ref:`quickstart`. | ||
|
||
License | ||
======= | ||
Licensed under the `MIT License <https://github.com/tmbo/questionary/blob/master/LICENSE>`_. | ||
Copyright 2020 Tom Bocklisch. | ||
|
||
.. toctree:: | ||
:hidden: | ||
|
||
pages/installation | ||
pages/quickstart | ||
pages/types | ||
pages/advanced | ||
pages/api_reference | ||
pages/support | ||
Examples <https://github.com/tmbo/questionary/tree/master/examples> | ||
|
||
.. toctree:: | ||
:hidden: | ||
|
||
pages/contributors | ||
|
||
.. toctree:: | ||
:hidden: | ||
|
||
pages/release_history |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.