Skip to content

docs: add Randomness page explaining seed semantics#737

Open
leotrs wants to merge 1 commit into
devfrom
docs-randomness-page
Open

docs: add Randomness page explaining seed semantics#737
leotrs wants to merge 1 commit into
devfrom
docs-randomness-page

Conversation

@leotrs

@leotrs leotrs commented Jun 4, 2026

Copy link
Copy Markdown
Collaborator

Summary

Adds a new `randomness.rst` page to the User Guides documenting how XGI's `seed` arguments behave. Per Max's suggestion on PR #724.

The page covers:

  • Accepted types: `None`, `int`, `numpy.random.Generator`
  • The four reproducibility cases (incl. the surprising one: `seed=42` ≠ `seed=default_rng(42)`)
  • Why and when to pass a single `Generator` to a multi-step pipeline
  • Links to NumPy's upstream rng docs

Also wires it into the User Guides toctree and adds a card for discoverability.

Test plan

  • Docs-only change, full test suite still passes (418 passed, 6 skipped)
  • No tests added (docs page)

Documents the three accepted seed types (None, int, Generator), the
four reproducibility cases that surprise users (esp. that seed=42 vs
seed=default_rng(42) produce different output), and the why-use-a-
Generator pattern for multi-step pipelines.

Per Max's suggestion on PR #724.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@codecov

codecov Bot commented Jun 4, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 94.61%. Comparing base (9e1e9af) to head (c8956bd).
⚠️ Report is 44 commits behind head on dev.

Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #737      +/-   ##
==========================================
+ Coverage   93.65%   94.61%   +0.95%     
==========================================
  Files          66       66              
  Lines        5168     5271     +103     
==========================================
+ Hits         4840     4987     +147     
+ Misses        328      284      -44     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant