{"id":18259632,"url":"https://github.com/ctk3b/borderline","last_synced_at":"2025-04-08T23:39:41.864Z","repository":{"id":46892106,"uuid":"407349297","full_name":"ctk3b/borderline","owner":"ctk3b","description":"Stop letting modules reach into other modules","archived":false,"fork":false,"pushed_at":"2021-09-29T17:44:18.000Z","size":57,"stargazers_count":0,"open_issues_count":4,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-14T18:28:02.892Z","etag":null,"topics":["python","testing"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ctk3b.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-17T00:06:04.000Z","updated_at":"2021-12-15T20:54:14.000Z","dependencies_parsed_at":"2022-09-11T15:12:17.718Z","dependency_job_id":null,"html_url":"https://github.com/ctk3b/borderline","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctk3b%2Fborderline","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctk3b%2Fborderline/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctk3b%2Fborderline/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ctk3b%2Fborderline/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ctk3b","download_url":"https://codeload.github.com/ctk3b/borderline/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247947823,"owners_count":21023058,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["python","testing"],"created_at":"2024-11-05T10:39:05.727Z","updated_at":"2025-04-08T23:39:41.844Z","avatar_url":"https://github.com/ctk3b.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Borderline\n\nStop letting modules reach into other modules.\n\n---\n\n![python-package](https://github.com/ctk3b/borderline/actions/workflows/python-package.yml/badge.svg)\n[![PyPI version fury.io](https://badge.fury.io/py/borderline.svg)](https://pypi.python.org/pypi/borderline/)\n\nThis library provides one thing and one thing only: a test class called `ModuleImports` \n\nTo use the test, subclass it in the test suite of the module you want to isolate and define that module's borderlines.\nThe test will fail if a module is not respecting those borderlines.\n\nFor example, a module called `report_builder` could have the following definition:\n\n```python\nclass TestReportBuilder(borderline.ModuleImports):\n    module = \"reporting.report_builder\"\n    \n    # The public API of the module.\n    # External modules should only import from here.\n    public_submodules = (\n        \"reporting.report_builder.api\",\n    )\n    # Modules that are considered outside of `module` and should not be imported\n    # by `module` unless they are a legitimate dependency.\n    external_modules = (\n        \"reporting\",\n    )\n    # Modules outside of `module` that ARE legitimate dependencies.\n    external_dependencies = (\n        \"reporting.review.api\",\n        \"reporting.common\",\n    )\n\n    # Directory to store imports that are currently allowed.\n    # This is useful when you are trying to isolate an existing module\n    # that is not respecting its borderlines.\n    grandfather_filedir = Path(\n        \"reporting/report_builder/tests/data/borderline\", parents=True, exist_ok=True\n    )\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctk3b%2Fborderline","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fctk3b%2Fborderline","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fctk3b%2Fborderline/lists"}