Getting started
To configure a python project to use alfred, here is the procedure:
alfred init
Write a first command to run the linter
$ alfred --new pylint src/myapp
import alfred
@alfred.command('lint', help="run linter on codebase")
def pylint():
alfred.run('pylint src/myapp')
Write a second command to run the tests
$ alfred --new pytest tests/unit
import alfred
@alfred.command('lint', help="run linter on codebase")
def pylint():
alfred.run('pylint src/myapp')
@alfred.command('tests', help="run unit tests on codebase")
def tests():
alfred.run('pytest tests/unit')
View documentation of commands
$ alfred
Usage: alfred [OPTIONS] COMMAND [ARGS]...
alfred is an extensible automation tool designed to streamline repository
operations.
Options:
-d, --debug display debug information like command runned and working
directory
-v, --version display the version of alfred
--new open a wizard to generate a new command
-c, --check check the command integrity
--completion display instructions to enable completion for your shell
--help Show this message and exit.
Commands:
lint run linter on codebase
tests run unit tests on codebase
Click Next when you are ready to customize command !