Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ENH: Numpy 2 Compatability #365

Merged
merged 38 commits into from
Sep 19, 2024
Merged

ENH: Numpy 2 Compatability #365

merged 38 commits into from
Sep 19, 2024

Conversation

bashtage
Copy link
Owner

Work to make Randomgen build and work on NumPy 2

@pep8speaks
Copy link

pep8speaks commented Sep 11, 2024

Hello @bashtage! Thanks for updating this PR. We checked the lines you've touched for PEP 8 issues, and found:

Line 41:1: F822 undefined name 'Generator' in all
Line 41:1: F822 undefined name 'ExtendedGenerator' in all
Line 41:1: F822 undefined name 'RandomState' in all

Line 41:1: F401 'randomgen.tests.data.compute_hashes.kwargs' imported but unused
Line 226:9: F811 redefinition of unused 'kwargs' from line 41
Line 533:42: F811 redefinition of unused 'kwargs' from line 41
Line 970:42: F811 redefinition of unused 'kwargs' from line 41
Line 1354:9: F811 redefinition of unused 'kwargs' from line 41
Line 1575:42: F811 redefinition of unused 'kwargs' from line 41
Line 1578:9: F841 local variable 'key' is assigned to but never used
Line 1869:42: F811 redefinition of unused 'kwargs' from line 41

Line 154:55: E231 missing whitespace after ':'
Line 609:13: F841 local variable 'out_of_bounds' is assigned to but never used
Line 973:13: F841 local variable 'out_of_bounds' is assigned to but never used
Line 979:9: F841 local variable 'error_type' is assigned to but never used
Line 989:5: E303 too many blank lines (2)

Comment last updated at 2024-09-17 08:24:21 UTC

randomgen/tests/test_direct.py Fixed Show fixed Hide fixed
@@ -221,17 +222,17 @@
data.append(int(line.split(",")[-1].strip(), 0))
return {"seed": seed, "data": np.array(data, dtype=cls.dtype)}

def setup_bitgenerator(self, seed, mode="legacy"):
return self.bit_generator(*seed, mode=mode)
def setup_bitgenerator(self, seed, mode="sequence"):

Check notice

Code scanning / CodeQL

Mismatch between signature and use of an overridden method Note test

Overridden method signature does not match
call
, where it is passed an argument named 'inc'. Overriding method
method TestPCG64XSLRR.setup_bitgenerator
matches the call.
Overridden method signature does not match
call
, where it is passed an argument named 'inc'. Overriding method
method TestPCG64XSLRR.setup_bitgenerator
matches the call.
Overridden method signature does not match
call
, where it is passed an argument named 'inc'. Overriding method
method TestPCG64XSLRR.setup_bitgenerator
matches the call.
Overridden method signature does not match
call
, where it is passed an argument named 'inc'. Overriding method
method TestPCG64XSLRR.setup_bitgenerator
matches the call.
Overridden method signature does not match
call
, where it is passed an argument named 'inc'. Overriding method
method TestPCG64XSLRR.setup_bitgenerator
matches the call.
Overridden method signature does not match
call
, where it is passed an argument named 'inc'. Overriding method
method TestPCG64DXSM.setup_bitgenerator
matches the call.
Copy link

codecov bot commented Sep 11, 2024

Codecov Report

Attention: Patch coverage is 99.51220% with 1 line in your changes missing coverage. Please review.

Project coverage is 88.29%. Comparing base (121280c) to head (d28f75f).

Files with missing lines Patch % Lines
randomgen/common.pyx 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #365      +/-   ##
==========================================
- Coverage   92.93%   88.29%   -4.64%     
==========================================
  Files          53       50       -3     
  Lines        8546     8277     -269     
  Branches      493      490       -3     
==========================================
- Hits         7942     7308     -634     
- Misses        572      937     +365     
  Partials       32       32              

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

@bashtage bashtage merged commit c678147 into main Sep 19, 2024
24 of 27 checks passed
@bashtage bashtage deleted the numpy-2-final branch September 19, 2024 13:15
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.

2 participants