Install the following extensions & make sure the settings (settings.json
) are set.
- Nix Environment Selector (
arrterian.nix-env-selector
) - Python (
ms-python.python
)
Put the given shell.nix
into the linotp checkout.
Open the project in VS Code & select the Nix environment. It should automatically select the right file (since we changed the default).
At some point during this setup you will be asked to configure a python linter. Both flake8 and mypy are avilable, select what makes sense for you.
Open a new termin (from within VS code) and enter the nix-shell (that isn't yet automagic: arrterian/nix-env-selector#31).
Within the nix-shell create a new virtual env python -m venv venv
. VS Code should have recognized the new folder and picked that up as the projects Python interpreter.
Now, still in the very same shell, activate the venv via source venv/bin/activate
. Now you can go ahead an install the linotp dependencies as normal cd linotpd/src/; pip install -e '.[test]'; python setup.py develop
.
After installing all the develop dependencies you should be able to run linotp
in the active shell.
In the debug section you can create a new launch configuration, copy the given template and it should just work(tm).