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

Update numpy in REQUIREMENTS.txt for compatibility with Python 3.12 #2024

Closed
shachafl opened this issue Oct 11, 2024 · 0 comments · Fixed by #2025
Closed

Update numpy in REQUIREMENTS.txt for compatibility with Python 3.12 #2024

shachafl opened this issue Oct 11, 2024 · 0 comments · Fixed by #2025
Assignees
Labels
bug An issue with an existing feature dependencies Pull requests that update a dependency file

Comments

@shachafl
Copy link
Collaborator

shachafl commented Oct 11, 2024

Description

Python 3.12 requires a numpy version >= 1.26.
Our current numpy version is limited to <1.25

Steps/Code to Reproduce

$ make install-dev
$ pip install -U "numpy<2"
$ make fast

Expected Results

pass all tests in make fast

Actual Results

  1. make mypy fails with deprecated np.product and np.NINF

  2. make fast-test results in two failed tests where numpy 1.25 changed sorting order in pandas for index names with identical values. This is due to the unstable nature of 'quicksort' when sorting values.

In file starfish/test/full_pipelines/api/test_dartfish.py:
def test_dartfish_pipeline_cropped_data(tmpdir):
)
assert np.array_equal(
high_expression_genes['gene'].values,
['MBP', 'MOBP', 'ADCY8', 'TRIM66', 'SYT6'] # fails and need to be replaced with ['MBP', 'MOBP', 'ADCY8', 'SYT6', 'TRIM66']
)

In file starfish/test/full_pipelines/api/test_merfish.py:
def test_merfish_pipeline_cropped_data():
# assert that number of high-expression detected genes are correct
expected_counts = pd.Series(
[107, 59, 46, 32, 32],
index=('MALAT1', 'SRRM2', 'FASN', 'IGF2R', 'TLN1') # fails and need to be replaced with "index=('MALAT1', 'SRRM2', 'FASN', 'TLN1', 'IGF2R')"
)
assert np.array_equal(
expected_counts.values,

@shachafl shachafl added the bug An issue with an existing feature label Oct 11, 2024
@shachafl shachafl self-assigned this Oct 11, 2024
@shachafl shachafl added the dependencies Pull requests that update a dependency file label Oct 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug An issue with an existing feature dependencies Pull requests that update a dependency file
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant