Closed ASK-DataScience closed 8 months ago
The error with editable install is because Python requires the bundled C++ code to be compiled using Microsoft c++ build tools.
My intention for the unittests was to run the tests as follows. That way you don't need the compiler. I haven't worked out a good way of distributing the unittests through pip, so this seemed like the most sensible way to do it, given that most people won't be running unittests (unless you have any other suggestions?).
pip install patato
git clone https://github.com/BohndiekLab/patato
cd patato/tests
python -m unittest
P.s. I don't really recognise the ImportError that you get in your second screenshot, so please let me know if this doesn't solve the problems :)
@ASK-DataScience do you think this is an acceptable way to do this?
@tomelse I agree with you that most people won't be running unittests, but as a reviewer I should check if it is working correctly for me. Any suggestion on how to make it work? I followed your steps in the documentation.
My next step will be running the examples.
Did you try the instructions in my previous comment? I.e. installing but not editable (pip install patato), then separately git checkout the repo and run the tests on that code
Otherwise you'd need to install the Microsoft C++ tools to compile the internal C++ code used for one of the algorithms
@tomelse I just tried the instructions in your previous comment (not editable) and I got the following error:
So looks like the first error is resolved, but we are still stuck with the second one.
Could you check that your Python environment is set up properly? Maybe try running Python in the command line then run
import patato
Could also check that unittest works for individual test scripts?
python -m unittest test_unmixing.py
I suspect there might be something wrong with the Python environment. It's hard to diagnose from my end though.
OK. Tests are finally working for me. But I had to install and run patato on the "base" environment instead of its own environment.
I suggest you add the option to run patato as not editable on the documentation page as well.
Thanks, I'll add that to the documentation.
I am getting an error after running this step: pip install -e .
Also after running this step: python -m unittest
This is part of JOSS Review