Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ env:
GALAXY_FORK: galaxyproject
GALAXY_BRANCH: release_25.1
MAX_CHUNKS: 40
OPENAI_API_KEY: ${{secrets.OPENAI_API_KEY }}
OPENAI_ENDPOINT_URL: https://llm.ai.e-infra.cz/v1

jobs:
setup:
name: Setup cache and determine changed repositories
Expand Down
109 changes: 109 additions & 0 deletions .github/workflows/it_pr.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
name: Galaxy Interactive Tool Linting and Tests for push and PR
on:
workflow_dispatch:
pull_request:
paths-ignore:
- '.github/**'
- 'deprecated/**'
- 'docs/**'
- '*'
push:
branches:
- main
- master
paths-ignore:
- '.github/**'
- 'deprecated/**'
- 'docs/**'
- '*'
env:
GALAXY_FORK: galaxyproject
GALAXY_BRANCH: release_25.1
MAX_CHUNKS: 4
MAX_FILE_SIZE: 1M

concurrency:
# Group runs by PR, but keep runs on the default branch separate
# because we do not want to cancel ToolShed uploads
group: pr-${{ (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') && github.run_number || github.ref }}
cancel-in-progress: true

jobs:
changed_files:
runs-on: ubuntu-latest # windows-latest || macos-latest
name: Test changed-files
steps: # check out rep
- uses: actions/checkout@v6

# find files that are changed compared to master
# find dockerfiles that have changed and pick first or fail if more are changed
- name: Get all changed Dockerfiles
id: changed-dockerfiles
uses: tj-actions/changed-files@v47 # v47.0.6
with:
# Avoid using single or double quotes for multiline patterns
files: |
interactive_tools/**/Dockerfile

- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.11'

- name: Install Planemo
shell: bash
run: |
python -m pip install --upgrade pip
python -m pip install planemo

- name: Validate Planemo installation
shell: bash
run: |
which planemo
planemo --version

# Expand macros and extract image name using planemo
- name: Expand macros and extract image name
id: expand-macros
shell: bash
run: |
# Get the directory containing the changed Dockerfile
changed_dockerfile="${{ steps.changed-dockerfiles.outputs.all_changed_files }}"
tool_dir=$(dirname "$changed_dockerfile")

# Find tool XML file
tool_xml=$(find "$tool_dir" -maxdepth 1 -name "*.xml" ! -name "macros.xml" | head -1 | xargs)

if [[ -z "$tool_xml" ]]; then
echo "No tool XML found in $tool_dir"
exit 1
fi

# Expand macros and capture output
expanded=$(planemo normalize --expand_macros "$tool_xml")

# Extract the container image name (only for type="docker")
image_name=$(echo "$expanded" | grep -oP '<container type="docker">\K[^<]+')

if [[ -z "$image_name" ]]; then
echo "No container tag with type=\"docker\" found after macro expansion"
exit 1
fi

echo "image_name=$image_name" >> "$GITHUB_OUTPUT"
echo "Extracted image: $image_name"

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4

# built docker image locally using the action from eu repo
- name: Build docker image
env:
CHANGED_FILES: ${{ steps.changed-dockerfiles.outputs.all_changed_files }}
uses: docker/build-push-action@v7
with:
push: false
file: ${{ env.CHANGED_FILES }}
tags: ${{ steps.expand-macros.outputs.image_name }}

# use planemo to run the tests for interactivetool
13 changes: 13 additions & 0 deletions interactive_tools/tad/.shed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
name: tad
owner: recetox
type: unrestricted
description: |
Interactive Tadviewer for viewing and manipulating tabular data in Galaxy.
long_description: |
Tadviewer is a web-based adaptation of the Tad desktop application that enables
interactive exploration of tabular datasets from Galaxy, including SQL-like data
querying and filtering capabilities.
homepage_url: https://github.com/RECETOX/tad
remote_repository_url: https://github.com/RECETOX/galaxytools/tree/master/interactive_tools/tad
categories:
- Visualization
35 changes: 35 additions & 0 deletions interactive_tools/tad/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
FROM node:24-bookworm-slim

ARG PORT=8765

ENV PORT=$PORT

RUN apt-get update && apt-get install -y --no-install-recommends \
ca-certificates \
git \
xz-utils \
&& apt-get clean \
&& apt-get autoclean \
&& apt-get autoremove --yes \
&& rm -rf /var/lib/apt/lists/* \
&& rm -rf /var/lib/dpkg/ \
&& rm -rf /var/cache/ \
&& rm -rf /var/log/ \
&& rm -rf /tmp/* ;

WORKDIR /app/tad
# Clone git repo with modified code
RUN git clone -b gxit https://github.com/RECETOX/tad.git .

RUN npm ci \
&& npm install \
&& npm run bootstrap \
&& ./tools/build-all.sh

WORKDIR /app/tad/packages/tadweb-server

RUN npm run build && npm cache clean --force

EXPOSE $PORT

CMD ["npm", "start"]
58 changes: 58 additions & 0 deletions interactive_tools/tad/interactivetool_tad.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
<tool id="interactive_tool_tad" tool_type="interactive" name="Tad" version="@TOOL_VERSION@+galaxy@VERSION_SUFFIX@" profile="21.05">
<description>tadweb-server application to view and manipulate tabular data</description>
<icon src="tad.png"/>
<macros>
<import>macros.xml</import>
</macros>
<expand macro="creator"/>

<requirements>
<container type="docker">recetox/tad:@TOOL_VERSION@</container>
</requirements>

<entry_points>
<entry_point name="tad-gxit" requires_domain="True">
<port>8765</port>
<url>/tadweb-app/index.html</url>
</entry_point>
</entry_points>

<environment_variables>
<!-- These will be accessible as environment variables inside the Docker container -->
<environment_variable name="GALAXY_WEB_PORT">8080</environment_variable>
<environment_variable name="GALAXY_URL">$__galaxy_url__</environment_variable>
</environment_variables>

<command><![CDATA[
## Symlink or copy the galaxy input files into the TAD server directory
JOB_DIR=\$PWD &&
#for $file in $infiles:
## We use the element_identifier (the name of the file in Galaxy history)
## to give it a sensible name, ensuring it ends with .csv
ln -s '$file' '${file.name}.${file.ext}' &&
#end for
cd /app/tad/packages/tadweb-server &&

## Run the server
npm start -- -d \$JOB_DIR > $logfile 2>&1
]]>
</command>

<inputs>
<param name="infiles" type="data" format="csv,tabular,tsv,parquet" multiple="true" label="Select one or more tabular datasets, or a dataset collection." help="Must be in CSV/tabular format."/>
</inputs>

<outputs>
<data name="logfile" format="txt"/>
</outputs>

<tests>
<!-- Currently does not have tests. -->
</tests>


<help>Tadviewer is a web-based adaptation of the Tad desktop application created by Antony Courtney: https://github.com/antonycourtney/tad
It enables viewing of tabular data from the Galaxy instance with built-in support of SQL features.
This galaxy interactive tool is mainatained by RECETOX organization: https://github.com/RECETOX/tad </help>

</tool>
24 changes: 24 additions & 0 deletions interactive_tools/tad/macros.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
<macros>
<xml name="creator">
<creator>
<person
givenName="Helge"
familyName="Hecht"
url="https://github.com/hechth"
identifier="0000-0001-6744-996X" />
<person
givenName="Michaela"
familyName="Boďova"
url="https://github.com/mbodova"
identifier="" />
<organization
url="https://www.recetox.muni.cz/"
email="GalaxyToolsDevelopmentandDeployment@space.muni.cz"
name="RECETOX MUNI" />
</creator>
</xml>


<token name="@TOOL_VERSION@">0.14.0</token>
<token name="@VERSION_SUFFIX@">0</token>
</macros>
Binary file added interactive_tools/tad/tad.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions interactive_tools/tad/test-data/sample.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
firstName,lastName,email,phoneNumber
John,Doe,john@doe.com,0123456789
Jane,Doe,jane@doe.com,9876543210
James,Bond,james.bond@mi6.co.uk,0612345678
Loading