A Django & Project Template to integrate Django, Buildout, Pylint, JSHint, Sphinx etc. Its a work in progress and expected to evolve further. The motivation to do this came from using Maven for Java projects.
git clone
this repository.- Run
python bootstrap.py
- Run
bin/buildout
- Run
bin/fab -l
for a list of common supported commands.
coverage Enables Coverage. Used for test targets
docs_gen Generates Documents. Picks sources from docs folder.
lint_js Reports Pylint Errors & Warnings for Python files
lint_py Reports Pylint Errors & Warnings for Python files
runserver Runs Django Server on port 8000
test_all Runs All Tests in src and tests folders
test_integration Runs All Tests in tests/integration package
test_unit Runs All Tests in tests/unit package
uml_gen Generates Package Dependency Diagrams. Assumes Graphviz.
Note: Whenever running a command always prefix it with bin or else your system wide installation would be used.
Note: For running tests along with coverage, use bin/fab coverage test_unit
etc.
Keep the following setting in default buildout config at ~/.buildout/default.cfg
.
Its a common buildout tip to keep download times low and builds faster.
[buildout]
eggs-directory = <HOME-DIR>/.buildout/eggs
download-cache = <HOME-DIR>/.buildout/dlcache
buildout.cfg
is the config to install eggs and generate scripts in bin folder.
fabfile.py
contains fabric tasks. You can modify it to add your own.
etc/lint.rc
contains pylint configuration.
etc/jshint.json
contains jshint settings.
tests
contains tests organized in unit, integration and ui packages.
Each of the above can be modified and customized as much as you want. If you implement something generally useful, please contribute it back.
Contributions and ideas are welcome. These are some ideas we would like to implement.
test_js
target to run javascript tests using a node js framework like mocha etc.django-pipeline
for static assets management.build
for jenkins build and packageincr
for linting or testing incremental changes e.g. modified files only.- more ...