diff --git a/docs/index.html b/docs/index.html index 65672299..48b14f93 100644 --- a/docs/index.html +++ b/docs/index.html @@ -820,7 +820,10 @@

Context

... max_length=100000, ... max_groups=100, ... ), -... dp.polars.Margin(by=(["grade_bin"] + list({}.keys())), invariant="keys"), +... dp.polars.Margin( +... by=(["grade_bin"] + list({}.keys())), +... invariant="keys", # Consider the bin values to be public information. +... ), ... ], ... ) diff --git a/docs/index.md b/docs/index.md index 45246300..3a315bc3 100644 --- a/docs/index.md +++ b/docs/index.md @@ -568,7 +568,10 @@ Next, we'll define our Context. This is where we set the privacy budget, and set ... max_length=100000, ... max_groups=100, ... ), -... dp.polars.Margin(by=(["grade_bin"] + list({}.keys())), invariant="keys"), +... dp.polars.Margin( +... by=(["grade_bin"] + list({}.keys())), +... invariant="keys", # Consider the bin values to be public information. +... ), ... ], ... ) diff --git a/dp_wizard/utils/code_generators/abstract_generator.py b/dp_wizard/utils/code_generators/abstract_generator.py index 6ee807d0..2818f6f3 100644 --- a/dp_wizard/utils/code_generators/abstract_generator.py +++ b/dp_wizard/utils/code_generators/abstract_generator.py @@ -140,7 +140,10 @@ def basic_template(GROUPS, MAX_ROWS): ) def bin_template(GROUPS, BIN_NAME): - dp.polars.Margin(by=([BIN_NAME] + list(GROUPS.keys()))) + dp.polars.Margin( + by=([BIN_NAME] + list(GROUPS.keys())), + invariant="keys", # Consider the bin values to be public information. + ) margins = [ DefaultsTemplate(basic_template) diff --git a/tests/test_misc.py b/tests/test_misc.py index 7b58235c..3f72488d 100644 --- a/tests/test_misc.py +++ b/tests/test_misc.py @@ -84,6 +84,7 @@ def get_file_paths() -> list[Path]: for path in package_root.parent.iterdir() if not ( path.match("*venv*") + or path.name.startswith(".coverage") or path.name in [ "docs",