diff --git a/MANIFEST.in b/MANIFEST.in index fac5a68..8105b19 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1 +1 @@ -include custom_json_diff/bom_diff_template.j2 \ No newline at end of file +include custom_json_diff/lib/bom_diff_template.j2 \ No newline at end of file diff --git a/custom_json_diff/cli.py b/custom_json_diff/cli.py index 558ee59..ebe07ca 100644 --- a/custom_json_diff/cli.py +++ b/custom_json_diff/cli.py @@ -3,13 +3,13 @@ from importlib.metadata import version -from custom_json_diff.custom_diff import ( +from custom_json_diff.lib.custom_diff import ( compare_dicts, get_diff, perform_bom_diff, report_results ) -from custom_json_diff.custom_diff_classes import Options +from custom_json_diff.lib.custom_diff_classes import Options logger = logging.getLogger(__name__) diff --git a/custom_json_diff/bom_diff_template.j2 b/custom_json_diff/lib/bom_diff_template.j2 similarity index 100% rename from custom_json_diff/bom_diff_template.j2 rename to custom_json_diff/lib/bom_diff_template.j2 diff --git a/custom_json_diff/custom_diff.py b/custom_json_diff/lib/custom_diff.py similarity index 98% rename from custom_json_diff/custom_diff.py rename to custom_json_diff/lib/custom_diff.py index 78496b0..f85e572 100644 --- a/custom_json_diff/custom_diff.py +++ b/custom_json_diff/lib/custom_diff.py @@ -7,13 +7,13 @@ from json_flatten import flatten # type: ignore -from custom_json_diff.custom_diff_classes import BomDicts, FlatDicts, Options, order_boms -from custom_json_diff.utils import ( +from custom_json_diff.lib.custom_diff_classes import BomDicts, FlatDicts, Options, order_boms +from custom_json_diff.lib.utils import ( export_html_report, export_results, logger, sort_dict_lists ) if TYPE_CHECKING: - from custom_json_diff.custom_diff_classes import ( + from custom_json_diff.lib.custom_diff_classes import ( BomComponent, BomDependency, BomService, BomVdr ) diff --git a/custom_json_diff/custom_diff_classes.py b/custom_json_diff/lib/custom_diff_classes.py similarity index 99% rename from custom_json_diff/custom_diff_classes.py rename to custom_json_diff/lib/custom_diff_classes.py index 1ee0159..944a266 100644 --- a/custom_json_diff/custom_diff_classes.py +++ b/custom_json_diff/lib/custom_diff_classes.py @@ -6,7 +6,7 @@ from json_flatten import unflatten # type: ignore -from custom_json_diff.utils import ( +from custom_json_diff.lib.utils import ( compare_bom_refs, compare_date, compare_recommendations, compare_versions, import_config ) diff --git a/custom_json_diff/utils.py b/custom_json_diff/lib/utils.py similarity index 99% rename from custom_json_diff/utils.py rename to custom_json_diff/lib/utils.py index 335bf23..4d44931 100644 --- a/custom_json_diff/utils.py +++ b/custom_json_diff/lib/utils.py @@ -12,7 +12,7 @@ from jinja2 import Environment if TYPE_CHECKING: - from custom_json_diff.custom_diff_classes import Options + from custom_json_diff.lib.custom_diff_classes import Options logger = logging.getLogger(__name__) diff --git a/pyproject.toml b/pyproject.toml index d013bc7..2139dc8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -44,6 +44,7 @@ build-backend = "setuptools.build_meta" [tool.setuptools] packages = [ "custom_json_diff", + "custom_json_diff.lib", ] include-package-data = true diff --git a/test/test_bom_diff.py b/test/test_bom_diff.py index 638fda0..58e7ecc 100644 --- a/test/test_bom_diff.py +++ b/test/test_bom_diff.py @@ -3,8 +3,8 @@ import pytest -from custom_json_diff.custom_diff import compare_dicts, perform_bom_diff -from custom_json_diff.custom_diff_classes import ( +from custom_json_diff.lib.custom_diff import compare_dicts, perform_bom_diff +from custom_json_diff.lib.custom_diff_classes import ( BomComponent, BomDicts, FlatDicts, Options, BomVdr, BomVdrAffects ) diff --git a/test/test_custom_json_diff.py b/test/test_custom_json_diff.py index 79c7733..df5348f 100644 --- a/test/test_custom_json_diff.py +++ b/test/test_custom_json_diff.py @@ -2,11 +2,11 @@ import pytest -from custom_json_diff.custom_diff import ( +from custom_json_diff.lib.custom_diff import ( compare_dicts, get_diff, load_json ) -from custom_json_diff.utils import sort_dict_lists -from custom_json_diff.custom_diff_classes import Options +from custom_json_diff.lib.utils import sort_dict_lists +from custom_json_diff.lib.custom_diff_classes import Options @pytest.fixture