python-colorspace icon indicating copy to clipboard operation
python-colorspace copied to clipboard

Error message when running tests with the makefile

Open dmreagan opened this issue 1 year ago • 3 comments

I'm testing the installation procedures for the review at https://github.com/openjournals/joss-reviews/issues/7120. I tried following the instructions for running the tests with the makefile.

# Setting up virtual environment with all dependencies for full
# tests as well as for creating the documentation, calculating
# coverage etc., install Python colorspace, activate venv and
# run full tests.
make venv && make install && source venv/bin/activate && make test

I tried this on two Ubuntu systems running the bash shell and both times got the following error:

source venv/bin/activate && make install
/bin/sh: 1: source: not found
make: *** [Makefile:31: venv] Error 127

dmreagan avatar Sep 11 '24 21:09 dmreagan

David, thanks for the report, very much appreciated! I can replicate this on my end (Debian/testing) and I think that the culprit is the last line of the venv target in the Makefile (L31).

To confirm, could you try to run the following after you got the error above?

source venv/bin/activate
make install
make test

For me this works and successfully completes all tests.

zeileis avatar Sep 11 '24 22:09 zeileis

Yes, those commands did work for me and the tests passed.

dmreagan avatar Sep 12 '24 18:09 dmreagan

Thanks, David, I've created PR #25 that tries to resolve the problem. But I'll let Reto have a final look when he returns from his vacations.

zeileis avatar Sep 12 '24 20:09 zeileis

Thank you @dmreagan, for reporting this issue.

We have resolved the problem (see PR https://github.com/retostauffer/python-colorspace/pull/25) and updated the Testing instructions accordingly:

  • Removed the source ... command from the make rule, which caused the "source: not found" error.
  • Corrected the order of commands for running tests (see the last line of the Testing section).

retostauffer avatar Oct 07 '24 13:10 retostauffer

Looks good to me. Closing.

dmreagan avatar Oct 22 '24 19:10 dmreagan