-
Install or make sure docker and docker-compose are installed on your computer
docker -v docker-compose -v
-
Clone this repo and change to the project root directory
git clone https://github.com/hackforla/peopledepot.git cd peopledepot
-
[Temporary] The latest code is in https://github.com/fyliu/peopledepot.git and we need to get that.
-
Create a git remote
fang
to that repogit remote add fang https://github.com/fyliu/peopledepot.git
-
Fetch data from the remote
git fetch fang
-
Checkout the recurring_event-model branch to see the current progress. The main repo should be updated with the latest code soon.
git checkout fang/recurring_event-model
-
-
Create .env.dev from .env.dev-sample
cp .env.dev-sample .env.dev
-
Build and run via the script
./scripts/buildrun.sh
-
Create a super user for logging into the web admin interface
docker-compose exec web python manage.py createsuperuser
-
Browse to the web admin interface at
http://localhost:8000/admin/
-
Run all tests
./scripts/test.sh
We're using the popular flake8 and black for linting and code formatting. We're also using isort to organize import statements.
To run them, use the lint.sh
convenience script or look inside the script to see how to run them individually.
-
Run
lint.sh
./scripts/lint.sh
We will eventually integrate this into pre-commit hooks, but for now, run this command before each git commit
-
Run
precommit-check.sh
./scripts/precommit-check.sh
- buildrun.sh - clean, build, and run containers in background mode
- lint.sh - lint and and auto-format code
- test.sh - run tests and generate test coverage report
- logs.sh - view container logs
- migrate.sh - run database migrations inside container
- precommit-check.sh - sanity checks before committing (calls other scripts, but doesn't stop progress on error like it should)
- createsuperuser.sh - creates a default superuser (assumes apt env. requires
expect
util to be installed)
- Find issue in Prioritized Backlog here
- Assign issue to yourself and move it to In progress
- Follow the steps in the issue description to complete the issue
- Create a pull request and tag it with the issue number (i.e. closes #15)
To create a new issue, please use the blank issue template (available when you click New Issue). If you want to create an issue for other projects to use, please create the issue in your own repository and send a slack message to one of your hack night hosts with the link.
We use the fork, branch, and pull request model
To contribute code changes
- Choose an issue to work on, say issue #15
- Create a fork and commit your work inside the fork
- Fork the repo from hackforla/peopledepot
- Create a branch in your fork to work on the issue. It's preferred to have the working issue number in the branch name.
- Remember to run the
precommit-checks.sh
script before each commit until it can be integrated
- Create a PR from your fork/branch to hackforla/peopledepot/main when you're done with your changes
- Reference the issue that you're working on in the PR description. e.g. "Closes #15"
- Provide a description of the relevant changes.
- Move the issue to the Review column in the project board
- Explain your process.