Skip to content

Commit

Permalink
Adding doit
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanfreckleton committed Nov 24, 2015
1 parent 4755c42 commit b4a007b
Show file tree
Hide file tree
Showing 4 changed files with 46 additions and 3 deletions.
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,4 @@ install: "pip install -r requirements.txt"
script:
- py.test
- pep8 *.py
- doit
2 changes: 1 addition & 1 deletion README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

- ~~Hello World~~
- ~~[pep8](https://pypi.python.org/pypi/pep8)~~
- [doit](http:https://pydoit.org/)
- ~~[doit](http:https://pydoit.org/)~~
- [pylint](https://pypi.python.org/pypi/pylint/1.4.4)
- [py.test](http:https://pytest.org/latest/)
- Deployment?
31 changes: 31 additions & 0 deletions dodo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import os
import glob

from pyflakes.scripts.pyflakes import checkPath


DOIT_CONFIG = {
# output from actions should be sent to the terminal/console
'verbosity': 2,
# does not stop execution on first task failure
'continue': True,
# doit itself should not produce any output (use only actions output)
'reporter': 'zero',
# use multi-processing / parallel execution
'num_process': 2,
}


def check_path(filename):
"""execute pyflakes checker"""
return not bool(checkPath(filename))

def task_pyflakes():
"""generate task for each file to be checked"""
for filename in glob.glob('*.py'):
path = os.path.abspath(filename)
yield {
'name': path, # name required to identify tasks
'file_dep': [path], # file dependency
'actions': [(check_path, (filename,)) ],
}
15 changes: 13 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
pytest>=2.8.3
pep8>=1.6.2
astroid==1.3.8
cloudpickle==0.1.1
configparser==3.3.0.post2
doit==0.29.0
logilab-common==1.1.0
pep8==1.6.2
py==1.4.30
pyflakes==1.0.0
pyinotify==0.9.6
pylint==1.4.4
pytest==2.8.3
six==1.10.0
wheel==0.24.0

0 comments on commit b4a007b

Please sign in to comment.