chore [P-01]: предлинт
This commit is contained in:
1 parent
9f1423870d
commit
e186c0412b
12 files changed
+191
-3741
No files matched your search
+25
-4
@@ -1,6 +1,6 @@
|
||||
#!/usr/bin/env sh
|
||||
|
||||
docker-compose -f docker-compose.lint.yml run --rm frontendlint
|
||||
# docker-compose -f docker-compose.lint.yml run --rm frontendlint
|
||||
# npm run lint-staged
|
||||
# #
|
||||
# # Проверяем наличие pylint
|
||||
@@ -9,15 +9,36 @@ docker-compose -f docker-compose.lint.yml run --rm frontendlint
|
||||
# exit 1
|
||||
# fi
|
||||
|
||||
# # Получение списка всех Python-файлов, подготовленных для коммита
|
||||
# files=$(git diff --cached --name-only --diff-filter=ACM | grep '\.py$')
|
||||
|
||||
# # Получение списка всех Vue/js/ts-файлов, подготовленных для коммита
|
||||
filesjs=$(git diff --cached --name-only --diff-filter=ACM | grep -E '\.vue$|\.js$|\.ts$'| grep -v 'test\.js$')
|
||||
filesjs_modified=$(echo "$filesjs" | sed 's|^src/front/src/|./src/|')
|
||||
echo $filesjs_modified
|
||||
|
||||
if [ -n "$filesjs_modified" ]; then
|
||||
# Запускаем команду formatter в контейнере
|
||||
docker-compose -f docker-compose.yml run --rm frontend sh -c "npm run formatter --write \"$filesjs_modified\" && npm run linter \"$filesjs_modified\""
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
# # Получение списка всех Python-файлов, подготовленных для коммита
|
||||
pyfiles=$(git diff --cached --name-only --diff-filter=ACM | grep '\.py$')
|
||||
pyfiles_mod=$(echo "$pyfiles" | sed 's|^src/back/||'| sed 's|/|.|g; s|\.py$||')
|
||||
# echo $pyfiles_mod
|
||||
# exit 1
|
||||
# # Если нет Python-файлов, выход
|
||||
# if [ -z "$files" ]; then
|
||||
# exit 0
|
||||
# fi
|
||||
|
||||
# # Запуск pylint для всех подготовленных Python-файлов
|
||||
# Запуск pylint для всех подготовленных Python-файлов
|
||||
# docker-compose -f docker-compose.yml run --rm --entrypoint sh backend -c "poetry run python black \"$pyfiles_mod\" && poetry run python pylint \"$pyfiles_mod\""
|
||||
# echo 1
|
||||
|
||||
|
||||
|
||||
# pylint $files
|
||||
# if [ $? -ne 0 ]; then
|
||||
# echo "Pylint found issues. Commit aborted."
|
||||
|
||||
+2
-1
@@ -78,8 +78,9 @@ services:
|
||||
- db
|
||||
- redis
|
||||
volumes:
|
||||
- /back/.venv/
|
||||
- ./src/back:/back
|
||||
|
||||
# command: ["tail", "-f", "/dev/null"]
|
||||
nginx:
|
||||
image: nginx:latest
|
||||
ports:
|
||||
|
||||
+17
-8
@@ -1,29 +1,38 @@
|
||||
FROM python:3.10.13-slim
|
||||
FROM python:3.10.13-slim AS builderstage
|
||||
|
||||
WORKDIR /back
|
||||
|
||||
ARG SOURCE_DIR
|
||||
ENV SOURCE_DIR=${SOURCE_DIR}
|
||||
# Устанавливаем рабочую директорию
|
||||
RUN apt-get update && apt-get install -y \
|
||||
default-libmysqlclient-dev \
|
||||
RUN apt-get update && apt-get install -y --no-install-recommends \
|
||||
libmariadb-dev-compat \
|
||||
build-essential \
|
||||
dos2unix \
|
||||
pkg-config && \
|
||||
apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
|
||||
# Копируем файлы зависимостей в контейнер
|
||||
COPY ${SOURCE_DIR}/r.txt .
|
||||
COPY ${SOURCE_DIR}/pyproject.toml ${SOURCE_DIR}/README.md ./
|
||||
COPY docker/entries/backend-entrypoint.sh /script/backend-entrypoint.sh
|
||||
|
||||
RUN dos2unix /script/backend-entrypoint.sh && chmod 777 /script/backend-entrypoint.sh && \
|
||||
python -m pip install --no-cache-dir poetry \
|
||||
&& poetry config virtualenvs.in-project true \
|
||||
&& poetry install --no-interaction --no-ansi
|
||||
# --without dev,test
|
||||
# Устанавливаем зависимости
|
||||
# RUN python -m venv env
|
||||
RUN pip install --no-cache-dir -r r.txt
|
||||
# RUN pip install --no-cache-dir -r r.txt
|
||||
|
||||
|
||||
# Копируем все файлы проекта в контейнер
|
||||
# COPY ${SOURCE_DIR} .
|
||||
# FROM python:3.10.13-slim
|
||||
# RUN python -m pip install --no-cache-dir poetry
|
||||
|
||||
# COPY --from=builderstage /script /script
|
||||
# WORKDIR /back
|
||||
EXPOSE 8000
|
||||
COPY docker/entries/backend-entrypoint.sh /script/backend-entrypoint.sh
|
||||
RUN dos2unix /script/backend-entrypoint.sh && chmod 777 /script/backend-entrypoint.sh
|
||||
@@ -17,7 +17,8 @@
|
||||
# sleep 2
|
||||
# done
|
||||
|
||||
python manage.py runserver 0.0.0.0:$BACKEND_INTERNAL_PORT
|
||||
|
||||
poetry run python manage.py runserver 0.0.0.0:$BACKEND_INTERNAL_PORT
|
||||
|
||||
# celery --app speaker worker --loglevel=$CELERY_LOGLEVEL --concurrency 1 -E &
|
||||
wait -n
|
||||
|
||||
@@ -1,33 +0,0 @@
|
||||
{
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"lint": "eslint . --ext .vue,.js,.jsx,.cjs,.mjs,.ts,.tsx,.cts,.mts --fix --ignore-path .gitignore",
|
||||
"lint-staged": "lint-staged",
|
||||
"commitlint": "commitlint --edit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@commitlint/cli": "^19.7.1",
|
||||
"@commitlint/config-conventional": "^19.7.1",
|
||||
"@eslint/js": "^9.19.0",
|
||||
"commitlint": "^19.7.1",
|
||||
"eslint": "^9.19.0",
|
||||
"eslint-config-prettier": "^10.0.1",
|
||||
"eslint-plugin-prettier": "^5.2.3",
|
||||
"eslint-plugin-vue": "^9.32.0",
|
||||
"globals": "^15.14.0",
|
||||
"lint-staged": "^15.4.3",
|
||||
"prettier": "^3.4.2",
|
||||
"vitepress": "^1.6.3"
|
||||
},
|
||||
"lint-staged": {
|
||||
"!(*test).{js,ts,vue}": [
|
||||
"prettier --write",
|
||||
"eslint --fix"
|
||||
],
|
||||
|
||||
"*.py": [
|
||||
"black",
|
||||
"pylint"
|
||||
]
|
||||
}
|
||||
}
|
||||
Whitespace-only changes.
@@ -20,6 +20,9 @@ class getuserAPIView(APIView):
|
||||
Если дать дополнительный параметр fullinfo = True, то будет выдаваться информация с комиссиями и ответсвенностью
|
||||
"""
|
||||
|
||||
|
||||
|
||||
|
||||
resp = None
|
||||
fullinfo = request.query_params.get('fullinfo')
|
||||
queryset = DictEmployee.objects.get(login=request.query_params.get('userlogin'))
|
||||
|
||||
@@ -0,0 +1,124 @@
|
||||
[project]
|
||||
name = "portal"
|
||||
version = "0.1.0"
|
||||
description = ""
|
||||
authors = [
|
||||
{name = "Your Name",email = "you@example.com"}
|
||||
]
|
||||
readme = "README.md"
|
||||
requires-python = ">=3.10,<4.0"
|
||||
dependencies = [
|
||||
"anyio (>=4.8.0,<5.0.0)",
|
||||
"asgiref (>=3.8.1,<4.0.0)",
|
||||
"async-timeout (>=5.0.1,<6.0.0)",
|
||||
"attrs (>=25.1.0,<26.0.0)",
|
||||
"autobahn (>=24.4.2,<25.0.0)",
|
||||
"automat (>=24.8.1,<25.0.0)",
|
||||
"backports-tarfile (>=1.2.0,<2.0.0)",
|
||||
"build (==1.2.2.post1)",
|
||||
"cachecontrol (>=0.14.2,<0.15.0)",
|
||||
"certifi (>=2025.1.31,<2026.0.0)",
|
||||
"cffi (>=1.17.1,<2.0.0)",
|
||||
"channels (>=4.2.0,<5.0.0)",
|
||||
"channels-redis (>=4.2.1,<5.0.0)",
|
||||
"charset-normalizer (>=3.4.1,<4.0.0)",
|
||||
"cleo (>=2.1.0,<3.0.0)",
|
||||
"constantly (>=23.10.4,<24.0.0)",
|
||||
"crashtest (>=0.4.1,<0.5.0)",
|
||||
"cryptography (>=44.0.1,<45.0.0)",
|
||||
"daphne (>=4.1.2,<5.0.0)",
|
||||
"defusedxml (>=0.7.1,<0.8.0)",
|
||||
"distlib (>=0.3.9,<0.4.0)",
|
||||
"django (>=5.1.6,<6.0.0)",
|
||||
"django-ckeditor (>=6.7.2,<7.0.0)",
|
||||
"django-ckeditor-5 (>=0.2.17,<0.3.0)",
|
||||
"django-cors-headers (>=4.7.0,<5.0.0)",
|
||||
"django-filter (>=25.1,<26.0)",
|
||||
"django-grappelli (>=4.0.1,<5.0.0)",
|
||||
"django-js-asset (>=3.1.0,<4.0.0)",
|
||||
"django-templated-mail (>=1.1.1,<2.0.0)",
|
||||
"djangorestframework (>=3.15.2,<4.0.0)",
|
||||
"djangorestframework-simplejwt (>=5.5.0,<6.0.0)",
|
||||
"djoser (>=2.3.1,<3.0.0)",
|
||||
"drf-yasg (>=1.21.9,<2.0.0)",
|
||||
"dulwich (>=0.22.7,<0.23.0)",
|
||||
"et-xmlfile (>=2.0.0,<3.0.0)",
|
||||
"exceptiongroup (>=1.2.2,<2.0.0)",
|
||||
"fastjsonschema (>=2.21.1,<3.0.0)",
|
||||
"filelock (>=3.17.0,<4.0.0)",
|
||||
"findpython (>=0.6.2,<0.7.0)",
|
||||
"h11 (>=0.14.0,<0.15.0)",
|
||||
"httpcore (>=1.0.7,<2.0.0)",
|
||||
"httpx (>=0.28.1,<0.29.0)",
|
||||
"hyperlink (>=21.0.0,<22.0.0)",
|
||||
"idna (>=3.10,<4.0)",
|
||||
"importlib-metadata (>=8.6.1,<9.0.0)",
|
||||
"incremental (>=24.7.2,<25.0.0)",
|
||||
"inflection (>=0.5.1,<0.6.0)",
|
||||
"installer (>=0.7.0,<0.8.0)",
|
||||
"jaraco-classes (>=3.4.0,<4.0.0)",
|
||||
"jaraco-context (>=6.0.1,<7.0.0)",
|
||||
"jaraco-functools (>=4.1.0,<5.0.0)",
|
||||
"jeepney (>=0.9.0,<0.10.0)",
|
||||
"keyring (>=25.6.0,<26.0.0)",
|
||||
"markdown (>=3.7,<4.0)",
|
||||
"more-itertools (>=10.6.0,<11.0.0)",
|
||||
"msgpack (>=1.1.0,<2.0.0)",
|
||||
"mysqlclient (>=2.2.7,<3.0.0)",
|
||||
"numpy (>=2.2.3,<3.0.0)",
|
||||
"oauthlib (>=3.2.2,<4.0.0)",
|
||||
"openpyxl (>=3.1.5,<4.0.0)",
|
||||
"packaging (>=24.2,<25.0)",
|
||||
"pandas (>=2.2.3,<3.0.0)",
|
||||
"pbs-installer (>=2025.2.12,<2026.0.0)",
|
||||
"pillow (>=11.1.0,<12.0.0)",
|
||||
"pkginfo (>=1.12.1.2,<2.0.0.0)",
|
||||
"platformdirs (>=4.3.6,<5.0.0)",
|
||||
"pyasn1 (>=0.6.1,<0.7.0)",
|
||||
"pyasn1-modules (>=0.4.1,<0.5.0)",
|
||||
"pycparser (>=2.22,<3.0)",
|
||||
"pyopenssl (>=25.0.0,<26.0.0)",
|
||||
"pyproject-hooks (>=1.2.0,<2.0.0)",
|
||||
"python-dateutil (>=2.9.0.post0,<3.0.0)",
|
||||
"python3-openid (>=3.2.0,<4.0.0)",
|
||||
"pytz (>=2025.1,<2026.0)",
|
||||
"pyyaml (>=6.0.2,<7.0.0)",
|
||||
"rapidfuzz (>=3.12.1,<4.0.0)",
|
||||
"redis (>=5.2.1,<6.0.0)",
|
||||
"requests (>=2.32.3,<3.0.0)",
|
||||
"requests-oauthlib (>=2.0.0,<3.0.0)",
|
||||
"requests-toolbelt (>=1.0.0,<2.0.0)",
|
||||
"secretstorage (>=3.3.3,<4.0.0)",
|
||||
"service-identity (>=24.2.0,<25.0.0)",
|
||||
"shellingham (>=1.5.4,<2.0.0)",
|
||||
"six (>=1.17.0,<2.0.0)",
|
||||
"sniffio (>=1.3.1,<2.0.0)",
|
||||
"social-auth-app-django (>=5.4.3,<6.0.0)",
|
||||
"social-auth-core (>=4.5.6,<5.0.0)",
|
||||
"sqlparse (>=0.5.3,<0.6.0)",
|
||||
"tomli (>=2.2.1,<3.0.0)",
|
||||
"tomlkit (>=0.13.2,<0.14.0)",
|
||||
"trove-classifiers (>=2025.2.18.16,<2026.0.0.0)",
|
||||
"twisted (>=24.11.0,<25.0.0)",
|
||||
"txaio (>=23.1.1,<24.0.0)",
|
||||
"typing-extensions (>=4.12.2,<5.0.0)",
|
||||
"tzdata (>=2025.1,<2026.0)",
|
||||
"uritemplate (>=4.1.1,<5.0.0)",
|
||||
"urllib3 (>=2.3.0,<3.0.0)",
|
||||
"virtualenv (>=20.29.2,<21.0.0)",
|
||||
"xlsxwriter (>=3.2.2,<4.0.0)",
|
||||
"zipp (>=3.21.0,<4.0.0)",
|
||||
"zope-interface (>=7.2,<8.0)",
|
||||
"zstandard (>=0.23.0,<0.24.0)"
|
||||
]
|
||||
|
||||
[tool.poetry]
|
||||
package-mode = false
|
||||
[tool.poetry.group.dev.dependencies]
|
||||
black = "^25.1.0"
|
||||
pylint = "^3.3.4"
|
||||
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core>=2.0.0,<3.0.0"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
Binary file not shown.
File renamed without changes.
Generated
-3692
File diff suppressed because it is too large.
Load diff
+18
-2
@@ -6,7 +6,9 @@
|
||||
"dev": "vite",
|
||||
"build": "vite build",
|
||||
"preview": "vite preview",
|
||||
"docs": "vuepress build docs"
|
||||
"formatter":"prettier --write",
|
||||
"linter":"eslint --fix"
|
||||
|
||||
},
|
||||
"dependencies": {
|
||||
"@ckeditor/ckeditor5-build-classic": "^44.1.0",
|
||||
@@ -43,6 +45,20 @@
|
||||
"leaflet": "^1.9.4",
|
||||
"sass-embedded": "^1.83.4",
|
||||
"vite": "^6.0.11",
|
||||
"vite-plugin-vuetify": "^2.1.0"
|
||||
"vite-plugin-vuetify": "^2.1.0",
|
||||
"@commitlint/cli": "^19.7.1",
|
||||
"@commitlint/config-conventional": "^19.7.1",
|
||||
"@eslint/js": "^9.19.0",
|
||||
"commitlint": "^19.7.1",
|
||||
"eslint": "^9.19.0",
|
||||
"eslint-config-prettier": "^10.0.1",
|
||||
"eslint-plugin-prettier": "^5.2.3",
|
||||
"eslint-plugin-vue": "^9.32.0",
|
||||
"globals": "^15.14.0",
|
||||
"prettier": "^3.4.2",
|
||||
"vitepress": "^1.6.3"
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user