Skip to content

Conversation

@Kai-Striega
Copy link
Member

This commit is the first commit to try and move from poetry to spin.

It is not working at the moment, namely the test runner cannot find the given tests.

This commit is the first commit to try and move from poetry to spin.

It is not working at the moment, namely the test runner cannot find the
given tests.
@Kai-Striega Kai-Striega added the build To do with building NumPy-Financial label Mar 29, 2024
@Kai-Striega Kai-Striega added this to the 2.0 milestone Mar 29, 2024
@Kai-Striega Kai-Striega self-assigned this Mar 29, 2024
@stefanv
Copy link
Contributor

stefanv commented Apr 1, 2024

With these changes, it now builds and tests on my machine; I am running into some numpy 2.0 issues, so those will still have to be addressed separately.

@stefanv
Copy link
Contributor

stefanv commented Apr 1, 2024

I see you're using ruff for linting. Providing a pre-commit hook would be helpful (or a custom hook, like SciPy, is fine too).

@stefanv
Copy link
Contributor

stefanv commented Apr 1, 2024

Errors I see locally:

FAILED numpy_financial/tests/test_financial.py::TestNpv::test_fuzz - ValueError: Buffer dtype mismatch, expected 'const double' but got 'float'
FAILED numpy_financial/tests/test_financial.py::TestNpv::test_rate_of_negative_one_returns_nan[-1] - ValueError: Buffer dtype mismatch, expected 'const double' but got 'long'
FAILED numpy_financial/tests/test_financial.py::TestNpv::test_rate_of_negative_one_returns_nan[-1.0] - ValueError: Buffer dtype mismatch, expected 'const double' but got 'long'
FAILED numpy_financial/tests/test_financial.py::TestMirr::test_mirr[values0-0.08-0.055-0.0666] - ValueError: Buffer dtype mismatch, expected 'const double' but got 'long'
FAILED numpy_financial/tests/test_financial.py::TestMirr::test_mirr[values1-0.1-0.12-0.126094] - ValueError: Buffer dtype mismatch, expected 'const double' but got 'long'
FAILED numpy_financial/tests/test_financial.py::TestMirr::test_mirr[values2-0.05-0.06-0.3428] - ValueError: Buffer dtype mismatch, expected 'const double' but got 'long'
FAILED numpy_financial/tests/test_financial.py::TestIrr::test_npv_irr_congruence - ValueError: Buffer dtype mismatch, expected 'const double' but got 'long'

@Kai-Striega
Copy link
Member Author

Thanks heaps for helping out. I think I can take it from here. I don't think those are NumPy 2.0 issues. They are just from me not having templated the Cython code fully yet. I'll take a look at it now

@Kai-Striega Kai-Striega merged commit fd3f340 into numpy:main Apr 1, 2024
@Kai-Striega Kai-Striega deleted the experiment/adopt-spin-and-cython branch April 1, 2024 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build To do with building NumPy-Financial

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants