comics development is coordinated through GitHub.

How to contribute

The easiest way to contribute to comics is to register as a user at GitHub, fork the comics project, and start hacking. To get your changes back into comics’ mainline, send a pull request to jodal at GitHub. Patches accompanied by tests and documentation gives +5 karma and kudos. When hacking on comics, please follow the code style and commit guidelines below.

All contributions must be granted under the same license as comics itself.

Code style

  • Follow PEP 8 unless otherwise noted. can be used to check your code against the guidelines, however remember that matching the style of the surrounding code is also important.

  • Use four spaces for indentation, never tabs.

  • Use CamelCase with initial caps for class names:

  • Use underscore to split variable, function and method names for readability. Don’t use CamelCase.

  • Use the fact that empty strings, lists and tuples are False and don’t compare boolean values using == and !=.

  • Follow whitespace rules as described in PEP 8. Good examples:

    spam(ham[1], {eggs: 2})
    dict['key'] = list[index]
  • Limit lines to 80 characters and avoid trailing whitespace. However note that wrapped lines should be one indentation level in from level above, except for if, for, with, and while lines which should have two levels of indentation:

    if (foo and bar ...
            baz and foobar):
        a = 1
    from foobar import (foo, bar, ...
  • For consistency, prefer ' over " for strings, unless the string contains '.

  • Take a look at PEP 20 for a nice peek into a general mindset useful for Python coding.

Commit guidelines

  • Keep commits small and on topic, e.g. add one crawler per commit.
  • Merge feature branches with --no-ff to keep track of the merge.
  • When expanding API to accommodate new crawler features, commit API changes, then new crawlers in a separate commit.
  • When changing existing API, commit API change and crawler changes in same commit. If this commit looks too big you should be working in a feature branch not a single commit.
  • Same policy applies for non-crawler changes.

Data model

comics’ data model is very simple. The comics.core app consists of three models; Comic, Release, and Image. The comics.accounts app adds a UserProfile which add comic specific fields to Django’s user model, including a mapping from the user to her preferred comics.

Deprecated since version 2.0: The comics.sets app has a model named Set. This model is deprecated and replaced by UserProfile.

Changes to the data model are managed using Django’s built-in database migrations. If you need to change the models, please provide the needed migrations.


The above data model diagram was generated using the Django app django_extensions and the following command:

python graph_models \
    --output=docs/_static/data_model.png --group-models core accounts

Running tests

comics got some tests, but far from full test coverage. If you write new or improved tests for comics’ functionality it will be greatly appreciated.

To run unit tests:

python test