Language Server implementation written in Python (pygls) to assist in the development of Galaxy tool wrappers.
- pygls: generic implementation of the Language Server Protocol in Python.
- lxml: Python library for processing XML files.
- anytree: Python library with an easy to use tree structure.
- galaxy-tool-util: the Galaxy tool utilities for Python.
Check the Getting Started section in the contributing docs.
Usually, the client will be in charge of running the server when it is needed, but, in case you want to run it manually for some reason, you can use the following commands:
In any case, it is recommended to create a Python virtual environment first (assuming you are using Python3.8+
):
# Create a virtual environment and activate it
python -m venv myenv
source ./myenv/bin/activate
# Install the language server and its dependencies
pip install galaxy-language-server
# Clone the repo
git clone https://github.com/galaxyproject/galaxy-language-server.git
# Go to the server directory
cd galaxy-language-server/server
# Install the dependencies
python -m pip install -r ./requirements.txt
# Run the server with the default parameters
python -m galaxyls
By default, the server uses IO pipes to communicate with the client. If you want to use TCP, you can pass additional parameters, for example:
python -m galaxyls --tcp --host=127.0.0.1 --port=2087
To check if everything went ok, you can look at the content of the server log file (galaxy-language-server.log
) that should contain the following lines:
INFO:pygls.server:Starting server on 127.0.0.1:2087
INFO:pygls.server:Shutting down the server
INFO:pygls.server:Closing the event loop.