From 810449dfacdccfed0ee489ed4486ef5803e9c940 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A1tia=20Nakamura?= Date: Fri, 19 Apr 2024 17:25:12 +0200 Subject: [PATCH 1/2] Requires Python >= 3.7 --- pyproject.toml | 10 +++++----- tests/test_dockerfile_generate.py | 3 ++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index f6d0361..8683c74 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -9,15 +9,15 @@ readme = "README.md" dockerfile-django = "dockerfile_django.main:cli" [tool.poetry.dependencies] -python = "^3.11" -typer = "^0.12.3" +python = "^3.7" +typer = {extras = ["all"], version = "^0.12.3"} jinja2 = "^3.1.3" markupsafe = "^2.1.5" -pydantic = "^2.6.4" +pydantic = "2.5.3" [tool.poetry.group.dev.dependencies] -black = "^24.3.0" -pytest = "^8.1.1" +pytest = "7.4.4" +black = "23.1.0" [build-system] requires = ["poetry-core"] diff --git a/tests/test_dockerfile_generate.py b/tests/test_dockerfile_generate.py index 7518310..c052926 100644 --- a/tests/test_dockerfile_generate.py +++ b/tests/test_dockerfile_generate.py @@ -18,6 +18,7 @@ ARG_MASK = re.compile(r"^(ARG\s+\w+\s*=).*?(\s*\\?)$", re.MULTILINE) + def get_scenario_dirs(): scenario_dirs = [] @@ -47,7 +48,7 @@ def test_dockerfile_generation(scenario_dir, tmp_path): with open(generated_dockerfile_path, "r") as file: generated_dockerfile_contents = ARG_MASK.sub(r"\1xxx\2", file.read()) - if 'TEST_CAPTURE' in os.environ: + if "TEST_CAPTURE" in os.environ: with open(expected_dockerfile_path, "w") as file: file.write(generated_dockerfile_contents) From 4aaaee97c4f3dacff9adbdbc0d428098ea1317ba Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A1tia=20Nakamura?= Date: Mon, 22 Apr 2024 20:08:05 +0200 Subject: [PATCH 2/2] No need to install "typer[all]" --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index 8683c74..af9ed7e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -10,7 +10,7 @@ dockerfile-django = "dockerfile_django.main:cli" [tool.poetry.dependencies] python = "^3.7" -typer = {extras = ["all"], version = "^0.12.3"} +typer = "^0.12.3" jinja2 = "^3.1.3" markupsafe = "^2.1.5" pydantic = "2.5.3"