A test dsl of the OceanDSL project.
Project description
exampleDSL for references
Optional: check python packages
- update package manager tools
python -m pip install --upgrade pip setuptools wheel
- check if python package
virtualenv
is installed if Python < 3.3 is used else a subset of it has been integrated into the standard library undervenv
python -m pip show virtualenv
- if not install package
virtualenv
into global system environmentpython -m pip install virtualenv
Install Server Dependencies
- generate virtual environment in directory
.venv
using the standard libraryvenv
python -m venv .venv
- alternative use
virtualenv
, see optional python packages
- activate virtual environment
.venv
source .venv/bin/activate
- install
antlr4-python3-runtime
,Jinja2
,mock
,pygls
andpytest
package into virtual environment.venv
python -m pip install antlr4-python3-runtime Jinja2 mock pygls pytest
Optional: update npm and node
- check
npm
versionnpm --version
- install latest
npm
version globally (-g
or--global
)sudo npm install -g npm@latest
- install latest
node
versionsudo n latest
- Install the dependencies to the global mode (
-g
or--global
)sudo npm update -g
Install Client Dependencies
- Goto extension directory
python-oceandsls/example-dsl
- Install the dependencies to the local node_modules
npm install
Run Example using VSCode
- Open
python-oceandsls/example-dsl
in VSCode - Trust author files in
python-oceandsls/example-dsl
- Goto Run and Debug
Ctrl/Cmd+Shift+D
- Select
Server + Client
- Start Debugging via
F5
or GUI - Open a
*.odsl
file - 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.json
file inpython-oceandsls/example-dsl
directory and setpython.defaultInterpreterPath
to 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 using Python 3.10 "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}/.."}, }
-
- Open Command prompt
-
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
Example-Language-0.40.0.tar.gz
(39.2 kB
view details)
Built Distribution
File details
Details for the file Example-Language-0.40.0.tar.gz
.
File metadata
- Download URL: Example-Language-0.40.0.tar.gz
- Upload date:
- Size: 39.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7bbe86c35282103f2ebf79f707ac32816fa1d22fd0e612e04929ae0527ddbe99 |
|
MD5 | b6573447b82c46af510e8c5910347ecc |
|
BLAKE2b-256 | 853b16f899b0be20510b131cd1066ccaf1f5ea2f1f51984226371f1cc9d01458 |
File details
Details for the file Example_Language-0.40.0-py3-none-any.whl
.
File metadata
- Download URL: Example_Language-0.40.0-py3-none-any.whl
- Upload date:
- Size: 56.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a65274338d17916fb107686716b143e48e2cc10c3b601670108488301742f9d9 |
|
MD5 | 09de84177ce132c6aaf34d4e2890d735 |
|
BLAKE2b-256 | 0a3e6c7c93c55419c3d134417240311c9771fb698d6f7e6e8b4cb7100615375d |