Compare commits

..

3 Commits

7 changed files with 94 additions and 78 deletions

View File

@ -30,7 +30,7 @@ jobs:
#----------------------------------------------
- name: Install poetry
env: # Keep in sync with `POETRY_VERSION` in `Dockerfile`
POETRY_VERSION: "1.6.1"
POETRY_VERSION: "1.7.0"
run: |
curl -sSL "https://install.python-poetry.org" | python -
# Adding `poetry` to `$PATH`:
@ -56,7 +56,7 @@ jobs:
- name: Install dependencies
run: |
poetry config virtualenvs.in-project true
poetry install
poetry install --no-interaction --no-ansi --no-root
poetry run pip install -U pip
#----------------------------------------------
# check dependencies

View File

@ -1,6 +1,6 @@
FROM python:3.11.6
ARG POETRY_VERSION=1.6.1
ARG POETRY_VERSION=1.7.0
ARG USER
# python:

View File

@ -5,7 +5,7 @@ YELLOW := $(shell tput -Txterm setaf 3)
RESET := $(shell tput -Txterm sgr0)
.DEFAULT_GOAL := help
.PHONY: help lint-deps
.PHONY: help lint-deps install lock requirements-dev requirements-prod
## Проверить зависимостей
lint-deps:
@ -14,6 +14,22 @@ lint-deps:
poetry run safety check --full-report
poetry run pip-audit
## Сгенерировать poetry.lock файл
lock:
poetry lock
## Установить все зависимости
install:
poetry install --sync --no-interaction --no-ansi --no-root
## Сгенерировать requirements.txt файл с dev зависимостями
requirements-dev:
poetry export -f requirements.txt --with dev --without-hashes --output requirements.txt
## Сгенерировать requirements.txt с only main зависимостями
requirements-prod:
poetry export -f requirements.txt --without-hashes --output requirements.txt
## Show help
help:
@echo ''

View File

@ -2,10 +2,15 @@
Used for poetry packages management with docker
required `docker` and optionally `docker-compose`
required `docker` and optionally `docker compose`
---
## Install poetry
```bash
curl -sSL https://install.python-poetry.org | python3 -
```
**Generate poetry.lock and requirements.txt in container for any version of python3 and poetry**
@ -23,7 +28,7 @@ docker build --build-arg USER=$USER -t poetry-python . && docker run --rm -u $US
### Or run from docker-compose:
```bash
docker-compose up --build
docker compose up --build
```
script will generate `poetry.lock` and `requirements.txt` files in `poetry` directory

114
poetry.lock generated
View File

@ -1,4 +1,4 @@
# This file is automatically @generated by Poetry 1.6.1 and should not be changed by hand.
# This file is automatically @generated by Poetry 1.7.0 and should not be changed by hand.
[[package]]
name = "aiohttp"
@ -154,17 +154,17 @@ files = [
[[package]]
name = "amqp"
version = "5.1.1"
version = "5.2.0"
description = "Low-level AMQP client for Python (fork of amqplib)."
optional = false
python-versions = ">=3.6"
files = [
{file = "amqp-5.1.1-py3-none-any.whl", hash = "sha256:6f0956d2c23d8fa6e7691934d8c3930eadb44972cbbd1a7ae3a520f735d43359"},
{file = "amqp-5.1.1.tar.gz", hash = "sha256:2c1b13fecc0893e946c65cbd5f36427861cffa4ea2201d8f6fca22e2a373b5e2"},
{file = "amqp-5.2.0-py3-none-any.whl", hash = "sha256:827cb12fb0baa892aad844fd95258143bce4027fdac4fccddbc43330fd281637"},
{file = "amqp-5.2.0.tar.gz", hash = "sha256:a1ecff425ad063ad42a486c902807d1482311481c8ad95a72694b2975e75f7fd"},
]
[package.dependencies]
vine = ">=5.0.0"
vine = ">=5.0.0,<6.0.0"
[[package]]
name = "annotated-types"
@ -393,13 +393,13 @@ typecheck = ["mypy"]
[[package]]
name = "billiard"
version = "4.1.0"
version = "4.2.0"
description = "Python multiprocessing fork with improvements and bugfixes"
optional = false
python-versions = ">=3.7"
files = [
{file = "billiard-4.1.0-py3-none-any.whl", hash = "sha256:0f50d6be051c6b2b75bfbc8bfd85af195c5739c281d3f5b86a5640c65563614a"},
{file = "billiard-4.1.0.tar.gz", hash = "sha256:1ad2eeae8e28053d729ba3373d34d9d6e210f6e4d8bf0a9c64f92bd053f1edf5"},
{file = "billiard-4.2.0-py3-none-any.whl", hash = "sha256:07aa978b308f334ff8282bd4a746e681b3513db5c9a514cbdd810cbbdc19714d"},
{file = "billiard-4.2.0.tar.gz", hash = "sha256:9a3c3184cb275aa17a732f93f65b20c525d3d9f253722d26a82194803ade5a2c"},
]
[[package]]
@ -1119,17 +1119,18 @@ pyflakes = ">=3.1.0,<3.2.0"
[[package]]
name = "flake8-aaa"
version = "0.16.0"
version = "0.17.0"
description = "A Flake8 plugin that checks Python tests follow the Arrange-Act-Assert pattern"
optional = false
python-versions = ">=3.8"
files = [
{file = "flake8-aaa-0.16.0.tar.gz", hash = "sha256:315d4fad96e4a5912069928afafffcb87d0482e602f9c7f73a6e02b5c0df12c3"},
{file = "flake8_aaa-0.16.0-py3-none-any.whl", hash = "sha256:ba5a3f0a099995e9136484709d94035307fdb495e4ed853855e809178e13e541"},
{file = "flake8-aaa-0.17.0.tar.gz", hash = "sha256:97dccdffa8e603dcf9cd9b4c2012e6fa22d58a2264a8b51146dcc9b63be66803"},
{file = "flake8_aaa-0.17.0-py3-none-any.whl", hash = "sha256:c9212d1fb94d1a95433c2ae18a644f96c33ee6ac059644d116e4dade0f191988"},
]
[package.dependencies]
asttokens = ">=2"
flake8 = ">=3"
[[package]]
name = "flake8-annotations-complexity"
@ -2027,6 +2028,26 @@ files = [
{file = "MarkupSafe-2.1.3.tar.gz", hash = "sha256:af598ed32d6ae86f1b747b82783958b1a4ab8f617b06fe68795c7f026abbdcad"},
]
[[package]]
name = "marshmallow"
version = "3.20.1"
description = "A lightweight library for converting complex datatypes to and from native Python datatypes."
optional = false
python-versions = ">=3.8"
files = [
{file = "marshmallow-3.20.1-py3-none-any.whl", hash = "sha256:684939db93e80ad3561392f47be0230743131560a41c5110684c16e21ade0a5c"},
{file = "marshmallow-3.20.1.tar.gz", hash = "sha256:5d2371bbe42000f2b3fb5eaa065224df7d8f8597bc19a1bbfa5bfe7fba8da889"},
]
[package.dependencies]
packaging = ">=17.0"
[package.extras]
dev = ["flake8 (==6.0.0)", "flake8-bugbear (==23.7.10)", "mypy (==1.4.1)", "pre-commit (>=2.4,<4.0)", "pytest", "pytz", "simplejson", "tox"]
docs = ["alabaster (==0.7.13)", "autodocsumm (==0.2.11)", "sphinx (==7.0.1)", "sphinx-issues (==3.0.1)", "sphinx-version-warning (==1.1.2)"]
lint = ["flake8 (==6.0.0)", "flake8-bugbear (==23.7.10)", "mypy (==1.4.1)", "pre-commit (>=2.4,<4.0)"]
tests = ["pytest", "pytz", "simplejson"]
[[package]]
name = "matplotlib-inline"
version = "0.1.6"
@ -2452,13 +2473,13 @@ test = ["pytest"]
[[package]]
name = "packaging"
version = "23.2"
version = "23.0"
description = "Core utilities for Python packages"
optional = false
python-versions = ">=3.7"
files = [
{file = "packaging-23.2-py3-none-any.whl", hash = "sha256:8c491190033a9af7e1d931d0b5dacc2ef47509b34dd0de67ed209b5203fc88c7"},
{file = "packaging-23.2.tar.gz", hash = "sha256:048fb0e9405036518eaaf48a55953c750c11e1a1b68e0dd1a9d62ed0c092cfc5"},
{file = "packaging-23.0-py3-none-any.whl", hash = "sha256:714ac14496c3e68c99c29b00845f7a2b85f3bb6f1078fd9f72fd20f0570002b2"},
{file = "packaging-23.0.tar.gz", hash = "sha256:b6ad297f8907de0fa2fe1ccbd26fdaf387f5f47c7275fedf8cce89f99446cf97"},
]
[[package]]
@ -6105,13 +6126,13 @@ pytest = ">=3.0.0"
[[package]]
name = "pytest-html"
version = "4.0.2"
version = "4.1.0"
description = "pytest plugin for generating HTML reports"
optional = false
python-versions = ">=3.8"
files = [
{file = "pytest_html-4.0.2-py3-none-any.whl", hash = "sha256:907c3e68462df129d3ee96dee58bd63f70216b06421836b22fd3fd57ef314acb"},
{file = "pytest_html-4.0.2.tar.gz", hash = "sha256:88682b9e8e51392472546a70a2139b27d6bc1834a4afd3e41da33c9d9f91e4a4"},
{file = "pytest_html-4.1.0-py3-none-any.whl", hash = "sha256:69c1bdcbbfb18a39b4907c5a756ff371bf33ce77d2d95e9989ac7c7416167495"},
{file = "pytest_html-4.1.0.tar.gz", hash = "sha256:1032cce620cf632679d51b3789f57e35d8eadde66d29cbbd481fae6359893230"},
]
[package.dependencies]
@ -6563,25 +6584,28 @@ files = [
[[package]]
name = "safety"
version = "2.3.4"
version = "2.4.0b1"
description = "Checks installed dependencies for known vulnerabilities and licenses."
optional = false
python-versions = "*"
files = [
{file = "safety-2.3.4-py3-none-any.whl", hash = "sha256:6224dcd9b20986a2b2c5e7acfdfba6bca42bb11b2783b24ed04f32317e5167ea"},
{file = "safety-2.3.4.tar.gz", hash = "sha256:b9e74e794e82f54d11f4091c5d820c4d2d81de9f953bf0b4f33ac8bc402ae72c"},
{file = "safety-2.4.0b1-py3-none-any.whl", hash = "sha256:95570bfdb0ca17bb2acdf34963966ce8f8b26bffeb76722d98251cee2f81b215"},
{file = "safety-2.4.0b1.tar.gz", hash = "sha256:26b3000eec09f64fdd323db29c44c0446607b0c9b4ce65c3f8f9570e2c640958"},
]
[package.dependencies]
Click = ">=8.0.2"
dparse = ">=0.6.2"
packaging = ">=21.0"
jinja2 = {version = ">=3.1.0", markers = "python_version >= \"3.7\""}
marshmallow = {version = ">=3.15.0", markers = "python_version >= \"3.7\""}
packaging = ">=21.0,<=23.0"
requests = "*"
"ruamel.yaml" = ">=0.17.21"
setuptools = ">=19.3"
setuptools = {version = ">=65.5.1", markers = "python_version >= \"3.7\""}
urllib3 = ">=1.26.5"
[package.extras]
github = ["jinja2 (>=3.1.0)", "pygithub (>=1.43.3)"]
github = ["pygithub (>=1.43.3)"]
gitlab = ["python-gitlab (>=1.3.0)"]
[[package]]
@ -6759,34 +6783,6 @@ postgresql-psycopgbinary = ["psycopg[binary] (>=3.0.7)"]
pymysql = ["pymysql"]
sqlcipher = ["sqlcipher3-binary"]
[[package]]
name = "sqlalchemy-utils"
version = "0.41.1"
description = "Various utility functions for SQLAlchemy."
optional = false
python-versions = ">=3.6"
files = [
{file = "SQLAlchemy-Utils-0.41.1.tar.gz", hash = "sha256:a2181bff01eeb84479e38571d2c0718eb52042f9afd8c194d0d02877e84b7d74"},
{file = "SQLAlchemy_Utils-0.41.1-py3-none-any.whl", hash = "sha256:6c96b0768ea3f15c0dc56b363d386138c562752b84f647fb8d31a2223aaab801"},
]
[package.dependencies]
SQLAlchemy = ">=1.3"
[package.extras]
arrow = ["arrow (>=0.3.4)"]
babel = ["Babel (>=1.3)"]
color = ["colour (>=0.0.4)"]
encrypted = ["cryptography (>=0.6)"]
intervals = ["intervals (>=0.7.1)"]
password = ["passlib (>=1.6,<2.0)"]
pendulum = ["pendulum (>=2.0.5)"]
phone = ["phonenumbers (>=5.9.2)"]
test = ["Jinja2 (>=2.3)", "Pygments (>=1.2)", "backports.zoneinfo", "docutils (>=0.10)", "flake8 (>=2.4.0)", "flexmock (>=0.9.7)", "isort (>=4.2.2)", "pg8000 (>=1.12.4)", "psycopg (>=3.1.8)", "psycopg2 (>=2.5.1)", "psycopg2cffi (>=2.8.1)", "pymysql", "pyodbc", "pytest (>=2.7.1)", "python-dateutil (>=2.6)", "pytz (>=2014.2)"]
test-all = ["Babel (>=1.3)", "Jinja2 (>=2.3)", "Pygments (>=1.2)", "arrow (>=0.3.4)", "backports.zoneinfo", "colour (>=0.0.4)", "cryptography (>=0.6)", "docutils (>=0.10)", "flake8 (>=2.4.0)", "flexmock (>=0.9.7)", "furl (>=0.4.1)", "intervals (>=0.7.1)", "isort (>=4.2.2)", "passlib (>=1.6,<2.0)", "pendulum (>=2.0.5)", "pg8000 (>=1.12.4)", "phonenumbers (>=5.9.2)", "psycopg (>=3.1.8)", "psycopg2 (>=2.5.1)", "psycopg2cffi (>=2.8.1)", "pymysql", "pyodbc", "pytest (>=2.7.1)", "python-dateutil", "python-dateutil (>=2.6)", "pytz (>=2014.2)"]
timezone = ["python-dateutil"]
url = ["furl (>=0.4.1)"]
[[package]]
name = "sqlparse"
version = "0.4.4"
@ -6993,13 +6989,13 @@ zstd = ["zstandard (>=0.18.0)"]
[[package]]
name = "uvicorn"
version = "0.23.2"
version = "0.24.0.post1"
description = "The lightning-fast ASGI server."
optional = false
python-versions = ">=3.8"
files = [
{file = "uvicorn-0.23.2-py3-none-any.whl", hash = "sha256:1f9be6558f01239d4fdf22ef8126c39cb1ad0addf76c40e760549d2c2f43ab53"},
{file = "uvicorn-0.23.2.tar.gz", hash = "sha256:4d3cc12d7727ba72b64d12d3cc7743124074c0a69f7b201512fc50c3e3f1569a"},
{file = "uvicorn-0.24.0.post1-py3-none-any.whl", hash = "sha256:7c84fea70c619d4a710153482c0d230929af7bcf76c7bfa6de151f0a3a80121e"},
{file = "uvicorn-0.24.0.post1.tar.gz", hash = "sha256:09c8e5a79dc466bdf28dead50093957db184de356fcdc48697bad3bde4c2588e"},
]
[package.dependencies]
@ -7033,13 +7029,13 @@ tooling-extras = ["pyaml (>=23.7.0)", "pypandoc-binary (>=1.11)", "pytest (>=7.4
[[package]]
name = "vine"
version = "5.0.0"
description = "Promises, promises, promises."
version = "5.1.0"
description = "Python promises."
optional = false
python-versions = ">=3.6"
files = [
{file = "vine-5.0.0-py2.py3-none-any.whl", hash = "sha256:4c9dceab6f76ed92105027c49c823800dd33cacce13bdedc5b914e3514b7fb30"},
{file = "vine-5.0.0.tar.gz", hash = "sha256:7d3b1624a953da82ef63462013bbd271d3eb75751489f9807598e8f340bd637e"},
{file = "vine-5.1.0-py3-none-any.whl", hash = "sha256:40fdf3c48b2cfe1c38a49e9ae2da6fda88e4794c810050a728bd7413811fb1dc"},
{file = "vine-5.1.0.tar.gz", hash = "sha256:8b62e981d35c41049211cf62a0a1242d8c1ee9bd15bb196ce38aefd6799e61e0"},
]
[[package]]
@ -7227,4 +7223,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p
[metadata]
lock-version = "2.0"
python-versions = ">=3.11,<3.12"
content-hash = "255922cd99a49f3d98f3569f9f25bf686a2e0347d6c760f0ad51c73cc8214084"
content-hash = "0f83a31176ab34c60699718ce73805279f94a29d7050dcc67550ed1b6d810ceb"

View File

@ -1,11 +1,11 @@
[tool.poetry]
name = "main packages"
version = "1.0.3"
description = "poetry requiremts creation"
version = "1.1.0"
description = "poetry requirements creation"
authors = ["Dmitry Afanasyev <Balshbox@gmail.com>"]
[build-system]
requires = ["poetry-core>=1.6.1"]
requires = ["poetry-core>=1.7.0"]
build-backend = "poetry.core.masonry.api"
[tool.poetry.dependencies]
@ -46,9 +46,8 @@ selenium = "^4.14"
simple-term-menu = "^1.6"
six = "^1.16"
SQLAlchemy = "^2.0"
SQLAlchemy-Utils = "^0.41"
termcolor = "^2.3"
uvicorn = "^0.23"
uvicorn = "^0.24"
validators = "^0.22"
virtualenv = "^20.24"
wget = "^3.2"
@ -67,7 +66,7 @@ flake8-comprehensions = "^3.14"
flake8-eradicate = "^1.5"
flake8-deprecated = "^2.0"
flake8-pytest-style = "^1.7"
flake8-aaa = "^0.16"
flake8-aaa = "^0.17"
flake8-bugbear = "^23.7"
flake8-warnings = "^0.4"
flake8-debugger = "^4.1"
@ -105,7 +104,7 @@ pytest-socket = "^0.6"
assertpy = "^1.1"
respx = "^0.20"
safety = "^2.3"
safety = "^2.3.5"
pip-audit = "^2.6"
ruff = "^0.1"

View File

@ -2,7 +2,7 @@ aiohttp==3.8.6 ; python_version >= "3.11" and python_version < "3.12"
aiosignal==1.3.1 ; python_version >= "3.11" and python_version < "3.12"
alembic==1.12.1 ; python_version >= "3.11" and python_version < "3.12"
altgraph==0.17.4 ; python_version >= "3.11" and python_version < "3.12"
amqp==5.1.1 ; python_version >= "3.11" and python_version < "3.12"
amqp==5.2.0 ; python_version >= "3.11" and python_version < "3.12"
annotated-types==0.6.0 ; python_version >= "3.11" and python_version < "3.12"
anyio==3.7.1 ; python_version >= "3.11" and python_version < "3.12"
appnope==0.1.3 ; python_version >= "3.11" and python_version < "3.12" and sys_platform == "darwin"
@ -17,7 +17,7 @@ attrs==23.1.0 ; python_version >= "3.11" and python_version < "3.12"
autoflake==2.2.1 ; python_version >= "3.11" and python_version < "3.12"
bandit==1.7.5 ; python_version >= "3.11" and python_version < "3.12"
bcrypt==4.0.1 ; python_version >= "3.11" and python_version < "3.12"
billiard==4.1.0 ; python_version >= "3.11" and python_version < "3.12"
billiard==4.2.0 ; python_version >= "3.11" and python_version < "3.12"
binaryornot==0.4.4 ; python_version >= "3.11" and python_version < "3.12"
black==23.10.1 ; python_version >= "3.11" and python_version < "3.12"
boolean-py==4.0 ; python_version >= "3.11" and python_version < "3.12"
@ -50,7 +50,7 @@ factory-boy==3.3.0 ; python_version >= "3.11" and python_version < "3.12"
faker==19.13.0 ; python_version >= "3.11" and python_version < "3.12"
fastapi==0.104.1 ; python_version >= "3.11" and python_version < "3.12"
filelock==3.13.1 ; python_version >= "3.11" and python_version < "3.12"
flake8-aaa==0.16.0 ; python_version >= "3.11" and python_version < "3.12"
flake8-aaa==0.17.0 ; python_version >= "3.11" and python_version < "3.12"
flake8-annotations-complexity==0.0.8 ; python_version >= "3.11" and python_version < "3.12"
flake8-bandit==4.1.1 ; python_version >= "3.11" and python_version < "3.12"
flake8-bugbear==23.9.16 ; python_version >= "3.11" and python_version < "3.12"
@ -312,7 +312,7 @@ pytest-cov==4.1.0 ; python_version >= "3.11" and python_version < "3.12"
pytest-deadfixtures==2.2.1 ; python_version >= "3.11" and python_version < "3.12"
pytest-env==1.1.1 ; python_version >= "3.11" and python_version < "3.12"
pytest-freezegun==0.4.2 ; python_version >= "3.11" and python_version < "3.12"
pytest-html==4.0.2 ; python_version >= "3.11" and python_version < "3.12"
pytest-html==4.1.0 ; python_version >= "3.11" and python_version < "3.12"
pytest-metadata==3.0.0 ; python_version >= "3.11" and python_version < "3.12"
pytest-mock==3.12.0 ; python_version >= "3.11" and python_version < "3.12"
pytest-randomly==3.15.0 ; python_version >= "3.11" and python_version < "3.12"
@ -364,9 +364,9 @@ typing-extensions==4.8.0 ; python_version >= "3.11" and python_version < "3.12"
tzdata==2023.3 ; python_version >= "3.11" and python_version < "3.12"
urllib3==2.0.7 ; python_version >= "3.11" and python_version < "3.12"
urllib3[socks]==2.0.7 ; python_version >= "3.11" and python_version < "3.12"
uvicorn==0.23.2 ; python_version >= "3.11" and python_version < "3.12"
uvicorn==0.24.0.post1 ; python_version >= "3.11" and python_version < "3.12"
validators==0.22.0 ; python_version >= "3.11" and python_version < "3.12"
vine==5.0.0 ; python_version >= "3.11" and python_version < "3.12"
vine==5.1.0 ; python_version >= "3.11" and python_version < "3.12"
virtualenv==20.24.6 ; python_version >= "3.11" and python_version < "3.12"
wcwidth==0.2.9 ; python_version >= "3.11" and python_version < "3.12"
webencodings==0.5.1 ; python_version >= "3.11" and python_version < "3.12"