From 1986f2e9a20102b6734bf636bcf738372e56af90 Mon Sep 17 00:00:00 2001 From: Ant Date: Tue, 12 Apr 2022 11:52:21 -0700 Subject: [PATCH 1/3] Remove packages that we don't need here --- generate_requirements.sh | 4 ---- 1 file changed, 4 deletions(-) diff --git a/generate_requirements.sh b/generate_requirements.sh index 5bd2b35..66687cc 100755 --- a/generate_requirements.sh +++ b/generate_requirements.sh @@ -11,15 +11,11 @@ pip install \ pytest-mock `# Provide mocker fixture`\ pytest-asyncio `# Add async tests to pytest`\ nest-asyncio `# For the asyncio loop`\ - python-box `# Make dictionaries nicer to use in tests`\ flake8 `# Linting`\ isort `# Utility to sort and organize imports into sections and types`\ flake8-isort `# Plugin to run isort as part of the linting`\ flake8-quotes `# Plugin to enforce specific quotes convention, which PEP8 doesn't`\ black `# Formatting`\ - shortuuid `# Utility to generate UUIDs`\ - requests httpx `# HTTP libraries. Requests might be remove in the future`\ - tenacity `# General-purpose retrying library` pip freeze > requirements.txt From 94cd47880d2c8ad16b4e4b279d4ea81ccb6a5b09 Mon Sep 17 00:00:00 2001 From: Ant Date: Tue, 12 Apr 2022 11:52:39 -0700 Subject: [PATCH 2/3] Reformat maintenance step & add docker hub link --- README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 0f72be2..cf06181 100644 --- a/README.md +++ b/README.md @@ -51,12 +51,13 @@ for linting, formatting and other testing tools ### Upgrade python base image versions -3 files need to be edited: - -* `docker-compose.generate_requirements.yml` to generate the requirements files. -* `Dockerfile` to change the default base image version. This is used only for testing - while developing but better to keep it up to date. -* `.github/workflows/docker_image.yml` to build and push the right images to docker hub. +1. Go to docker hub to get the latest patch version for + the [python docker image](https://hub.docker.com/_/python/) +2. Then 3 files need to be edited with the latest python minor or patch versions: + 1. `docker-compose.generate_requirements.yml` to generate the requirements files. + 1. `.github/workflows/docker_image.yml` to build and push the right images to docker hub. + 1. `Dockerfile` to change the default base image version. This is used only for testing + while developing but better to keep it up to date. ### Upgrade the requirements files From 78cffce2deb79c5e151e59a514aeaff9cdfcd202 Mon Sep 17 00:00:00 2001 From: Ant Date: Tue, 12 Apr 2022 11:53:07 -0700 Subject: [PATCH 3/3] Upgrade packages and image versions --- .github/workflows/docker_image.yml | 8 ++-- Dockerfile | 2 +- docker-compose.generate_requirements.yml | 6 +-- requirements_3.10.txt | 57 ++++++++++-------------- requirements_3.8.txt | 57 ++++++++++-------------- requirements_3.9.txt | 57 ++++++++++-------------- 6 files changed, 77 insertions(+), 110 deletions(-) diff --git a/.github/workflows/docker_image.yml b/.github/workflows/docker_image.yml index 85d1b31..909f768 100644 --- a/.github/workflows/docker_image.yml +++ b/.github/workflows/docker_image.yml @@ -40,7 +40,7 @@ jobs: tags: | satel/python-base:${{env.RELEASE_VERSION}}-python3.8 build-args: | - IMAGE_VERSION=python:3.8.12-slim + IMAGE_VERSION=python:3.8.13-slim REQUIREMENTS_VERSION=3.8 push: true @@ -53,7 +53,7 @@ jobs: tags: | satel/python-base:${{env.RELEASE_VERSION}}-python3.9 build-args: | - IMAGE_VERSION=python:3.9.9-slim + IMAGE_VERSION=python:3.9.12-slim REQUIREMENTS_VERSION=3.9 push: true @@ -66,6 +66,6 @@ jobs: tags: | satel/python-base:${{env.RELEASE_VERSION}}-python3.10 build-args: | - IMAGE_VERSION=python:3.10.1-slim + IMAGE_VERSION=python:3.10.4-slim REQUIREMENTS_VERSION=3.10 - push: true \ No newline at end of file + push: true diff --git a/Dockerfile b/Dockerfile index aa74247..9da1359 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,4 +1,4 @@ -ARG IMAGE_VERSION=python:3.10.0-slim +ARG IMAGE_VERSION=python:3.10.4-slim FROM $IMAGE_VERSION ARG REQUIREMENTS_VERSION=3.10 diff --git a/docker-compose.generate_requirements.yml b/docker-compose.generate_requirements.yml index 7c218df..4d856b4 100644 --- a/docker-compose.generate_requirements.yml +++ b/docker-compose.generate_requirements.yml @@ -2,7 +2,7 @@ version: "3.5" services: generate_requirements_3_10: - image: python:3.10.1-slim + image: python:3.10.4-slim command: "/generate_requirements.sh" volumes: - ./generate_requirements.sh:/generate_requirements.sh @@ -10,7 +10,7 @@ services: tty: true generate_requirements_3_9: - image: python:3.9.9-slim + image: python:3.9.12-slim command: "/generate_requirements.sh" volumes: - ./generate_requirements.sh:/generate_requirements.sh @@ -18,7 +18,7 @@ services: tty: true generate_requirements_3_8: - image: python:3.8.12-slim + image: python:3.8.13-slim command: "/generate_requirements.sh" volumes: - ./generate_requirements.sh:/generate_requirements.sh diff --git a/requirements_3.10.txt b/requirements_3.10.txt index 8d233ba..2fb85a9 100644 --- a/requirements_3.10.txt +++ b/requirements_3.10.txt @@ -1,52 +1,41 @@ -anyio==3.4.0 +anyio==3.5.0 argh==0.26.2 -asgiref==3.4.1 -attrs==21.2.0 -black==21.12b0 -certifi==2021.10.8 -charset-normalizer==2.0.9 -click==8.0.3 -coverage==6.2 -fastapi==0.70.1 +asgiref==3.5.0 +attrs==21.4.0 +black==22.3.0 +click==8.1.2 +coverage==6.3.2 +fastapi==0.75.1 flake8==4.0.1 flake8-isort==4.1.1 flake8-quotes==3.3.1 -h11==0.12.0 -httpcore==0.14.3 -httpx==0.21.1 +h11==0.13.0 idna==3.3 iniconfig==1.1.1 isort==5.10.1 -loguru==0.5.3 +loguru==0.6.0 mccabe==0.6.1 -mypy==0.910 +mypy==0.942 mypy-extensions==0.4.3 -nest-asyncio==1.5.4 +nest-asyncio==1.5.5 packaging==21.3 pathspec==0.9.0 -platformdirs==2.4.0 +platformdirs==2.5.1 pluggy==1.0.0 py==1.11.0 pycodestyle==2.8.0 -pydantic==1.8.2 +pydantic==1.9.0 pyflakes==2.4.0 -pyparsing==3.0.6 -pytest==6.2.5 -pytest-asyncio==0.16.0 +pyparsing==3.0.8 +pytest==7.1.1 +pytest-asyncio==0.18.3 pytest-cov==3.0.0 -pytest-mock==3.6.1 -python-box==5.4.1 +pytest-mock==3.7.0 PyYAML==6.0 -requests==2.26.0 -rfc3986==1.5.0 -shortuuid==1.0.8 sniffio==1.2.0 -starlette==0.16.0 -tenacity==8.0.1 -testfixtures==6.18.3 -toml==0.10.2 -tomli==1.2.3 -typing_extensions==4.0.1 -urllib3==1.26.7 -uvicorn==0.16.0 -watchdog==2.1.6 +starlette==0.17.1 +testfixtures==6.18.5 +tomli==2.0.1 +typing_extensions==4.1.1 +uvicorn==0.17.6 +watchdog==2.1.7 diff --git a/requirements_3.8.txt b/requirements_3.8.txt index b5d1e83..2fb85a9 100644 --- a/requirements_3.8.txt +++ b/requirements_3.8.txt @@ -1,52 +1,41 @@ -anyio==3.4.0 +anyio==3.5.0 argh==0.26.2 -asgiref==3.4.1 -attrs==21.2.0 -black==21.12b0 -certifi==2021.10.8 -charset-normalizer==2.0.9 -click==8.0.3 -coverage==6.2 -fastapi==0.70.1 +asgiref==3.5.0 +attrs==21.4.0 +black==22.3.0 +click==8.1.2 +coverage==6.3.2 +fastapi==0.75.1 flake8==4.0.1 flake8-isort==4.1.1 flake8-quotes==3.3.1 -h11==0.12.0 -httpcore==0.14.3 -httpx==0.21.1 +h11==0.13.0 idna==3.3 iniconfig==1.1.1 isort==5.10.1 -loguru==0.5.3 +loguru==0.6.0 mccabe==0.6.1 -mypy==0.910 +mypy==0.942 mypy-extensions==0.4.3 -nest-asyncio==1.5.4 +nest-asyncio==1.5.5 packaging==21.3 pathspec==0.9.0 -platformdirs==2.4.0 +platformdirs==2.5.1 pluggy==1.0.0 py==1.11.0 pycodestyle==2.8.0 -pydantic==1.8.2 +pydantic==1.9.0 pyflakes==2.4.0 -pyparsing==3.0.6 -pytest==6.2.5 -pytest-asyncio==0.16.0 +pyparsing==3.0.8 +pytest==7.1.1 +pytest-asyncio==0.18.3 pytest-cov==3.0.0 -pytest-mock==3.6.1 -python-box==5.4.1 +pytest-mock==3.7.0 PyYAML==6.0 -requests==2.26.0 -rfc3986==1.5.0 -shortuuid==1.0.8 sniffio==1.2.0 -starlette==0.16.0 -tenacity==8.0.1 -testfixtures==6.18.3 -toml==0.10.2 -tomli==1.2.2 -typing_extensions==4.0.1 -urllib3==1.26.7 -uvicorn==0.16.0 -watchdog==2.1.6 +starlette==0.17.1 +testfixtures==6.18.5 +tomli==2.0.1 +typing_extensions==4.1.1 +uvicorn==0.17.6 +watchdog==2.1.7 diff --git a/requirements_3.9.txt b/requirements_3.9.txt index b5d1e83..2fb85a9 100644 --- a/requirements_3.9.txt +++ b/requirements_3.9.txt @@ -1,52 +1,41 @@ -anyio==3.4.0 +anyio==3.5.0 argh==0.26.2 -asgiref==3.4.1 -attrs==21.2.0 -black==21.12b0 -certifi==2021.10.8 -charset-normalizer==2.0.9 -click==8.0.3 -coverage==6.2 -fastapi==0.70.1 +asgiref==3.5.0 +attrs==21.4.0 +black==22.3.0 +click==8.1.2 +coverage==6.3.2 +fastapi==0.75.1 flake8==4.0.1 flake8-isort==4.1.1 flake8-quotes==3.3.1 -h11==0.12.0 -httpcore==0.14.3 -httpx==0.21.1 +h11==0.13.0 idna==3.3 iniconfig==1.1.1 isort==5.10.1 -loguru==0.5.3 +loguru==0.6.0 mccabe==0.6.1 -mypy==0.910 +mypy==0.942 mypy-extensions==0.4.3 -nest-asyncio==1.5.4 +nest-asyncio==1.5.5 packaging==21.3 pathspec==0.9.0 -platformdirs==2.4.0 +platformdirs==2.5.1 pluggy==1.0.0 py==1.11.0 pycodestyle==2.8.0 -pydantic==1.8.2 +pydantic==1.9.0 pyflakes==2.4.0 -pyparsing==3.0.6 -pytest==6.2.5 -pytest-asyncio==0.16.0 +pyparsing==3.0.8 +pytest==7.1.1 +pytest-asyncio==0.18.3 pytest-cov==3.0.0 -pytest-mock==3.6.1 -python-box==5.4.1 +pytest-mock==3.7.0 PyYAML==6.0 -requests==2.26.0 -rfc3986==1.5.0 -shortuuid==1.0.8 sniffio==1.2.0 -starlette==0.16.0 -tenacity==8.0.1 -testfixtures==6.18.3 -toml==0.10.2 -tomli==1.2.2 -typing_extensions==4.0.1 -urllib3==1.26.7 -uvicorn==0.16.0 -watchdog==2.1.6 +starlette==0.17.1 +testfixtures==6.18.5 +tomli==2.0.1 +typing_extensions==4.1.1 +uvicorn==0.17.6 +watchdog==2.1.7