DOC: tighten the comments that came with the sampler seed groups - #1154
Merged
Gui-FernandesBR merged 1 commit intoAug 14, 2026
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1154 +/- ##
===========================================
+ Coverage 82.18% 83.30% +1.12%
===========================================
Files 122 130 +8
Lines 16355 17080 +725
===========================================
+ Hits 13441 14229 +788
+ Misses 2914 2851 -63 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
thc1006
force-pushed
the
doc/tighten-sampler-seed-comments
branch
from
August 14, 2026 08:12
5aefe54 to
5c9fb34
Compare
Gui-FernandesBR
approved these changes
Aug 14, 2026
The prose added in RocketPy-Team#1102 restates itself across three places and narrates how each rule was arrived at. Keep the caller-visible rules, drop the retelling, and let a shared group's contract live on seed_group rather than being repeated at each call site. Comments only, no change to executable code. Signed-off-by: thc1006 <84045975+thc1006@users.noreply.github.com>
Gui-FernandesBR
force-pushed
the
doc/tighten-sampler-seed-comments
branch
from
August 14, 2026 09:50
5c9fb34 to
85d682d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request type
Checklist
ruff check/ruff format --check) has passed locallypytest tests/unit) have passed locallyCurrent behavior
The comments I added in #1102 are longer than they need to be. Three of them
explain the same rule, and several narrate how the rule was arrived at instead
of stating it.
seed_groupin particular carries three paragraphs for aone-line body, which is out of step with
sampleandreset_seedright belowit in the same file.
New behavior
Same rules, shorter. The contract a shared group has to honour now lives on
seed_group, and_reset_custom_samplersand_validate_custom_samplerpointat it rather than restating it. Inline comments state the constraint rather than
the investigation, and the
#1103reference is kept as a reference.Nothing outside comments and docstrings changed. I checked that by parsing both
revisions, dropping every docstring, and comparing the resulting ASTs: identical
for both files.
Net effect is -21 lines.
Breaking change
Additional information
Local run against
developat cb6106a:One thing I left alone.
seed_group's prose is down from 12 lines to 6, but itsbody is
return self, so it is still longer than the code it sits on. It is anabstract property that users implement themselves, and the three things it says
(all members return the same generator, return the same object each call, one
group per model) are each a way to get a silently wrong seed. I would rather
keep those than hit a line count. Happy to cut it further if you disagree.