Skip to content

Som-Energia/uiqmako-api

Repository files navigation

UI-QMako-API

CI Status Coverage Status

API of Som Energia UI-QMako tool.

UI-QMako allows for a user friendly editing of Mako Templates.

Getting started

Python version

Python 3.8.8

Dependencies

  • Git.
  • Python 3, pip and poetry.

Installation and run

  1. Clone project from repo
    git clone git@github.com:Som-Energia/uiqmako-api.git
  1. Setup poetry environment Python
    cd uiqmako-api
    poetry install
  1. Create local configuration
    cp .env.example .env
    # Review and edit .env
  1. Create database
    # If you didn't do that before for your user, here 'myuser'
    sudo su postgres
    createuser myuser
    echo "ALTER USER myuser CREATEDB" > psql
    exit

    # and then
    createdb uiqmako_db
  1. Run development server
    poetry run uvicorn uiqmako_api.api.api:app --debug

The API will run on: http://localhost:8000

Open http://localhost:8000/docs or http://localhost:8000/redoc to see the API docs.

  1. Run tests and coverage
    createdb test_uiqmako
    cp tests/.env.test.example tests/.env.test
    # Review and edit test/.env.test
    poetry run pytest -v --cov=uiqmako_api

Some infrastructure tests that access private servers are disabled by default until you enable them using env var UIQMAKO_TEST_ERP.

    UIQMAKO_TEST_ERP=1 poetry run pytest -v --cov=uiqmako_api

Server deploy

Releasing

Deploying upgrades

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages