From 63dc01eb80561dbb817199f655652621a5162524 Mon Sep 17 00:00:00 2001 From: David Vujic Date: Sat, 3 May 2025 17:45:26 +0200 Subject: [PATCH 1/3] refactor(poly test): explicit name to avoid confusion with existing brick name --- components/polylith/commands/test.py | 4 ++-- components/polylith/test/core.py | 8 ++++++-- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/components/polylith/commands/test.py b/components/polylith/commands/test.py index 346ed4c1..f5b8691b 100644 --- a/components/polylith/commands/test.py +++ b/components/polylith/commands/test.py @@ -8,9 +8,9 @@ def get_imported_bricks_in_tests( root: Path, ns: str, tag_name: Union[str, None], theme: str ) -> Set[str]: files = test.get_changed_files(root, tag_name) - imports = test.get_brick_imports_in_tests(root, ns, theme, files) + brick_imports = test.get_brick_imports_in_tests(root, ns, theme, files) - return set().union(*imports.values()) + return set().union(*brick_imports.values()) def extract_brick_names(bricks_data: List[dict], imported_bricks: Set[str]) -> Set[str]: diff --git a/components/polylith/test/core.py b/components/polylith/test/core.py index 6ac21b22..3115b326 100644 --- a/components/polylith/test/core.py +++ b/components/polylith/test/core.py @@ -1,7 +1,7 @@ from pathlib import Path from typing import List, Union -from polylith import check, diff +from polylith import check, diff, imports def is_test(root: Path, ns: str, path: Path, theme: str) -> bool: @@ -30,4 +30,8 @@ def get_brick_imports_in_tests( ) -> dict: matched = {f for f in files if is_test(root, ns, f, theme)} - return check.collect.extract_bricks(matched, ns) + listed_imports = [imports.list_imports(m) for m in matched] + + all_imports = {k: v for k, v in enumerate(listed_imports)} + + return check.grouping.extract_brick_imports(all_imports, ns) From bfe29f7635c9e8ae2133c27b739ebb3a0f2e3466 Mon Sep 17 00:00:00 2001 From: David Vujic Date: Sat, 3 May 2025 17:46:27 +0200 Subject: [PATCH 2/3] bump Poetry plugin to 1.37.1 --- projects/poetry_polylith_plugin/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/poetry_polylith_plugin/pyproject.toml b/projects/poetry_polylith_plugin/pyproject.toml index 04e2910a..faff4a26 100644 --- a/projects/poetry_polylith_plugin/pyproject.toml +++ b/projects/poetry_polylith_plugin/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "poetry-polylith-plugin" -version = "1.37.0" +version = "1.37.1" description = "A Poetry plugin that adds tooling support for the Polylith Architecture" authors = ["David Vujic"] homepage = "https://davidvujic.github.io/python-polylith-docs/" From be658526d4a9bcbdfcd82429095300b13f2026a3 Mon Sep 17 00:00:00 2001 From: David Vujic Date: Sat, 3 May 2025 17:46:52 +0200 Subject: [PATCH 3/3] bump CLI to 1.27.1 --- projects/polylith_cli/pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/projects/polylith_cli/pyproject.toml b/projects/polylith_cli/pyproject.toml index 1a821393..f3897cf8 100644 --- a/projects/polylith_cli/pyproject.toml +++ b/projects/polylith_cli/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "polylith-cli" -version = "1.27.0" +version = "1.27.1" description = "Python tooling support for the Polylith Architecture" authors = ['David Vujic'] homepage = "https://davidvujic.github.io/python-polylith-docs/"