A program for a language server based on the bgc ocean-dsl.
Project description
BGC-DSL for biogeochemical models
Optional: check python packages
- update package manager tools
python -m pip install --upgrade pip setuptools wheel
- check if python package
virtualenvis installed if Python < 3.3 is used else a subset of it has been integrated into the standard library under the venvpython -m pip show virtualenv- if not install package
virtualenvinto global system environmentpython -m pip install virtualenv
Install Server Dependencies
- generate virtual environment in directory
.venvusing the standard library 'venv'python -m venv .venv- alternative use
virtualenv, see optional python packages
- activate virtual environment
.venvsource .venv/bin/activate
- install
antlr4-python3-runtime,pygls,Jinja2andpytestpackage into virtual environment.venvpython -m pip install antlr4-python3-runtime Jinja2 mock pygls pytest
Optional: update npm and node
- check npm version
npm --version
- install latest npm version globally (-g or --global)
sudo npm install -g npm@latest
- install latest node version
sudo n latest
- Install the dependencies to the global mode (-g or --global)
sudo npm update -g
Install Client Dependencies
- Goto extension directory
python-oceandsls/bgc-dsl - Install the dependencies to the local node_modules
npm install
Run Example using VSCode
- Open
python-oceandsls/bgc-dslin VSCode - Trust author files in
python-oceandsls/bgc-dsl - Goto Run and Debug
Ctrl/Cmd+Shift+D
- Select
Server + Client - Start Debugging via
F5or GUI - Open a
*.bgcfile - If server is working correctly notification shows
Text Document Did Open
Troubleshooting
-
If VS Code doesn`t automatically locate the interpreter of the virtual environment. Set it manually
-
Open Command prompt
Ctrl/Cmd+Shift+P- Run select interpreter command
Python: Select Interpreter
- Run select interpreter command
-
Alternative create
.vscode/settings.jsonfile inpython-oceandsls/bgc-dsldirectory and setpython.defaultInterpreterPathto point to the virtual environment- settings.json
{ // set Python Interpreter relative to workspaceFolder to virtual environment '.venv' "python.defaultInterpreterPath": "${workspaceFolder}/../.venv/bin/python", // alternative //"python.defaultInterpreterPath": "../.venv", // deprecated // "python.pythonPath": "${workspaceFolder}/../.venv/bin/python",
// Pylance VSCode code analysis and auto-completion "python.analysis.extraPaths": [ "{workspaceFolder}/../.venv/lib/python3.10/site-packages/:${workspaceFolder}/../antlrLib/" ], // Object with environment variables that will be added to the VS Code process to be used by the terminal on OS X "terminal.integrated.env.osx": {"PYTHONPATH": "${workspaceFolder}/.."}, // Object with environment variables that will be added to the VS Code process to be used by the terminal on Linux "terminal.integrated.env.linux": {"PYTHONPATH": "${workspaceFolder}/.."}, // Object with environment variables that will be added to the VS Code process to be used by the terminal on Windows "terminal.integrated.env.windows": {"PYTHONPATH": "${workspaceFolder}/.."},}
-
-
If npm version conflicts exists change npm to the required version
- E.g. reset npm version to 9.2.0
sudo npm install -g npm@9.2.0
- E.g. reset npm version to 9.2.0
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file BGC-Language-Server-0.40.0.tar.gz.
File metadata
- Download URL: BGC-Language-Server-0.40.0.tar.gz
- Upload date:
- Size: 42.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8f76678d44d05a6d369d11f0c7300368360e453853aacd101c53f6143d90f3dd
|
|
| MD5 |
4e8b651f91a0e939a85fd3c3c49a4ef4
|
|
| BLAKE2b-256 |
d243112479711c63546483f2d7fc6e42fde915fc687bef3a57f58441d7d7d92d
|
File details
Details for the file BGC_Language_Server-0.40.0-py3-none-any.whl.
File metadata
- Download URL: BGC_Language_Server-0.40.0-py3-none-any.whl
- Upload date:
- Size: 54.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0072525eefebb0f50cfc968d9318a9813752604039477f21e490b4c952de846
|
|
| MD5 |
02705ff66d25a8628dd2f3fbdfe225c6
|
|
| BLAKE2b-256 |
1c3a297a39e474cae73eecfeb363655646b95f1da083f3c6956a9fd46779bffc
|