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

Fix invalid-sequence-index for call to scipy.fft.rfft #8103

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

clavedeluna
Copy link
Collaborator

Type of Changes

Type
βœ“ πŸ› Bug fix

Description

Fix invalid-sequence-index for call to scipy.fft.rfft.

Closes #8018

@clavedeluna
Copy link
Collaborator Author

I'd like feedback from maintainers on where I should add scipy as a test dependency

Copy link
Member

@Pierre-Sassoulas Pierre-Sassoulas left a comment

Choose a reason for hiding this comment

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

I think it's better to pinpoint the exact code construct that create the problem in scipy and then use that directly in the test. We won't have to install scipy, and the test will still be meaningful if the scipy code is refactored and the problematic code construct disappear.

@Pierre-Sassoulas Pierre-Sassoulas added the False Positive 🦟 A message is emitted but nothing is wrong with the code label Jan 23, 2023
@github-actions
Copy link
Contributor

πŸ€– Effect of this PR on checked open source code: πŸ€–

Effect on django:
The following messages are now emitted:

  1. subprocess-run-check:
    'subprocess.run' used without explicitly defining the value for 'check'.
    https://github.com/django/django/blob/ef85b6bf0bc5a8b194f0724cf5bbedbcee402b96/django/core/management/utils.py#L22
  2. subprocess-run-check:
    'subprocess.run' used without explicitly defining the value for 'check'.
    https://github.com/django/django/blob/ef85b6bf0bc5a8b194f0724cf5bbedbcee402b96/django/core/management/utils.py#L172
  3. subprocess-run-check:
    'subprocess.run' used without explicitly defining the value for 'check'.
    https://github.com/django/django/blob/ef85b6bf0bc5a8b194f0724cf5bbedbcee402b96/django/utils/autoreload.py#L274
  4. subprocess-run-check:
    'subprocess.run' used without explicitly defining the value for 'check'.
    https://github.com/django/django/blob/ef85b6bf0bc5a8b194f0724cf5bbedbcee402b96/django/utils/version.py#L87

The following messages are no longer emitted:

  1. subprocess-run-check:
    Using subprocess.run without explicitly set check is not recommended.
    https://github.com/django/django/blob/ef85b6bf0bc5a8b194f0724cf5bbedbcee402b96/django/core/management/utils.py#L22
  2. subprocess-run-check:
    Using subprocess.run without explicitly set check is not recommended.
    https://github.com/django/django/blob/ef85b6bf0bc5a8b194f0724cf5bbedbcee402b96/django/core/management/utils.py#L172
  3. subprocess-run-check:
    Using subprocess.run without explicitly set check is not recommended.
    https://github.com/django/django/blob/ef85b6bf0bc5a8b194f0724cf5bbedbcee402b96/django/utils/autoreload.py#L274
  4. subprocess-run-check:
    Using subprocess.run without explicitly set check is not recommended.
    https://github.com/django/django/blob/ef85b6bf0bc5a8b194f0724cf5bbedbcee402b96/django/utils/version.py#L87

This comment was generated for commit b11d2d6

@clavedeluna
Copy link
Collaborator Author

clavedeluna commented Jan 24, 2023

I think it's better to pinpoint the exact code construct that create the problem in scipy and then use that directly in the test. We won't have to install scipy, and the test will still be meaningful if the scipy code is refactored and the problematic code construct disappear.

That makes sense, but I think I'll still need to at least test with numpy since the behavior happens when the objects are numpy arrays. I see some functional tests that do use numpy, but I don't see where numpy is installed?? @Pierre-Sassoulas

@Pierre-Sassoulas
Copy link
Member

There are import from numpy but it's tested without installing numpy (it's simply an example using numpy). We would need a numpy astroid plugin if something is specific to numpy. We might need to discuss how we test c extension generically by providing the C code ourselves to be able to follow the same logic than m'y previous comment for c extensions.

@clavedeluna
Copy link
Collaborator Author

clavedeluna commented Jan 27, 2023

I've pushed the latest code I have but will block this until maintainers let me know about how to move forward with testing this.

@clavedeluna clavedeluna added the Blocked 🚧 Blocked by a particular issue label Jan 27, 2023
@Pierre-Sassoulas Pierre-Sassoulas added the Needs decision πŸ”’ Needs a decision before implemention or rejection label Jan 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Blocked 🚧 Blocked by a particular issue False Positive 🦟 A message is emitted but nothing is wrong with the code Needs decision πŸ”’ Needs a decision before implemention or rejection
Projects
None yet
Development

Successfully merging this pull request may close these issues.

False positive invalid-sequence-index with scipy.fft.rfft
2 participants