Closed segefjord closed 2 years ago
You won't be able to run any of the internal modules outside of Ableton, because their functionality all relies on the ableton.v2
module and Live
objects, which are both internal to Live. They are all only really intended to run as part of the control script, which then receives control messages via OSC.
Regarding running the unit tests: I realised that these inadvertently relied on the system having pythonosc
installed, which wasn't my intention. Have just pushed a commit that adds .
to PYTHONPATH, so that if you run pytest
from the top-level directory, it should be able to find and import pythonosc OK. Let me know if that works!
Oh that's fine.
Btw i get a different amount of passed tests when using the internal pythonosc
module, and installing the system level one with pip XD
Also not all tests are passing - i was looking in the contribution guide and noticed this is required. But are we just rolling with failing tests, or am i doing something wrong still? 😂 btw no judgement, just trying to keep up with you<3
Thanks @ferry-creator, it looks like this was a knock-on effect from the above fix - now pushed an update that resolves it (but make sure you run with a fresh empty instance of Live). I try to ensure all of the tests are passing, although I have noticed that occasaionally one or two sporadically fail probably due to some small indeterminacies due to timing.
Let me know if they all pass for you after the above fix!
Okay, then maybe something is wrong on my system / or i need to write a fix for the framework to get it working on my system.
Ableton Live V11.1.5
I'm testing on a fresh instance of Live everytime as requested in CONTRIBUTING.md
:-)
tests/test_application.py ..
tests/test_clip.py .FFFF.
tests/test_song.py .........................
tests/test_track.py ...F......
(5 tests fail in total)
Your recent push did solve 2 failing tests tho, before the recent commit i got 2 additional failing tests on test_track.py
.
tests/test_track.py ...F...F.F
So it did fix something :D Should i attempt a fix for the rest with a PR?
Interesting note:
when i remove all cache folders (__pycache__
, .pytest_cache
) i get 8 failing tests.
It goes back to 5 failing tests after running a second time, and then it's consistent at 5 failed tests.
Yep, I'd definitely welcome suggested fixes, thanks!
I'm having trouble running the code outside of Ableton. The python compiler embedded in Ableton seems to load the code just fine, but trouble is when i try to fire a
pytest
or run any modules just bypython [module]
I'm using pyenv and virtualenv, so it's a completely clean and isolated environment.
The problem seems to be import errors
I get a bunch of errors very similar to the one i dumped down below. It seems to be related to relative imports.
Terminal output
python version: 3.11.0 pytest version: 7.2.0
MacOS Catalina 10.15.7