Skip to content

Commit

Permalink
Merge pull request #15 from ymyzk/develop
Browse files Browse the repository at this point in the history
0.7.1
  • Loading branch information
ymyzk committed May 15, 2015
2 parents 940c032 + efc7fba commit a7fdf25
Show file tree
Hide file tree
Showing 11 changed files with 143 additions and 42 deletions.
7 changes: 7 additions & 0 deletions .codeclimate.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
languages:
Ruby: false
JavaScript: false
PHP: false
Python: true
exclude_paths:
- "tests/*"
15 changes: 3 additions & 12 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,6 @@
language: python
python:
- "2.7"
- "3.2"
- "3.3"
- "3.4"
- "pypy"
- "pypy3"
sudo: false
install:
- pip install .
- pip install coveralls
- pip install 'tox>=2.0,<2.1'
script:
- coverage run setup.py test
after_success:
- coveralls
- tox
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
# python-gyazo
[![PyPI version](https://badge.fury.io/py/python-gyazo.svg)](http://badge.fury.io/py/python-gyazo)
[![Downloads](https://pypip.in/download/python-gyazo/badge.svg)](https://pypi.python.org/pypi/python-gyazo/)
[![Build Status](https://travis-ci.org/ymyzk/python-gyazo.svg?branch=master)](https://travis-ci.org/ymyzk/python-gyazo)
[![Code Climate](https://codeclimate.com/github/ymyzk/python-gyazo/badges/gpa.svg)](https://codeclimate.com/github/ymyzk/python-gyazo)
[![Coverage Status](https://coveralls.io/repos/ymyzk/python-gyazo/badge.svg?branch=master)](https://coveralls.io/r/ymyzk/python-gyazo?branch=master)

A Python wrapper for Gyazo API.

## Requirements
* Python 2.7
* Python 3.2+
* PyPy

## Installation
`pip install python-gyazo`
Expand Down
23 changes: 19 additions & 4 deletions docs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
SPHINXOPTS =
SPHINXBUILD = sphinx-build
PAPER =
BUILDDIR = _build
BUILDDIR = build

# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
Expand All @@ -15,11 +15,11 @@ endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) source

.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest coverage gettext

help:
@echo "Please use \`make <target>' where <target> is one of"
Expand All @@ -30,6 +30,7 @@ help:
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " applehelp to make an Apple Help Book"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
Expand All @@ -45,6 +46,7 @@ help:
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
@echo " coverage to run coverage check of the documentation (if enabled)"

clean:
rm -rf $(BUILDDIR)/*
Expand Down Expand Up @@ -89,6 +91,14 @@ qthelp:
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/python-gyazo.qhc"

applehelp:
$(SPHINXBUILD) -b applehelp $(ALLSPHINXOPTS) $(BUILDDIR)/applehelp
@echo
@echo "Build finished. The help book is in $(BUILDDIR)/applehelp."
@echo "N.B. You won't be able to view it unless you put it in" \
"~/Library/Documentation/Help or install it in your application" \
"bundle."

devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
Expand Down Expand Up @@ -166,6 +176,11 @@ doctest:
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."

coverage:
$(SPHINXBUILD) -b coverage $(ALLSPHINXOPTS) $(BUILDDIR)/coverage
@echo "Testing of coverage in the sources finished, look at the " \
"results in $(BUILDDIR)/coverage/python.txt."

xml:
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
Expand Down
31 changes: 26 additions & 5 deletions docs/make.bat
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set BUILDDIR=_build
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
set I18NSPHINXOPTS=%SPHINXOPTS% .
set BUILDDIR=build
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% source
set I18NSPHINXOPTS=%SPHINXOPTS% source
if NOT "%PAPER%" == "" (
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
Expand Down Expand Up @@ -37,6 +37,7 @@ if "%1" == "help" (
echo. pseudoxml to make pseudoxml-XML files for display purposes
echo. linkcheck to check all external links for integrity
echo. doctest to run all doctests embedded in the documentation if enabled
echo. coverage to run coverage check of the documentation if enabled
goto end
)

Expand All @@ -47,6 +48,14 @@ if "%1" == "clean" (
)


REM Check if sphinx-build is available and fallback to Python version if any
%SPHINXBUILD% 2> nul
if errorlevel 9009 goto sphinx_python
goto sphinx_ok

:sphinx_python

set SPHINXBUILD=python -m sphinx.__init__
%SPHINXBUILD% 2> nul
if errorlevel 9009 (
echo.
Expand All @@ -60,6 +69,9 @@ if errorlevel 9009 (
exit /b 1
)

:sphinx_ok


if "%1" == "html" (
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
if errorlevel 1 exit /b 1
Expand Down Expand Up @@ -149,7 +161,7 @@ if "%1" == "latexpdf" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
cd %BUILDDIR%/latex
make all-pdf
cd %BUILDDIR%/..
cd %~dp0
echo.
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
goto end
Expand All @@ -159,7 +171,7 @@ if "%1" == "latexpdfja" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
cd %BUILDDIR%/latex
make all-pdf-ja
cd %BUILDDIR%/..
cd %~dp0
echo.
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
goto end
Expand Down Expand Up @@ -223,6 +235,15 @@ results in %BUILDDIR%/doctest/output.txt.
goto end
)

if "%1" == "coverage" (
%SPHINXBUILD% -b coverage %ALLSPHINXOPTS% %BUILDDIR%/coverage
if errorlevel 1 exit /b 1
echo.
echo.Testing of coverage in the sources finished, look at the ^
results in %BUILDDIR%/coverage/python.txt.
goto end
)

if "%1" == "xml" (
%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
if errorlevel 1 exit /b 1
Expand Down
56 changes: 40 additions & 16 deletions docs/conf.py → docs/source/conf.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# -*- coding: utf-8 -*-
#
# python-gyazo documentation build configuration file, created by
# sphinx-quickstart on Mon Jan 26 09:08:54 2015.
# sphinx-quickstart on Fri May 15 14:17:23 2015.
#
# This file is execfile()d with the current directory set to its
# containing dir.
Expand All @@ -14,6 +14,7 @@

import sys
import os
import shlex

# 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
Expand All @@ -35,7 +36,9 @@
# Add any paths that contain templates here, relative to this directory.
templates_path = ['_templates']

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

# The encoding of source files.
Expand All @@ -46,20 +49,24 @@

# General information about the project.
project = u'python-gyazo'
copyright = u'2015, Yusuke Miyazaki'
copyright = u'2014-2015, Yusuke Miyazaki'
author = u'Yusuke Miyazaki'

# 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.5.0'
version = '0.7.1'
# The full version, including alpha/beta/rc tags.
release = '0.5.0'
release = '0.7.1'

# The language for content autogenerated by Sphinx. Refer to documentation
# for a list of supported languages.
#language = None
#
# 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

# There are two options for replacing |today|: either, you set today to some
# non-false value, then it is used:
Expand All @@ -69,7 +76,7 @@

# List of patterns, relative to source directory, that match files and
# directories to ignore when looking for source files.
exclude_patterns = ['_build']
exclude_patterns = []

# The reST default role (used for this markup: `text`) to use for all
# documents.
Expand All @@ -95,12 +102,15 @@
# If true, keep warnings as "system message" paragraphs in the built documents.
#keep_warnings = False

# If true, `todo` and `todoList` produce output, else they produce nothing.
todo_include_todos = False


# -- 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 = 'default'
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
Expand Down Expand Up @@ -177,10 +187,23 @@
# This is the file name suffix for HTML files (e.g. ".xhtml").
#html_file_suffix = None

# Language to be used for generating the HTML full-text search index.
# Sphinx supports the following languages:
# 'da', 'de', 'en', 'es', 'fi', 'fr', 'hu', 'it', 'ja'
# 'nl', 'no', 'pt', 'ro', 'ru', 'sv', 'tr'
#html_search_language = 'en'

# A dictionary with options for the search language support, empty by default.
# Now only 'ja' uses this config value
#html_search_options = {'type': 'default'}

# The name of a javascript file (relative to the configuration directory) that
# implements a search results scorer. If empty, the default will be used.
#html_search_scorer = 'scorer.js'

# Output file base name for HTML help builder.
htmlhelp_basename = 'python-gyazodoc'


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

latex_elements = {
Expand All @@ -192,13 +215,16 @@

# 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 = [
('index', 'python-gyazo.tex', u'python-gyazo Documentation',
(master_doc, 'python-gyazo.tex', u'python-gyazo Documentation',
u'Yusuke Miyazaki', 'manual'),
]

Expand Down Expand Up @@ -228,8 +254,8 @@
# One entry per manual page. List of tuples
# (source start file, name, description, authors, manual section).
man_pages = [
('index', 'python-gyazo', u'python-gyazo Documentation',
[u'Yusuke Miyazaki'], 1)
(master_doc, 'python-gyazo', u'python-gyazo Documentation',
[author], 1)
]

# If true, show URL addresses after external links.
Expand All @@ -242,8 +268,8 @@
# (source start file, target name, title, author,
# dir menu entry, description, category)
texinfo_documents = [
('index', 'python-gyazo', u'python-gyazo Documentation',
u'Yusuke Miyazaki', 'python-gyazo', 'One line description of project.',
(master_doc, 'python-gyazo', u'python-gyazo Documentation',
author, 'python-gyazo', 'One line description of project.',
'Miscellaneous'),
]

Expand All @@ -258,5 +284,3 @@

# If true, do not generate a @detailmenu in the "Top" node's menu.
#texinfo_no_detailmenu = False

autoclass_content = 'both'
File renamed without changes.
File renamed without changes.
3 changes: 3 additions & 0 deletions gyazo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@
from .api import Api
from .error import GyazoError
from .image import Image, ImageList


__all__ = [Api, GyazoError, Image, ImageList]
Loading

0 comments on commit a7fdf25

Please sign in to comment.