Skip to main content

A language server for Galaxy (https://galaxyproject.org) tool wrappers

Project description

Galaxy Language Server

Actions Status PyPI - Python Version PyPI

Language Server implementation written in Python (pygls) to assist in the development of Galaxy tool wrappers.

Dependencies

Getting Started

Check the Getting Started section in the contributing docs.

How to manually run the server

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

Option 1: Installing from PyPi

# Install the language server and its dependencies
pip install galaxy-language-server

Option 2: Building from source

# 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

# 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.

Galaxy Language Server Changelog

[0.8.0] - 2022-10-02

Added

  • Full Galaxy tool linting integration (#204).

Changed

  • Code quality: refactor validation system (#205).

  • Code quality: setup isort (#203).

[0.7.1] - 2022-01-31

Fixed

  • Check valid document extension before checking contents when validating documents (#189).

[0.7.0] - 2022-01-29

Added

  • New custom command to discover tests in a single tool file to support the new Testing API in the client (#183).

Changed

  • Update pygls dependency and fix how custom commands are registered (#179).

Fixed

  • An error creating Code Actions to extract macros when selecting a text range in some situations (#178).

[0.6.1] - 2021-09-26

Changed

  • Revert pygls version to 0.11.1. This should temporarily fix an issue that prevents using any custom command in the language server (#172).

[0.6.0] - 2021-09-12

Added

  • Code Action language feature to be able to extract macros out of valid blocks of XML (#165).

[0.5.3] - 2021-07-09

Fixed

  • An error when generating tests from inputs that contained boolean values different than true or false like True or False (#156).

[0.5.2] - 2021-06-08

Fixed

  • Line offset mismatch between diagnostic line and expanded document (#150).

[0.5.1] - 2021-06-03

Fixed

  • Clear diagnostics when the document is not valid (#143).

  • Fix empty document validation (#144).

[0.5.0] - 2021-05-13

Added

  • New feature to navigate to (or peek) macro and token definitions, open referenced macro files directly from the <import> tag and preview token values on hover (#127).

  • A custom command to generate the expanded version of a tool document (#128).

  • Existing macro names are now suggested when manually invoking IntelliSense with Ctrl+Space (#132).

  • Support for dynamic token parameter attributes in <expand> elements (#133).

Changed

  • Updated main dependencies to latests versions, specially pygls=0.10.3 which introduced some backward incompatible changes (#126).

Fixed

  • When manually invoking IntelliSense with Ctrl+Space in the middle of a tag or attribute the auto-completion was suggesting wrong values (#129).

  • Auto-closing tags when writing / or > was broken in previous versions (#137).

[0.4.0] - 2021-02-15

Added

  • A custom command for tests discovery that provides information about the test definitions of all the opened tool documents in the virtual workspace (#110).

  • A custom command to reorder <param> attributes according to the IUC Style Guidelines (#104).

Fixed

  • Unexpected errors when generating code were failing silently without providing feedback to the user. Now an error notification will be displayed to the user (#113).

  • Elements inside macros were not correctly associated with their XSD definition (#111).

  • An bug in the search algorithm when analyzing the tool input trees with nested conditional sharing the same 'when' value. This was causing the code generation commands to fail (#109).

[0.3.2] - 2021-01-24

Fixed

  • The server was ignoring tool wrappers with syntax errors instead of reporting those syntax errors (#100).

[0.3.1] - 2021-01-09

Fixed

  • The autocompletion of tags and attributes was leaking into the CDATA sections (#86).

  • Weird behavior of the autoclosing tag feature (#86).

  • When using a custom command to auto-generate the <command> or the <tests> sections (with a tool document containing macros), the insert position inside the document for the code snippets was offset (#83).

[0.3.0] - 2021-01-01

Added

  • A custom command to auto-generate the <command> section with boilerplate Cheetah template based on the current inputs and outputs defined in the tool (#77).
  • A custom command to auto-generate <test> cases based on the current inputs and outputs defined in the tool (#73).

Fixed

  • Avoid processing unknown XML documents (aka not tool wrappers) (#75).
  • Broken XML parsing when more than one comment block was present in the document (#70).

[0.2.1] - 2020-11-22

Fixed

  • The documentation displayed when hovering an element now shows the correct documentation instead of No documentation available (#64).

[0.2.0] - 2020-11-13

Added

  • Client settings to control completion features (#56).

Changed

  • The XML parser has been replaced with a better implementation (#55).

[0.1.2] - 2020-10-25

Removed

  • Removed unused function XsdTree.find_node_by_name().

[0.1.1] - 2020-10-24

Added

  • Support autocompletion for <expand> element.

Changed

  • Updated dependencies to latest versions.

Fixed

  • Fix error when hovering <expand> elements or it's atributes (#41).

[0.1.0] - 2020-10-14

Added

  • Basic tag and attribute auto-completion.
  • Auto-close tags feature.
  • XML tool validation when opening and saving file.
  • Basic validation of macros.
  • Auto-formatting document when saving file.
  • Display tag and attribute documentation when hovering.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

galaxy-language-server-0.8.0.tar.gz (50.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

galaxy_language_server-0.8.0-py3-none-any.whl (65.8 kB view details)

Uploaded Python 3

File details

Details for the file galaxy-language-server-0.8.0.tar.gz.

File metadata

  • Download URL: galaxy-language-server-0.8.0.tar.gz
  • Upload date:
  • Size: 50.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.14

File hashes

Hashes for galaxy-language-server-0.8.0.tar.gz
Algorithm Hash digest
SHA256 680aceaf42d4eae627b7729a112a04bf8abb4a854e3a177f4a836b722af36cf7
MD5 c48eda031f1226e9c2aa1e3f95ec5056
BLAKE2b-256 86e2d8d46814736cf0db1b8a351802bf25410f9bf954558ac00ef91001c2666f

See more details on using hashes here.

File details

Details for the file galaxy_language_server-0.8.0-py3-none-any.whl.

File metadata

File hashes

Hashes for galaxy_language_server-0.8.0-py3-none-any.whl
Algorithm Hash digest
SHA256 9c4dc63dffb199db5c85f420c0e9f51f74914e1009dcd0086f99af8ac413fc2f
MD5 4e77937154bcadc675d6d1f713084687
BLAKE2b-256 e20126873c5b3956bf7be004d542afc34f5c09051b325fa1d99df93c17f3c850

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page