diff --git a/Dockerfile b/Dockerfile index 832830a..1d89cd2 100644 --- a/Dockerfile +++ b/Dockerfile @@ -3,12 +3,12 @@ FROM python:3.12.2 AS base # [tool.poetry.dependencies] # make sure to update build.system.requries poetry version in pyproject.toml -ENV POETRY_VERSION="1.7.1" +ENV POETRY_VERSION="1.8.1" ENV POETRY_HOME="/opt/poetry" ENV PATH="$POETRY_HOME/bin:$PATH" -RUN pip install --upgrade pip==23.3.2 +RUN pip install --upgrade pip==24.0 RUN pip install poetry==$POETRY_VERSION COPY poetry.lock poetry.lock diff --git a/build_support/src/build_support/ci_cd_tasks/build_tasks.py b/build_support/src/build_support/ci_cd_tasks/build_tasks.py index 91c7691..47b7e47 100644 --- a/build_support/src/build_support/ci_cd_tasks/build_tasks.py +++ b/build_support/src/build_support/ci_cd_tasks/build_tasks.py @@ -17,7 +17,6 @@ get_pypi_docs_src_dir, get_pypi_src_dir, get_sphinx_conf_dir, - get_temp_dist_dir, ) from build_support.ci_cd_vars.project_setting_vars import ( get_project_name, @@ -120,22 +119,7 @@ def run(self) -> None: ), "poetry", "build", - ], - ), - ) - # TODO @Alec: clean this up once a new version of poetry supporting "-o" is - # released - # https://github.com/alec-g-olson/TemplatePythonProject/issues/64 - run_process( - args=concatenate_args( - args=[ - get_docker_command_for_image( - non_docker_project_root=self.non_docker_project_root, - docker_project_root=self.docker_project_root, - target_image=DockerTarget.PROD, - ), - "mv", - get_temp_dist_dir(project_root=self.docker_project_root), + "--output", get_dist_dir(project_root=self.docker_project_root), ], ), diff --git a/build_support/src/build_support/ci_cd_vars/file_and_dir_path_vars.py b/build_support/src/build_support/ci_cd_vars/file_and_dir_path_vars.py index dbeb7ec..7b4654a 100644 --- a/build_support/src/build_support/ci_cd_vars/file_and_dir_path_vars.py +++ b/build_support/src/build_support/ci_cd_vars/file_and_dir_path_vars.py @@ -469,18 +469,6 @@ def get_git_info_yaml(project_root: Path) -> Path: return get_build_dir(project_root=project_root).joinpath("git_info.yaml") -def get_temp_dist_dir(project_root: Path) -> Path: - """Gets the temporary dist dir for the project. - - Args: - project_root (Path): Path to this project's root. - - Returns: - Path: Path to temporary dist dir for the project. - """ - return maybe_build_dir(dir_to_build=project_root.joinpath("dist")) - - ######################################## # Files and folder collections that span domains ######################################## diff --git a/build_support/test/ci_cd_tasks/test_build_tasks.py b/build_support/test/ci_cd_tasks/test_build_tasks.py index f123b31..3ce3f92 100644 --- a/build_support/test/ci_cd_tasks/test_build_tasks.py +++ b/build_support/test/ci_cd_tasks/test_build_tasks.py @@ -24,7 +24,6 @@ get_pypi_docs_src_dir, get_pypi_src_dir, get_sphinx_conf_dir, - get_temp_dist_dir, ) from build_support.ci_cd_vars.project_setting_vars import ( get_project_name, @@ -138,17 +137,7 @@ def test_run_build_pypi( ), "poetry", "build", - ], - ) - mv_dist_to_final_location_args = concatenate_args( - args=[ - get_docker_command_for_image( - non_docker_project_root=mock_project_root, - docker_project_root=docker_project_root, - target_image=DockerTarget.PROD, - ), - "mv", - get_temp_dist_dir(project_root=docker_project_root), + "--output", get_dist_dir(project_root=docker_project_root), ], ) @@ -161,7 +150,6 @@ def test_run_build_pypi( expected_run_process_calls = [ call(args=clean_dist_args), call(args=poetry_build_args), - call(args=mv_dist_to_final_location_args), ] assert run_process_mock.call_count == len(expected_run_process_calls) run_process_mock.assert_has_calls(calls=expected_run_process_calls) diff --git a/build_support/test/ci_cd_vars/test_file_and_dir_path_vars.py b/build_support/test/ci_cd_vars/test_file_and_dir_path_vars.py index 0cf1efb..668fbb8 100644 --- a/build_support/test/ci_cd_vars/test_file_and_dir_path_vars.py +++ b/build_support/test/ci_cd_vars/test_file_and_dir_path_vars.py @@ -26,7 +26,6 @@ get_pypi_test_dir, get_pyproject_toml, get_sphinx_conf_dir, - get_temp_dist_dir, maybe_build_dir, ) from build_support.dag_engine import concatenate_args @@ -168,17 +167,6 @@ def test_get_git_info_yaml(mock_project_root: Path) -> None: ).joinpath("git_info.yaml") -def test_get_temp_dist_dir(mock_project_root: Path) -> None: - expected_temp_dist_dir = mock_project_root.joinpath("dist") - assert not expected_temp_dist_dir.exists() - assert get_temp_dist_dir(project_root=mock_project_root) == expected_temp_dist_dir - assert expected_temp_dist_dir.exists() - - assert get_temp_dist_dir( - project_root=mock_project_root, - ) == mock_project_root.joinpath("dist") - - def test_get_all_non_pulumi_python_folders(mock_project_root: Path) -> None: assert get_all_non_pulumi_python_folders( project_root=mock_project_root, diff --git a/poetry.lock b/poetry.lock index f22a684..741fa51 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 1.7.1 and should not be changed by hand. +# This file is automatically @generated by Poetry 1.8.1 and should not be changed by hand. [[package]] name = "alabaster" @@ -707,12 +707,12 @@ files = [ [[package]] name = "pulumi" -version = "3.107.0" +version = "3.108.1" description = "Pulumi's Python SDK" optional = false python-versions = ">=3.8" files = [ - {file = "pulumi-3.107.0-py3-none-any.whl", hash = "sha256:c0d8acd93501bbd3927d83579db19b6b1470c3ab7ea5a79d42c054b3ffeaaf37"}, + {file = "pulumi-3.108.1-py3-none-any.whl", hash = "sha256:58118884fe7d6fb3344af8323881e9d04dc99c9ca4b088a498e363ddbd2cb7c0"}, ] [package.dependencies] @@ -725,13 +725,13 @@ six = ">=1.12,<2.0" [[package]] name = "pulumi-aws" -version = "6.23.0" +version = "6.24.1" description = "A Pulumi package for creating and managing Amazon Web Services (AWS) cloud resources." optional = false python-versions = ">=3.8" files = [ - {file = "pulumi_aws-6.23.0-py3-none-any.whl", hash = "sha256:5bebdb5d7af078952fbf1d22d3821fc332d9d7f70a6175cc43c89005865aae65"}, - {file = "pulumi_aws-6.23.0.tar.gz", hash = "sha256:02587f52e22f2599153e8191b8e5544d4ffd0c00915b7370cb788b03e6d429e3"}, + {file = "pulumi_aws-6.24.1-py3-none-any.whl", hash = "sha256:31880e648a00a148fce19c12891ff92ebfb664b763fafcb005732c3d8690bbee"}, + {file = "pulumi_aws-6.24.1.tar.gz", hash = "sha256:fef31a7ebf987b00ed7c375eaedb9862db5bf54441db8afae9f7f50d98e15a0c"}, ] [package.dependencies] @@ -741,13 +741,13 @@ semver = ">=2.8.1" [[package]] name = "pydantic" -version = "2.6.2" +version = "2.6.3" description = "Data validation using Python type hints" optional = false python-versions = ">=3.8" files = [ - {file = "pydantic-2.6.2-py3-none-any.whl", hash = "sha256:37a5432e54b12fecaa1049c5195f3d860a10e01bdfd24f1840ef14bd0d3aeab3"}, - {file = "pydantic-2.6.2.tar.gz", hash = "sha256:a09be1c3d28f3abe37f8a78af58284b236a92ce520105ddc91a6d29ea1176ba7"}, + {file = "pydantic-2.6.3-py3-none-any.whl", hash = "sha256:72c6034df47f46ccdf81869fddb81aade68056003900a8724a4f160700016a2a"}, + {file = "pydantic-2.6.3.tar.gz", hash = "sha256:e07805c4c7f5c6826e33a1d4c9d47950d7eaf34868e2690f8594d2e30241f11f"}, ] [package.dependencies] @@ -1078,13 +1078,13 @@ tests = ["coverage (>=6.0.0)", "flake8", "mypy", "pytest (>=7.0.0)", "pytest-asy [[package]] name = "rich" -version = "13.7.0" +version = "13.7.1" description = "Render rich text, tables, progress bars, syntax highlighting, markdown and more to the terminal" optional = false python-versions = ">=3.7.0" files = [ - {file = "rich-13.7.0-py3-none-any.whl", hash = "sha256:6da14c108c4866ee9520bbffa71f6fe3962e193b7da68720583850cd4548e235"}, - {file = "rich-13.7.0.tar.gz", hash = "sha256:5cb5123b5cf9ee70584244246816e9114227e0b98ad9176eede6ad54bf5403fa"}, + {file = "rich-13.7.1-py3-none-any.whl", hash = "sha256:4edbae314f59eb482f54e9e30bf00d33350aaa94f4bfcd4e9e3110e64d0d7222"}, + {file = "rich-13.7.1.tar.gz", hash = "sha256:9be308cb1fe2f1f57d67ce99e95af38a1e2bc71ad9813b0e247cf7ffbcc3a432"}, ] [package.dependencies] @@ -1341,13 +1341,13 @@ pbr = ">=2.0.0,<2.1.0 || >2.1.0" [[package]] name = "tomlkit" -version = "0.12.3" +version = "0.12.4" description = "Style preserving TOML library" optional = false python-versions = ">=3.7" files = [ - {file = "tomlkit-0.12.3-py3-none-any.whl", hash = "sha256:b0a645a9156dc7cb5d3a1f0d4bab66db287fcb8e0430bdd4664a095ea16414ba"}, - {file = "tomlkit-0.12.3.tar.gz", hash = "sha256:75baf5012d06501f07bee5bf8e801b9f343e7aac5a92581f20f80ce632e6b5a4"}, + {file = "tomlkit-0.12.4-py3-none-any.whl", hash = "sha256:5cd82d48a3dd89dee1f9d64420aa20ae65cfbd00668d6f094d7578a78efbb77b"}, + {file = "tomlkit-0.12.4.tar.gz", hash = "sha256:7ca1cfc12232806517a8515047ba66a19369e71edf2439d0f5824f91032b6cc3"}, ] [[package]] diff --git a/pyproject.toml b/pyproject.toml index cc02cfe..c4f7d54 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -128,7 +128,7 @@ enable_error_code = ["ignore-without-code"] [tool.poetry] name = "template_python_project" -version = "0.2.21" +version = "0.2.22" license = "unlicense" packages = [{include = "template_python_project", from="pypi_package/src"}] description = "A project that can be used as a template to provide some CI/CD out of the box."