This is the skeleton of a Twitter clone project.
The project will require Python 3. Please install Python 3.5 and make sure the appropriate version of pip is available from the command line.
Alse Sqlite 3 will be needed.
Some of these instructions have not been tested on Windows. You may have a better experience if you use Git Bash instead of CMD.
- Log into GitHub
- Click the fork button here
- Execute
git clone https://github.com/ewilson/chirpr.git
in the terminal, in the directory you want the project to be.
Execute the following commands in PowerShell or Bash
cd chirpr
pyvenv venv
source venv/bin/activate
pip3 install -r requirements.txt
$ python chirpr.py
Now navigate to localhost:5000 to verify that it is running locally.
To set up the test database, run
$ ./init_db.py
To set up an empty database, without example data, run
$ ./init_db.py new
When you need to make changes to the DB structure -- suppose you add a column to a table --
you will need to add a migration script to data/migrations
. This scripts should follow a naming
convention like follows:
01_Example_change.sql
02_Another_change.sql
This series of scripts should allow another user to run data/db_migrate.py
in order to transform
the test database into the structure that your changes require.
It will be common for changes to the application to require changes to the database structure.
Here is an outline of our workflow.
-
We discuss the card in Trello that you will implement next. We will try at this point to resolve confusions about the requirements. This card will then be moved to the "Doing" column in Trello.
-
You implement and test the feature. Asking questions during this step may be useful.
-
When you think the feature is done, move the Trello card to the "Review" column, and open a Pull Request. A Pull Request is a GitHub feature that will allow for me to see and comment on your changes.
-
I will give comments on the things that need to be improved, both in code style and in defects discovered. You will need to fix these issues and push them to your pull request branch.
-
When I am satisfied that the feature is complete, I will merge your code, and the card is moved to done. We now return to step 1.