diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f66d473..5adc428 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -45,7 +45,7 @@ jobs: - name: Install Dependencies run: python -m pip install docker pytest - name: Test Image - run: bash scripts/test.sh + run: pytest tests env: NAME: ${{ matrix.image.name }} PYTHON_VERSION: ${{ matrix.image.python_version }} diff --git a/mypy.ini b/mypy.ini deleted file mode 100644 index 4ff4483..0000000 --- a/mypy.ini +++ /dev/null @@ -1,3 +0,0 @@ -[mypy] -disallow_untyped_defs = True -ignore_missing_imports = True diff --git a/pyproject.toml b/pyproject.toml deleted file mode 100644 index 5ff2669..0000000 --- a/pyproject.toml +++ /dev/null @@ -1,21 +0,0 @@ -[tool.poetry] -name = "meinheld-gunicorn-docker" -version = "0.1.0" -description = "Docker image with Meinheld managed by Gunicorn for high-performance web applications in Python with performance auto-tuning." -authors = ["Sebastián Ramírez "] -license = "MIT" - -[tool.poetry.dependencies] -python = "^3.7" -docker = "^6.0.1" -pytest = "^7.0.1" - -[tool.poetry.dev-dependencies] -black = "^23.3" -isort = "^5.8.0" -autoflake = "^2.0.0" -mypy = "^1.4" - -[build-system] -requires = ["poetry>=0.12"] -build-backend = "poetry.masonry.api" diff --git a/scripts/format-imports.sh b/scripts/format-imports.sh deleted file mode 100644 index 8710c79..0000000 --- a/scripts/format-imports.sh +++ /dev/null @@ -1,6 +0,0 @@ -#!/usr/bin/env bash -set -x - -# Sort imports one per line, so autoflake can remove unused imports -isort --recursive --force-single-line-imports --apply ./ -sh ./scripts/format.sh diff --git a/scripts/format.sh b/scripts/format.sh deleted file mode 100644 index a38f39a..0000000 --- a/scripts/format.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -set -x - -autoflake --remove-all-unused-imports --recursive --remove-unused-variables --in-place ./ --exclude=__init__.py -isort --multi-line=3 --trailing-comma --force-grid-wrap=0 --combine-as --line-width 88 --recursive --apply ./ -black ./ diff --git a/scripts/lint.sh b/scripts/lint.sh deleted file mode 100644 index 8198da0..0000000 --- a/scripts/lint.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash - -set -e -set -x - -mypy ./ -black ./ --check -isort --multi-line=3 --trailing-comma --force-grid-wrap=0 --combine-as --line-width 88 --recursive --check-only diff --git a/scripts/process_all.py b/scripts/process_all.py deleted file mode 100644 index 927e9a3..0000000 --- a/scripts/process_all.py +++ /dev/null @@ -1,52 +0,0 @@ -import os -import subprocess -import sys - -environments = [ - {"NAME": "latest", "PYTHON_VERSION": "3.9"}, - {"NAME": "python3.9", "PYTHON_VERSION": "3.9"}, - {"NAME": "python3.8", "PYTHON_VERSION": "3.8"}, - {"NAME": "python3.7", "PYTHON_VERSION": "3.7"}, -] - -start_with = os.environ.get("START_WITH") -build_push = os.environ.get("BUILD_PUSH") - - -def process_tag(*, env: dict) -> None: - use_env = {**os.environ, **env} - script = "scripts/test.sh" - if build_push: - script = "scripts/build-push.sh" - return_code = subprocess.call(["bash", script], env=use_env) - if return_code != 0: - sys.exit(return_code) - - -def print_version_envs() -> None: - env_lines = [] - for env in environments: - env_vars = [] - for key, value in env.items(): - env_vars.append(f"{key}='{value}'") - env_lines.append(" ".join(env_vars)) - for line in env_lines: - print(line) - - -def main() -> None: - start_at = 0 - if start_with: - start_at = [ - i for i, env in enumerate((environments)) if env["NAME"] == start_with - ][0] - for i, env in enumerate(environments[start_at:]): - print(f"Processing tag: {env['NAME']}") - process_tag(env=env) - - -if __name__ == "__main__": - if len(sys.argv) > 1: - print_version_envs() - else: - main() diff --git a/scripts/test.sh b/scripts/test.sh deleted file mode 100644 index 22d68c6..0000000 --- a/scripts/test.sh +++ /dev/null @@ -1,4 +0,0 @@ -#!/usr/bin/env bash -set -e - -pytest tests