Giter VIP home page Giter VIP logo

athena-backend's Introduction

image

image

Build status

BRANCH BUILD STATUS
master backend_master_build
dev backend_dev_build

Quickstart

You need docker and docker-compose on your machine to start dev server without installing dev dependencies. As you installed this tools and checked work, run following commands to start server on localhost:8000:

mv .env.example .env
make compose-up

Requests will be available in postman_tests folder as postman collection. You can import file and test requests and see responses from them.

Developers guide

You need poetry installed on your machine to bootstrap environment. Rename .env.example to .env and set DEBUG to True, then change other values if need. If you have your own postgres instance running on your machine, then get ip and credentials and fill necessary variables in .env. Or if you have docker and docker-compose you can run following commands to run postgres container and fill .env data for work:

mv .env.example .env
make startdb
make dbip

Once you get ip of container with postgres write it into .env file. You can start app manually with poetry if you have not entered into virtualenv or as usual if you've activated it.

First way is creating your own virtualenv and running app using virtualenv module:

python -m virtualenv venv
activate venv/bin/activate
pip install poetry
poetry install

Using this way you must always activate virtualenv to work with application.

Second way requires poetry installed local on your machine to install dependencies but you'll get possibility to use simple commands from Makefile for work with application:

make bootstrap-environment

Now you can use commands from Makefile commands section to work with app.

Makefile commands

Makefile contains all necessary commands to start application:

bootstrap-environment  - create virtualenv and install dependencies
makemigrations         - create migrations using project django
reformat               - remove unused import and format code with black
migrate                - run db migrations using project django
tests                  - run tests with pytest
startapp               - run django development server
startdb                - start postgres in docker
dbip                   - get postgres ip for local development
compose-up             - start all services from compose config
compose-up-rebuild     - rebuild image for `athena` and start compose
compose-logs           - show compose logs
compose-stop           - stop all running compose services
compose-athena-connect - connect to athena container
docker-dev             - build dev image for athena
docker-master          - build image for athena with default tag

athena-backend's People

Contributors

nkhitrov avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.