Skip to content

Commit

Permalink
Merge branch 'main' into adds-renovate-config-removes-dependabot
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisantonellis authored Oct 14, 2022
2 parents 2df9e44 + 1efc15c commit c5c8ca5
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 13 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ name: CI
on: [push, pull_request]

env:
PYTHON_VERSION: "3.8.5"
PYTHON_VERSION: "3.10.7"

jobs:
bandit:
Expand Down Expand Up @@ -94,7 +94,7 @@ jobs:
runs-on: "ubuntu-latest"
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
python-version: [3.6, 3.7, 3.8, 3.9, '3.10']
steps:
- name: "Check out code"
uses: "actions/checkout@v2"
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: Publish Release
env:
PYTHON_VERSION: "3.9"
PYTHON_VERSION: "3.10"
on:
release:
types: [published]
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Changed

* Added Support for testing in Python 3.9 and 3.10
* Add Python 3.10 support to the PythonVersion constants and pyproject.toml python_versions
* Update workflow testing version to python 3.10.7

## [0.2.1] - 2021-10-21

### Fixed
Expand Down
35 changes: 30 additions & 5 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
version: '3.4'

# Defaults

x-build-args-36: &build_args_36
IMAGE_TAG: "3.6-buster"

Expand All @@ -11,6 +10,12 @@ x-build-args-37: &build_args_37
x-build-args-38: &build_args_38
IMAGE_TAG: "3.8-buster"

x-build-args-39: &build_args_39
IMAGE_TAG: "3.9-buster"

x-build-args-310: &build_args_310
IMAGE_TAG: "3.10-buster"

x-mount-app-and-user-git-config: &mount-app-and-user-git-config
volumes:
- ./:/app
Expand All @@ -35,7 +40,7 @@ services:
entrypoint: /bin/bash docker/bump_version.sh

# Test & Lint suite

test-36:
<<: *dev
build:
Expand All @@ -44,7 +49,7 @@ services:
IMAGE: python:3.6-buster
image: little-cheesemonger-test-36
command: docker/run_tests.sh

test-37:
<<: *dev
build:
Expand All @@ -54,17 +59,37 @@ services:
image: little-cheesemonger-test-37
command: docker/run_tests.sh

# NOTE: test-38 command includes `--format-code` option that will
# apply changes when the lint suite is run
test-38:
<<: *dev
build:
<<: *dev_build
args:
IMAGE: python:3.8-buster
image: little-cheesemonger-test-38
command: docker/run_tests.sh

test-39:
<<: *dev
build:
<<: *dev_build
args:
IMAGE: python:3.9-buster
image: little-cheesemonger-test-39
command: docker/run_tests.sh

# NOTE: test-310 command includes `--format-code` option that will
# apply changes when the lint suite is run
test-310:
<<: *dev
build:
<<: *dev_build
args:
IMAGE: python:3.10-buster
image: little-cheesemonger-test-310
command: docker/run_tests.sh --format-code



test-integration-manylinux1-default-loader: &test_integration
build: &test_build
dockerfile: ./docker/manylinux.Dockerfile
Expand Down
2 changes: 1 addition & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ARG IMAGE=python:3.8-buster
ARG IMAGE=python:3.10-buster
FROM ${IMAGE}

# Set up user for automatic git branch creation
Expand Down
4 changes: 4 additions & 0 deletions little_cheesemonger/_constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class PythonVersion(str, Enum):
CP37_CP37M = "cp37-cp37m"
CP38_CP38 = "cp38-cp38"
CP39_CP39 = "cp39-cp39"
CP310_CP310 = "cp310-cp310"


PYTHON_BINARIES = {
Expand All @@ -34,20 +35,23 @@ class PythonVersion(str, Enum):
PythonVersion.CP37_CP37M: Path("/opt/python/cp37-cp37m/bin"),
PythonVersion.CP38_CP38: Path("/opt/python/cp38-cp38/bin"),
PythonVersion.CP39_CP39: Path("/opt/python/cp39-cp39/bin"),
PythonVersion.CP310_CP310: Path("/opt/python/cp310-cp310/bin"),
},
Platform.MANYLINUX2010: {
PythonVersion.CP35_CP35M: Path("/opt/python/cp35-cp35m/bin"),
PythonVersion.CP36_CP36M: Path("/opt/python/cp36-cp36m/bin"),
PythonVersion.CP37_CP37M: Path("/opt/python/cp37-cp37m/bin"),
PythonVersion.CP38_CP38: Path("/opt/python/cp38-cp38/bin"),
PythonVersion.CP39_CP39: Path("/opt/python/cp39-cp39/bin"),
PythonVersion.CP310_CP310: Path("/opt/python/cp310-cp310/bin"),
},
Platform.MANYLINUX2014: {
PythonVersion.CP35_CP35M: Path("/opt/python/cp35-cp35m/bin"),
PythonVersion.CP36_CP36M: Path("/opt/python/cp36-cp36m/bin"),
PythonVersion.CP37_CP37M: Path("/opt/python/cp37-cp37m/bin"),
PythonVersion.CP38_CP38: Path("/opt/python/cp38-cp38/bin"),
PythonVersion.CP39_CP39: Path("/opt/python/cp39-cp39/bin"),
PythonVersion.CP310_CP310: Path("/opt/python/cp310-cp310/bin"),
},
}
}
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.black]
line-length = 88
target_version = ['py38']
target_version = ['py310']
exclude = '''
/(
venv
Expand Down
2 changes: 2 additions & 0 deletions run_unit_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@ set -e
docker-compose run --rm test-36
docker-compose run --rm test-37
docker-compose run --rm test-38
docker-compose run --rm test-39
docker-compose run --rm test-310
1 change: 1 addition & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ classifiers =
Programming Language :: Python :: 3.7
Programming Language :: Python :: 3.8
Programming Language :: Python :: 3.9
Programming Language :: Python :: 3.10

[options]

Expand Down
9 changes: 6 additions & 3 deletions tests/integration/assets/example_package/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ python_versions = [
"cp36-cp36m",
"cp36-cp37m",
"cp36-cp38",
"cp36-cp39"
"cp36-cp39",
"cp36-cp310"
]
python_dependencies = [
"nyancat==0.1.2"
Expand All @@ -29,7 +30,8 @@ python_versions = [
"cp36-cp36m",
"cp36-cp37m",
"cp36-cp38",
"cp36-cp39"
"cp36-cp39",
"cp36-cp310"
]
python_dependencies = [
"nyancat==0.1.2"
Expand All @@ -49,7 +51,8 @@ python_versions = [
"cp36-cp36m",
"cp36-cp37m",
"cp36-cp38",
"cp36-cp39"
"cp36-cp39",
"cp36-cp310"
]
python_dependencies = [
"nyancat==0.1.2"
Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,4 +64,5 @@ def test_get_python_binaries__return_binaries_for_architecture_and_platform(mock
PythonVersion.CP37_CP37M: Path("/opt/python/cp37-cp37m/bin"),
PythonVersion.CP38_CP38: Path("/opt/python/cp38-cp38/bin"),
PythonVersion.CP39_CP39: Path("/opt/python/cp39-cp39/bin"),
PythonVersion.CP310_CP310: Path("/opt/python/cp310-cp310/bin"),
}

0 comments on commit c5c8ca5

Please sign in to comment.