Skip to content

Commit

Permalink
Merge branch 'release/0.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
luiscoms committed Feb 21, 2017
2 parents 0969ce6 + f2de6bd commit 1b9b0b3
Show file tree
Hide file tree
Showing 28 changed files with 539 additions and 572 deletions.
9 changes: 9 additions & 0 deletions .bumpversion.cfg
@@ -0,0 +1,9 @@
[bumpversion]
current_version = 0.1.0

[bumpversion:file:setup.py]

[bumpversion:file:CHANGELOG.md]
search = Next Release
replace = {new_version}

2 changes: 1 addition & 1 deletion .coveragerc
@@ -1,6 +1,6 @@
[run]
branch = True
source = boilerplate
source = eve_healthcheck

[report]
show_missing = True
1 change: 1 addition & 0 deletions .coveralls.yml
@@ -0,0 +1 @@
repo_token: 3FLlXcyRliVhxZYTLiuNv979OJaxljgni
19 changes: 19 additions & 0 deletions .editorconfig
@@ -0,0 +1,19 @@
root = true

[{*.{cfg,ini,json,py,yml},Makefile}]
charset = utf-8
trim_trailing_whitespace = true
indent_style = space
indent_size = 4
end_of_line = lf
insert_final_newline = true

# Para arquivos JSON e YAML
[*.{json,yml}]
# Indentação em 2 espaços
indent_size = 2
# Para arquivos Makefile

[Makefile]
# Indentação deve ser por tabs
indent_style = tab
122 changes: 118 additions & 4 deletions .gitignore
@@ -1,8 +1,122 @@
htmlcov/
###Linux###

*~

# KDE directory preferences
.directory


###OSX###

.DS_Store
.AppleDouble
.LSOverride

# Icon must end with two \r
Icon

# Thumbnails
._*

# Files that might appear on external disk
.Spotlight-V100
.Trashes

# Directories potentially created on remote AFP share
.AppleDB
.AppleDesktop
Network Trash Folder
Temporary Items
.apdisk


###Python###

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
docs/_build/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
*.egg-info
*.pyc
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover

# Translations
*.mo
*.pot

# Django stuff:
*.log

# Sphinx documentation
docs/_build/

# PyBuilder
target/

db

###PyCharm###

# PyCharm
# http://www.jetbrains.com/pycharm/webhelp/project.html
.idea
.iml


###Windows###

# Windows image file caches
Thumbs.db
ehthumbs.db

# Folder config file
Desktop.ini

# Recycle Bin used on file shares
$RECYCLE.BIN/

# Windows Installer files
*.cab
*.msi
*.msm
*.msp

# Windows shortcuts
*.lnk
Expand Down
4 changes: 3 additions & 1 deletion .travis.yml
@@ -1,9 +1,11 @@
language: python
services: mongodb
python: 3.5
install:
- pip install tox
script:
- tox
env:
- TOXENV=py27
- TOXENV=py3
- TOXENV=docs
- TOXENV=coveralls
7 changes: 7 additions & 0 deletions CHANGELOG.md
@@ -0,0 +1,7 @@
eve-healthckeck
===========

0.1.0
-----

* Initial release
3 changes: 3 additions & 0 deletions MANIFEST.in
@@ -0,0 +1,3 @@
include README.rst
include LICENSE
include requirements.txt
44 changes: 44 additions & 0 deletions Makefile
@@ -0,0 +1,44 @@
include defines.mk

ifdef PY_VENV_PATH
PYTHON_ACTIVATE = . $(PY_VENV_PATH)/bin/activate
PIP = $(PYTHON_ACTIVATE) && pip
PYTHON_BIN := $(PYTHON)
PYTHON := $(PYTHON_ACTIVATE) && $(PYTHON)
ifneq ("$(wildcard $(PY_VENV_PATH)/bin/activate)","")
$(PYTHON_ACTIVATE):
else
$(PYTHON_ACTIVATE):
virtualenv -p$(PYTHON_BIN) $(PY_VENV_PATH)
endif
endif

.PHONY: install
install: $(PYTHON_ACTIVATE)
# $(PIP) install -r requirements-dev.txt
$(PYTHON) setup.py install

# make test PY_VENV_PATH=env
.PHONY: test
test: install-dev lint
echo "Start testing"
$(PYTHON_ACTIVATE) && nosetests -v --with-doctest

# make register PIPY_REPOSITORY=pypitest
.PHONY: register
register:
$(PYTHON) setup.py register -r ${PIPY_REPOSITORY}

# make dist PIPY_REPOSITORY=pypitest
.PHONY: dist
dist: install
$(PYTHON) setup.py sdist

# make upload PIPY_REPOSITORY=pypitest
.PHONY: upload
upload:
$(PYTHON) setup.py sdist upload -r ${PIPY_REPOSITORY}

ifndef VERBOSE
.SILENT:
endif
8 changes: 0 additions & 8 deletions README.md

This file was deleted.

58 changes: 58 additions & 0 deletions README.rst
@@ -0,0 +1,58 @@
eve-healthcheck
===============

|Build Status| |Requirements Status| |Coverage Status|

`eve-healthcheck`_ is project that servers healthcheck urls used to
monitor your application `Eve`_ powered RESTful API.

Usage
-----

.. code:: python
from eve_healthcheck import EveHealthCheck
...
app = Eve()
hc = EveHealthCheck(app, '/healthcheck')
...
This will add an url ``/healthckeck`` that will check database
connection like:

.. code:: json
{'hostname': 'localhost',
'results': [{'checker': 'database_check',
'expires': 1487655119.5796409,
'output': 'Database OK',
'passed': True,
'timestamp': 1487655092.5796409}],
'status': 'success',
'timestamp': 1487655092.5820687}
Running tests with ``tox``
--------------------------

Install ``tox``

::

$ pip install tox

Run tests

::

tox

.. _eve-healthcheck: https://pypi.python.org/pypi/eve-healthcheck
.. _Eve: http://python-eve.org/

.. |Build Status| image:: https://travis-ci.org/ateliedocodigo/eve-healthcheck.svg?branch=master
:target: https://travis-ci.org/ateliedocodigo/eve-healthcheck
.. |Requirements Status| image:: https://requires.io/github/ateliedocodigo/eve-healthcheck/requirements.svg?branch=master
:target: https://requires.io/github/ateliedocodigo/eve-healthcheck/requirements/?branch=master
.. |Coverage Status| image:: https://coveralls.io/repos/github/ateliedocodigo/eve-healthcheck/badge.svg?branch=master
:target: https://coveralls.io/github/ateliedocodigo/eve-healthcheck?branch=master
Empty file removed boilerplate/__init__.py
Empty file.
14 changes: 0 additions & 14 deletions boilerplate/script.py

This file was deleted.

30 changes: 30 additions & 0 deletions defines.mk
@@ -0,0 +1,30 @@
PIP = pip3
PYTHON = python3
PIPY_REPOSITORY=pypi

BASE_PKG_NAME=boilerplate
PKG_NAME=boilerplate

script_env = \
PIP="$(PIP)" \
PYTHON="$(PYTHON)" \
PIPY_REPOSITORY="$(PIPY_REPOSITORY)" \
BASE_PKG_NAME="$(BASE_PKG_NAME)" \
PKG_NAME="$(PKG_NAME)" \
VERSION="$(VERSION)"


.PHONY: clean
clean:
rm -rf .cache .tox/ .coverage build/ dist/ docs/_build htmlcov *.egg-info

.PHONY: rename
rename: $(script_env)
ifeq ($(BASE_PKG_NAME),$(PKG_NAME))
echo "Set a different name to rename BASE_PKG_NAME or PKG_NAME ie.:";
echo "\t$$ make rename PKG_NAME=my_pkg"
exit 1
endif
echo "Rename package from $(BASE_PKG_NAME) to $(PKG_NAME)"
grep -rl $(BASE_PKG_NAME) . | grep -v .git/ | grep -v defines.mk | xargs sed -i 's/$(BASE_PKG_NAME)/$(PKG_NAME)/g'
mv $(BASE_PKG_NAME) $(PKG_NAME)

0 comments on commit 1b9b0b3

Please sign in to comment.