From 5b5c318d0c3b02e863daf52130987c99b16c90e0 Mon Sep 17 00:00:00 2001 From: David Vujic Date: Wed, 16 Nov 2022 21:34:55 +0100 Subject: [PATCH] fix: align poly diff columns (#33) * fix: poly diff, align projects and brick status a little bit better * bump poetry plugin to 1.0.4 --- components/polylith/diff/report.py | 9 ++++----- projects/poetry_polylith_plugin/pyproject.toml | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/components/polylith/diff/report.py b/components/polylith/diff/report.py index 4a261056..82891c3c 100644 --- a/components/polylith/diff/report.py +++ b/components/polylith/diff/report.py @@ -30,17 +30,16 @@ def print_diff_details( table = Table(box=box.SIMPLE_HEAD) table.add_column("[data]changed brick[/]") - for project in projects_data: - project_name = project["name"] - table.add_column(f"[proj]{project_name}[/]") + proj_cols = [f"[proj]{project['name']}[/]" for project in projects_data] + table.add_column(Columns(proj_cols, align="center", expand=True)) for brick in sorted(components): cols = [brick_status(brick, p.get("components")) for p in projects_data] - table.add_row(f"[comp]{brick}[/]", Columns(cols)) + table.add_row(f"[comp]{brick}[/]", Columns(cols, align="center", expand=True)) for brick in sorted(bases): cols = [brick_status(brick, p.get("bases")) for p in projects_data] - table.add_row(f"[base]{brick}[/]", Columns(cols)) + table.add_row(f"[base]{brick}[/]", Columns(cols, align="center", expand=True)) console.print(table, overflow="ellipsis") diff --git a/projects/poetry_polylith_plugin/pyproject.toml b/projects/poetry_polylith_plugin/pyproject.toml index 5d672f17..1674982f 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.0.3" +version = "1.0.4" description = "A Poetry plugin that adds tooling support for the Polylith Architecture" authors = ["David Vujic"] homepage = "https://github.com/davidvujic/python-polylith"