Thank you for your interest in making Sellotape better.
We use Vagrant to set up our virutal environment. To properly run the project, make sure that you have VirtualBox and Vagrant installed on your machine. Then:
- Clone this repository
- Open a shell prompt, and switch to the location of the repository
- Run
vagrant upwhich will create the virtual machine according to the Vagrantfile. Once it's finished, you're all set! - Open your browser and navigate to
0.0.0.0:8000. Voila! 😏
A superuser is automatically created in the provisioning scripts that are run by Vagrant during the bootstrao process. You can change the default username and password in there before running vagrant up.
The defaults are currently admin, 123456.
For you convenience, we've set up a few aliases to ease up Start/Stop/Restart actions of the project.
After SSHing to the virtual machine (using vagrant ssh) you can run the following commands:
start_sellotape,stop_sellotape,restart_sellotapeto start/stop/restart sellotape. Note that upon project creation,start_sellotapeis run automatically.
We don't expect you to fix bugs or develop new features on the virutal machine 😝 All the files in the repository are copied to a 2-way-synced (shared) folder on the virtual machine under the /vagrant/ folder. Develop locally on your host machine while the server will restart itself at any file change.
Take a look at the architecture document to understand the project's technological stack and design. We follow the PEP 8 style guide and use Flake8 as our enforcement linter. So before submitting any Pull Requests, make sure you pass the linter by running flake8 . --count --max-line-length=127.
We encourage you to develop in TDD. Make sure that you add tests to any new feature you want to add. If you're fixing a bug, first make sure that there is a test failing for that use case (if it does not exist then add it). Then work on your fix until that test passes. The tests should reside in a tests folder under the plugged Django application your working on. So, if your're adding a test to the main_app, you would test it by executing pipenv run python3 sellotape_dj/manage.py test main_app.