- Ревью - задача с наивысшим приоритетом. Желательно приступать к ревью как можно скорее. Это поможет избежать массового мержа задач в конце спринта и не будет тратить время коллег, особенно если задачи взаимозависимы. Начинаем ревью задачи при первом стабильном билде.
- Прежде всего нужно проверить соответствие указанного номера задачи, репозитория и версии указанным в Jira, а в ходе ревью обратить внимание, соответствуют ли внесенные изменения поставленной задаче.
- Названия коммитов и PR пишутся с большой буквы, они должны содержать номер задачи, описывать внесенные изменения и быть обезличенными. Плохой пример: “сделал правки”, хороший пример: “UFSUI-1111 Исправлена работа скролла в Select при открытии вверх”.
- На ревью обязательно нужно как посмотреть код, так и проверить корректность работы компонента с внесенными изменениями. Код стоит проверять досконально в каждом файле. При проверке работы нужно попытаться воспроизвести все возможные кейсы использования компонента. Не стоит пренебрегать одним из ш
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # | |
| # Wide-open CORS config for nginx | |
| # | |
| location / { | |
| if ($request_method = 'OPTIONS') { | |
| add_header 'Access-Control-Allow-Origin' '*'; | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| source /home/project/myenv/bin/activate | |
| cd /home/project/server | |
| PID=$(ps aux | grep 'uvicorn myapp:app' | grep -v grep | awk {'print $2'} | xargs) | |
| if [ "$PID" != "" ] | |
| then | |
| kill -9 $PID | |
| sleep 2 | |
| echo "" > nohup.out | |
| echo "Restarting FastAPI server" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # dont do this | |
| this_function_name(foo, bar | |
| baz) | |
| # do this | |
| cramers_version( | |
| foo, bar, baz) | |
| # allow this | |
| cramers_version(foo, bar, |
FastAPI - новый фреймворк для создания REST API, ориентированный на скорость работы, удобство разработки, интуитивность, простоту использования, наличие дополнительного функционала, уменьшающего объём кода и следование стандартам (OpenAPI, JSON Schema).
FastAPI построен на основе Starlette, ASGI мифкрофреймворка, и имеет схожую с ним скорость работы и Pydantic, библиотеки для парсинга и валидации данных на основе типизации (type hinting), встроенной в Python.
FastAPI также автоматически создаёт документацию посредством библиотек Swagger и ReDoc.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # use a certain pyenv version | |
| use_python() { | |
| if [ -n "$(which pyenv)" ]; then | |
| local pyversion=$1 | |
| pyenv local ${pyversion} | |
| fi | |
| } | |
| layout_virtualenv() { | |
| local pyversion=$1 |
Обновляемся
apt update && apt upgradeСтавим docker
sudo apt-get install apt-transport-https ca-certificates curl gnupg2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # ---------------------------------- | |
| # Colors | |
| # ---------------------------------- | |
| NOCOLOR='\033[0m' | |
| RED='\033[0;31m' | |
| GREEN='\033[0;32m' | |
| ORANGE='\033[0;33m' | |
| BLUE='\033[0;34m' | |
| PURPLE='\033[0;35m' | |
| CYAN='\033[0;36m' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| apt-get install apt-transport-https ca-certificates curl gnupg2 software-properties-common sudo | |
| curl -fsSL https://download.docker.com/linux/$(. /etc/os-release; echo "$ID")/gpg | sudo apt-key add - | |
| add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") $(lsb_release -cs) stable" | |
| apt-get update |