Skip to content

⬆️ Maintenance - spring 2022 #323

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 12, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .github/workflows/docker_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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

Expand All @@ -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
push: true
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -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
Expand Down
13 changes: 7 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 3 additions & 3 deletions docker-compose.generate_requirements.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,23 @@ 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
- ./requirements_3.10.txt:/requirements.txt
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
- ./requirements_3.9.txt:/requirements.txt
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
Expand Down
4 changes: 0 additions & 4 deletions generate_requirements.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
57 changes: 23 additions & 34 deletions requirements_3.10.txt
Original file line number Diff line number Diff line change
@@ -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
57 changes: 23 additions & 34 deletions requirements_3.8.txt
Original file line number Diff line number Diff line change
@@ -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
57 changes: 23 additions & 34 deletions requirements_3.9.txt
Original file line number Diff line number Diff line change
@@ -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