Skip to content

Commit

Permalink
Merge pull request #180 from tbascoul/support-py-3-11
Browse files Browse the repository at this point in the history
Support python 3.11
  • Loading branch information
antoinejeannot authored Mar 29, 2023
2 parents 19f6aa9 + 47872b9 commit 0772848
Show file tree
Hide file tree
Showing 10 changed files with 74 additions and 53 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Python 3.10
- name: Set up Python 3.11
uses: actions/setup-python@v3
with:
python-version: "3.10"
python-version: "3.11"
- name: Install dependencies
run: python3.10 -m pip install -r requirements-dev.txt
run: python3.11 -m pip install -r requirements-dev.txt
- name: Install mypy types
run: mypy --install-types --non-interactive -p modelkit
- name: Run lint
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
fail-fast: false
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.8", "3.9", "3.10", "3.11"]
os: [macos-latest, windows-latest, ubuntu-latest]

runs-on: ${{ matrix.os }}
Expand All @@ -35,7 +35,7 @@ jobs:
PYTHON_VERSION: "${{ matrix.python-version }}"

- name: Add & Commit Badges
if: ${{matrix.os == 'ubuntu-latest' && matrix.python-version == '3.7' && github.ref == 'refs/heads/main'}}
if: ${{matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8' && github.ref == 'refs/heads/main'}}
run: |
git config user.name github-actions
git config user.email [email protected]
Expand All @@ -44,7 +44,7 @@ jobs:
git push
- name: 'Upload coverage report'
if: ${{matrix.os == 'ubuntu-latest' && matrix.python-version == '3.7' && github.ref == 'refs/heads/main'}}
if: ${{matrix.os == 'ubuntu-latest' && matrix.python-version == '3.8' && github.ref == 'refs/heads/main'}}
uses: actions/upload-artifact@v3
with:
name: coverage
Expand Down
2 changes: 1 addition & 1 deletion modelkit/core/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ class TFServingSettings(pydantic.BaseSettings):
enable: bool = pydantic.Field(False, env="MODELKIT_TF_SERVING_ENABLE")
mode: str = pydantic.Field("rest", env="MODELKIT_TF_SERVING_MODE")
host: str = pydantic.Field("localhost", env="MODELKIT_TF_SERVING_HOST")
port: int = pydantic.Field(None, env="MODELKIT_TF_SERVING_PORT")
port: int = pydantic.Field(8501, env="MODELKIT_TF_SERVING_PORT")

@pydantic.validator("port")
@classmethod
Expand Down
4 changes: 2 additions & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import nox


@nox.session(python=["3.7", "3.8", "3.9", "3.10"])
@nox.session(python=["3.8", "3.9", "3.10", "3.11"])
def test(session):
# Install deps and the package itself.
session.install("-r", "requirements-dev.txt")
Expand All @@ -10,7 +10,7 @@ def test(session):
session.run("pytest", "--junitxml=junit.xml")


@nox.session(python=["3.7", "3.8", "3.9", "3.10"])
@nox.session(python=["3.8", "3.9", "3.10", "3.11"])
def coverage(session):
# Install deps and the package itself.
session.install("-r", "requirements-optional.txt")
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["setuptools >= 40.6.0", "wheel"]
build-backend = "setuptools.build_meta"

[tool.black]
target-version = ['py37']
target-version = ['py38']

[tool.towncrier]
package = "modelkit"
Expand Down
1 change: 1 addition & 0 deletions requirements-dev.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ networkx
# api
uvicorn
fastapi
httpx
# releases
bump2version
# docs
Expand Down
59 changes: 36 additions & 23 deletions requirements-dev.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,21 @@
#
# This file is autogenerated by pip-compile with python 3.10
# To update, run:
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --no-emit-index-url --output-file=requirements-dev.txt requirements-dev.in
#
aiohttp==3.8.1
aiohttp==3.8.2
# via
# -c requirements.txt
# -r requirements.in
aiosignal==1.2.0
# via
# -c requirements.txt
# aiohttp
anyio==3.3.4
# via starlette
anyio==3.6.2
# via
# httpcore
# starlette
argcomplete==1.12.3
# via nox
asgiref==3.5.0
Expand Down Expand Up @@ -47,6 +49,8 @@ botocore==1.27.62
# via
# boto3
# s3transfer
build==0.10.0
# via pip-tools
bump2version==1.0.1
# via -r requirements-dev.in
cachetools==5.0.0
Expand All @@ -57,6 +61,8 @@ cachetools==5.0.0
certifi==2022.6.15
# via
# -c requirements.txt
# httpcore
# httpx
# msrest
# requests
cffi==1.15.1
Expand Down Expand Up @@ -90,7 +96,7 @@ deprecated==1.2.13
# redis
distlib==0.3.3
# via virtualenv
fastapi==0.71.0
fastapi==0.95.0
# via -r requirements-dev.in
filelock==3.6.0
# via
Expand All @@ -99,7 +105,7 @@ filelock==3.6.0
# virtualenv
flake8==3.9.2
# via -r requirements-dev.in
frozenlist==1.3.0
frozenlist==1.3.1
# via
# -c requirements.txt
# aiohttp
Expand All @@ -126,8 +132,14 @@ google-resumable-media==2.3.3
# via google-cloud-storage
googleapis-common-protos==1.56.4
# via google-api-core
h11==0.12.0
# via uvicorn
h11==0.14.0
# via
# httpcore
# uvicorn
httpcore==0.16.3
# via httpx
httpx==0.23.3
# via -r requirements-dev.in
humanize==4.0.0
# via
# -c requirements.txt
Expand All @@ -137,6 +149,7 @@ idna==3.3
# -c requirements.txt
# anyio
# requests
# rfc3986
# yarl
importlib-metadata==4.8.2
# via mkdocs
Expand Down Expand Up @@ -175,7 +188,7 @@ mkdocs-material-extensions==1.0.3
# via mkdocs-material
msrest==0.7.1
# via azure-storage-blob
multidict==6.0.2
multidict==5.2.0
# via
# -c requirements.txt
# aiohttp
Expand All @@ -195,23 +208,22 @@ oauthlib==3.2.0
packaging==21.3
# via
# -c requirements.txt
# build
# mkdocs
# nox
# pytest
# redis
pathspec==0.9.0
# via black
pep517==0.12.0
# via pip-tools
pip-tools==6.6.0
pip-tools==6.12.3
# via -r requirements-dev.in
platformdirs==2.4.0
# via
# black
# virtualenv
pluggy==1.0.0
# via pytest
protobuf==3.20.0
protobuf==3.20.3
# via
# google-api-core
# googleapis-common-protos
Expand All @@ -231,7 +243,7 @@ pycodestyle==2.7.0
# via flake8
pycparser==2.21
# via cffi
pydantic==1.9.0
pydantic==1.10.7
# via
# -c requirements.txt
# -r requirements.in
Expand All @@ -251,6 +263,8 @@ pyparsing==3.0.7
# via
# -c requirements.txt
# packaging
pyproject-hooks==1.0.0
# via build
pytest==6.2.5
# via
# -r requirements-dev.in
Expand Down Expand Up @@ -284,6 +298,8 @@ requests==2.28.1
# requests-oauthlib
requests-oauthlib==1.3.1
# via msrest
rfc3986[idna2008]==1.5.0
# via httpx
rich==12.2.0
# via
# -c requirements.txt
Expand All @@ -305,7 +321,9 @@ sniffio==1.2.0
# -c requirements.txt
# -r requirements.in
# anyio
starlette==0.17.1
# httpcore
# httpx
starlette==0.26.1
# via fastapi
structlog==21.5.0
# via
Expand All @@ -322,11 +340,6 @@ tenacity==8.0.1
# -r requirements.in
toml==0.10.2
# via pytest
tomli==1.2.2
# via
# black
# mypy
# pep517
types-cachetools==5.0.0
# via -r requirements-dev.in
types-python-dateutil==2.8.10
Expand All @@ -339,7 +352,7 @@ types-tabulate==0.8.6
# via -r requirements-dev.in
types-urllib3==1.26.11
# via types-requests
typing-extensions==4.1.1
typing-extensions==4.5.0
# via
# -c requirements.txt
# -r requirements.in
Expand All @@ -363,7 +376,7 @@ wrapt==1.14.0
# via
# -c requirements.txt
# deprecated
yarl==1.7.2
yarl==1.8.1
# via
# -c requirements.txt
# aiohttp
Expand Down
16 changes: 8 additions & 8 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#
# This file is autogenerated by pip-compile with python 3.10
# To update, run:
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --no-emit-index-url --output-file=requirements.txt
#
aiohttp==3.8.1
aiohttp==3.8.2
# via -r requirements.in
aiosignal==1.2.0
# via aiohttp
Expand Down Expand Up @@ -32,7 +32,7 @@ deprecated==1.2.13
# via redis
filelock==3.6.0
# via -r requirements.in
frozenlist==1.3.0
frozenlist==1.3.1
# via
# aiohttp
# aiosignal
Expand All @@ -42,13 +42,13 @@ idna==3.3
# via
# requests
# yarl
multidict==6.0.2
multidict==5.2.0
# via
# aiohttp
# yarl
packaging==21.3
# via redis
pydantic==1.9.0
pydantic==1.10.7
# via -r requirements.in
pygments==2.12.0
# via rich
Expand All @@ -72,13 +72,13 @@ tabulate==0.8.9
# via -r requirements.in
tenacity==8.0.1
# via -r requirements.in
typing-extensions==4.1.1
typing-extensions==4.5.0
# via
# -r requirements.in
# pydantic
urllib3==1.26.12
# via requests
wrapt==1.14.0
# via deprecated
yarl==1.7.2
yarl==1.8.1
# via aiohttp
2 changes: 1 addition & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ long_description = file: README.md, HISTORY.md
long_description_content_type = text/markdown
classifiers =
Programming Language :: Python :: 3
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10
Programming Language :: Python :: 3.11
home-page = https://idpy.org
project_urls =
Bug Tracker = https://github.com/Cornerstone-OnDemand/modelkit/issues
Expand Down
Loading

0 comments on commit 0772848

Please sign in to comment.