OperationCode / back-end

OperationCode's main back-end server
https://operationcode.org
MIT License
13 stars 30 forks source link
django django-rest-auth django-rest-framework hacktoberfest hacktoberfest2017 hacktoberfest2018 hacktoberfest2019 hacktoberfest2020 operationcode python

Operation Code Logo

License: MIT Twitter Follow Code-style: black

CircleCI Maintainability Test Coverage Dependabot Status

Welcome!

This is the back-end application for OperationCode. We highly recommend joining our organization to receive an invite to our Slack team. From there, you'll want to join the #oc-python-projects and #oc-projects channels. You can get help from multiple professional developers, including people who have worked on the application since day 1!

Before contributing, please review our Contributing Guide

Maintainers

For information about the maintainers of the project, check out MAINTAINERS.md.

Quick Start

Recommended versions of tools used within the repo:

# Install dependencies (ensure poetry is already installed)
# if you are encountering an error with psycopg2 during poetry installation, ensure postgreqsql is installed (macOS: brew install postgresql)
poetry install

# Create database
# By default this creates a local sqlite database and adds tables for each of the defined models
# see example.env for database configurations
poetry run python src/manage.py migrate

# Create a superuser to add to the new database
poetry run python src/manage.py createsuperuser 

# Run local development
poetry run python src/manage.py runserver

# Run testing suite
poetry run pytest

# Run formatting and linting
poetry run black .
# the next line shouldn't output anything to the terminal if it passes
poetry run flake8
poetry run isort -rc .

Running Bandit

Bandit is a tool designed to find common security issues in Python code.

From within the back-end/ directory you can run the following Bandit command: