Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add requirements.txt, invoke commands, and update README
- Loading branch information
Showing
5 changed files
with
82 additions
and
10 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
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,20 +1,22 @@ | ||
.PHONY: install\ | ||
.PHONY: installdeps\ | ||
build\ | ||
test\ | ||
lint\ | ||
coverage\ | ||
clean | ||
|
||
install: | ||
# Let developers manage their python versions | ||
# and Django versions independently | ||
pip install coveralls flake8 | ||
installdeps: | ||
pip install -U -r requirements.txt | ||
|
||
build: | ||
invoke build $(ARGS) | ||
|
||
test: | ||
python setup.py test | ||
invoke test | ||
|
||
lint: | ||
flake8 | ||
invoke lint | ||
|
||
clean: | ||
find . -type f -name '*.py[cod]' -delete | ||
invoke clean $(ARGS) | ||
|
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,5 @@ | ||
flake8 | ||
coveralls | ||
Sphinx | ||
Django>1.7,<1.9 | ||
invoke==0.12.2 |
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,32 @@ | ||
from invoke import run | ||
from invoke import task | ||
|
||
|
||
@task | ||
def clean(docs=False, bytecode=True, extra=''): | ||
patterns = ['build'] | ||
if docs: | ||
patterns.append('docs/_build') | ||
if bytecode: | ||
patterns.append('**/*.pyc') | ||
if extra: | ||
patterns.append(extra) | ||
for pattern in patterns: | ||
run("rm -rf %s" % pattern) | ||
|
||
|
||
@task | ||
def build(docs=False): | ||
run("python setup.py build") | ||
if docs: | ||
run("sphinx-build docs docs/_build") | ||
|
||
|
||
@task | ||
def test(): | ||
run("python setup.py test") | ||
|
||
|
||
@task | ||
def lint(): | ||
run("flake8") |