From 8771bdb6324b83307814beea83bca2c9ae49f70f Mon Sep 17 00:00:00 2001 From: Adrian Dankiv Date: Wed, 22 Sep 2021 17:42:32 +0300 Subject: [PATCH 1/6] Add different python versions to CI --- .circleci/config.yml | 11 +++++++++-- poetry.lock | 17 ++++++++++++++++- pyproject.toml | 5 ++++- 3 files changed, 29 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 56a9981..1a7b18a 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -7,7 +7,7 @@ jobs: build-and-test: # Our environment, Python 3.6.14 docker: - - image: cimg/python:3.6.14 + - image: cimg/python:<> # The steps for our build-and-test steps: @@ -77,7 +77,14 @@ workflows: # The build-and-test we will run EVERYTIME a piece of code changes build-and-test-workflow: jobs: - - build-and-test + - build-and-test: + python: 3.6 + - build-and-test: + python: 3.7 + - build-and-test: + python: 3.8 + - build-and-test: + python: 3.9 # The deployment workflow publishes the package deployment-workflow: diff --git a/poetry.lock b/poetry.lock index 60dab90..2ffd682 100644 --- a/poetry.lock +++ b/poetry.lock @@ -25,6 +25,9 @@ category = "dev" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*, <4" +[package.dependencies] +toml = {version = "*", optional = true, markers = "extra == \"toml\""} + [package.extras] toml = ["toml"] @@ -102,6 +105,14 @@ category = "main" optional = false python-versions = ">=2.7, !=3.0.*, !=3.1.*, !=3.2.*" +[[package]] +name = "toml" +version = "0.10.2" +description = "Python Library for Tom's Obvious, Minimal Language" +category = "dev" +optional = false +python-versions = ">=2.6, !=3.0.*, !=3.1.*, !=3.2.*" + [[package]] name = "urllib3" version = "1.26.6" @@ -118,7 +129,7 @@ socks = ["PySocks (>=1.5.6,!=1.5.7,<2.0)"] [metadata] lock-version = "1.1" python-versions = "^3.6" -content-hash = "311dbb2b42164b6172e2d9efcd398b841a0516bd315c971420b3e573c25505b7" +content-hash = "8d80d8120252030a491b99e1ac1e44cc4b7fbd337bf9ef829f74763da3a91138" [metadata.files] certifi = [ @@ -206,6 +217,10 @@ six = [ {file = "six-1.16.0-py2.py3-none-any.whl", hash = "sha256:8abb2f1d86890a2dfb989f9a77cfcfd3e47c2a354b01111771326f8aa26e0254"}, {file = "six-1.16.0.tar.gz", hash = "sha256:1e61c37477a1626458e36f7b1d82aa5c9b094fa4802892072e49de9c60c4c926"}, ] +toml = [ + {file = "toml-0.10.2-py2.py3-none-any.whl", hash = "sha256:806143ae5bfb6a3c6e736a764057db0e6a0e05e338b5630894a5f779cabb4f9b"}, + {file = "toml-0.10.2.tar.gz", hash = "sha256:b3bda1d108d5dd99f4a20d24d9c348e91c4db7ab1b749200bded2f839ccbe68f"}, +] urllib3 = [ {file = "urllib3-1.26.6-py2.py3-none-any.whl", hash = "sha256:39fb8672126159acb139a7718dd10806104dec1e2f0f6c88aab05d17df10c8d4"}, {file = "urllib3-1.26.6.tar.gz", hash = "sha256:f57b4c16c62fa2760b7e3d97c35b255512fb6b59a259730f36ba32ce9f8e342f"}, diff --git a/pyproject.toml b/pyproject.toml index 94687e4..68731da 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,9 +21,12 @@ requests = "^2.22" responses = "^0.14.0" [tool.poetry.dev-dependencies] -coverage = "^5.5" +coverage = {version = "^5.5", extras = ["toml"]} coveralls = "^3.2.0" [build-system] requires = ["poetry>=0.12"] build-backend = "poetry.masonry.api" + +[tool.coverage.run] +relative_files = true \ No newline at end of file From 805136a2fad431ba526d8394e866b2dc0b7fe4cf Mon Sep 17 00:00:00 2001 From: Adrian Dankiv Date: Wed, 22 Sep 2021 17:44:25 +0300 Subject: [PATCH 2/6] Upgrade config.yml version --- .circleci/config.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 1a7b18a..ca7a33d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,4 +1,4 @@ -version: 2 +version: 2.1 jobs: @@ -72,8 +72,6 @@ jobs: # In the workflows section, we specify when we want to run the jobs defined workflows: - version: 2 - # The build-and-test we will run EVERYTIME a piece of code changes build-and-test-workflow: jobs: From 36a7ade6c2ce27356b5febd78f74596fe52624a8 Mon Sep 17 00:00:00 2001 From: Adrian Dankiv Date: Wed, 22 Sep 2021 17:46:38 +0300 Subject: [PATCH 3/6] Fix config.yml --- .circleci/config.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index ca7a33d..8767042 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -9,6 +9,10 @@ jobs: docker: - image: cimg/python:<> + parameters: + python: + type: string + # The steps for our build-and-test steps: # Get the code @@ -57,7 +61,7 @@ jobs: # Same environment docker: - - image: circleci/python:3.6.8 + - image: cimg/python:3.6.11 steps: # Gets the code From 6772ae5fc8655adce7105ea9bd7364ad344ee1ca Mon Sep 17 00:00:00 2001 From: Adrian Dankiv Date: Wed, 22 Sep 2021 17:47:16 +0300 Subject: [PATCH 4/6] Fix config.yml --- .circleci/config.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 8767042..d286a98 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -80,13 +80,13 @@ workflows: build-and-test-workflow: jobs: - build-and-test: - python: 3.6 + python: '3.6' - build-and-test: - python: 3.7 + python: '3.7' - build-and-test: - python: 3.8 + python: '3.8' - build-and-test: - python: 3.9 + python: '3.9' # The deployment workflow publishes the package deployment-workflow: From 875f09ffc86025a7da168f5e6b8a678e08310afb Mon Sep 17 00:00:00 2001 From: Adrian Dankiv Date: Wed, 22 Sep 2021 17:48:52 +0300 Subject: [PATCH 5/6] Fix config.yml --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index d286a98..43ff2ef 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -99,6 +99,7 @@ workflows: only: /v[0-9]+(\.[0-9]+)*/ branches: ignore: /.*/ + python: '3.6.11' # Runs the deployment job, just with the tags as well - deployment: From 13008fb978e30b465a947708c2fa6a817598ca8a Mon Sep 17 00:00:00 2001 From: Adrian Dankiv Date: Wed, 22 Sep 2021 17:53:32 +0300 Subject: [PATCH 6/6] Add Python versions classifiers --- pyproject.toml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pyproject.toml b/pyproject.toml index 68731da..95d3a3a 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -13,6 +13,11 @@ classifiers = [ "Topic :: Software Development :: Testing :: Mocking", "Topic :: Software Development :: Testing :: Unit", "Topic :: Internet :: WWW/HTTP", + "Programming Language :: Python :: 3", + "Programming Language :: Python :: 3.6", + "Programming Language :: Python :: 3.7", + "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", ] [tool.poetry.dependencies]