Skip to content

Conversation

@spebern
Copy link

@spebern spebern commented May 25, 2024

This is still a WIP, and I'd like to get some feedback on this approach first.

Given that a lot of the functionality is available in Python and widely tested, I think it would make sense to test against Python. This can save a lot of time in generating/writing test code, and we profit from the widely tested Python libraries.

Currently, I only added one test for the reverse bessel roots and limited the n because for higher n the try_n_roots was returning an error.

If Python is not available, the test function does not get called, any error on importing SciPy will be ignored, and the test gets skipped.

What do you think about this approach? One disadvantage is that python with SciPy is required for those tests, but I think it makes writing tests so trivial that it is worth introducing it.

@spebern spebern changed the title Add tests against python Add tests against python (WIP) May 25, 2024
@PanieriLorenzo
Copy link
Owner

I think it's a good approach, since I'm loosely basing this crate on NumPy and SciPy. I don't have any issues with the python dev dependency as I'm quite comfortable with python.

I haven't run it yet because I'll be quite busy for a few days but I'll run it when I have time and tell you if there's any issue.

@PanieriLorenzo
Copy link
Owner

I tried running it but it cannot find libpython3.11.so.1.0, I cannot seem to find why it is dependent on 3.11 specifically, because I only have 3.12 and 3.10 installed system-wide. Could you maybe make it more portable, perhaps with a virtual environment? Or add instructions on what dependencies are needed. I tried building within a 3.11 virtualenv with no luck

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