From 4b6fd93644942a454cc89aec65e22c3d8cc6bd71 Mon Sep 17 00:00:00 2001 From: Brooks Travis Date: Tue, 16 Jul 2024 13:01:59 -0500 Subject: [PATCH] Bumping pyproject.toml version number and updating github workflow to work with it. --- .flake8 | 2 ++ .gitignore | 1 + folioclient/__init__.py | 4 ++++ folioclient/decorators.py | 3 +++ mypy.ini | 5 +++++ noxfile.py | 5 +++-- pyproject.toml | 2 +- requirements.txt | 13 +++++++------ 8 files changed, 26 insertions(+), 9 deletions(-) create mode 100644 .flake8 create mode 100644 mypy.ini diff --git a/.flake8 b/.flake8 new file mode 100644 index 0000000..81b1e7d --- /dev/null +++ b/.flake8 @@ -0,0 +1,2 @@ +[flake8] +exclude = .git,__pycache__,docs/source/conf.py,old,build,dist,.venv,.nox,.pytest_cache,.mypy_cache,.vscode \ No newline at end of file diff --git a/.gitignore b/.gitignore index 6a879f3..20560d8 100644 --- a/.gitignore +++ b/.gitignore @@ -89,6 +89,7 @@ venv/ ENV/ env.bak/ venv.bak/ +.nox # Spyder project settings .spyderproject diff --git a/folioclient/__init__.py b/folioclient/__init__.py index fbc3930..d3e25de 100644 --- a/folioclient/__init__.py +++ b/folioclient/__init__.py @@ -1 +1,5 @@ +import importlib.metadata + +__version__ = importlib.metadata.version("folioclient") + from folioclient.FolioClient import FolioClient diff --git a/folioclient/decorators.py b/folioclient/decorators.py index 59e036d..8d42680 100644 --- a/folioclient/decorators.py +++ b/folioclient/decorators.py @@ -11,6 +11,9 @@ def retry_on_server_error(func): """Retry a function if a temporary server error is encountered. + Args: + func: The function to be retried. + Returns: The decorated function. """ diff --git a/mypy.ini b/mypy.ini new file mode 100644 index 0000000..4ce4949 --- /dev/null +++ b/mypy.ini @@ -0,0 +1,5 @@ +# mypy.ini +[mypy] + +[mypy-nox.*,pytest] +ignore_missing_imports = True diff --git a/noxfile.py b/noxfile.py index d32750b..7095e48 100644 --- a/noxfile.py +++ b/noxfile.py @@ -18,9 +18,10 @@ @nox.session() def tests(session): - posargs = ["--cov=./", "--cov-report=xml", "--durations=20"] + # posargs = ["--cov=./", "--cov-report=xml", "--durations=20"] session.run("poetry", "install", external=True) - session.run("pytest", "--cov", *posargs, env=env) + # session.run("pytest", "--cov", *posargs, env=env) + session.run("pytest", env=env) @nox.session() diff --git a/pyproject.toml b/pyproject.toml index 829c3e4..aee9b83 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "folioclient" -version = "0.60.3" +version = "0.60.4" authors = ["Theodor Tolstoy ", "Brooks Travis "] description = "An API wrapper over the FOLIO LSP API Suite OKAPI." repository = "https://github.com/FOLIO-FSE/folioclient" diff --git a/requirements.txt b/requirements.txt index 734aa5f..4341902 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,13 +1,14 @@ -anyio==4.0.0 ; python_version >= "3.9" and python_version < "4.0" -certifi==2023.7.22 ; python_version >= "3.9" and python_version < "4.0" -exceptiongroup==1.1.3 ; python_version >= "3.9" and python_version < "3.11" +anyio==4.4.0 ; python_version >= "3.9" and python_version < "4.0" +certifi==2024.7.4 ; python_version >= "3.9" and python_version < "4.0" +exceptiongroup==1.2.2 ; python_version >= "3.9" and python_version < "3.11" h11==0.14.0 ; python_version >= "3.9" and python_version < "4.0" httpcore==0.16.3 ; python_version >= "3.9" and python_version < "4.0" httpx==0.23.3 ; python_version >= "3.9" and python_version < "4.0" -idna==3.4 ; python_version >= "3.9" and python_version < "4.0" -python-dateutil==2.8.2 ; python_version >= "3.9" and python_version < "4.0" +idna==3.7 ; python_version >= "3.9" and python_version < "4.0" py-openapi-schema-to-json-schema==0.0.3 ; python_version >= "3.9" and python_version < "4.0" +python-dateutil==2.9.0.post0 ; python_version >= "3.9" and python_version < "4.0" pyyaml==6.0.1 ; python_version >= "3.9" and python_version < "4.0" rfc3986[idna2008]==1.5.0 ; python_version >= "3.9" and python_version < "4.0" six==1.16.0 ; python_version >= "3.9" and python_version < "4.0" -sniffio==1.3.0 ; python_version >= "3.9" and python_version < "4.0" +sniffio==1.3.1 ; python_version >= "3.9" and python_version < "4.0" +typing-extensions==4.12.2 ; python_version >= "3.9" and python_version < "3.11"