Feel free to create a new Pull request if you want to propose a new feature or fix a bug. If you need development support or want to discuss with other developers, join us in the channel #sorl-thumnbnail at freenode.net
For occasional developers we recommend using Travis CI to run testsuit, for those who want to run tests locally, read on.
Since sorl-thumbnail supports a variety of image backends, python and Django versions, we provide an easy way to test locally across all of them. We use Vagrant for simple interaction with virtual machines and tox for managing python virtual environments.
Some dependencies like pgmagick takes a lot of time to compiling. To speed up your vagrant box you can edit Vagrant file with mem and cpu or simply install vagrant-faster. The resulting .tox folder containing all virtualenvs requires ~
- Install Vagrant
cdin your source directory
vagrant upto prepare VM. It will download Ubuntu image and install all necessary dependencies.
vagrant sshto log in the VM
- Launch all tests via
tox(will take some time to build envs first time)
To run only tests against only one configuration use
tox -e py34-django16-pil
Py34 stands for python version, 1.6 is Django version and the latter is image library.
For full list of tox environments, see
You can get away without using Vagrant if you install all packages locally yourself, however, this is not recommended.
Sending pull requests
Fork the repo:
Create a branch for your specific changes:
$ git checkout master $ git pull $ git checkout -b feature/foobar
To simplify things, please, make one branch per issue (pull request). It's also important to make sure your branch is up-to-date with upstream master, so that maintainers can merge changes easily.
Commit changes. Please update docs, if relevant.
Don't forget to run tests to check than nothing breaks.
Ideally, write your own tests for new feature/bug fix.
Submit a pull request.