From 9e96f3293385caa7f26c1aa5d26a9a41d2590106 Mon Sep 17 00:00:00 2001 From: Chiara Rasi Date: Wed, 6 Dec 2023 14:46:03 +0100 Subject: [PATCH 1/5] Update Python in GitHub action and fix pytest bug by upgrading lib --- .github/workflows/tests.yml | 2 +- CHANGELOG.md | 2 + poetry.lock | 175 ++++++++---------------------------- pyproject.toml | 5 +- 4 files changed, 44 insertions(+), 140 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index cdceda6..edbb306 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -7,7 +7,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [ '3.8' ] + python-version: [ '3.11' ] steps: - uses: actions/checkout@v4 - name: Set up Python ${{ matrix.python-version }} diff --git a/CHANGELOG.md b/CHANGELOG.md index 9bac7c3..d4545c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,8 @@ ## [unreleased] ### Changed - Updated version of external images used in GitHub actions +- Updated Python version to v3.11 in tests GitHub action +- Updated pytest package to the latest version to fix GitHub tests action bug ## [1.4] ### Changed diff --git a/poetry.lock b/poetry.lock index 1167880..1b34514 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,10 +1,9 @@ -# This file is automatically @generated by Poetry 1.4.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. [[package]] name = "aiofiles" version = "23.2.1" description = "File support for asyncio." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -16,7 +15,6 @@ files = [ name = "annotated-types" version = "0.6.0" description = "Reusable constraint types to use with typing.Annotated" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -31,7 +29,6 @@ typing-extensions = {version = ">=4.0.0", markers = "python_version < \"3.9\""} name = "anyio" version = "3.7.1" description = "High level compatibility layer for multiple asynchronous event loop implementations" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -49,41 +46,10 @@ doc = ["Sphinx", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx-rtd- test = ["anyio[trio]", "coverage[toml] (>=4.5)", "hypothesis (>=4.0)", "mock (>=4)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"] trio = ["trio (<0.22)"] -[[package]] -name = "atomicwrites" -version = "1.4.1" -description = "Atomic file writes." -category = "main" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" -files = [ - {file = "atomicwrites-1.4.1.tar.gz", hash = "sha256:81b2c9071a49367a7f770170e5eec8cb66567cfbbc8c73d20ce5ca4a8d71cf11"}, -] - -[[package]] -name = "attrs" -version = "23.1.0" -description = "Classes Without Boilerplate" -category = "main" -optional = false -python-versions = ">=3.7" -files = [ - {file = "attrs-23.1.0-py3-none-any.whl", hash = "sha256:1f28b4522cdc2fb4256ac1a020c78acf9cba2c6b461ccd2c126f3aa8e8335d04"}, - {file = "attrs-23.1.0.tar.gz", hash = "sha256:6279836d581513a26f1bf235f9acd333bc9115683f14f7e8fae46c98fc50e015"}, -] - -[package.extras] -cov = ["attrs[tests]", "coverage[toml] (>=5.3)"] -dev = ["attrs[docs,tests]", "pre-commit"] -docs = ["furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier", "zope-interface"] -tests = ["attrs[tests-no-zope]", "zope-interface"] -tests-no-zope = ["cloudpickle", "hypothesis", "mypy (>=1.1.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] - [[package]] name = "certifi" version = "2023.11.17" description = "Python package for providing Mozilla's CA Bundle." -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -95,7 +61,6 @@ files = [ name = "charset-normalizer" version = "3.3.2" description = "The Real First Universal Charset Detector. Open, modern and actively maintained alternative to Chardet." -category = "main" optional = false python-versions = ">=3.7.0" files = [ @@ -195,7 +160,6 @@ files = [ name = "click" version = "8.1.7" description = "Composable command line interface toolkit" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -210,7 +174,6 @@ colorama = {version = "*", markers = "platform_system == \"Windows\""} name = "colorama" version = "0.4.6" description = "Cross-platform colored terminal text." -category = "main" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,!=3.3.*,!=3.4.*,!=3.5.*,!=3.6.*,>=2.7" files = [ @@ -222,7 +185,6 @@ files = [ name = "exceptiongroup" version = "1.2.0" description = "Backport of PEP 654 (exception groups)" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -237,7 +199,6 @@ test = ["pytest (>=6)"] name = "fastapi" version = "0.104.1" description = "FastAPI framework, high performance, easy to learn, fast to code, ready for production" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -258,7 +219,6 @@ all = ["email-validator (>=2.0.0)", "httpx (>=0.23.0)", "itsdangerous (>=1.1.0)" name = "ghp-import" version = "2.1.0" description = "Copy your docs directly to the gh-pages branch." -category = "dev" optional = false python-versions = "*" files = [ @@ -276,7 +236,6 @@ dev = ["flake8", "markdown", "twine", "wheel"] name = "greenlet" version = "3.0.1" description = "Lightweight in-process concurrent programming" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -347,7 +306,6 @@ test = ["objgraph", "psutil"] name = "gunicorn" version = "20.1.0" description = "WSGI HTTP Server for UNIX" -category = "main" optional = false python-versions = ">=3.5" files = [ @@ -368,7 +326,6 @@ tornado = ["tornado (>=0.2)"] name = "h11" version = "0.14.0" description = "A pure-Python, bring-your-own-I/O implementation of HTTP/1.1" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -380,7 +337,6 @@ files = [ name = "httpcore" version = "0.16.3" description = "A minimal low-level HTTP client." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -392,17 +348,16 @@ files = [ anyio = ">=3.0,<5.0" certifi = "*" h11 = ">=0.13,<0.15" -sniffio = ">=1.0.0,<2.0.0" +sniffio = "==1.*" [package.extras] http2 = ["h2 (>=3,<5)"] -socks = ["socksio (>=1.0.0,<2.0.0)"] +socks = ["socksio (==1.*)"] [[package]] name = "httpx" version = "0.23.3" description = "The next generation HTTP client." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -418,15 +373,14 @@ sniffio = "*" [package.extras] brotli = ["brotli", "brotlicffi"] -cli = ["click (>=8.0.0,<9.0.0)", "pygments (>=2.0.0,<3.0.0)", "rich (>=10,<13)"] +cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<13)"] http2 = ["h2 (>=3,<5)"] -socks = ["socksio (>=1.0.0,<2.0.0)"] +socks = ["socksio (==1.*)"] [[package]] name = "idna" version = "3.6" description = "Internationalized Domain Names in Applications (IDNA)" -category = "main" optional = false python-versions = ">=3.5" files = [ @@ -438,7 +392,6 @@ files = [ name = "importlib-metadata" version = "7.0.0" description = "Read metadata from Python packages" -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -458,7 +411,6 @@ testing = ["flufl.flake8", "importlib-resources (>=1.3)", "packaging", "pyfakefs name = "importlib-resources" version = "5.13.0" description = "Read resources from Python packages" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -473,11 +425,21 @@ zipp = {version = ">=3.1.0", markers = "python_version < \"3.10\""} docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] testing = ["pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-ruff"] +[[package]] +name = "iniconfig" +version = "2.0.0" +description = "brain-dead simple config-ini parsing" +optional = false +python-versions = ">=3.7" +files = [ + {file = "iniconfig-2.0.0-py3-none-any.whl", hash = "sha256:b6a85871a79d2e3b22d2d1b94ac2824226a63c6b741c88f7ae975f18b6778374"}, + {file = "iniconfig-2.0.0.tar.gz", hash = "sha256:2d91e135bf72d31a410b17c16da610a82cb55f6b0477d1a902134b24a455b8b3"}, +] + [[package]] name = "jinja2" version = "3.1.2" description = "A very fast and expressive template engine." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -495,7 +457,6 @@ i18n = ["Babel (>=2.7)"] name = "markdown" version = "3.5.1" description = "Python implementation of John Gruber's Markdown." -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -514,7 +475,6 @@ testing = ["coverage", "pyyaml"] name = "markupsafe" version = "2.1.3" description = "Safely add untrusted strings to HTML/XML markup." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -584,7 +544,6 @@ files = [ name = "mergedeep" version = "1.3.4" description = "A deep merge function for 🐍." -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -596,7 +555,6 @@ files = [ name = "mkdocs" version = "1.5.3" description = "Project documentation with Markdown." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -628,7 +586,6 @@ min-versions = ["babel (==2.9.0)", "click (==7.0)", "colorama (==0.4)", "ghp-imp name = "mkdocs-material" version = "7.3.6" description = "A Material Design theme for MkDocs" -category = "dev" optional = false python-versions = "*" files = [ @@ -648,7 +605,6 @@ pymdown-extensions = ">=9.0" name = "mkdocs-material-extensions" version = "1.3.1" description = "Extension pack for Python Markdown and MkDocs Material." -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -656,23 +612,10 @@ files = [ {file = "mkdocs_material_extensions-1.3.1.tar.gz", hash = "sha256:10c9511cea88f568257f960358a467d12b970e1f7b2c0e5fb2bb48cab1928443"}, ] -[[package]] -name = "more-itertools" -version = "10.1.0" -description = "More routines for operating on iterables, beyond itertools" -category = "main" -optional = false -python-versions = ">=3.8" -files = [ - {file = "more-itertools-10.1.0.tar.gz", hash = "sha256:626c369fa0eb37bac0291bce8259b332fd59ac792fa5497b59837309cd5b114a"}, - {file = "more_itertools-10.1.0-py3-none-any.whl", hash = "sha256:64e0735fcfdc6f3464ea133afe8ea4483b1c5fe3a3d69852e6503b43a0b222e6"}, -] - [[package]] name = "packaging" version = "23.2" description = "Core utilities for Python packages" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -684,7 +627,6 @@ files = [ name = "pathspec" version = "0.11.2" description = "Utility library for gitignore style pattern matching of file paths." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -696,7 +638,6 @@ files = [ name = "platformdirs" version = "4.1.0" description = "A small Python package for determining appropriate platform-specific dirs, e.g. a \"user data dir\"." -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -712,7 +653,6 @@ test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4)", "pytest-co name = "pluggy" version = "0.13.1" description = "plugin and hook calling mechanisms for python" -category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" files = [ @@ -723,23 +663,10 @@ files = [ [package.extras] dev = ["pre-commit", "tox"] -[[package]] -name = "py" -version = "1.11.0" -description = "library with cross-python path, ini-parsing, io, code, log facilities" -category = "main" -optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*" -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 = "pydantic" version = "2.5.2" description = "Data validation using Python type hints" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -759,7 +686,6 @@ email = ["email-validator (>=2.0.0)"] name = "pydantic-core" version = "2.14.5" description = "" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -877,7 +803,6 @@ typing-extensions = ">=4.6.0,<4.7.0 || >4.7.0" name = "pydantic-settings" version = "2.1.0" description = "Settings management using Pydantic" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -893,7 +818,6 @@ python-dotenv = ">=0.21.0" name = "pygments" version = "2.17.2" description = "Pygments is a syntax highlighting package written in Python." -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -909,7 +833,6 @@ windows-terminal = ["colorama (>=0.4.6)"] name = "pymdown-extensions" version = "10.5" description = "Extension pack for Python Markdown." -category = "dev" optional = false python-versions = ">=3.8" files = [ @@ -926,35 +849,30 @@ extra = ["pygments (>=2.12)"] [[package]] name = "pytest" -version = "5.4.3" +version = "7.4.3" description = "pytest: simple powerful testing with Python" -category = "main" optional = false -python-versions = ">=3.5" +python-versions = ">=3.7" files = [ - {file = "pytest-5.4.3-py3-none-any.whl", hash = "sha256:5c0db86b698e8f170ba4582a492248919255fcd4c79b1ee64ace34301fb589a1"}, - {file = "pytest-5.4.3.tar.gz", hash = "sha256:7979331bfcba207414f5e1263b5a0f8f521d0f457318836a7355531ed1a4c7d8"}, + {file = "pytest-7.4.3-py3-none-any.whl", hash = "sha256:0d009c083ea859a71b76adf7c1d502e4bc170b80a8ef002da5806527b9591fac"}, + {file = "pytest-7.4.3.tar.gz", hash = "sha256:d989d136982de4e3b29dabcc838ad581c64e8ed52c11fbe86ddebd9da0818cd5"}, ] [package.dependencies] -atomicwrites = {version = ">=1.0", markers = "sys_platform == \"win32\""} -attrs = ">=17.4.0" colorama = {version = "*", markers = "sys_platform == \"win32\""} -more-itertools = ">=4.0.0" +exceptiongroup = {version = ">=1.0.0rc8", markers = "python_version < \"3.11\""} +iniconfig = "*" packaging = "*" -pluggy = ">=0.12,<1.0" -py = ">=1.5.0" -wcwidth = "*" +pluggy = ">=0.12,<2.0" +tomli = {version = ">=1.0.0", markers = "python_version < \"3.11\""} [package.extras] -checkqa-mypy = ["mypy (==v0.761)"] -testing = ["argcomplete", "hypothesis (>=3.56)", "mock", "nose", "requests", "xmlschema"] +testing = ["argcomplete", "attrs (>=19.2.0)", "hypothesis (>=3.56)", "mock", "nose", "pygments (>=2.7.2)", "requests", "setuptools", "xmlschema"] [[package]] name = "pytest-mock" version = "3.12.0" description = "Thin-wrapper around the mock package for easier use with pytest" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -972,7 +890,6 @@ dev = ["pre-commit", "pytest-asyncio", "tox"] name = "python-dateutil" version = "2.8.2" description = "Extensions to the standard Python datetime module" -category = "dev" optional = false python-versions = "!=3.0.*,!=3.1.*,!=3.2.*,>=2.7" files = [ @@ -987,7 +904,6 @@ six = ">=1.5" name = "python-dotenv" version = "1.0.0" description = "Read key-value pairs from a .env file and set them as environment variables" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1002,7 +918,6 @@ cli = ["click (>=5.0)"] name = "pyyaml" version = "6.0.1" description = "YAML parser and emitter for Python" -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1062,7 +977,6 @@ files = [ name = "pyyaml-env-tag" version = "0.1" description = "A custom YAML tag for referencing environment variables in YAML files. " -category = "dev" optional = false python-versions = ">=3.6" files = [ @@ -1077,7 +991,6 @@ pyyaml = "*" name = "requests" version = "2.31.0" description = "Python HTTP for Humans." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1099,7 +1012,6 @@ use-chardet-on-py3 = ["chardet (>=3.0.2,<6)"] name = "rfc3986" version = "1.5.0" description = "Validating URI References per RFC 3986" -category = "main" optional = false python-versions = "*" files = [ @@ -1117,7 +1029,6 @@ idna2008 = ["idna"] name = "setuptools" version = "69.0.2" description = "Easily download, build, install, upgrade, and uninstall Python packages" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1134,7 +1045,6 @@ testing-integration = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "jar name = "six" version = "1.16.0" description = "Python 2 and 3 compatibility utilities" -category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" files = [ @@ -1146,7 +1056,6 @@ files = [ name = "sniffio" version = "1.3.0" description = "Sniff out which async library your code is running under" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1158,7 +1067,6 @@ files = [ name = "sqlalchemy" version = "2.0.23" description = "Database Abstraction Library" -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1246,7 +1154,6 @@ sqlcipher = ["sqlcipher3-binary"] name = "sqlmodel" version = "0.0.14" description = "SQLModel, SQL databases in Python, designed for simplicity, compatibility, and robustness." -category = "main" optional = false python-versions = ">=3.7,<4.0" files = [ @@ -1262,7 +1169,6 @@ SQLAlchemy = ">=2.0.0,<2.1.0" name = "starlette" version = "0.27.0" description = "The little ASGI library that shines." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1277,11 +1183,21 @@ typing-extensions = {version = ">=3.10.0", markers = "python_version < \"3.10\"" [package.extras] full = ["httpx (>=0.22.0)", "itsdangerous", "jinja2", "python-multipart", "pyyaml"] +[[package]] +name = "tomli" +version = "2.0.1" +description = "A lil' TOML parser" +optional = false +python-versions = ">=3.7" +files = [ + {file = "tomli-2.0.1-py3-none-any.whl", hash = "sha256:939de3e7a6161af0c887ef91b7d41a53e7c5a1ca976325f429cb46ea9bc30ecc"}, + {file = "tomli-2.0.1.tar.gz", hash = "sha256:de526c12914f0c550d15924c62d72abc48d6fe7364aa87328337a31007fe8a4f"}, +] + [[package]] name = "typer" version = "0.4.2" description = "Typer, build great CLIs. Easy to code. Based on Python type hints." -category = "main" optional = false python-versions = ">=3.6" files = [ @@ -1302,7 +1218,6 @@ test = ["black (>=22.3.0,<23.0.0)", "coverage (>=5.2,<6.0)", "isort (>=5.0.6,<6. name = "typing-extensions" version = "4.8.0" description = "Backported and Experimental Type Hints for Python 3.8+" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1314,7 +1229,6 @@ files = [ name = "urllib3" version = "2.1.0" description = "HTTP library with thread-safe connection pooling, file post, and more." -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1331,7 +1245,6 @@ zstd = ["zstandard (>=0.18.0)"] name = "uvicorn" version = "0.21.1" description = "The lightning-fast ASGI server." -category = "main" optional = false python-versions = ">=3.7" files = [ @@ -1350,7 +1263,6 @@ standard = ["colorama (>=0.4)", "httptools (>=0.5.0)", "python-dotenv (>=0.13)", name = "watchdog" version = "3.0.0" description = "Filesystem events monitoring" -category = "dev" optional = false python-versions = ">=3.7" files = [ @@ -1386,23 +1298,10 @@ files = [ [package.extras] watchmedo = ["PyYAML (>=3.10)"] -[[package]] -name = "wcwidth" -version = "0.2.12" -description = "Measures the displayed width of unicode strings in a terminal" -category = "main" -optional = false -python-versions = "*" -files = [ - {file = "wcwidth-0.2.12-py2.py3-none-any.whl", hash = "sha256:f26ec43d96c8cbfed76a5075dac87680124fa84e0855195a6184da9c187f133c"}, - {file = "wcwidth-0.2.12.tar.gz", hash = "sha256:f01c104efdf57971bcb756f054dd58ddec5204dd15fa31d6503ea57947d97c02"}, -] - [[package]] name = "zipp" version = "3.17.0" description = "Backport of pathlib-compatible object wrapper for zip files" -category = "main" optional = false python-versions = ">=3.8" files = [ @@ -1417,4 +1316,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "28b05d02cfc1760de66a1da107a091f983de5e8e63bc409b317397d7d25443c8" +content-hash = "2b642348a916ce8f3a6e74af12b1989bbc658c444ebf8a17a230e9e467ce8929" diff --git a/pyproject.toml b/pyproject.toml index f06d925..1cc473f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,12 +22,15 @@ importlib-resources = "^5.12.0" uvicorn = "^0.21.1" pydantic = "^2.5.2" pydantic-settings = "^2.1.0" +pytest = "^7.4.3" [tool.poetry.dev-dependencies] -pytest = "^5.2" mkdocs = "^1.2.2" mkdocs-material = "^7.3.1" +[tool.poetry.group.dev.dependencies] +pytest = "^7.4.3" + [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" From 0d7e017b3c113864102fc60f8f3d929664e3ca21 Mon Sep 17 00:00:00 2001 From: Chiara Rasi Date: Wed, 6 Dec 2023 14:48:37 +0100 Subject: [PATCH 2/5] Fix changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4545c1..15c9e7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,7 @@ ### Changed - Updated version of external images used in GitHub actions - Updated Python version to v3.11 in tests GitHub action +### Fixed - Updated pytest package to the latest version to fix GitHub tests action bug ## [1.4] From 1beb68b3fc2f7c9cf8676ccc6ccabc677ea0a5a5 Mon Sep 17 00:00:00 2001 From: Chiara Rasi Date: Thu, 7 Dec 2023 08:29:08 +0100 Subject: [PATCH 3/5] Fix tests --- poetry.lock | 9 +++++---- tests/endpoints/test_endpoint_exons.py | 3 ++- tests/endpoints/test_endpoints_genes.py | 4 ++-- tests/endpoints/test_endpoints_transcripts.py | 2 +- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/poetry.lock b/poetry.lock index 1b34514..af420d6 100644 --- a/poetry.lock +++ b/poetry.lock @@ -651,17 +651,18 @@ test = ["appdirs (==1.4.4)", "covdefaults (>=2.3)", "pytest (>=7.4)", "pytest-co [[package]] name = "pluggy" -version = "0.13.1" +version = "1.3.0" description = "plugin and hook calling mechanisms for python" optional = false -python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*" +python-versions = ">=3.8" files = [ - {file = "pluggy-0.13.1-py2.py3-none-any.whl", hash = "sha256:966c145cd83c96502c3c3868f50408687b38434af77734af1e9ca461a4081d2d"}, - {file = "pluggy-0.13.1.tar.gz", hash = "sha256:15b2acde666561e1298d71b523007ed7364de07029219b604cf808bfa1c765b0"}, + {file = "pluggy-1.3.0-py3-none-any.whl", hash = "sha256:d89c696a773f8bd377d18e5ecda92b7a3793cbe66c87060a6fb58c7b6e1061f7"}, + {file = "pluggy-1.3.0.tar.gz", hash = "sha256:cf61ae8f126ac6f7c451172cf30e3e43d3ca77615509771b3a984a0730651e12"}, ] [package.extras] dev = ["pre-commit", "tox"] +testing = ["pytest", "pytest-benchmark"] [[package]] name = "pydantic" diff --git a/tests/endpoints/test_endpoint_exons.py b/tests/endpoints/test_endpoint_exons.py index 40a90cd..848faba 100644 --- a/tests/endpoints/test_endpoint_exons.py +++ b/tests/endpoints/test_endpoint_exons.py @@ -30,7 +30,8 @@ def test_ensembl_exons( mocker.patch("schug.endpoints.exons.stream_resource", return_value=exons_lines) # WHEN sending a request to Biomart to retrieve exons in the given build - response: Response = client.get(f"{endpoints.ENSEMBL_EXONS}?build={build}") + response: Response = client.get(f"{endpoints.ENSEMBL_EXONS.value}?build={build}") + # THEN it should return success assert response.status_code == status.HTTP_200_OK # AND response should contain lines diff --git a/tests/endpoints/test_endpoints_genes.py b/tests/endpoints/test_endpoints_genes.py index 3d6a27b..e04738e 100644 --- a/tests/endpoints/test_endpoints_genes.py +++ b/tests/endpoints/test_endpoints_genes.py @@ -19,7 +19,7 @@ def test_read_genes_empty_db(client: TestClient, endpoints: Type): """Test read genes response when database is empty.""" # WHEN getting a response from the genes endpoints of an empty app - response = client.get(endpoints.GENES) + response = client.get(endpoints.GENES.value) # THEN expected status should be 404 (NOT FOUND) assert response.status_code == status.HTTP_404_NOT_FOUND @@ -41,7 +41,7 @@ def test_ensembl_genes( mocker.patch("schug.endpoints.genes.stream_resource", return_value=gene_lines) # WHEN sending a request to Biomart to retrieve genes in the given build - response: Response = client.get(f"{endpoints.ENSEMBL_GENES}?build={build}") + response: Response = client.get(f"{endpoints.ENSEMBL_GENES.value}?build={build}") # THEN it should return success assert response.status_code == status.HTTP_200_OK # AND response should contain lines diff --git a/tests/endpoints/test_endpoints_transcripts.py b/tests/endpoints/test_endpoints_transcripts.py index 6bc0bf9..96c4eb9 100644 --- a/tests/endpoints/test_endpoints_transcripts.py +++ b/tests/endpoints/test_endpoints_transcripts.py @@ -31,7 +31,7 @@ def test_ensembl_transcripts_37( mocker.patch("schug.endpoints.transcripts.stream_resource", return_value=tx_lines) # WHEN sending a request to Biomart to retrieve transcripts in the given build - response: Response = client.get(f"{endpoints.ENSEMBL_TRANCRIPTS}?build={build}") + response: Response = client.get(f"{endpoints.ENSEMBL_TRANCRIPTS.value}?build={build}") # THEN it should return success assert response.status_code == status.HTTP_200_OK # AND response should contain lines From 31a577863fff2ceb7add790ffe32419171194e2c Mon Sep 17 00:00:00 2001 From: Chiara Rasi Date: Thu, 7 Dec 2023 08:30:44 +0100 Subject: [PATCH 4/5] Reformat file with black --- tests/endpoints/test_endpoints_transcripts.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tests/endpoints/test_endpoints_transcripts.py b/tests/endpoints/test_endpoints_transcripts.py index 96c4eb9..a3bf377 100644 --- a/tests/endpoints/test_endpoints_transcripts.py +++ b/tests/endpoints/test_endpoints_transcripts.py @@ -31,7 +31,9 @@ def test_ensembl_transcripts_37( mocker.patch("schug.endpoints.transcripts.stream_resource", return_value=tx_lines) # WHEN sending a request to Biomart to retrieve transcripts in the given build - response: Response = client.get(f"{endpoints.ENSEMBL_TRANCRIPTS.value}?build={build}") + response: Response = client.get( + f"{endpoints.ENSEMBL_TRANCRIPTS.value}?build={build}" + ) # THEN it should return success assert response.status_code == status.HTTP_200_OK # AND response should contain lines From 58d65a6ab83c4edcac1dac926ce8ab26c30d7676 Mon Sep 17 00:00:00 2001 From: Chiara Rasi Date: Mon, 11 Dec 2023 08:09:06 +0100 Subject: [PATCH 5/5] Remove pytest from the package dependecies --- CHANGELOG.md | 3 +-- poetry.lock | 2 +- pyproject.toml | 4 ---- 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 15c9e7c..aed94a7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,8 +4,7 @@ ### Changed - Updated version of external images used in GitHub actions - Updated Python version to v3.11 in tests GitHub action -### Fixed -- Updated pytest package to the latest version to fix GitHub tests action bug +- Removed pytest from the package dependencies ## [1.4] ### Changed diff --git a/poetry.lock b/poetry.lock index af420d6..b5a5ff0 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1317,4 +1317,4 @@ testing = ["big-O", "jaraco.functools", "jaraco.itertools", "more-itertools", "p [metadata] lock-version = "2.0" python-versions = "^3.8" -content-hash = "2b642348a916ce8f3a6e74af12b1989bbc658c444ebf8a17a230e9e467ce8929" +content-hash = "929be0cebd7b4ad1786e58c937d7d5521f2ec2b7682a313cc3031fe8b1176563" diff --git a/pyproject.toml b/pyproject.toml index 1cc473f..ad7dafb 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -22,15 +22,11 @@ importlib-resources = "^5.12.0" uvicorn = "^0.21.1" pydantic = "^2.5.2" pydantic-settings = "^2.1.0" -pytest = "^7.4.3" [tool.poetry.dev-dependencies] mkdocs = "^1.2.2" mkdocs-material = "^7.3.1" -[tool.poetry.group.dev.dependencies] -pytest = "^7.4.3" - [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api"