diff --git a/bases/polylith/cli/core.py b/bases/polylith/cli/core.py index 1fb5c4d3..db6aba7e 100644 --- a/bases/polylith/cli/core.py +++ b/bases/polylith/cli/core.py @@ -1,4 +1,5 @@ from pathlib import Path +from typing import List, Union from polylith import commands, configuration, info, repo from polylith.cli import create, options @@ -14,6 +15,14 @@ ) +def filtered_projects_data( + projects_data: List[dict], directory: Union[str, None] +) -> List[dict]: + dir_path = Path(directory).as_posix() if directory else Path.cwd().name + + return [p for p in projects_data if dir_path in p["path"].as_posix()] + + @app.command("info") def info_command(short: Annotated[bool, options.short_workspace] = False): """Info about the Polylith workspace.""" @@ -42,8 +51,8 @@ def check_command( "alias": str.split(alias, ",") if alias else [], } - dir_path = Path(directory).as_posix() if directory else Path.cwd().name - projects_data = [p for p in only_projects_data if dir_path in p["path"].as_posix()] + projects_data = filtered_projects_data(only_projects_data, directory) + results = {commands.check.run(root, ns, p, cli_options) for p in projects_data} if not all(results): @@ -70,15 +79,15 @@ def libs_command( root = repo.get_workspace_root(Path.cwd()) ns = configuration.get_namespace_from_config(root) - projects_data = info.get_projects_data(root, ns) + all_projects_data = info.get_projects_data(root, ns) cli_options = { "strict": strict, "alias": str.split(alias, ",") if alias else [], } - dir_path = Path(directory).as_posix() if directory else Path.cwd().name - projects_data = [p for p in projects_data if dir_path in p["path"].as_posix()] + projects_data = filtered_projects_data(all_projects_data, directory) + results = {commands.libs.run(root, ns, p, cli_options) for p in projects_data} if not all(results): @@ -96,7 +105,7 @@ def sync_command( root = repo.get_workspace_root(Path.cwd()) ns = configuration.get_namespace_from_config(root) - projects_data = info.get_projects_data(root, ns) + all_projects_data = info.get_projects_data(root, ns) cli_options = { "strict": strict, @@ -104,12 +113,22 @@ def sync_command( "verbose": verbose, } - dir_path = Path(directory).as_posix() if directory else Path.cwd().name - projects_data = [p for p in projects_data if dir_path in p["path"].as_posix()] + projects_data = filtered_projects_data(all_projects_data, directory) for p in projects_data: commands.sync.run(root, ns, p, cli_options) +@app.command("deps") +def deps_command(directory: Annotated[str, options.directory] = ""): + """Visualize the dependencies between bricks.""" + root = repo.get_workspace_root(Path.cwd()) + ns = configuration.get_namespace_from_config(root) + + dir_path = Path(directory).as_posix() if directory else None + + commands.deps.run(root, ns, dir_path) + + if __name__ == "__main__": app() diff --git a/bases/polylith/poetry_plugin/plugin.py b/bases/polylith/poetry_plugin/plugin.py index fb0ad1ee..fdb984c8 100644 --- a/bases/polylith/poetry_plugin/plugin.py +++ b/bases/polylith/poetry_plugin/plugin.py @@ -6,6 +6,7 @@ CreateComponentCommand, CreateProjectCommand, CreateWorkspaceCommand, + DepsCommand, DiffCommand, InfoCommand, LibsCommand, @@ -18,6 +19,7 @@ CreateComponentCommand, CreateProjectCommand, CreateWorkspaceCommand, + DepsCommand, DiffCommand, InfoCommand, LibsCommand, diff --git a/components/polylith/check/collect.py b/components/polylith/check/collect.py index 8eff9719..92ff25c3 100644 --- a/components/polylith/check/collect.py +++ b/components/polylith/check/collect.py @@ -1,5 +1,5 @@ from pathlib import Path -from typing import List, Set +from typing import Set from polylith import check, imports, workspace @@ -31,13 +31,13 @@ def with_unknown_components(root: Path, ns: str, brick_imports: dict) -> dict: return with_unknown_components(root, ns, collected) -def diff(known_bricks: Set[str], bases: List[str], components: List[str]) -> Set[str]: +def diff(known_bricks: Set[str], bases: Set[str], components: Set[str]) -> Set[str]: bricks = set().union(bases, components) return known_bricks.difference(bricks) -def imports_diff(brick_imports: dict, bases: List, components: List) -> Set[str]: +def imports_diff(brick_imports: dict, bases: Set[str], components: Set[str]) -> Set[str]: flattened_bases = set().union(*brick_imports["bases"].values()) flattened_components = set().union(*brick_imports["components"].values()) diff --git a/components/polylith/check/report.py b/components/polylith/check/report.py index 2159c510..a07cb2f8 100644 --- a/components/polylith/check/report.py +++ b/components/polylith/check/report.py @@ -76,7 +76,7 @@ def create_report( brick_imports = collected_imports["brick_imports"] third_party_imports = collected_imports["third_party_imports"] - brick_diff = collect.imports_diff(brick_imports, list(bases), list(components)) + brick_diff = collect.imports_diff(brick_imports, bases, components) libs_diff = libs.report.calculate_diff( third_party_imports, third_party_libs, is_strict ) diff --git a/components/polylith/commands/__init__.py b/components/polylith/commands/__init__.py index 99e1a8ec..df4df6d6 100644 --- a/components/polylith/commands/__init__.py +++ b/components/polylith/commands/__init__.py @@ -1,3 +1,3 @@ -from polylith.commands import check, create, diff, info, libs, sync +from polylith.commands import check, create, deps, diff, info, libs, sync -__all__ = ["check", "create", "diff", "info", "libs", "sync"] +__all__ = ["check", "create", "deps", "diff", "info", "libs", "sync"] diff --git a/components/polylith/commands/deps.py b/components/polylith/commands/deps.py new file mode 100644 index 00000000..e307bf05 --- /dev/null +++ b/components/polylith/commands/deps.py @@ -0,0 +1,40 @@ +from pathlib import Path +from typing import List, Set, Union + +from polylith import bricks, deps, info + + +def print_report(root: Path, ns: str, bases: Set[str], components: Set[str]): + brick_imports = deps.get_brick_imports(root, ns, bases, components) + + flattened = {**brick_imports["bases"], **brick_imports["components"]} + + deps.print_deps(bases, components, flattened) + + +def pick_name(data: List[dict]) -> Set[str]: + return {b["name"] for b in data} + + +def get_bases(root: Path, ns: str, project_data: dict) -> Set[str]: + if project_data: + return set(project_data.get("bases", [])) + + return pick_name(bricks.get_bases_data(root, ns)) + + +def get_components(root: Path, ns: str, project_data: dict) -> Set[str]: + if project_data: + return set(project_data.get("components", [])) + + return pick_name(bricks.get_components_data(root, ns)) + + +def run(root: Path, ns: str, directory: Union[str, None]): + projects_data = info.get_projects_data(root, ns) if directory else [] + project = next((p for p in projects_data if directory in p["path"].as_posix()), {}) + + bases = get_bases(root, ns, project) + components = get_components(root, ns, project) + + print_report(root, ns, bases, components) diff --git a/components/polylith/deps/__init__.py b/components/polylith/deps/__init__.py new file mode 100644 index 00000000..f90052ed --- /dev/null +++ b/components/polylith/deps/__init__.py @@ -0,0 +1,4 @@ +from polylith.deps.core import get_brick_imports +from polylith.deps.report import print_deps + +__all__ = ["get_brick_imports", "print_deps"] diff --git a/components/polylith/deps/core.py b/components/polylith/deps/core.py new file mode 100644 index 00000000..15aa06a0 --- /dev/null +++ b/components/polylith/deps/core.py @@ -0,0 +1,23 @@ +from pathlib import Path +from typing import Set + +from polylith import check, workspace + + +def get_brick_imports( + root: Path, ns: str, bases: Set[str], components: Set[str] +) -> dict: + bases_paths = workspace.paths.collect_bases_paths(root, ns, bases) + comp_paths = workspace.paths.collect_components_paths(root, ns, components) + + brick_imports_in_bases = check.collect.extract_bricks(bases_paths, ns) + brick_imports_in_components = check.collect.extract_bricks(comp_paths, ns) + + return { + "bases": check.collect.with_unknown_components( + root, ns, brick_imports_in_bases + ), + "components": check.collect.with_unknown_components( + root, ns, brick_imports_in_components + ), + } diff --git a/components/polylith/deps/report.py b/components/polylith/deps/report.py new file mode 100644 index 00000000..5c93ae2f --- /dev/null +++ b/components/polylith/deps/report.py @@ -0,0 +1,84 @@ +from functools import reduce +from typing import List, Set, Tuple + +from polylith.reporting import theme +from rich import box +from rich.console import Console +from rich.table import Table + + +def calculate_tag(brick: str, project_data: dict) -> str: + return "base" if brick in project_data.get("bases", []) else "comp" + + +def to_col(brick: str, tag: str) -> str: + name = "\n".join(brick) + + return f"[{tag}]{name}[/]" + + +def brick_status(bricks: List[str], brick_name: str, imported: str) -> str: + status = theme.check_emoji if imported in bricks and imported != brick_name else "-" + + return f"[data]{status}[/]" + + +def to_row(name: str, tag: str, brick_imports: dict, imported: List[str]) -> List[str]: + bricks = brick_imports[name] + statuses = [brick_status(bricks, name, i) for i in imported] + + return [f"[{tag}]{name}[/]"] + statuses + + +def flatten_import(acc: Set[str], kv: Tuple[str, Set[str]]) -> set: + key = kv[0] + values = kv[1] + + return set().union(acc, values.difference({key})) + + +def flatten_imports(brick_imports: dict) -> Set[str]: + """Flatten the dict into a set of imports, with the actual brick filtered away when existing as an import""" + return reduce(flatten_import, brick_imports.items(), set()) + + +def create_columns( + imported_bases: List[str], imported_components: List[str] +) -> List[str]: + base_cols = [to_col(brick, "base") for brick in imported_bases] + comp_cols = [to_col(brick, "comp") for brick in imported_components] + + return comp_cols + base_cols + + +def create_rows( + bases: Set[str], components: Set[str], import_data: dict, imported: List[str] +) -> List[List[str]]: + base_rows = [to_row(b, "base", import_data, imported) for b in sorted(bases)] + comp_rows = [to_row(c, "comp", import_data, imported) for c in sorted(components)] + + return comp_rows + base_rows + + +def print_deps(bases: Set[str], components: Set[str], import_data: dict): + flattened = flatten_imports(import_data) + + imported_bases = sorted({b for b in flattened if b in bases}) + imported_components = sorted({c for c in flattened if c in components}) + imported_bricks = imported_components + imported_bases + + table = Table(box=box.SIMPLE_HEAD) + table.add_column("[data]brick[/]") + + cols = create_columns(imported_bases, imported_components) + rows = create_rows(bases, components, import_data, imported_bricks) + + for col in cols: + table.add_column(col, justify="center") + + for row in rows: + table.add_row(*row) + + console = Console(theme=theme.poly_theme) + + console.print(table, overflow="ellipsis") diff --git a/components/polylith/info/report.py b/components/polylith/info/report.py index 4913fd14..9af1fb8d 100644 --- a/components/polylith/info/report.py +++ b/components/polylith/info/report.py @@ -8,7 +8,7 @@ def brick_status(brick, bricks, command: str) -> str: - emoji = ":heavy_check_mark:" if command == "info" else ":gear:" + emoji = theme.check_emoji if command == "info" else ":gear:" status = emoji if brick in bricks else "-" diff --git a/components/polylith/poetry/commands/__init__.py b/components/polylith/poetry/commands/__init__.py index 209976f8..76f1ebd6 100644 --- a/components/polylith/poetry/commands/__init__.py +++ b/components/polylith/poetry/commands/__init__.py @@ -3,6 +3,7 @@ from polylith.poetry.commands.create_component import CreateComponentCommand from polylith.poetry.commands.create_project import CreateProjectCommand from polylith.poetry.commands.create_workspace import CreateWorkspaceCommand +from polylith.poetry.commands.deps import DepsCommand from polylith.poetry.commands.diff import DiffCommand from polylith.poetry.commands.info import InfoCommand from polylith.poetry.commands.libs import LibsCommand @@ -14,6 +15,7 @@ "CreateComponentCommand", "CreateProjectCommand", "CreateWorkspaceCommand", + "DepsCommand", "DiffCommand", "InfoCommand", "LibsCommand", diff --git a/components/polylith/poetry/commands/deps.py b/components/polylith/poetry/commands/deps.py new file mode 100644 index 00000000..7c3470e5 --- /dev/null +++ b/components/polylith/poetry/commands/deps.py @@ -0,0 +1,20 @@ +from pathlib import Path + +from poetry.console.commands.command import Command +from polylith import commands, configuration, repo + + +class DepsCommand(Command): + name = "poly deps" + description = "Visualize the dependencies between bricks." + + def handle(self) -> int: + directory = self.option("directory") + root = repo.get_workspace_root(Path.cwd()) + ns = configuration.get_namespace_from_config(root) + + dir_path = Path(directory).as_posix() if directory else None + + commands.deps.run(root, ns, dir_path) + + return 0 diff --git a/components/polylith/reporting/theme.py b/components/polylith/reporting/theme.py index 9932de4b..bde8f50c 100644 --- a/components/polylith/reporting/theme.py +++ b/components/polylith/reporting/theme.py @@ -8,3 +8,5 @@ "base": "#6495ED", } ) + +check_emoji = ":heavy_check_mark:" diff --git a/components/polylith/sync/collect.py b/components/polylith/sync/collect.py index d4784dbd..fa29ba8f 100644 --- a/components/polylith/sync/collect.py +++ b/components/polylith/sync/collect.py @@ -1,26 +1,6 @@ from pathlib import Path -from polylith import check, info, workspace - - -def get_brick_imports(root: Path, ns: str, project_data: dict) -> dict: - bases = {b for b in project_data.get("bases", [])} - components = {c for c in project_data.get("components", [])} - - bases_paths = workspace.paths.collect_bases_paths(root, ns, bases) - components_paths = workspace.paths.collect_components_paths(root, ns, components) - - brick_imports_in_bases = check.collect.extract_bricks(bases_paths, ns) - brick_imports_in_components = check.collect.extract_bricks(components_paths, ns) - - return { - "bases": check.collect.with_unknown_components( - root, ns, brick_imports_in_bases - ), - "components": check.collect.with_unknown_components( - root, ns, brick_imports_in_components - ), - } +from polylith import check, deps, info def calculate_diff( @@ -29,14 +9,13 @@ def calculate_diff( project_data: dict, workspace_data: dict, ) -> dict: - brick_imports = get_brick_imports(root, namespace, project_data) + bases = set(project_data["bases"]) + components = set(project_data["components"]) all_bases = workspace_data["bases"] all_components = workspace_data["components"] - bases = project_data["bases"] - components = project_data["components"] - + brick_imports = deps.get_brick_imports(root, namespace, bases, components) is_project = info.is_project(project_data) if is_project: diff --git a/components/polylith/sync/report.py b/components/polylith/sync/report.py index 945774da..08b47922 100644 --- a/components/polylith/sync/report.py +++ b/components/polylith/sync/report.py @@ -19,7 +19,7 @@ def print_summary(diff: dict) -> None: anything_to_sync = bases or components - emoji = ":point_right:" if anything_to_sync else ":heavy_check_mark:" + emoji = ":point_right:" if anything_to_sync else theme.check_emoji printable_name = f"[proj]{name}[/]" if is_project else f"[data]{name}[/]" console.print(f"{emoji} {printable_name}") diff --git a/projects/poetry_polylith_plugin/poetry.lock b/projects/poetry_polylith_plugin/poetry.lock index 7689da64..7a34253b 100644 --- a/projects/poetry_polylith_plugin/poetry.lock +++ b/projects/poetry_polylith_plugin/poetry.lock @@ -47,13 +47,13 @@ redis = ["redis (>=2.10.5)"] [[package]] name = "certifi" -version = "2023.11.17" +version = "2024.2.2" description = "Python package for providing Mozilla's CA Bundle." optional = false python-versions = ">=3.6" files = [ - {file = "certifi-2023.11.17-py3-none-any.whl", hash = "sha256:e036ab49d5b79556f99cfc2d9320b34cfbe5be05c5871b51de9329f0603b0474"}, - {file = "certifi-2023.11.17.tar.gz", hash = "sha256:9b469f3a900bf28dc19b8cfbf8019bf47f7fdd1a65a1d4ffb98fc14166beb4d1"}, + {file = "certifi-2024.2.2-py3-none-any.whl", hash = "sha256:dc383c07b76109f368f6106eee2b593b04a011ea4d55f652c6ca24a754d1cdd1"}, + {file = "certifi-2024.2.2.tar.gz", hash = "sha256:0569859f95fc761b18b45ef421b1290a0f65f147e92a1e5eb3e635f9a5e4e66f"}, ] [[package]] @@ -258,47 +258,56 @@ files = [ [[package]] name = "cryptography" -version = "41.0.7" +version = "42.0.2" description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers." optional = false python-versions = ">=3.7" files = [ - {file = "cryptography-41.0.7-cp37-abi3-macosx_10_12_universal2.whl", hash = "sha256:3c78451b78313fa81607fa1b3f1ae0a5ddd8014c38a02d9db0616133987b9cdf"}, - {file = "cryptography-41.0.7-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:928258ba5d6f8ae644e764d0f996d61a8777559f72dfeb2eea7e2fe0ad6e782d"}, - {file = "cryptography-41.0.7-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:5a1b41bc97f1ad230a41657d9155113c7521953869ae57ac39ac7f1bb471469a"}, - {file = "cryptography-41.0.7-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:841df4caa01008bad253bce2a6f7b47f86dc9f08df4b433c404def869f590a15"}, - {file = "cryptography-41.0.7-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:5429ec739a29df2e29e15d082f1d9ad683701f0ec7709ca479b3ff2708dae65a"}, - {file = "cryptography-41.0.7-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:43f2552a2378b44869fe8827aa19e69512e3245a219104438692385b0ee119d1"}, - {file = "cryptography-41.0.7-cp37-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:af03b32695b24d85a75d40e1ba39ffe7db7ffcb099fe507b39fd41a565f1b157"}, - {file = "cryptography-41.0.7-cp37-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:49f0805fc0b2ac8d4882dd52f4a3b935b210935d500b6b805f321addc8177406"}, - {file = "cryptography-41.0.7-cp37-abi3-win32.whl", hash = "sha256:f983596065a18a2183e7f79ab3fd4c475205b839e02cbc0efbbf9666c4b3083d"}, - {file = "cryptography-41.0.7-cp37-abi3-win_amd64.whl", hash = "sha256:90452ba79b8788fa380dfb587cca692976ef4e757b194b093d845e8d99f612f2"}, - {file = "cryptography-41.0.7-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:079b85658ea2f59c4f43b70f8119a52414cdb7be34da5d019a77bf96d473b960"}, - {file = "cryptography-41.0.7-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:b640981bf64a3e978a56167594a0e97db71c89a479da8e175d8bb5be5178c003"}, - {file = "cryptography-41.0.7-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:e3114da6d7f95d2dee7d3f4eec16dacff819740bbab931aff8648cb13c5ff5e7"}, - {file = "cryptography-41.0.7-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:d5ec85080cce7b0513cfd233914eb8b7bbd0633f1d1703aa28d1dd5a72f678ec"}, - {file = "cryptography-41.0.7-pp38-pypy38_pp73-macosx_10_12_x86_64.whl", hash = "sha256:7a698cb1dac82c35fcf8fe3417a3aaba97de16a01ac914b89a0889d364d2f6be"}, - {file = "cryptography-41.0.7-pp38-pypy38_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:37a138589b12069efb424220bf78eac59ca68b95696fc622b6ccc1c0a197204a"}, - {file = "cryptography-41.0.7-pp38-pypy38_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:68a2dec79deebc5d26d617bfdf6e8aab065a4f34934b22d3b5010df3ba36612c"}, - {file = "cryptography-41.0.7-pp38-pypy38_pp73-win_amd64.whl", hash = "sha256:09616eeaef406f99046553b8a40fbf8b1e70795a91885ba4c96a70793de5504a"}, - {file = "cryptography-41.0.7-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:48a0476626da912a44cc078f9893f292f0b3e4c739caf289268168d8f4702a39"}, - {file = "cryptography-41.0.7-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:c7f3201ec47d5207841402594f1d7950879ef890c0c495052fa62f58283fde1a"}, - {file = "cryptography-41.0.7-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:c5ca78485a255e03c32b513f8c2bc39fedb7f5c5f8535545bdc223a03b24f248"}, - {file = "cryptography-41.0.7-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:d6c391c021ab1f7a82da5d8d0b3cee2f4b2c455ec86c8aebbc84837a631ff309"}, - {file = "cryptography-41.0.7.tar.gz", hash = "sha256:13f93ce9bea8016c253b34afc6bd6a75993e5c40672ed5405a9c832f0d4a00bc"}, + {file = "cryptography-42.0.2-cp37-abi3-macosx_10_12_universal2.whl", hash = "sha256:701171f825dcab90969596ce2af253143b93b08f1a716d4b2a9d2db5084ef7be"}, + {file = "cryptography-42.0.2-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:61321672b3ac7aade25c40449ccedbc6db72c7f5f0fdf34def5e2f8b51ca530d"}, + {file = "cryptography-42.0.2-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ea2c3ffb662fec8bbbfce5602e2c159ff097a4631d96235fcf0fb00e59e3ece4"}, + {file = "cryptography-42.0.2-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3b15c678f27d66d247132cbf13df2f75255627bcc9b6a570f7d2fd08e8c081d2"}, + {file = "cryptography-42.0.2-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:8e88bb9eafbf6a4014d55fb222e7360eef53e613215085e65a13290577394529"}, + {file = "cryptography-42.0.2-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:a047682d324ba56e61b7ea7c7299d51e61fd3bca7dad2ccc39b72bd0118d60a1"}, + {file = "cryptography-42.0.2-cp37-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:36d4b7c4be6411f58f60d9ce555a73df8406d484ba12a63549c88bd64f7967f1"}, + {file = "cryptography-42.0.2-cp37-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:a00aee5d1b6c20620161984f8ab2ab69134466c51f58c052c11b076715e72929"}, + {file = "cryptography-42.0.2-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:b97fe7d7991c25e6a31e5d5e795986b18fbbb3107b873d5f3ae6dc9a103278e9"}, + {file = "cryptography-42.0.2-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:5fa82a26f92871eca593b53359c12ad7949772462f887c35edaf36f87953c0e2"}, + {file = "cryptography-42.0.2-cp37-abi3-win32.whl", hash = "sha256:4b063d3413f853e056161eb0c7724822a9740ad3caa24b8424d776cebf98e7ee"}, + {file = "cryptography-42.0.2-cp37-abi3-win_amd64.whl", hash = "sha256:841ec8af7a8491ac76ec5a9522226e287187a3107e12b7d686ad354bb78facee"}, + {file = "cryptography-42.0.2-cp39-abi3-macosx_10_12_universal2.whl", hash = "sha256:55d1580e2d7e17f45d19d3b12098e352f3a37fe86d380bf45846ef257054b242"}, + {file = "cryptography-42.0.2-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:28cb2c41f131a5758d6ba6a0504150d644054fd9f3203a1e8e8d7ac3aea7f73a"}, + {file = "cryptography-42.0.2-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b9097a208875fc7bbeb1286d0125d90bdfed961f61f214d3f5be62cd4ed8a446"}, + {file = "cryptography-42.0.2-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:44c95c0e96b3cb628e8452ec060413a49002a247b2b9938989e23a2c8291fc90"}, + {file = "cryptography-42.0.2-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:2f9f14185962e6a04ab32d1abe34eae8a9001569ee4edb64d2304bf0d65c53f3"}, + {file = "cryptography-42.0.2-cp39-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:09a77e5b2e8ca732a19a90c5bca2d124621a1edb5438c5daa2d2738bfeb02589"}, + {file = "cryptography-42.0.2-cp39-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:ad28cff53f60d99a928dfcf1e861e0b2ceb2bc1f08a074fdd601b314e1cc9e0a"}, + {file = "cryptography-42.0.2-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:130c0f77022b2b9c99d8cebcdd834d81705f61c68e91ddd614ce74c657f8b3ea"}, + {file = "cryptography-42.0.2-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:fa3dec4ba8fb6e662770b74f62f1a0c7d4e37e25b58b2bf2c1be4c95372b4a33"}, + {file = "cryptography-42.0.2-cp39-abi3-win32.whl", hash = "sha256:3dbd37e14ce795b4af61b89b037d4bc157f2cb23e676fa16932185a04dfbf635"}, + {file = "cryptography-42.0.2-cp39-abi3-win_amd64.whl", hash = "sha256:8a06641fb07d4e8f6c7dda4fc3f8871d327803ab6542e33831c7ccfdcb4d0ad6"}, + {file = "cryptography-42.0.2-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:087887e55e0b9c8724cf05361357875adb5c20dec27e5816b653492980d20380"}, + {file = "cryptography-42.0.2-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:a7ef8dd0bf2e1d0a27042b231a3baac6883cdd5557036f5e8df7139255feaac6"}, + {file = "cryptography-42.0.2-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:4383b47f45b14459cab66048d384614019965ba6c1a1a141f11b5a551cace1b2"}, + {file = "cryptography-42.0.2-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:fbeb725c9dc799a574518109336acccaf1303c30d45c075c665c0793c2f79a7f"}, + {file = "cryptography-42.0.2-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:320948ab49883557a256eab46149df79435a22d2fefd6a66fe6946f1b9d9d008"}, + {file = "cryptography-42.0.2-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:5ef9bc3d046ce83c4bbf4c25e1e0547b9c441c01d30922d812e887dc5f125c12"}, + {file = "cryptography-42.0.2-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:52ed9ebf8ac602385126c9a2fe951db36f2cb0c2538d22971487f89d0de4065a"}, + {file = "cryptography-42.0.2-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:141e2aa5ba100d3788c0ad7919b288f89d1fe015878b9659b307c9ef867d3a65"}, + {file = "cryptography-42.0.2.tar.gz", hash = "sha256:e0ec52ba3c7f1b7d813cd52649a5b3ef1fc0d433219dc8c93827c57eab6cf888"}, ] [package.dependencies] -cffi = ">=1.12" +cffi = {version = ">=1.12", markers = "platform_python_implementation != \"PyPy\""} [package.extras] docs = ["sphinx (>=5.3.0)", "sphinx-rtd-theme (>=1.1.1)"] -docstest = ["pyenchant (>=1.6.11)", "sphinxcontrib-spelling (>=4.0.1)", "twine (>=1.12.0)"] +docstest = ["pyenchant (>=1.6.11)", "readme-renderer", "sphinxcontrib-spelling (>=4.0.1)"] nox = ["nox"] -pep8test = ["black", "check-sdist", "mypy", "ruff"] +pep8test = ["check-sdist", "click", "mypy", "ruff"] sdist = ["build"] ssh = ["bcrypt (>=3.1.5)"] -test = ["pretend", "pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-xdist"] +test = ["certifi", "pretend", "pytest (>=6.2.0)", "pytest-benchmark", "pytest-cov", "pytest-xdist"] test-randomorder = ["pytest-randomly"] [[package]] @@ -490,21 +499,21 @@ files = [ [[package]] name = "jaraco-classes" -version = "3.3.0" +version = "3.3.1" description = "Utility functions for Python class constructs" optional = false python-versions = ">=3.8" files = [ - {file = "jaraco.classes-3.3.0-py3-none-any.whl", hash = "sha256:10afa92b6743f25c0cf5f37c6bb6e18e2c5bb84a16527ccfc0040ea377e7aaeb"}, - {file = "jaraco.classes-3.3.0.tar.gz", hash = "sha256:c063dd08e89217cee02c8d5e5ec560f2c8ce6cdc2fcdc2e68f7b2e5547ed3621"}, + {file = "jaraco.classes-3.3.1-py3-none-any.whl", hash = "sha256:86b534de565381f6b3c1c830d13f931d7be1a75f0081c57dff615578676e2206"}, + {file = "jaraco.classes-3.3.1.tar.gz", hash = "sha256:cb28a5ebda8bc47d8c8015307d93163464f9f2b91ab4006e09ff0ce07e8bfb30"}, ] [package.dependencies] more-itertools = "*" [package.extras] -docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"] -testing = ["pytest (>=6)", "pytest-black (>=0.3.7)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy (>=0.9.1)", "pytest-ruff"] +docs = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (<7.2.5)", "sphinx (>=3.5)", "sphinx-lint"] +testing = ["pytest (>=6)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-mypy", "pytest-ruff (>=0.2.1)"] [[package]] name = "jeepney" @@ -1041,13 +1050,13 @@ files = [ [[package]] name = "trove-classifiers" -version = "2024.1.8" +version = "2024.1.31" description = "Canonical source for classifiers on PyPI (pypi.org)." optional = false python-versions = "*" files = [ - {file = "trove-classifiers-2024.1.8.tar.gz", hash = "sha256:6e36caf430ff6485c4b57a4c6b364a13f6a898d16b9417c6c37467e59c14b05a"}, - {file = "trove_classifiers-2024.1.8-py3-none-any.whl", hash = "sha256:3c1ff4deb10149c7e39ede6e5bbc107def64362ef1ee7590ec98d71fb92f1b6a"}, + {file = "trove-classifiers-2024.1.31.tar.gz", hash = "sha256:bfdfe60bbf64985c524416afb637ecc79c558e0beb4b7f52b0039e01044b0229"}, + {file = "trove_classifiers-2024.1.31-py3-none-any.whl", hash = "sha256:854aba3358f3cf10e5c0916aa533f5a39e27aadd8ade26a54cdc2a93257e39c4"}, ] [[package]] @@ -1063,17 +1072,18 @@ files = [ [[package]] name = "urllib3" -version = "2.1.0" +version = "2.2.0" description = "HTTP library with thread-safe connection pooling, file post, and more." optional = false python-versions = ">=3.8" files = [ - {file = "urllib3-2.1.0-py3-none-any.whl", hash = "sha256:55901e917a5896a349ff771be919f8bd99aff50b79fe58fec595eb37bbc56bb3"}, - {file = "urllib3-2.1.0.tar.gz", hash = "sha256:df7aa8afb0148fa78488e7899b2c59b5f4ffcfa82e6c54ccb9dd37c1d7b52d54"}, + {file = "urllib3-2.2.0-py3-none-any.whl", hash = "sha256:ce3711610ddce217e6d113a2732fafad960a03fd0318c91faa79481e35c11224"}, + {file = "urllib3-2.2.0.tar.gz", hash = "sha256:051d961ad0c62a94e50ecf1af379c3aba230c66c710493493560c0c223c49f20"}, ] [package.extras] brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] +h2 = ["h2 (>=4,<5)"] socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] zstd = ["zstandard (>=0.18.0)"] diff --git a/projects/poetry_polylith_plugin/pyproject.toml b/projects/poetry_polylith_plugin/pyproject.toml index c9715e55..863d5771 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.15.1" +version = "1.16.0" description = "A Poetry plugin that adds tooling support for the Polylith Architecture" authors = ["David Vujic"] homepage = "https://davidvujic.github.io/python-polylith-docs/" @@ -15,6 +15,7 @@ packages = [ {include = "polylith/check",from = "../../components"}, {include = "polylith/commands",from = "../../components"}, {include = "polylith/configuration",from = "../../components"}, + {include = "polylith/deps",from = "../../components"}, {include = "polylith/development",from = "../../components"}, {include = "polylith/diff",from = "../../components"}, {include = "polylith/dirs",from = "../../components"}, diff --git a/projects/polylith_cli/pyproject.toml b/projects/polylith_cli/pyproject.toml index 424c0884..84844939 100644 --- a/projects/polylith_cli/pyproject.toml +++ b/projects/polylith_cli/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "polylith-cli" -version = "1.2.1" +version = "1.3.0" description = "Python tooling support for the Polylith Architecture" authors = ['David Vujic'] homepage = "https://davidvujic.github.io/python-polylith-docs/" @@ -15,6 +15,7 @@ packages = [ {include = "polylith/check",from = "../../components"}, {include = "polylith/commands",from = "../../components"}, {include = "polylith/configuration",from = "../../components"}, + {include = "polylith/deps",from = "../../components"}, {include = "polylith/development",from = "../../components"}, {include = "polylith/diff",from = "../../components"}, {include = "polylith/dirs",from = "../../components"}, diff --git a/pyproject.toml b/pyproject.toml index 0dbe6c73..c11fb40b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -17,6 +17,7 @@ packages = [ {include = "polylith/check",from = "components"}, {include = "polylith/configuration",from = "components"}, {include = "polylith/commands",from = "components"}, + {include = "polylith/deps",from = "components"}, {include = "polylith/development",from = "components"}, {include = "polylith/diff",from = "components"}, {include = "polylith/dirs",from = "components"},