This project will create a dynamic, educational portal that helps clarify the multifaceted and changing rental environment in PDX, with a focus on affordable rentals. The team will investigate what parts of town are currently affordable to a diverse spectrum of residents, and explore trends in how the Portland housing and rental market has changed over time, with a special emphasis on recent changes in the 7-year census gap. The project will approach common perceptions of the state of affordable rent in Portland with a range of digital, analytical, and creative strategies, with the overall goal of broadening insight on the experience of renting in Portland. The most current version of Team Housing's Vision Document / Elevator Pitch is maintained by Gabriele Hayden.
If you are running a recent edition of MacOS, Windows 10 Professional, or Linux, you need Docker and Git:
If you are using an older version of Windows, you'll have need to use either Docker Toolbox, which is temperamental and not covered, or run Docker in a Vagrant box, provided here:
From GitHub, fork the Repo at https://github.com/hackoregon/housing-backend.
Clone the GitHub repository using SSH or HTTPS:
# SSH:
$ git clone git@github.com:YOUR-USERNAME/housing-backend.git
# HTTPS:
$ git clone https://github.com/YOUR-USERNAME/housing-backend.git
Add upstream remote repository:
# SSH:
$ git remote add upstream git@github.com:hackoregon/housing-backend.git
# HTTPS:
$ git remote add upstream https://github.com/hackoregon/housing-backend.git
Make a feature branch:
[optional]
git branch <branchname>
git checkout <branchname>
# or the shorthand:
git checkout -b <branchname>
Add and commit your changes:
git add .
git commit -m "a meaningful commit message in the imperative present tense"
Merge back into master:
[optional - if working from a feature branch]
git checkout master
git rebase <branchname>
Download changes other's may have made and merge with your changes:
git fetch upstream
git rebase upstream/master
Push changes back to your own fork:
git push -f origin master
List changed / uncommitted files:
$ git status
List the current branches of the repository:
$ git branch -a
- Docker or Docker toolkit
- (Optional) Travis-CI - Contact the DevOps Team
- (Optional) Cluster deployment keys - Contact the DevOps Team
- (Optional) ECR Password - Contact the DevOps Team
- (Optional) ECS Service Name - Contact the DevOps Team
- Create
env.sh
in the project with the following contents:
#! /bin/bash
# Setup project specifics - Make sure env.sh is in the .gitignore and .dockerignore
export DOCKER_IMAGE=housing-service
export PROJ_SETTINGS_DIR=housingAPI
export DEPLOY_TARGET=dev
echo "##############################"
echo Local Project Environment
echo "##############################"
echo DOCKER_IMAGE $DOCKER_IMAGE
echo PROJ_SETTINGS_DIR $PROJ_SETTINGS_DIR
echo DEPLOY_TARGET $DEPLOY_TARGET
- Run
chmod +x backend/bin/env.sh
to make the script file executable
- Run
source env.sh
to setup your environment
- Run
backend/bin/build-proj -l
to build your container locally - Run
backend/bin/test-proj -l
to test your container locally
- Make sure you've got a local copy of your project's
backend/backend/project_config.py
- Contact the DevOps Team - Run
backend/bin/start-proj -l
to view your service's Swaggerized API
Run Django and PostgreSQL:
$ cd housing-backend/backend
$ docker-compose up
You can also run it in the background:
$ docker-compose up -d
It looks like it starts faster this way, but give it a bit to import data into the database in the background before trying to view it in a browser.
$ docker-compose down
# or
$ docker-compose down --rmi all # remove images to save disk space
$ docker-compose down # (if not already shut down)
$ docker-compose up --build
Run manage.py command directly:
docker-compose exec web ./manage.py <command>
Run the Python shell:
docker-compose exec web ./manage.py shell
Run the PostgreSQL shell:
docker-compose exec --user postgres db psql
Have at it!
View the API GUI at localhost:8000.
Feel free to explore the API docs.
Explain how to run the automated tests for this system
Explain what these tests test and why
Give an example
Explain what these tests test and why
Give an example
See the DevOps page of the Wiki for notes about how to deploy this on a live system
See the Wiki for notes about the front-end, datbases, and web framework used for the project
All Hack Oregon projects are open source, built entirely by volunteers from our local community. Visit Hack Oregon - Build With Us to learn more!
We use SemVer for versioning. For the versions available, see the tags on this repository.
- Adrienne Tilley - Design Lead
- Bimal Rajbhandary - Domain Expert / Strategic Development
- David Daniel - Tech Lead
- Derek Demaria - Front-end Lead
- Gabriele Hayden - Facilitator / Strategic Development
- Victoria James - Domain Expert / Strategic Development
- Warren Friedland - Tech Lead
- Kartik Nagappa - Design Lead
- Riley Rustad - Tech Lead
- Esme Miller - Research Lead
See also the list of contributors who participated in this project.