Skip to content

move rng to be scanpy like - #761

Open
Intron7 wants to merge 4 commits into
mainfrom
move-rng-to-scanpy-like
Open

move rng to be scanpy like#761
Intron7 wants to merge 4 commits into
mainfrom
move-rng-to-scanpy-like

Conversation

@Intron7

@Intron7 Intron7 commented Aug 13, 2026

Copy link
Copy Markdown
Member

No description provided.

Signed-off-by: Intron7 <severin.dicks@icloud.com>
Signed-off-by: Intron7 <severin.dicks@icloud.com>
@codecov-commenter

codecov-commenter commented Aug 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 90.36145% with 8 lines in your changes missing coverage. Please review.
✅ Project coverage is 89.25%. Comparing base (0147bbf) to head (a1397b2).

Files with missing lines Patch % Lines
src/rapids_singlecell/_utils/_random.py 84.09% 7 Missing ⚠️
src/rapids_singlecell/tools/_score_genes.py 90.90% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main     #761   +/-   ##
=======================================
  Coverage   89.25%   89.25%           
=======================================
  Files         109      110    +1     
  Lines       10485    10563   +78     
=======================================
+ Hits         9358     9428   +70     
- Misses       1127     1135    +8     
Files with missing lines Coverage Δ
...ids_singlecell/preprocessing/_harmony_integrate.py 60.46% <100.00%> (+2.96%) ⬆️
...ds_singlecell/preprocessing/_neighbors/__init__.py 91.57% <100.00%> (+0.46%) ⬆️
src/rapids_singlecell/preprocessing/_pca.py 95.06% <100.00%> (+0.09%) ⬆️
...ids_singlecell/preprocessing/_scrublet/__init__.py 96.90% <100.00%> (+0.16%) ⬆️
src/rapids_singlecell/tools/_clustering.py 93.63% <100.00%> (+0.20%) ⬆️
src/rapids_singlecell/tools/_draw_graph.py 92.85% <100.00%> (+0.54%) ⬆️
src/rapids_singlecell/tools/_umap.py 82.85% <100.00%> (+0.76%) ⬆️
src/rapids_singlecell/tools/_score_genes.py 85.71% <90.90%> (ø)
src/rapids_singlecell/_utils/_random.py 84.09% <84.09%> (ø)

@flying-sheep flying-sheep left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Design looks great!

  1. The implementation is not complete: I still see use of some APIs that use global state, e.g. cp.random.binomial
  2. There is confusing stuff like random_state: int | None – that’s not random state, that’s a seed. Similarly random_seed.some_method() doesn’t make sense
  3. There’s also use of legacy cp.random.RandomState, but that’s more a style question, as calling methods on that doesn’t modify state, it just has the old API which gets a bit confusing if you also use cp.random.Generator in other parts of the code base.

Signed-off-by: Intron7 <severin.dicks@icloud.com>
@flying-sheep

Copy link
Copy Markdown
Member

I updated the comment above since I misse what is now “2.”

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.

3 participants