diff --git a/.github/workflows/docbuild.yml b/.github/workflows/docbuild.yml index e57d9a0..4bf8930 100644 --- a/.github/workflows/docbuild.yml +++ b/.github/workflows/docbuild.yml @@ -8,7 +8,7 @@ jobs: strategy: max-parallel: 4 matrix: - python-version: [3.6, 3.7, 3.8, 3.9] + python-version: ["3.9", "3.10"] steps: - name: Checkout repo diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 47a5834..2078256 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -8,7 +8,7 @@ jobs: strategy: max-parallel: 8 matrix: - python-version: [3.6, 3.7, 3.8, 3.9] + python-version: ["3.8", "3.9", "3.10"] steps: - name: Checkout repo @@ -19,9 +19,9 @@ jobs: python-version: ${{ matrix.python-version }} - name: Install software run: | - python -m pip install --upgrade pip --use-feature=2020-resolver - python -m pip install coveralls --use-feature=2020-resolver - python -m pip install .[dev] --use-feature=2020-resolver + python -m pip install --upgrade pip + python -m pip install coveralls + python -m pip install .[dev] python -m pip install https://github.com/bboe/coveralls-python/archive/github_actions.zip - name: Configure run: | diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index a30267f..c25c21a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,5 @@ repos: - repo: https://github.com/python/black - rev: 22.1.0 + rev: 23.7.0 hooks: - id: black - language_version: python3.9 diff --git a/cloudknot/aws/base_classes.py b/cloudknot/aws/base_classes.py index 620fb91..6896fd6 100644 --- a/cloudknot/aws/base_classes.py +++ b/cloudknot/aws/base_classes.py @@ -251,6 +251,7 @@ def get_s3_params(): # Use set_s3_params to check for name availability # and write to config file + bucket = bucket.replace("_", "-") # S3 does not allow underscores set_s3_params(bucket=bucket, policy=policy, sse=sse) if policy is None: diff --git a/cloudknot/cloudknot.py b/cloudknot/cloudknot.py index 9251735..38da5fa 100644 --- a/cloudknot/cloudknot.py +++ b/cloudknot/cloudknot.py @@ -5,10 +5,9 @@ import logging import os -try: - from collections.abc import Iterable, namedtuple -except ImportError: - from collections import Iterable, namedtuple +from collections.abc import Iterable +from collections import namedtuple + from concurrent.futures import ThreadPoolExecutor from . import aws diff --git a/cloudknot/data/docker_reqs_ref_data/py3/ref1/Dockerfile b/cloudknot/data/docker_reqs_ref_data/py3/ref1/Dockerfile index 5b07533..7fc7b6d 100644 --- a/cloudknot/data/docker_reqs_ref_data/py3/ref1/Dockerfile +++ b/cloudknot/data/docker_reqs_ref_data/py3/ref1/Dockerfile @@ -14,7 +14,7 @@ RUN pip install --no-cache-dir -r /tmp/requirements.txt # Add user to "staff" group. # Give user a home directory. RUN (id -u cloudknot-user >/dev/null 2>&1 || useradd cloudknot-user) \ - && addgroup cloudknot-user staff \ + && usermod -a -G staff "cloudknot-user" \ && mkdir -p /home/cloudknot-user \ && chown -R cloudknot-user:staff /home/cloudknot-user diff --git a/cloudknot/data/docker_reqs_ref_data/py3/ref2/Dockerfile b/cloudknot/data/docker_reqs_ref_data/py3/ref2/Dockerfile index f332d1c..49005c4 100644 --- a/cloudknot/data/docker_reqs_ref_data/py3/ref2/Dockerfile +++ b/cloudknot/data/docker_reqs_ref_data/py3/ref2/Dockerfile @@ -14,7 +14,7 @@ RUN pip install --no-cache-dir -r /tmp/requirements.txt # Add user to "staff" group. # Give user a home directory. RUN (id -u unit-test-username >/dev/null 2>&1 || useradd unit-test-username) \ - && addgroup unit-test-username staff \ + && usermod -a -G staff "${unit-test-username}" \ && mkdir -p /home/unit-test-username \ && chown -R unit-test-username:staff /home/unit-test-username diff --git a/cloudknot/templates/Dockerfile.template b/cloudknot/templates/Dockerfile.template index cf1b8d8..622717e 100644 --- a/cloudknot/templates/Dockerfile.template +++ b/cloudknot/templates/Dockerfile.template @@ -14,7 +14,7 @@ RUN pip install --no-cache-dir -r /tmp/requirements.txt${github_installs_string} # Add user to "staff" group. # Give user a home directory. RUN (id -u ${username} >/dev/null 2>&1 || useradd ${username}) \ - && addgroup ${username} staff \ + && usermod -a -G staff "${username}" \ && mkdir -p /home/${username} \ && chown -R ${username}:staff /home/${username} diff --git a/cloudknot/templates/script.template b/cloudknot/templates/script.template index 6383ff1..5d7068c 100644 --- a/cloudknot/templates/script.template +++ b/cloudknot/templates/script.template @@ -1,3 +1,4 @@ +#!/usr/bin/python import boto3 import cloudpickle import os diff --git a/pyproject.toml b/pyproject.toml index 6d944aa..9d2a6ab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -27,7 +27,7 @@ exclude = ''' | build | dist )/ - | foo.py # also separately exclude a file named foo.py in - # the root of the project + | _version.py + | cli.py ) ''' diff --git a/setup.cfg b/setup.cfg index 86c839b..6c51004 100644 --- a/setup.cfg +++ b/setup.cfg @@ -33,8 +33,8 @@ setup_requires = setuptools_scm python_requires = >=3.6 install_requires = - awscli boto3>=1.5.21 + awscli>=1.28.0 botocore>=1.8.36 cloudpickle docker>=3.0.0 @@ -53,18 +53,17 @@ console_scripts = [options.extras_require] dev = - black==20.8b1 + black==23.7.0 coverage==5.3 flake8==3.8.3 numpydoc==1.1.0 - moto>=2.2.13.dev2 - responses==0.12.0 - pre-commit==2.9.2 + moto[cloudformation]==4.1.13 + pre-commit==3.3.3 pydocstyle==5.1.1 pytest-cov==2.10.1 pytest-xdist[psutil]==2.1.0 - pytest==6.0.1 - sphinx==3.2.1 + pytest==7.4.0 + sphinx==5.0.0 maint = rapidfuzz==0.12.2