Skip to content

victoraguilarc/places-api

Repository files navigation

Places API

API to enrich places with weather forecasts.

styleguide Coverage

Stack

Features

  • Registration
  • Autthentication (JWT Token)
  • Accounts (Users)
  • Places

Getting started

Development

You need to have installed git, docker, ssh and a decent terminal.

  1. make build build the images for development.
  2. make fixtures load initial data (optional).
  3. Copy the .env.local to .env and fill the required variables.
  4. make up start development server. 5Open localhost:8000 in your browser.

Useful commands

  • make debug to enable debug mode for development.
  • make migrations run django makemigrations command
  • make migrate run django migrate command
  • make superuser make a superuserfor develoment

Code Quality

  • make test run pytest over all test files in the project
  • make test ARG=path_to_file run pytest of a single test file.
  • make coverage run pytest and generate the coverage report.
  • make isort Fix posible import issues
  • make lint run flake8 and generate linting report.
  • make report_coverage serves the coverage report as html at localhost:3000
  • make report_lint serves the lint report as html at localhost:3001
  • make code_review run formatting linting and tests in just one command.

Translation

  • make locales harverst translate string and generate .po files.
  • make compile_locales compile translation strings.

Code quality hooks

To configure pre-commit hooks, we need to do this just one time.

  • brew install pre-commit installs pre-commit
  • pre-commit install install hooks in the current repo.
  • pre-commit autoupdate enables the pre-commit autoupdate.

Tools

Deployment

This project was deployed in Digital Ocean using docker-compose and a nginx reverse proxy in a Ubuntu 22.04 droplet in the domain https://places.codemia.dev.

Releases

No releases published

Packages

No packages published