- Added run.sh script with init, upd, run, and clean commands - Updated README.md to document run.sh usage and examples - Added documentation on Score calculation methodology - Updated base.py to include score calculation logic ``` This commit message follows the conventional commit format with a short title and a detailed description of the changes made. It explains what was changed and why, making it clear and informative.
51 lines
1.2 KiB
Bash
Executable File
51 lines
1.2 KiB
Bash
Executable File
#!/bin/bash
|
||
|
||
# Получаем имя ядра (Linux – Linux, macOS – Darwin, FreeBSD – FreeBSD …)
|
||
OS_NAME=$(uname -s)
|
||
|
||
init() {
|
||
if [[ "$OS_NAME" == "Darwin" ]]; then
|
||
python3.13 -m venv z
|
||
else
|
||
python3 -m venv z
|
||
fi
|
||
upd
|
||
}
|
||
|
||
upd() {
|
||
activate
|
||
pip install -r requirements.txt --upgrade
|
||
git submodule update --remote --merge
|
||
}
|
||
|
||
clean() {
|
||
rm -rf results/*
|
||
echo "Отчеты успешно очищены"
|
||
}
|
||
|
||
activate() {
|
||
source z/bin/activate
|
||
}
|
||
|
||
echo "_= Project Scripts =_"
|
||
if [ -n "$1" ]; then
|
||
if [[ "$1" == "init" ]]; then
|
||
init
|
||
elif [[ "$1" == "upd" ]]; then
|
||
upd
|
||
elif [[ "$1" == "run" ]]; then
|
||
activate
|
||
shift
|
||
python src/main.py "$@"
|
||
elif [[ "$1" == "clean" ]]; then
|
||
clean
|
||
fi
|
||
else
|
||
echo " Аргументом необходимо написать название скрипта (+опционально аргументы скрипта)"
|
||
echo "Скрипты:"
|
||
echo " * init - инициализация, устанавливает env"
|
||
echo " * upd - обновление зависимостей"
|
||
echo " * run - запуск бенчмарков"
|
||
echo " * clean - очистка отчетов"
|
||
fi
|