-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
324 additions
and
182 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
[run] | ||
branch = True | ||
|
||
[report] | ||
# Regexes for lines to exclude from consideration | ||
exclude_lines = | ||
# Have to re-enable the standard pragma | ||
pragma: no cover | ||
|
||
# Don't complain about missing debug-only code: | ||
def __repr__ | ||
if self\.debug | ||
|
||
# Don't complain if tests don't hit defensive assertion code: | ||
raise AbstractError | ||
raise AssertionError | ||
raise NotImplementedError | ||
|
||
# Don't complain if non-runnable code isn't run: | ||
if 0: | ||
if __name__ == .__main__.: | ||
|
||
ignore_errors = True | ||
|
||
[html] | ||
directory = docs/_build/html/coverage |
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,4 @@ | ||
[style] | ||
based_on_style = pep8 | ||
column_limit = 120 | ||
dedent_closing_brackets = true |
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 |
---|---|---|
@@ -1,52 +1,117 @@ | ||
# This file has been auto-generated. | ||
# All changes will be lost, see Projectfile. | ||
# | ||
# Updated at 2016-11-08 14:35:29.418304 | ||
# Generated by Medikit 0.5.20 on 2018-04-18. | ||
# All changes will be overriden. | ||
# Edit Projectfile and run “make update” (or “medikit update”) to regenerate. | ||
|
||
PYTHON ?= $(shell which python) | ||
PACKAGE ?= windflow | ||
PYTHON ?= $(shell which python || echo python) | ||
PYTHON_BASENAME ?= $(shell basename $(PYTHON)) | ||
PYTHON_REQUIREMENTS_FILE ?= requirements-uvloop.txt | ||
PYTHON_DIRNAME ?= $(shell dirname $(PYTHON)) | ||
PYTHON_REQUIREMENTS_FILE ?= requirements.txt | ||
PYTHON_REQUIREMENTS_ALEMBIC_FILE ?= requirements-alembic.txt | ||
PYTHON_REQUIREMENTS_DEV_FILE ?= requirements-dev.txt | ||
PYTHON_REQUIREMENTS_UVLOOP_FILE ?= requirements-uvloop.txt | ||
QUICK ?= | ||
VIRTUAL_ENV ?= .virtualenv-$(PYTHON_BASENAME) | ||
PIP ?= $(VIRTUAL_ENV)/bin/pip | ||
PYTEST ?= $(VIRTUAL_ENV)/bin/pytest | ||
PYTEST_OPTIONS ?= --capture=no --cov=windflow --cov-report html | ||
SPHINX_OPTS ?= | ||
SPHINX_BUILD ?= $(VIRTUAL_ENV)/bin/sphinx-build | ||
SPHINX_SOURCEDIR ?= doc | ||
PIP ?= $(PYTHON) -m pip | ||
PIP_INSTALL_OPTIONS ?= | ||
VERSION ?= $(shell git describe 2>/dev/null || git rev-parse --short HEAD) | ||
PYTEST ?= $(PYTHON_DIRNAME)/pytest | ||
PYTEST_OPTIONS ?= --capture=no --cov=$(PACKAGE) --cov-report html | ||
SPHINX_BUILD ?= $(PYTHON_DIRNAME)/sphinx-build | ||
SPHINX_OPTIONS ?= | ||
SPHINX_SOURCEDIR ?= docs | ||
SPHINX_BUILDDIR ?= $(SPHINX_SOURCEDIR)/_build | ||
YAPF ?= $(PYTHON) -m yapf | ||
YAPF_OPTIONS ?= -rip | ||
MEDIKIT ?= $(PYTHON) -m medikit | ||
MEDIKIT_UPDATE_OPTIONS ?= | ||
MEDIKIT_VERSION ?= 0.5.20 | ||
|
||
.PHONY: clean doc install install-dev lint test | ||
.PHONY: $(SPHINX_SOURCEDIR) clean format help install install-alembic install-dev install-uvloop medikit quick test update update-requirements | ||
|
||
# Installs the local project dependencies. | ||
install: $(VIRTUAL_ENV) | ||
if [ -z "$(QUICK)" ]; then \ | ||
$(PIP) install -Ur $(PYTHON_REQUIREMENTS_FILE) ; \ | ||
fi | ||
install: .medikit/install ## Installs the project. | ||
.medikit/install: $(PYTHON_REQUIREMENTS_FILE) setup.py | ||
$(eval target := $(shell echo $@ | rev | cut -d/ -f1 | rev)) | ||
ifeq ($(filter quick,$(MAKECMDGOALS)),quick) | ||
@printf "Skipping \033[36m%s\033[0m because of \033[36mquick\033[0m target.\n" $(target) | ||
else ifneq ($(QUICK),) | ||
@printf "Skipping \033[36m%s\033[0m because \033[36m$$QUICK\033[0m is not empty.\n" $(target) | ||
else | ||
@printf "Applying \033[36m%s\033[0m target...\n" $(target) | ||
$(PIP) install $(PIP_INSTALL_OPTIONS) -U "pip <10" wheel | ||
$(PIP) install $(PIP_INSTALL_OPTIONS) -U -r $(PYTHON_REQUIREMENTS_FILE) | ||
@mkdir -p .medikit; touch $@ | ||
endif | ||
|
||
# Installs the local project dependencies, including development-only libraries. | ||
install-dev: $(VIRTUAL_ENV) | ||
if [ -z "$(QUICK)" ]; then \ | ||
$(PIP) install -Ur $(PYTHON_REQUIREMENTS_DEV_FILE) ; \ | ||
fi | ||
clean: ## Cleans up the working copy. | ||
rm -rf build dist *.egg-info .medikit/install .medikit/install-dev .medikit/install-alembic .medikit/install-uvloop | ||
find . -name __pycache__ -type d | xargs rm -rf | ||
|
||
# Cleans up the local mess. | ||
clean: | ||
rm -rf build | ||
rm -rf dist | ||
install-dev: .medikit/install-dev ## Installs the project (with dev dependencies). | ||
.medikit/install-dev: $(PYTHON_REQUIREMENTS_DEV_FILE) $(PYTHON_REQUIREMENTS_FILE) setup.py | ||
$(eval target := $(shell echo $@ | rev | cut -d/ -f1 | rev)) | ||
ifeq ($(filter quick,$(MAKECMDGOALS)),quick) | ||
@printf "Skipping \033[36m%s\033[0m because of \033[36mquick\033[0m target.\n" $(target) | ||
else ifneq ($(QUICK),) | ||
@printf "Skipping \033[36m%s\033[0m because \033[36m$$QUICK\033[0m is not empty.\n" $(target) | ||
else | ||
@printf "Applying \033[36m%s\033[0m target...\n" $(target) | ||
$(PIP) install $(PIP_INSTALL_OPTIONS) -U "pip <10" wheel | ||
$(PIP) install $(PIP_INSTALL_OPTIONS) -U -r $(PYTHON_REQUIREMENTS_DEV_FILE) | ||
@mkdir -p .medikit; touch $@ | ||
endif | ||
|
||
# Setup the local virtualenv, or use the one provided by the current environment. | ||
$(VIRTUAL_ENV): | ||
virtualenv -p $(PYTHON) $(VIRTUAL_ENV) | ||
$(PIP) install -U pip\>=9,\<10 wheel\>=0.29,\<1.0 | ||
ln -fs $(VIRTUAL_ENV)/bin/activate activate-$(PYTHON_BASENAME) | ||
quick: # | ||
@printf "" | ||
|
||
lint: install-dev | ||
$(VIRTUAL_ENV)/bin/pylint --py3k windflow -f html > pylint.html | ||
install-alembic: .medikit/install-alembic ## Installs the project (with alembic dependencies). | ||
.medikit/install-alembic: $(PYTHON_REQUIREMENTS_ALEMBIC_FILE) $(PYTHON_REQUIREMENTS_FILE) setup.py | ||
$(eval target := $(shell echo $@ | rev | cut -d/ -f1 | rev)) | ||
ifeq ($(filter quick,$(MAKECMDGOALS)),quick) | ||
@printf "Skipping \033[36m%s\033[0m because of \033[36mquick\033[0m target.\n" $(target) | ||
else ifneq ($(QUICK),) | ||
@printf "Skipping \033[36m%s\033[0m because \033[36m$$QUICK\033[0m is not empty.\n" $(target) | ||
else | ||
@printf "Applying \033[36m%s\033[0m target...\n" $(target) | ||
$(PIP) install $(PIP_INSTALL_OPTIONS) -U "pip <10" wheel | ||
$(PIP) install $(PIP_INSTALL_OPTIONS) -U -r $(PYTHON_REQUIREMENTS_ALEMBIC_FILE) | ||
@mkdir -p .medikit; touch $@ | ||
endif | ||
|
||
test: install-dev | ||
install-uvloop: .medikit/install-uvloop ## Installs the project (with uvloop dependencies). | ||
.medikit/install-uvloop: $(PYTHON_REQUIREMENTS_FILE) $(PYTHON_REQUIREMENTS_UVLOOP_FILE) setup.py | ||
$(eval target := $(shell echo $@ | rev | cut -d/ -f1 | rev)) | ||
ifeq ($(filter quick,$(MAKECMDGOALS)),quick) | ||
@printf "Skipping \033[36m%s\033[0m because of \033[36mquick\033[0m target.\n" $(target) | ||
else ifneq ($(QUICK),) | ||
@printf "Skipping \033[36m%s\033[0m because \033[36m$$QUICK\033[0m is not empty.\n" $(target) | ||
else | ||
@printf "Applying \033[36m%s\033[0m target...\n" $(target) | ||
$(PIP) install $(PIP_INSTALL_OPTIONS) -U "pip <10" wheel | ||
$(PIP) install $(PIP_INSTALL_OPTIONS) -U -r $(PYTHON_REQUIREMENTS_UVLOOP_FILE) | ||
@mkdir -p .medikit; touch $@ | ||
endif | ||
|
||
test: install-dev ## Runs the test suite. | ||
$(PYTEST) $(PYTEST_OPTIONS) tests | ||
|
||
doc: install-dev | ||
$(SPHINX_BUILD) -b html -D latex_paper_size=a4 $(SPHINX_OPTS) $(SPHINX_SOURCEDIR) $(SPHINX_BUILDDIR)/html | ||
$(SPHINX_SOURCEDIR): install-dev ## | ||
$(SPHINX_BUILD) -b html -D latex_paper_size=a4 $(SPHINX_OPTIONS) $(SPHINX_SOURCEDIR) $(SPHINX_BUILDDIR)/html | ||
|
||
format: install-dev ## Reformats the whole python codebase using yapf. | ||
$(YAPF) $(YAPF_OPTIONS) . | ||
$(YAPF) $(YAPF_OPTIONS) Projectfile | ||
|
||
medikit: # Checks installed medikit version and updates it if it is outdated. | ||
@$(PYTHON) -c 'import medikit, pip, sys; from packaging.version import Version; sys.exit(0 if (Version(medikit.__version__) >= Version("$(MEDIKIT_VERSION)")) and (Version(pip.__version__) < Version("10")) else 1)' || $(PYTHON) -m pip install -U "pip <10" "medikit>=$(MEDIKIT_VERSION)" | ||
|
||
update: medikit ## Update project artifacts using medikit. | ||
$(MEDIKIT) update $(MEDIKIT_UPDATE_OPTIONS) | ||
|
||
update-requirements: ## Update project artifacts using medikit, including requirements files. | ||
MEDIKIT_UPDATE_OPTIONS="--override-requirements" $(MAKE) update | ||
|
||
help: ## Shows available commands. | ||
@echo "Available commands:" | ||
@echo | ||
@grep -E '^[a-zA-Z_-]+:.*?##[\s]?.*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?##"}; {printf " make \033[36m%-30s\033[0m %s\n", $$1, $$2}' | ||
@echo |
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 |
---|---|---|
@@ -1,56 +1,38 @@ | ||
# windflow (see github.com/python-edgy/project) | ||
|
||
name = 'windflow' | ||
description = 'Windflow is a rapid web application development toolkit using tornado, asyncio and sqlalchemy.' | ||
license = 'Apache 2.0' | ||
|
||
url = 'https://github.com/hartym/windflow' | ||
download_url = 'https://github.com/hartym/windflow/archive/{version}.tar.gz' | ||
|
||
author = 'Romain Dorgueil' | ||
author_email = 'romain@dorgueil.net' | ||
|
||
enable_features = { | ||
'git', | ||
'make', | ||
'pylint', | ||
'pytest', | ||
'python', | ||
'sphinx', | ||
} | ||
|
||
install_requires = [ | ||
'Jinja2 >=2.8,<2.9', | ||
'SQLAlchemy >=1.1,<1.2', | ||
'Werkzeug >=0.11,<0.12', | ||
'honcho >=0.7,<0.8', | ||
'psycopg2 >=2.6,<2.7', | ||
'python-dotenv >=0.6,<0.7', | ||
'simplejson >=3.8,<3.11', | ||
'tornado >=4,<5', | ||
] | ||
|
||
extras_require = { | ||
'dev': [ | ||
'coverage >=4.2,<4.3', | ||
'honcho >=0.7,<0.8', | ||
'mock >=2.0,<2.1', | ||
'nose >=1.3,<1.4', | ||
'pylint >=1.6,<1.7', | ||
'pytest >=3.0,<3.1', | ||
'pytest-cov >=2.4,<2.5', | ||
'sphinx >=1.4,<1.5', | ||
'sphinx_rtd_theme', | ||
# windflow's medikit projectfile | ||
|
||
from medikit import listen, require | ||
|
||
PACKAGE = 'windflow' | ||
|
||
make = require('make') | ||
pytest = require('pytest') | ||
python = require('python') | ||
sphinx = require('sphinx') | ||
yapf = require('yapf') | ||
|
||
python.setup( | ||
name='windflow', | ||
description='Windflow helps to write web apps (asyncio, tornado, sqlalchemy). Experimental, use at own risks.', | ||
license='Apache 2.0', | ||
url='https://github.com/hartym/windflow', | ||
download_url='https://github.com/hartym/windflow/archive/{version}.tar.gz', | ||
author='Romain Dorgueil', | ||
author_email='romain@dorgueil.net', | ||
) | ||
python.add_requirements( | ||
'Jinja2 ~=2.9', | ||
'SQLAlchemy >=1.2,<1.3', | ||
'Werkzeug ~=0.14.1', | ||
'honcho ~=1.0.1', | ||
'python-dotenv ~=0.8.2', | ||
'simplejson ~=3.13.2', | ||
'tornado ~=5.0', | ||
uvloop=[ | ||
'uvloop ~=0.9.1', | ||
], | ||
'uvloop': [ | ||
'uvloop >=0.6,<0.7', | ||
alembic=[ | ||
'alembic ~=0.9.9', | ||
], | ||
'alembic': [ | ||
'alembic >=0.8,<0.9', | ||
], | ||
} | ||
|
||
) | ||
|
||
@listen('edgy.project.feature.make.on_generate') | ||
def on_make_generate(e): | ||
e.makefile['PYTHON_REQUIREMENTS_FILE'] = 'requirements-uvloop.txt' | ||
# vim: ft=python: |
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 |
---|---|---|
@@ -1 +1,9 @@ | ||
-e .[alembic] | ||
-r requirements.txt | ||
alembic==0.9.9 | ||
mako==1.0.7 | ||
markupsafe==1.0 | ||
python-dateutil==2.7.2 | ||
python-editor==1.0.3 | ||
six==1.11.0 | ||
sqlalchemy==1.2.6 |
Oops, something went wrong.