Skip to content

Commit 43958f6

Browse files
authored
delta=0 bug fix (#923)
* use pure DP where we can; slightly better generated notebooks * update docs * revert strip * update index.html * bin keys are public * update docs * update index.html
1 parent 0fe34b6 commit 43958f6

4 files changed

Lines changed: 13 additions & 3 deletions

File tree

docs/index.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -820,7 +820,10 @@ <h1>Context</h1>
820820
... max_length=100000,
821821
... max_groups=100,
822822
... ),
823-
... dp.polars.Margin(by=([&quot;grade_bin&quot;] + list({}.keys())), invariant=&quot;keys&quot;),
823+
... dp.polars.Margin(
824+
... by=([&quot;grade_bin&quot;] + list({}.keys())),
825+
... invariant=&quot;keys&quot;, # Consider the bin values to be public information.
826+
... ),
824827
... ],
825828
... )
826829
</code></pre>

docs/index.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,10 @@ Next, we'll define our Context. This is where we set the privacy budget, and set
568568
... max_length=100000,
569569
... max_groups=100,
570570
... ),
571-
... dp.polars.Margin(by=(["grade_bin"] + list({}.keys())), invariant="keys"),
571+
... dp.polars.Margin(
572+
... by=(["grade_bin"] + list({}.keys())),
573+
... invariant="keys", # Consider the bin values to be public information.
574+
... ),
572575
... ],
573576
... )
574577

dp_wizard/utils/code_generators/abstract_generator.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,10 @@ def basic_template(GROUPS, MAX_ROWS):
140140
)
141141

142142
def bin_template(GROUPS, BIN_NAME):
143-
dp.polars.Margin(by=([BIN_NAME] + list(GROUPS.keys())))
143+
dp.polars.Margin(
144+
by=([BIN_NAME] + list(GROUPS.keys())),
145+
invariant="keys", # Consider the bin values to be public information.
146+
)
144147

145148
margins = [
146149
DefaultsTemplate(basic_template)

tests/test_misc.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ def get_file_paths() -> list[Path]:
8484
for path in package_root.parent.iterdir()
8585
if not (
8686
path.match("*venv*")
87+
or path.name.startswith(".coverage")
8788
or path.name
8889
in [
8990
"docs",

0 commit comments

Comments
 (0)