relsynth 1.0.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- relsynth/__init__.py +32 -0
- relsynth/__main__.py +5 -0
- relsynth/_version.py +2 -0
- relsynth/api.py +709 -0
- relsynth/cli.py +612 -0
- relsynth/connectors/__init__.py +129 -0
- relsynth/connectors/base.py +181 -0
- relsynth/connectors/ddl.py +229 -0
- relsynth/connectors/ddl_types.py +68 -0
- relsynth/connectors/files.py +180 -0
- relsynth/connectors/mssql.py +47 -0
- relsynth/connectors/oracle.py +31 -0
- relsynth/connectors/postgres.py +46 -0
- relsynth/connectors/sql.py +574 -0
- relsynth/connectors/sqlfuncs.py +148 -0
- relsynth/connectors/sqlite.py +36 -0
- relsynth/copula.py +412 -0
- relsynth/counts.py +98 -0
- relsynth/data.py +401 -0
- relsynth/diagnostics.py +149 -0
- relsynth/discovery.py +1437 -0
- relsynth/doctor.py +531 -0
- relsynth/engine.py +4936 -0
- relsynth/errors.py +64 -0
- relsynth/evaluate.py +1443 -0
- relsynth/export.py +1111 -0
- relsynth/expr.py +708 -0
- relsynth/introspect.py +1047 -0
- relsynth/kernels.py +69 -0
- relsynth/keyfind.py +618 -0
- relsynth/marginals.py +287 -0
- relsynth/model_report.py +298 -0
- relsynth/pii.py +66 -0
- relsynth/pipeline.py +255 -0
- relsynth/posterior.py +118 -0
- relsynth/prepare.py +359 -0
- relsynth/profiling.py +327 -0
- relsynth/pushdown/__init__.py +14 -0
- relsynth/pushdown/loader.py +103 -0
- relsynth/pushdown/planner.py +97 -0
- relsynth/pushdown/stats.py +201 -0
- relsynth/py.typed +0 -0
- relsynth/relational.py +1475 -0
- relsynth/replica.py +898 -0
- relsynth/schema.py +447 -0
- relsynth/source.py +224 -0
- relsynth/spec.py +953 -0
- relsynth/stancheck.py +197 -0
- relsynth/table_model.py +431 -0
- relsynth/text.py +206 -0
- relsynth/transform.py +642 -0
- relsynth/verify.py +299 -0
- relsynth-1.0.0.dist-info/METADATA +445 -0
- relsynth-1.0.0.dist-info/RECORD +57 -0
- relsynth-1.0.0.dist-info/WHEEL +5 -0
- relsynth-1.0.0.dist-info/entry_points.txt +2 -0
- relsynth-1.0.0.dist-info/top_level.txt +1 -0
relsynth/__init__.py
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"""relsynth: Bayesian synthetic data for relational databases.
|
|
2
|
+
|
|
3
|
+
import relsynth as rs
|
|
4
|
+
spec = rs.introspect("sqlite:shop.db") # draft a specification
|
|
5
|
+
model = rs.fit(spec) # fit the Bayesian model
|
|
6
|
+
data = model.sample(scale=2.0) # a synthetic database
|
|
7
|
+
model.evaluate(data).require(0.98) # quality gate
|
|
8
|
+
data.write("csv:synthetic/")
|
|
9
|
+
|
|
10
|
+
See README.md and docs/ for the user guide, the CLI, the connectors and the
|
|
11
|
+
theory (propositions and proofs).
|
|
12
|
+
"""
|
|
13
|
+
from ._version import __version__
|
|
14
|
+
|
|
15
|
+
# Submodules named like API functions are loaded first: importing a submodule for
|
|
16
|
+
# the first time binds its name on the package, which would hide the function.
|
|
17
|
+
from . import doctor as _doctor_module # noqa: F401
|
|
18
|
+
from . import evaluate as _evaluate_module # noqa: F401
|
|
19
|
+
from . import introspect as _introspect_module # noqa: F401
|
|
20
|
+
from . import verify as _verify_module # noqa: F401
|
|
21
|
+
from .api import (Diagnosis, EvaluationReport, FittedModel, RunResult, Spec, SyntheticData, clone_schema, connect,
|
|
22
|
+
doctor, evaluate, export_model, fit, introspect, ping, profile, run, sample, tune, validate_spec,
|
|
23
|
+
verify)
|
|
24
|
+
from .engine import Synthesizer
|
|
25
|
+
from .errors import EngineError, QualityGateError, RelsynthError, SourceError
|
|
26
|
+
from .spec import SpecError, dump_spec, load_spec
|
|
27
|
+
from .verify import VerifyReport
|
|
28
|
+
|
|
29
|
+
__all__ = ["__version__", "Spec", "FittedModel", "SyntheticData", "EvaluationReport", "RunResult", "Diagnosis",
|
|
30
|
+
"introspect", "validate_spec", "fit", "sample", "evaluate", "run", "doctor", "tune", "export_model", "verify",
|
|
31
|
+
"clone_schema", "profile", "ping", "connect", "Synthesizer", "VerifyReport", "load_spec", "dump_spec",
|
|
32
|
+
"RelsynthError", "SpecError", "SourceError", "EngineError", "QualityGateError"]
|
relsynth/__main__.py
ADDED
relsynth/_version.py
ADDED