Skip to content

Latest commit

 

History

History
112 lines (73 loc) · 3.27 KB

CONTRIBUTING.md

File metadata and controls

112 lines (73 loc) · 3.27 KB

Contributing to Our Project 👩‍💻👨‍💻

Welcome to our project! We're thrilled that you're interested in contributing.
Please take a moment to review this document to understand how you can contribute effectively.

Table of Content

Ways to Contribute 🚀

There are several ways you can contribute to our project:

  • Reporting Bugs: If you find a bug, please open an issue and include as much detail as possible.
  • Suggesting Enhancements: Have an idea to improve the project? Open an issue and share your suggestions!
  • Submitting Pull Requests: You can contribute code changes by submitting pull requests.

Code of Conduct 🤝

Please review our Code of Conduct before contributing.

Getting Started 🏁

1. Installing pre-commit hooks

We use pre-commit hooks for code quality.

1.1. Download dependencies using Python:

pip install -r backend/requirements-dev.txt

1.2. Install pre-commit

pre-commit install

1.3. Verify install

pre-commit run --all-files

1.4. Skip pre-commit

If needed, use --no-verify option to commit without running the pre-commit hooks.

git commit -m "emergency! skipping hooks" --no-verify

2. Running Django

Install the project first as lined out in the README.

Create and run database migrations with

python backend/manage.py makemigrations
python backend/manage.py migrate

Add the site URL in the database

python manage.py shell < scripts/update_site_domain.py

Start the development server with

python backend/manage.py runserver

2.1 OpenAPI Spec

We use drf-spectacular to autogenerate our OpenAPI spec.

Access the OpenAPI spec in three ways while running the django server:

  • Download the spec from /api/schema/
  • Use Swagger UI at /api/schema/swagger-ui/
  • Use Redoc UI at /api/schema/redoc-ui/

3. Conventions

3.1 Database table and column names

We use camelCase for our database tables and column names defined in models.py.

4. Nuances

Current issues that affect development are listed here for transparency.

  • DELETE -> /auth/users/me not properly documented
    • Send {"current_password":"<pass>"} in the request body. Since OpenAPI doesn't support request bodies for DELETE methods, the swagger/redoc pages won't pick up on this.