Skip to content

Commit

Permalink
Merge branch 'release/0.3.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
ltn100 committed Apr 9, 2020
2 parents d2eda4d + 32ce9d8 commit d742d40
Show file tree
Hide file tree
Showing 21 changed files with 895 additions and 144 deletions.
9 changes: 9 additions & 0 deletions .readthedocs.yml
@@ -0,0 +1,9 @@
version: 2

sphinx:
configuration: docs/conf.py

python:
version: 3.7
install:
- requirements: docs/requirements.txt
1 change: 1 addition & 0 deletions .travis.yml
Expand Up @@ -15,6 +15,7 @@ install:
- pip install mock
- pip install configparser
- pip install pytest
- pip install sphinx

script:
- git fetch
Expand Down
24 changes: 24 additions & 0 deletions .vscode/launch.json
@@ -0,0 +1,24 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "Python: Sphinx Module",
"type": "python",
"request": "launch",
"module": "sphinx",
"args": [
"-a",
"-E",
"docs",
"build/sphinx/html"
]
},
{
"name": "Python: Current File",
"type": "python",
"request": "launch",
"program": "${file}",
"console": "integratedTerminal"
}
]
}
5 changes: 5 additions & 0 deletions Makefile
Expand Up @@ -35,6 +35,11 @@ upload: clean build
install test: build
$(PYTHON) $(SETUP) $@

.PHONY: docs
docs:
$(PYTHON) $(SETUP) build_sphinx && \
xdg-open build/sphinx/html/index.html

# Bespoke targets...
.PHONY: clean
clean:
Expand Down
5 changes: 2 additions & 3 deletions README.md
@@ -1,5 +1,4 @@
Prompty [![Build Status](https://travis-ci.org/ltn100/prompty.svg?branch=develop)](https://travis-ci.org/ltn100/prompty)
[![Coverage Status](https://coveralls.io/repos/ltn100/prompty/badge.svg?service=github)](https://coveralls.io/github/ltn100/prompty) [![PyPI version](https://badge.fury.io/py/prompty.svg)](https://pypi.org/project/prompty/) [![MIT license](http://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)
Prompty [![Build Status](https://travis-ci.org/ltn100/prompty.svg?branch=develop)](https://travis-ci.org/ltn100/prompty) [![Documentation Status](https://readthedocs.org/projects/prompty/badge/?version=latest)](https://prompty.readthedocs.io/en/latest/) [![Coverage Status](https://coveralls.io/repos/ltn100/prompty/badge.svg?service=github)](https://coveralls.io/github/ltn100/prompty) [![PyPI version](https://badge.fury.io/py/prompty.svg)](https://pypi.org/project/prompty/) [![MIT license](http://img.shields.io/badge/license-MIT-blue.svg)](http://opensource.org/licenses/MIT)
=======

Prompty is a [command prompt](https://en.wikipedia.org/wiki/Command-line_interface#Command_prompt) [markup language](https://en.wikipedia.org/wiki/Markup_language).
Expand Down Expand Up @@ -124,4 +123,4 @@ For a more elaborate example, see [`~/.local/share/prompty/default.prompty`](./s

# Documentation

Documentation will be coming soon...
Documentation is available at [readthedocs](https://prompty.readthedocs.io/en/latest/).
8 changes: 4 additions & 4 deletions bin/prompty
Expand Up @@ -80,10 +80,10 @@ def main(argv=None):
c = prompty.colours.Colours(prompty.functionContainer.FunctionContainer())
for style in c.STYLES:
for colour in c.COLOURS:
print("%s%s : %s%s" % (c.startColour(colour, style=style, wrap=False),
print("%s%s : %s%s" % (c.startColour(colour, style=style, _wrap=False),
style[c.NAME_KEY],
colour[c.NAME_KEY],
c.stopColour(wrap=False)))
c.stopColour(_wrap=False)))
return 0

if option in ("-d", "--debug"):
Expand All @@ -97,10 +97,10 @@ def main(argv=None):
fgcolour=colour[c.FG_KEY],
bgcolour=colour[c.BG_KEY],
style=colour[c.STYLE_KEY],
wrap=False
_wrap=False
),
colour[c.NAME_KEY],
c.stopColour(wrap=False))
c.stopColour(_wrap=False))
)
return 0

Expand Down
Empty file added docs/_static/.gitignore
Empty file.
5 changes: 5 additions & 0 deletions docs/colours.rst
@@ -0,0 +1,5 @@
Colours
=======

.. autoclass:: prompty.colours.Colours
:members:
179 changes: 179 additions & 0 deletions docs/conf.py
@@ -0,0 +1,179 @@
# -*- coding: utf-8 -*-
#
# Configuration file for the Sphinx documentation builder.
#
# This file does only contain a selection of the most common options. For a
# full list see the documentation:
# http://www.sphinx-doc.org/en/master/config

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

# If extensions (or modules to document with autodoc) are in another directory,
# add these directories to sys.path here. If the directory is relative to the
# documentation root, use os.path.abspath to make it absolute, like shown here.
#
import os
import sys
sys.path.insert(0, os.path.abspath('..'))


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

project = u'prompty'
copyright = u'2020, Lee Netherton'
author = u'Lee Netherton'

# The short X.Y version
version = u''
# The full version, including alpha/beta/rc tags
release = u'0.3.0'


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

# If your documentation needs a minimal Sphinx version, state it here.
#
# needs_sphinx = '1.0'

# Add any Sphinx extension module names here, as strings. They can be
# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom
# ones.
extensions = [
'sphinx.ext.autodoc',
'prompty.utils.sphinx'
]

# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

# The suffix(es) of source filenames.
# You can specify multiple suffix as a list of string:
#
# source_suffix = ['.rst', '.md']
source_suffix = '.rst'

# The master toctree document.
master_doc = 'index'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#
# This is also used if you do content translation via gettext catalogs.
# Usually you set "language" from the command line for these cases.
language = None

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
# This pattern also affects html_static_path and html_extra_path.
exclude_patterns = []

# The name of the Pygments (syntax highlighting) style to use.
pygments_style = None

autodoc_member_order = 'bysource'

# -- Options for HTML output -------------------------------------------------

# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
html_theme = 'sphinx_rtd_theme'

# Theme options are theme-specific and customize the look and feel of a theme
# further. For a list of options available for each theme, see the
# documentation.
#
# html_theme_options = {}

# Add any paths that contain custom static files (such as style sheets) here,
# relative to this directory. They are copied after the builtin static files,
# so a file named "default.css" will overwrite the builtin "default.css".
html_static_path = ['_static']

# Custom sidebar templates, must be a dictionary that maps document names
# to template names.
#
# The default sidebars (for documents that don't match any pattern) are
# defined by theme itself. Builtin themes are using these templates by
# default: ``['localtoc.html', 'relations.html', 'sourcelink.html',
# 'searchbox.html']``.
#
# html_sidebars = {}


# -- Options for HTMLHelp output ---------------------------------------------

# Output file base name for HTML help builder.
htmlhelp_basename = 'promptydoc'


# -- Options for LaTeX output ------------------------------------------------

latex_elements = {
# The paper size ('letterpaper' or 'a4paper').
#
# 'papersize': 'letterpaper',

# The font size ('10pt', '11pt' or '12pt').
#
# 'pointsize': '10pt',

# Additional stuff for the LaTeX preamble.
#
# 'preamble': '',

# Latex figure (float) alignment
#
# 'figure_align': 'htbp',
}

# Grouping the document tree into LaTeX files. List of tuples
# (source start file, target name, title,
# author, documentclass [howto, manual, or own class]).
latex_documents = [
(master_doc, 'prompty.tex', u'prompty Documentation',
u'Lee Netherton', 'manual'),
]


# -- Options for manual page output ------------------------------------------

# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
(master_doc, 'prompty', u'prompty Documentation',
[author], 1)
]


# -- Options for Texinfo output ----------------------------------------------

# Grouping the document tree into Texinfo files. List of tuples
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
(master_doc, 'prompty', u'prompty Documentation',
author, 'prompty', 'One line description of project.',
'Miscellaneous'),
]


# -- Options for Epub output -------------------------------------------------

# Bibliographic Dublin Core info.
epub_title = project

# The unique identifier of the text. This can be a ISBN number
# or the project homepage.
#
# epub_identifier = ''

# A unique identification for the text.
#
# epub_uid = ''

# A list of files that should not be packed into the epub file.
epub_exclude_files = ['search.html']


# -- Extension configuration -------------------------------------------------
11 changes: 11 additions & 0 deletions docs/functions.rst
@@ -0,0 +1,11 @@
Functions
=========

.. automodule:: prompty.functions
:members:
:undoc-members:

.. automodule:: prompty.vcs
:members:
:undoc-members:
:exclude-members: VCS, VCSBase
23 changes: 23 additions & 0 deletions docs/index.rst
@@ -0,0 +1,23 @@
Welcome to prompty's documentation!
===================================

.. toctree::
:hidden:

self

.. toctree::
:maxdepth: 2
:caption: Contents:

functions
colours




Indices and tables
==================

* :ref:`genindex`
* :ref:`search`
2 changes: 2 additions & 0 deletions docs/requirements.txt
@@ -0,0 +1,2 @@
sphinx
sphinx_rtd_theme
11 changes: 11 additions & 0 deletions environment.yml
@@ -0,0 +1,11 @@
name: prompty-dev
dependencies:
- python==3.7.*
- future
- configparser
- mock
- pytest
- pycodestyle
- wheel
- sphinx<2
- sphinx_rtd_theme<0.5
2 changes: 1 addition & 1 deletion prompty/__init__.py
Expand Up @@ -2,7 +2,7 @@
# vim:set softtabstop=4 shiftwidth=4 tabstop=4 expandtab:

# Must comply with http://legacy.python.org/dev/peps/pep-0440/#version-scheme
__version__ = "0.2.1"
__version__ = "0.3.0"

from . import prompt
from . import functions
Expand Down

0 comments on commit d742d40

Please sign in to comment.