Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,10 @@ <h1>Context</h1>
... max_length=100000,
... max_groups=100,
... ),
... dp.polars.Margin(by=([&quot;grade_bin&quot;] + list({}.keys())), invariant=&quot;keys&quot;),
... dp.polars.Margin(
... by=([&quot;grade_bin&quot;] + list({}.keys())),
... invariant=&quot;keys&quot;, # Consider the bin values to be public information.
... ),
... ],
... )
</code></pre>
Expand Down
5 changes: 4 additions & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
... ),
... ],
... )

Expand Down
5 changes: 4 additions & 1 deletion dp_wizard/utils/code_generators/abstract_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
1 change: 1 addition & 0 deletions tests/test_misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Loading