The aim of this project is to implement the Language Server Protocol to assist in the development of Galaxy tool wrappers inside modern code editors.
The idea is to provide realtime XML validation, code completion, help/documentation and other smart features to help in following best practices during the development process of XML tool wrappers for Galaxy.
This repository contains both the server implementation in Python and the client implementation of a Visual Studio Code extension in Node.js.
Please note this is still an early work in progress and bugs and issues are expected.
The tags and attributes are suggested based on the Galaxy.xsd schema. They will appear in the same order that they are declared in the schema, so they can comply with the best practices recommendations defined in the Galaxy IUC Standards Style Guide.
The documentation of tags and attributes is retrieved from the Galaxy.xsd schema.
Please note that some elements in the schema are still missing documentation. This will probably be improved over time.
The tools are also validated against the Galaxy.xsd schema.
When the tool file is saved it gets auto-formatted to maintain a consistent format with the Galaxy IUC Standards Style Guide.
Whenever you write a closing >
the corresponding closing tag will be inserted. You can also type /
in an open tag to close it.
Snippets can be really helpful to speed up your tool wrapper development. They allow to quickly create common blocks and let you enter just the important information by pressing tab
and navigating to the next available value.
If you want to add more snippets check the guide in the contribution guidelines.
Current version: Unreleased
See the change log for details.
If you are considering contributing, please read the contribution guide.
-
Fork this repo on Github
-
Clone your fork locally:
git clone https://github.com/<your_github_name>/galaxy-tools-extension.git
-
Create a virtual environment using conda and install the dependencies:
conda create -n <environment-name> python=3.8 conda activate <environment-name> # For the language server: pip install -r requirements-dev.txt # For the client extension: conda install nodejs typescript npm install
-
Run the tests locally
# For the language server: pytest # Additionally you can check the coverage: pytest --cov=server
-
Create a branch for local development:
git checkout -b name-of-your-bugfix-or-feature
Now you can make your changes locally.
Remember to check the Style Guide to maintain an uniform code style.
-
When you're done making changes, check that your changes pass
style linter
and thetests
.flake8 pytest
-
Commit your changes and push your branch to GitHub::
git add . git commit -m "Your detailed description of your changes." git push origin name-of-your-bugfix-or-feature
-
Submit a pull request through the GitHub website.
If you want to debug the extension and the Language Server at the same time follow these steps:
- Open the
galaxy-tool-extension
directory in Visual Studio Code - Open debug view (
ctrl + shift + D
) - Select
Server + Client
and pressF5