Skip to content

Commit

Permalink
Doc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
robbiet480 committed Sep 5, 2016
1 parent 5144547 commit 1170b28
Show file tree
Hide file tree
Showing 7 changed files with 100 additions and 33 deletions.
5 changes: 5 additions & 0 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " livehtml to make standalone HTML files via sphinx-autobuild"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
Expand Down Expand Up @@ -54,6 +55,10 @@ html:
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."

.PHONY: livehtml
livehtml:
sphinx-autobuild --port 0 -B -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html

.PHONY: dirhtml
dirhtml:
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
Expand Down
Binary file added docs/source/_static/favicon.ico
Binary file not shown.
Binary file added docs/source/_static/logo-apple.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/source/_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.
59 changes: 46 additions & 13 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,13 @@
# import sys
# sys.path.insert(0, os.path.abspath('.'))

from homeassistant.const import (__version__, __short_version__, PROJECT_NAME,
PROJECT_LONG_DESCRIPTION, PROJECT_URL,
PROJECT_COPYRIGHT, PROJECT_AUTHOR,
PROJECT_GITHUB_USERNAME,
PROJECT_GITHUB_REPOSITORY, PYPI_URL,
GITHUB_URL)

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

# If your documentation needs a minimal Sphinx version, state it here.
Expand Down Expand Up @@ -53,18 +60,18 @@
master_doc = 'index'

# General information about the project.
project = 'Home Assistant'
copyright = '2016, Home Assistant Team'
author = 'Home Assistant Team'
project = PROJECT_NAME
copyright = PROJECT_COPYRIGHT
author = PROJECT_AUTHOR

# The version info for the project you're documenting, acts as replacement for
# |version| and |release|, also used in various other places throughout the
# built documents.
#
# The short X.Y version.
version = '0.27'
version = __short_version__
# The full version, including alpha/beta/rc tags.
release = '0.27.0'
release = __version__

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
Expand Down Expand Up @@ -124,13 +131,31 @@
# The theme to use for HTML and HTML Help pages. See the documentation for
# a list of builtin themes.
#
# html_theme = 'alabaster'
html_theme = 'alabaster'

# 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 = {}
html_theme_options = {
'logo': 'logo.png',
'logo_name': PROJECT_NAME,
'description': PROJECT_LONG_DESCRIPTION,
'github_user': PROJECT_GITHUB_USERNAME,
'github_repo': PROJECT_GITHUB_REPOSITORY,
'github_type': 'star',
'github_banner': True,
'travis_button': True,
'touch_icon': 'logo-apple.png',
# 'fixed_sidebar': True, # Re-enable when we have more content
'extra_nav_links': {
'🏡 Homepage': PROJECT_URL,
'📌 Community Forums': 'https://community.home-assistant.io',
'💬 Gitter': 'https://gitter.im/home-assistant/home-assistant',
'🚀 GitHub': GITHUB_URL,
'💾 Download Releases': PYPI_URL,
}
}

# Add any paths that contain custom themes here, relative to this directory.
# html_theme_path = []
Expand All @@ -147,13 +172,14 @@
# The name of an image file (relative to this directory) to place at the top
# of the sidebar.
#
# html_logo = None
# html_logo = '_static/logo.png'

# The name of an image file (relative to this directory) to use as a favicon of
# the docs. This file should be a Windows icon file (.ico) being 16x16 or 32x32
# the docs.
# This file should be a Windows icon file (.ico) being 16x16 or 32x32
# pixels large.
#
# html_favicon = None
html_favicon = '_static/favicon.ico'

# 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,
Expand All @@ -170,16 +196,23 @@
# bottom, using the given strftime format.
# The empty string is equivalent to '%b %d, %Y'.
#
# html_last_updated_fmt = None
html_last_updated_fmt = '%b %d, %Y'

# If true, SmartyPants will be used to convert quotes and dashes to
# typographically correct entities.
#
# html_use_smartypants = True
html_use_smartypants = True

# Custom sidebar templates, maps document names to template names.
#
# html_sidebars = {}
html_sidebars = {
'**': [
'about.html',
'navigation.html',
'relations.html',
'searchbox.html',
]
}

# Additional templates that should be rendered to pages, maps page names to
# template names.
Expand Down
37 changes: 35 additions & 2 deletions homeassistant/const.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,42 @@
# coding: utf-8
"""Constants used by Home Assistant components."""

__version__ = '0.28.0.dev0'
MAJOR_VERSION = 0
MINOR_VERSION = 28
PATCH_VERSION = '0.dev0'
__short_version__ = '{}.{}'.format(MAJOR_VERSION, MINOR_VERSION)
__version__ = '{}.{}'.format(__short_version__, PATCH_VERSION)
REQUIRED_PYTHON_VER = (3, 4)

PROJECT_NAME = 'Home Assistant'
PROJECT_PACKAGE_NAME = 'homeassistant'
PROJECT_LICENSE = 'MIT License'
PROJECT_AUTHOR = 'The Home Assistant Authors'
PROJECT_COPYRIGHT = '2016, {}'.format(PROJECT_AUTHOR)
PROJECT_URL = 'https://home-assistant.io/'
PROJECT_EMAIL = 'hello@home-assistant.io'
PROJECT_DESCRIPTION = ('Open-source home automation platform '
'running on Python 3.')
PROJECT_LONG_DESCRIPTION = ('Home Assistant is an open-source '
'home automation platform running on Python 3. '
'Track and control all devices at home and '
'automate control. '
'Installation in less than a minute.')
PROJECT_CLASSIFIERS = [
'Intended Audience :: End Users/Desktop',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3.4',
'Topic :: Home Automation'
]

PROJECT_GITHUB_USERNAME = 'home-assistant'
PROJECT_GITHUB_REPOSITORY = 'home-assistant'

PYPI_URL = 'https://pypi.python.org/pypi/{}'.format(PROJECT_PACKAGE_NAME)
GITHUB_URL = 'https://github.com/{}/{}'.format(PROJECT_GITHUB_USERNAME,
PROJECT_GITHUB_REPOSITORY)

PLATFORM_FORMAT = '{}.{}'

# Can be used to specify a catch all when registering state or event listeners.
Expand Down
32 changes: 14 additions & 18 deletions setup.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
#!/usr/bin/env python3
import os
from setuptools import setup, find_packages
from homeassistant.const import __version__
from homeassistant.const import (__version__, PROJECT_PACKAGE_NAME,
PROJECT_LICENSE, PROJECT_URL,
PROJECT_EMAIL, PROJECT_DESCRIPTION,
PROJECT_CLASSIFIERS, GITHUB_URL,
PROJECT_AUTHOR)

PACKAGE_NAME = 'homeassistant'
HERE = os.path.abspath(os.path.dirname(__file__))
DOWNLOAD_URL = ('https://github.com/home-assistant/home-assistant/archive/'
'{}.zip'.format(__version__))
DOWNLOAD_URL = ('{}/archive/'
'{}.zip'.format(GITHUB_URL, __version__))

PACKAGES = find_packages(exclude=['tests', 'tests.*'])

Expand All @@ -21,14 +24,14 @@
]

setup(
name=PACKAGE_NAME,
name=PROJECT_PACKAGE_NAME,
version=__version__,
license='MIT License',
url='https://home-assistant.io/',
license=PROJECT_LICENSE,
url=PROJECT_URL,
download_url=DOWNLOAD_URL,
author='Home Assistant',
author_email='hello@home-assistant.io',
description='Open-source home automation platform running on Python 3.',
author=PROJECT_AUTHOR,
author_email=PROJECT_EMAIL,
description=PROJECT_DESCRIPTION,
packages=PACKAGES,
include_package_data=True,
zip_safe=False,
Expand All @@ -41,12 +44,5 @@
'hass = homeassistant.__main__:main'
]
},
classifiers=[
'Intended Audience :: End Users/Desktop',
'Intended Audience :: Developers',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
'Programming Language :: Python :: 3.4',
'Topic :: Home Automation'
],
classifiers=PROJECT_CLASSIFIERS,
)

0 comments on commit 1170b28

Please sign in to comment.