Skip to content
This repository has been archived by the owner on Sep 27, 2024. It is now read-only.
/ goit-pyweb-hw-14 Public archive

Модуль 14. Тестування та розгортання веб-додатків

Notifications You must be signed in to change notification settings

lexhouk/goit-pyweb-hw-14

Repository files navigation

Contacts API

Development

Documentation

$ sphinx-quickstart docs
$ python -m pip freeze > requirements.txt
$ docker compose up -d
$ docker exec -it lexhouk-hw-14-documentation make -C docs html
$ cd docs/_build/html
$ python -m http.server

Go to http://localhost:8000.

Testing

$ python -m unittest discover -s tests -p "test_unit_*.py"
$ pytest -v tests/test_e2e_*.py

Deployment

$ git clone https://github.com/lexhouk/goit-pyweb-hw-14.git
$ cd goit-pyweb-hw-14
$ poetry install
$ docker compose up -d
$ alembic upgrade head

Usage

$ docker compose up -d
$ poetry shell
$ python main.py

All available endoints can be viewed in Swagger UI or ReDoc, and can only be tested in the former.