diff --git a/bin/__init__.py b/bin/__init__.py deleted file mode 100644 index 69889b3..0000000 --- a/bin/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Command-line entry points.""" diff --git a/bin/derive_domain.py b/bin/derive_domain.py index 20e5df6..013c797 100644 --- a/bin/derive_domain.py +++ b/bin/derive_domain.py @@ -20,7 +20,7 @@ from absl import flags from absl import logging from dpsynth import domain -from dpsynth.bin import _read_csv_args +from bin import _read_csv_args import fancyflags as ff import numpy as np import pandas as pd diff --git a/bin/main.py b/bin/main.py index 67bd1ec..7d699fd 100644 --- a/bin/main.py +++ b/bin/main.py @@ -27,7 +27,7 @@ from absl import app from absl import flags import dpsynth -from dpsynth.bin import _read_csv_args +from bin import _read_csv_args import fancyflags as ff import pandas as pd diff --git a/bin/run_data_generation.py b/bin/run_data_generation.py index 2cca438..04dc90f 100644 --- a/bin/run_data_generation.py +++ b/bin/run_data_generation.py @@ -22,7 +22,7 @@ import apache_beam as beam from dpsynth import data_generation from dpsynth import domain -from dpsynth.bin import _proto_class_flag +from bin import _proto_class_flag from dpsynth.dataset_descriptors import csv_descriptor from dpsynth.dataset_descriptors import proto_descriptors from dpsynth.dataset_descriptors import tfrecord_descriptor diff --git a/bin/run_tabular_eval.py b/bin/run_tabular_eval.py index 9068858..ecdccc9 100644 --- a/bin/run_tabular_eval.py +++ b/bin/run_tabular_eval.py @@ -23,8 +23,8 @@ import apache_beam as beam from dpsynth.dataset_descriptors import dataset_descriptor from dpsynth.dataset_descriptors import proto_descriptors -from dpsynth.eval import tabular_eval -from dpsynth.eval import types +from eval import tabular_eval +from eval import types from dpsynth.pipeline_transformations import diagnostic_info from google.protobuf import text_format import pandas as pd diff --git a/eval/__init__.py b/eval/__init__.py deleted file mode 100644 index f3045b2..0000000 --- a/eval/__init__.py +++ /dev/null @@ -1,15 +0,0 @@ -# Copyright 2026 Google LLC -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -"""Tabular evaluation utilities (distribution, correlation, marginal metrics).""" diff --git a/eval/attribute_statistics.py b/eval/attribute_statistics.py index e1fb711..cd573cf 100644 --- a/eval/attribute_statistics.py +++ b/eval/attribute_statistics.py @@ -18,8 +18,8 @@ import dataclasses from typing import Any -from dpsynth.eval import correlation_computation -from dpsynth.eval import types +from eval import correlation_computation +from eval import types from dpsynth.pipeline_transformations import diagnostic_info import pipeline_dp from pipeline_dp import pipeline_functions diff --git a/eval/correlation_computation.py b/eval/correlation_computation.py index 60a9968..857b435 100644 --- a/eval/correlation_computation.py +++ b/eval/correlation_computation.py @@ -17,7 +17,7 @@ from collections.abc import Iterable import itertools from typing import Any -from dpsynth.eval import types +from eval import types from dpsynth.pipeline_transformations import diagnostic_info import numpy as np import pipeline_dp diff --git a/eval/marginal_total_variance.py b/eval/marginal_total_variance.py index c33b0b2..46a4298 100644 --- a/eval/marginal_total_variance.py +++ b/eval/marginal_total_variance.py @@ -19,7 +19,7 @@ import itertools from typing import Any -from dpsynth.eval import types +from eval import types from dpsynth.pipeline_transformations import diagnostic_info import pipeline_dp diff --git a/eval/one_way_distribution_computation.py b/eval/one_way_distribution_computation.py index ca947be..0c5f957 100644 --- a/eval/one_way_distribution_computation.py +++ b/eval/one_way_distribution_computation.py @@ -16,7 +16,7 @@ from collections.abc import Iterable from typing import Any -from dpsynth.eval import types +from eval import types from dpsynth.pipeline_transformations import diagnostic_info import numpy as np import pipeline_dp diff --git a/eval/tabular_eval.py b/eval/tabular_eval.py index 72a4b07..a89eab2 100644 --- a/eval/tabular_eval.py +++ b/eval/tabular_eval.py @@ -17,11 +17,11 @@ from typing import Any import apache_beam as beam -from dpsynth.eval import attribute_statistics -from dpsynth.eval import correlation_computation -from dpsynth.eval import marginal_total_variance -from dpsynth.eval import one_way_distribution_computation -from dpsynth.eval import types +from eval import attribute_statistics +from eval import correlation_computation +from eval import marginal_total_variance +from eval import one_way_distribution_computation +from eval import types from dpsynth.pipeline_transformations import diagnostic_info import pipeline_dp diff --git a/pyproject.toml b/pyproject.toml index 40ae04a..6ad3dc7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -47,3 +47,6 @@ version = {attr = "dpsynth.__version__"} [tool.setuptools.packages.find] namespaces = false + +[tool.pytest.ini_options] +pythonpath = ["."] diff --git a/tests/bin/_read_csv_args_test.py b/tests/bin/_read_csv_args_test.py index 2099967..ef4af48 100644 --- a/tests/bin/_read_csv_args_test.py +++ b/tests/bin/_read_csv_args_test.py @@ -14,7 +14,7 @@ from absl.testing import absltest from absl.testing import parameterized -from dpsynth.bin import _read_csv_args +from bin import _read_csv_args class ReadCsvArgsTest(parameterized.TestCase): diff --git a/tests/bin/derive_domain_test.py b/tests/bin/derive_domain_test.py index 021e330..6f02a3f 100644 --- a/tests/bin/derive_domain_test.py +++ b/tests/bin/derive_domain_test.py @@ -14,7 +14,7 @@ from absl.testing import absltest from dpsynth import domain -from dpsynth.bin import derive_domain +from bin import derive_domain import numpy as np import pandas as pd diff --git a/tests/eval/attribute_statistics_test.py b/tests/eval/attribute_statistics_test.py index 58ba5ff..ec84eca 100644 --- a/tests/eval/attribute_statistics_test.py +++ b/tests/eval/attribute_statistics_test.py @@ -13,8 +13,8 @@ # limitations under the License. from absl.testing import absltest -from dpsynth.eval import attribute_statistics -from dpsynth.eval import types +from eval import attribute_statistics +from eval import types from dpsynth.pipeline_transformations import diagnostic_info import pipeline_dp diff --git a/tests/eval/correlation_computation_test.py b/tests/eval/correlation_computation_test.py index 0982000..307db99 100644 --- a/tests/eval/correlation_computation_test.py +++ b/tests/eval/correlation_computation_test.py @@ -13,8 +13,8 @@ # limitations under the License. from absl.testing import absltest -from dpsynth.eval import correlation_computation -from dpsynth.eval import types +from eval import correlation_computation +from eval import types from dpsynth.pipeline_transformations import diagnostic_info import pipeline_dp diff --git a/tests/eval/marginal_total_variance_test.py b/tests/eval/marginal_total_variance_test.py index e16519f..243494a 100644 --- a/tests/eval/marginal_total_variance_test.py +++ b/tests/eval/marginal_total_variance_test.py @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. from absl.testing import absltest -from dpsynth.eval import marginal_total_variance +from eval import marginal_total_variance import pipeline_dp diff --git a/tests/eval/one_way_distribution_computation_test.py b/tests/eval/one_way_distribution_computation_test.py index 1cdd6a5..65ccf98 100644 --- a/tests/eval/one_way_distribution_computation_test.py +++ b/tests/eval/one_way_distribution_computation_test.py @@ -13,7 +13,7 @@ # limitations under the License. from absl.testing import absltest -from dpsynth.eval import one_way_distribution_computation +from eval import one_way_distribution_computation from dpsynth.pipeline_transformations import diagnostic_info import pipeline_dp diff --git a/tests/eval/tabular_eval_test.py b/tests/eval/tabular_eval_test.py index d93b25b..a70c5e2 100644 --- a/tests/eval/tabular_eval_test.py +++ b/tests/eval/tabular_eval_test.py @@ -13,8 +13,8 @@ # limitations under the License. from absl.testing import absltest -from dpsynth.eval import tabular_eval -from dpsynth.eval import types +from eval import tabular_eval +from eval import types from dpsynth.pipeline_transformations import diagnostic_info import pipeline_dp