diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2302e86..c9a9f1d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: ["3.11", "3.12"] + python-version: ["3.11"] steps: - name: Checkout code diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index ddbc7d6..0e3b966 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,4 +1,4 @@ -image: python:3.11 +image: python:3.13 stages: - test @@ -6,7 +6,7 @@ stages: - build variables: - POETRY_VERSION: "1.8.0" + POETRY_VERSION: "2.3.1" PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" cache: @@ -17,7 +17,8 @@ cache: before_script: - python --version - pip install poetry==$POETRY_VERSION - - poetry config virtualenvs.create false + - poetry config virtualenvs.create true + - poetry config virtualenvs.in-project true - poetry install --with dev test: @@ -40,14 +41,13 @@ test: security: stage: security script: - - pip install bandit safety + - pip install bandit - bandit -r . -c .bandit.yml -f json -o bandit-report.json - - safety check --json > safety-report.json artifacts: paths: - bandit-report.json - - safety-report.json expire_in: 1 week + when: always build: stage: build diff --git a/app/main.py b/app/main.py index cb64fe8..d4fdcd7 100644 --- a/app/main.py +++ b/app/main.py @@ -17,7 +17,7 @@ CORSMiddleware, allow_origins=["http://127.0.0.1:8000"], allow_credentials=True, - allow_methods=["*"], + allow_methods=["*"], # TODO: get allow_headers=["*"], ) diff --git a/poetry.lock b/poetry.lock index fc302f2..5fb65ed 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.3.0 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.3.1 and should not be changed by hand. [[package]] name = "annotated-doc" @@ -1479,6 +1479,53 @@ nodeenv = ">=0.11.1" pyyaml = ">=5.1" virtualenv = ">=20.10.0" +[[package]] +name = "psutil" +version = "7.2.1" +description = "Cross-platform lib for process and system monitoring." +optional = false +python-versions = ">=3.6" +groups = ["dev"] +files = [ + {file = "psutil-7.2.1-cp313-cp313t-macosx_10_13_x86_64.whl", hash = "sha256:ba9f33bb525b14c3ea563b2fd521a84d2fa214ec59e3e6a2858f78d0844dd60d"}, + {file = "psutil-7.2.1-cp313-cp313t-macosx_11_0_arm64.whl", hash = "sha256:81442dac7abfc2f4f4385ea9e12ddf5a796721c0f6133260687fec5c3780fa49"}, + {file = "psutil-7.2.1-cp313-cp313t-manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:ea46c0d060491051d39f0d2cff4f98d5c72b288289f57a21556cc7d504db37fc"}, + {file = "psutil-7.2.1-cp313-cp313t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:35630d5af80d5d0d49cfc4d64c1c13838baf6717a13effb35869a5919b854cdf"}, + {file = "psutil-7.2.1-cp313-cp313t-win_amd64.whl", hash = "sha256:923f8653416604e356073e6e0bccbe7c09990acef442def2f5640dd0faa9689f"}, + {file = "psutil-7.2.1-cp313-cp313t-win_arm64.whl", hash = "sha256:cfbe6b40ca48019a51827f20d830887b3107a74a79b01ceb8cc8de4ccb17b672"}, + {file = "psutil-7.2.1-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:494c513ccc53225ae23eec7fe6e1482f1b8a44674241b54561f755a898650679"}, + {file = "psutil-7.2.1-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:3fce5f92c22b00cdefd1645aa58ab4877a01679e901555067b1bd77039aa589f"}, + {file = "psutil-7.2.1-cp314-cp314t-manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:93f3f7b0bb07711b49626e7940d6fe52aa9940ad86e8f7e74842e73189712129"}, + {file = "psutil-7.2.1-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:d34d2ca888208eea2b5c68186841336a7f5e0b990edec929be909353a202768a"}, + {file = "psutil-7.2.1-cp314-cp314t-win_amd64.whl", hash = "sha256:2ceae842a78d1603753561132d5ad1b2f8a7979cb0c283f5b52fb4e6e14b1a79"}, + {file = "psutil-7.2.1-cp314-cp314t-win_arm64.whl", hash = "sha256:08a2f175e48a898c8eb8eace45ce01777f4785bc744c90aa2cc7f2fa5462a266"}, + {file = "psutil-7.2.1-cp36-abi3-macosx_10_9_x86_64.whl", hash = "sha256:b2e953fcfaedcfbc952b44744f22d16575d3aa78eb4f51ae74165b4e96e55f42"}, + {file = "psutil-7.2.1-cp36-abi3-macosx_11_0_arm64.whl", hash = "sha256:05cc68dbb8c174828624062e73078e7e35406f4ca2d0866c272c2410d8ef06d1"}, + {file = "psutil-7.2.1-cp36-abi3-manylinux2010_x86_64.manylinux_2_12_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5e38404ca2bb30ed7267a46c02f06ff842e92da3bb8c5bfdadbd35a5722314d8"}, + {file = "psutil-7.2.1-cp36-abi3-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:ab2b98c9fc19f13f59628d94df5cc4cc4844bc572467d113a8b517d634e362c6"}, + {file = "psutil-7.2.1-cp36-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:f78baafb38436d5a128f837fab2d92c276dfb48af01a240b861ae02b2413ada8"}, + {file = "psutil-7.2.1-cp36-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:99a4cd17a5fdd1f3d014396502daa70b5ec21bf4ffe38393e152f8e449757d67"}, + {file = "psutil-7.2.1-cp37-abi3-win_amd64.whl", hash = "sha256:b1b0671619343aa71c20ff9767eced0483e4fc9e1f489d50923738caf6a03c17"}, + {file = "psutil-7.2.1-cp37-abi3-win_arm64.whl", hash = "sha256:0d67c1822c355aa6f7314d92018fb4268a76668a536f133599b91edd48759442"}, + {file = "psutil-7.2.1.tar.gz", hash = "sha256:f7583aec590485b43ca601dd9cea0dcd65bd7bb21d30ef4ddbf4ea6b5ed1bdd3"}, +] + +[package.extras] +dev = ["abi3audit", "black", "check-manifest", "coverage", "packaging", "psleak", "pylint", "pyperf", "pypinfo", "pytest", "pytest-cov", "pytest-instafail", "pytest-xdist", "requests", "rstcheck", "ruff", "setuptools", "sphinx", "sphinx_rtd_theme", "toml-sort", "twine", "validate-pyproject[all]", "virtualenv", "vulture", "wheel"] +test = ["psleak", "pytest", "pytest-instafail", "pytest-xdist", "setuptools"] + +[[package]] +name = "py" +version = "1.11.0" +description = "library with cross-python path, ini-parsing, io, code, log facilities" +optional = false +python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" +groups = ["dev"] +files = [ + {file = "py-1.11.0-py2.py3-none-any.whl", hash = "sha256:607c53218732647dff4acdfcd50cb62615cedf612e72d1724fb1a0cc6405b378"}, + {file = "py-1.11.0.tar.gz", hash = "sha256:51c75c4126074b472f746a24399ad32f6053d1b34b68d2fa41e558e6f4a98719"}, +] + [[package]] name = "pycparser" version = "3.0" @@ -1774,6 +1821,23 @@ pytest = ">=7" [package.extras] testing = ["process-tests", "pytest-xdist", "virtualenv"] +[[package]] +name = "pytest-xprocess" +version = "0.22.2" +description = "A pytest plugin for managing processes across test runs." +optional = false +python-versions = ">=3.7" +groups = ["dev"] +files = [ + {file = "pytest-xprocess-0.22.2.tar.gz", hash = "sha256:599ee25b938e8f259e18d9c5b4d6384884f8a6a28ca51eed32d0d9526bdcf77c"}, + {file = "pytest_xprocess-0.22.2-py3-none-any.whl", hash = "sha256:dabd65bc06485df85bb40d26d103d9ba9b94c63ce80a2358bf642bd679bcc742"}, +] + +[package.dependencies] +psutil = "*" +py = "*" +pytest = ">=2.8" + [[package]] name = "python-dotenv" version = "1.2.1" @@ -2876,4 +2940,4 @@ files = [ [metadata] lock-version = "2.1" python-versions = ">=3.11" -content-hash = "dbf047d08a7f6fa4b2520a49f36377a6c61213a0c0522210d0c7f5003c71ef03" +content-hash = "77b059fb4bba6f766aab92f0ad0319eba0c115a68a01582423a15c9366c665fb" diff --git a/pyproject.toml b/pyproject.toml index 0f62370..b4fbd69 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,6 +22,7 @@ ruff = ">=0.4.8" pytest = "^8.3.0" pytest-asyncio = "^0.23.0" pytest-cov = "^7.0.0" +pytest-xprocess = "^0.22.0" pre-commit = "^4.5.1" bandit = "^1.9.3" safety = "^3.7.0" @@ -31,7 +32,7 @@ requires = ["poetry-core"] build-backend = "poetry.core.masonry.api" [tool.ruff] -target-version = "py311" +target-version = "py313" line-length = 79 format.quote-style = "double" lint.select = ["E", "W", "F", "I", "B", "C4", "UP", "RUF"]