ohad24 / encyclo-flower

encyclo-flower.com site
https://encyclo-flower.com
5 stars 2 forks source link
flowers-classification flowers-recognition plants search social social-network

ENCYCLO-FLOWER SITE (v2)

API build SWAG build Ansible deployment codecov

Known Vulnerabilities Codacy Badge Total alerts Language grade: Python

Hello all šŸ‘‹, Welcome to the Encyclo-Flower site source code. This repo contains the source code for the entire site tech stack (Backend API, Frontend, VM configuration, CI/CD automation, tests, and SWAG web server).

Site main features

Development install and run

Backend

API is running on Python 3.10
Install:
Environment variables:

Tests:

  # For testing + coverage, formatting and linting:
  pip install pytest pytest-cov black flake8

  # pwd
  # ./encyclo-flower
  # enter venv
  pytest -v -x -s --cov=src/api/ --cov-report xml --cov-report html:.cov_html

  # exclude one test VIA command line
  pytest -x -s -vv -k 'not detect_image' tests/api/

  # format
  black src/api/

  # lint
  flake8 src/api/

Run:

  # enter venv
  cd src/api
  uvicorn main:app --reload

Dev environment

Ansible (Server automatic configuration)

  sudo apt install ansible
  cd server
  ansible-galaxy role install -r requirements.yml
  ansible-galaxy collection install -r requirements.yml
  # CREATE a 'hosts' file before the next step (see `hosts.example`)
  ansible-playbook -i hosts playbook.yml

Docs

learning assets

fastapi
pydantic
full-stack-fastapi-postgresql
ohad24/market