-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
VUnit-by-HGB seems to ignore virtual environments #17
Comments
Hi @philipphct, Thank you for the issue! I don't know how smart this feature should be... Should the property "vunit-by-hgb.python" be deprecated and the extension completely relies on the property "python.defaultInterpreterPath" ? In relative paths, variables like ${workspaceFolder} cannot be used as the vscode-api doesn't offer any functionality to resolve these variables inside a path, as far as i know... The problem is that the smarter this feature gets the more edge cases will arise where the feature won't work as expected without the user being able to understand the problem... What is your opinion, @philipphct ? |
Hi @jakobjung10,
I wholeheartedly agree.
Thats unfortunate, I was hoping for some already existing builtin resolution function, to deal with such user inputs.
Yes, that would be way too much.
Hmm, I don't think so.
In the meantime I found this wikipage regarding python.defaultInterpreterPath: My interpretation is, that "python.defaultInterpreterPath" would be
From the wikipage:
The last part may be a not that interesting (see your comment "..api doesn't offer any functionality to resolve these variables.."), but the first one could be interesting? If that is something that could work, i guess it would also
Sorry for the inconvenience. What do you think? |
Disclaimer
First of all, lovely plugin, me - and my team - use it almost every day, and love to see the improvements over "hbohlin.vunit-test-explorer" :)
Previously we used vunit and this plugin in a systemwide installation and did not bother with virtual environments and such. But as time passes, it gets increasingly difficult to ensure everyone is on the same page. So I did some investigations regarding using virtual environments and here is what I found.
In case I simply missconfigured something, I would be glad to hear from you whats wrong :)
P.S.: This is my corporate github account, so I am currenty kinda inofficially speaking in the name of that corporation. So in case that is a turnoff for you, I totally understand.
Unfortuately I have zero experience with Typescript and VSCode Plugin development, otherwise I could give it a try.
Anyway, those are the findings I did not want to rot away in internal wiki;
Setup
A clean python installation and configured a python virtual environment with CTRL + Shift + P -> Python: Create Environment -> VENV-> Python3…. -> requirements.txt
Configured in User Settings:
What I already tried
Sanity Checking my setup
Running a run.py within a terminal window inside VSCode does work. -> Virtual environment itself seems OK
Configuring Default Python Interpreter
Configuring the default Python Interpreter Path in Workspace Settings relative to current working dir
does not have any effect, i.e. this plugin seems to ignore that setting.
Relative Path in Plugin Settings
Configuring a relative path to the virtual environments python executable like any variation of those:
does not work either with this output:
Running VUnit: ./venv/Scritps/python.exe "d:\dev\path\run.py" --no-color --exit-0
Der Befehl "." ist entweder falsch geschrieben oder
konnte nicht gefunden werden.
or similar.
Absolute Path to python executable
Using absolute path in workspace settings
Works perfectly fine, but kind of a hassle.
System Information
The text was updated successfully, but these errors were encountered: