diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 66b2a7f1..e8723910 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -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 diff --git a/.github/workflows/it_pr.yaml b/.github/workflows/it_pr.yaml new file mode 100644 index 00000000..1cc0094b --- /dev/null +++ b/.github/workflows/it_pr.yaml @@ -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 '\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 diff --git a/interactive_tools/tad/.shed.yml b/interactive_tools/tad/.shed.yml new file mode 100644 index 00000000..c5c18e17 --- /dev/null +++ b/interactive_tools/tad/.shed.yml @@ -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 diff --git a/interactive_tools/tad/Dockerfile b/interactive_tools/tad/Dockerfile new file mode 100644 index 00000000..ccf5477e --- /dev/null +++ b/interactive_tools/tad/Dockerfile @@ -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"] diff --git a/interactive_tools/tad/interactivetool_tad.xml b/interactive_tools/tad/interactivetool_tad.xml new file mode 100644 index 00000000..e8533523 --- /dev/null +++ b/interactive_tools/tad/interactivetool_tad.xml @@ -0,0 +1,58 @@ + + tadweb-server application to view and manipulate tabular data + + + macros.xml + + + + + recetox/tad:@TOOL_VERSION@ + + + + + 8765 + /tadweb-app/index.html + + + + + + 8080 + $__galaxy_url__ + + + $logfile 2>&1 + ]]> + + + + + + + + + + + + + + + + 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 + + \ No newline at end of file diff --git a/interactive_tools/tad/macros.xml b/interactive_tools/tad/macros.xml new file mode 100644 index 00000000..59dea10a --- /dev/null +++ b/interactive_tools/tad/macros.xml @@ -0,0 +1,24 @@ + + + + + + + + + + + 0.14.0 + 0 + \ No newline at end of file diff --git a/interactive_tools/tad/tad.png b/interactive_tools/tad/tad.png new file mode 100644 index 00000000..f009cc30 Binary files /dev/null and b/interactive_tools/tad/tad.png differ diff --git a/interactive_tools/tad/test-data/sample.csv b/interactive_tools/tad/test-data/sample.csv new file mode 100644 index 00000000..46948cfc --- /dev/null +++ b/interactive_tools/tad/test-data/sample.csv @@ -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 \ No newline at end of file