Code Monkey home page Code Monkey logo

aquavitae-app's Introduction



Aquavitae App

Software to track patients who are on nutritional diets and allow the patient and nutritionist to see the progress.

Python FastAPI Postgres

How to execute

To build the project run the following commands in terminal, step by step:

  1. Creating a virtual environment with pipenv

    $ cd /path/to/project
    $ pip install pipenv
    $ pipenv install
    
    1. Make sure pip is using python version 3.9
    2. If you have problems installing the psycopg2 package run the following commands:
      $ sudo apt install libpq-dev python3.9-dev
      $ pipenv install
      
  2. Creating the Postgres database using docker

    $ sudo apt install docker docker-compose
    $ docker pull postgres
    $ docker run --name <CONTAINER_NAME> -e POSTGRES_USER=<DATABASE_USER> -e POSTGRES_PASSWORD=<DATABASE_PASSWORD> -p 5432:5432 -d postgres
    
  3. Create or update the database with alembic

    $ alembic upgrade head
    
  4. Execute the project

    $ python src/main.py
    
  5. Fill the database with initial data

    $ python src/core/scripts/initial_data.py
    

How to execute the tests

  1. In the .env file put your APP_ENV=test
  2. Execute the following commands in terminal:
    • Create or update the test database with alembic

      $ cd /path/to/project
      $ alembic upgrade head
      
    • Execute all the tests

      $ python -m pytest
      
      • Note: You can also run in terminal just $ pytest
      • Note: To get the code coverage you can add the following parameters --cov=. --cov-report=html

License

MIT License

aquavitae-app's People

Contributors

hmarcuzzo avatar

Watchers

James Cloos 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.