diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index fd57ae55..3ed0cefa 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -7,7 +7,7 @@ on: types: [run-all-tool-tests-command] env: GALAXY_FORK: galaxyproject - GALAXY_BRANCH: release_23.2 + GALAXY_BRANCH: release_24.0 MAX_CHUNKS: 40 jobs: setup: @@ -27,7 +27,7 @@ jobs: steps: - name: Add reaction if: ${{ github.event.client_payload.slash_command.command == 'run-all-tool-tests' }} - uses: peter-evans/create-or-update-comment@v2 + uses: peter-evans/create-or-update-comment@v4 with: token: ${{ secrets.PAT }} repository: ${{ github.event.client_payload.github.payload.repository.full_name }} @@ -43,11 +43,11 @@ jobs: - name: Determine latest commit in the Galaxy repo id: get-galaxy-sha run: echo "galaxy-head-sha=$(git ls-remote https://github.com/${{ steps.get-fork-branch.outputs.fork }}/galaxy refs/heads/${{ steps.get-fork-branch.outputs.branch }} | cut -f1)" >> $GITHUB_OUTPUT - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Cache .cache/pip - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-pip with: path: ~/.cache/pip @@ -56,7 +56,7 @@ jobs: # are not available as wheels, pip will build a wheel for them, which can be cached. - name: Install wheel run: pip install wheel - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 - name: Fake a Planemo run to update cache and determine commit range, repositories, and chunks @@ -84,14 +84,14 @@ jobs: matrix: python-version: ['3.11'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Cache .cache/pip - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-pip with: path: ~/.cache/pip @@ -104,7 +104,7 @@ jobs: repository-list: ${{ needs.setup.outputs.repository-list }} tool-list: ${{ needs.setup.outputs.tool-list }} additional-planemo-options: --biocontainers -s tests,output,inputs,help,general,command,citations,tool_xsd,xml_order,tool_urls,shed_metadata - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: ${{ failure() }} with: name: 'Tool linting output' @@ -133,20 +133,20 @@ jobs: steps: # checkout the repository # and use it as the current working directory - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Cache .cache/pip - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-pip with: path: ~/.cache/pip key: pip_cache_py_${{ matrix.python-version }}_gxy_${{ needs.setup.outputs.galaxy-head-sha }} - name: Get number of CPU cores - uses: SimenB/github-actions-cpu-cores@v1 + uses: SimenB/github-actions-cpu-cores@v2 id: cpu-cores - name: Clean dotnet folder for space run: rm -Rf /usr/share/dotnet @@ -163,7 +163,7 @@ jobs: galaxy-slots: ${{ steps.cpu-cores.outputs.count }} # Limit each test to 15 minutes test_timeout: 900 - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: 'Tool test output ${{ matrix.chunk }}' path: upload @@ -182,14 +182,14 @@ jobs: # This job runs on Linux runs-on: ubuntu-latest steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: path: artifacts - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Cache .cache/pip - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-pip with: path: ~/.cache/pip @@ -200,7 +200,7 @@ jobs: with: mode: combine html-report: true - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: 'All tool test results' path: upload @@ -211,7 +211,7 @@ jobs: - name: Create comment if: ${{ github.event.client_payload.slash_command.command == 'run-all-tool-tests' }} - uses: peter-evans/create-or-update-comment@v2 + uses: peter-evans/create-or-update-comment@v4 with: token: ${{ secrets.PAT }} repository: ${{ github.event.client_payload.github.payload.repository.full_name }} diff --git a/.github/workflows/pr.yaml b/.github/workflows/pr.yaml index 00d355cd..8591087f 100644 --- a/.github/workflows/pr.yaml +++ b/.github/workflows/pr.yaml @@ -2,7 +2,6 @@ name: Galaxy Tool Linting and Tests for push and PR on: pull_request: paths-ignore: - - '.github/**' - 'deprecated/**' - 'docs/**' - '*' @@ -11,13 +10,12 @@ on: - main - master paths-ignore: - - '.github/**' - 'deprecated/**' - 'docs/**' - '*' env: GALAXY_FORK: galaxyproject - GALAXY_BRANCH: release_23.2 + GALAXY_BRANCH: release_24.0 MAX_CHUNKS: 4 MAX_FILE_SIZE: 1M concurrency: @@ -59,17 +57,17 @@ jobs: - name: Determine latest commit in the Galaxy repo id: get-galaxy-sha run: echo "galaxy-head-sha=$(git ls-remote https://github.com/${{ env.GALAXY_FORK }}/galaxy refs/heads/${{ env.GALAXY_BRANCH }} | cut -f1)" >> $GITHUB_OUTPUT - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Cache .cache/pip - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-pip with: path: ~/.cache/pip key: pip_cache_py_${{ matrix.python-version }}_gxy_${{ steps.get-galaxy-sha.outputs.galaxy-head-sha }} - name: Cache .planemo - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-planemo with: path: ~/.planemo @@ -80,7 +78,7 @@ jobs: run: pip install wheel - name: Install flake8 run: pip install flake8 flake8-import-order - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Fake a Planemo run to update cache and determine commit range, repositories, and chunks @@ -113,14 +111,14 @@ jobs: matrix: python-version: ['3.11'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Cache .cache/pip - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-pip with: path: ~/.cache/pip @@ -142,7 +140,7 @@ jobs: fail-level: ${{ env.FAIL_LEVEL }} repository-list: ${{ needs.setup.outputs.repository-list }} tool-list: ${{ needs.setup.outputs.tool-list }} - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: ${{ failure() }} with: name: 'Tool linting output' @@ -159,14 +157,14 @@ jobs: matrix: python-version: ['3.11'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Cache .cache/pip - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-pip with: path: ~/.cache/pip @@ -175,7 +173,7 @@ jobs: run: pip install flake8 flake8-import-order - name: Flake8 run: echo '${{ needs.setup.outputs.repository-list }}' | xargs -d '\n' flake8 --output-file pylint_report.txt --tee - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: ${{ failure() }} with: name: 'Python linting output' @@ -184,21 +182,21 @@ jobs: lintr: name: Lint R scripts needs: setup - if: ${{ github.event_name == 'pull_request' && needs.setup.outputs.repository-list != '' }} + if: ${{ needs.setup.outputs.repository-list != '' }} runs-on: ${{ matrix.os }} strategy: matrix: os: [ubuntu-20.04] r-version: ['release'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 - uses: r-lib/actions/setup-r@v2 with: r-version: ${{ matrix.r-version }} - name: Cache R packages - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ env.R_LIBS_USER }} key: r_cache_${{ matrix.os }}_${{ matrix.r-version }} @@ -214,7 +212,7 @@ jobs: echo '${{ needs.setup.outputs.repository-list }}' | xargs -d '\n' -n 1 ./.github/styler.R --dry off git status git diff --exit-code | tee rlint_report.txt - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: ${{ failure() }} with: name: 'R linting output' @@ -226,7 +224,7 @@ jobs: if: ${{ github.event_name == 'pull_request' && needs.setup.outputs.repository-list != '' }} runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Check file sizes @@ -241,7 +239,7 @@ jobs: cat file_size_report.txt exit 1 fi - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 if: ${{ failure() }} with: name: 'File size report' @@ -269,26 +267,26 @@ jobs: ports: - 5432:5432 steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Cache .cache/pip - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-pip with: path: ~/.cache/pip key: pip_cache_py_${{ matrix.python-version }}_gxy_${{ needs.setup.outputs.galaxy-head-sha }} - name: Cache .planemo - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-planemo with: path: ~/.planemo key: planemo_cache_py_${{ matrix.python-version }}_gxy_${{ needs.setup.outputs.galaxy-head-sha }} - name: Get number of CPU cores - uses: SimenB/github-actions-cpu-cores@v1 + uses: SimenB/github-actions-cpu-cores@v2 id: cpu-cores - name: Clean dotnet folder for space run: rm -Rf /usr/share/dotnet @@ -319,7 +317,7 @@ jobs: galaxy-slots: ${{ steps.cpu-cores.outputs.count }} # Limit each test to 15 minutes test_timeout: 1800 - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: 'Tool test output ${{ matrix.chunk }}' path: upload @@ -338,14 +336,14 @@ jobs: matrix: python-version: ['3.11'] steps: - - uses: actions/download-artifact@v3 + - uses: actions/download-artifact@v4 with: path: artifacts - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Cache .cache/pip - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-pip with: path: ~/.cache/pip @@ -357,7 +355,7 @@ jobs: mode: combine html-report: true markdown-report: true - - uses: actions/upload-artifact@v3 + - uses: actions/upload-artifact@v4 with: name: 'All tool test results' path: upload @@ -384,14 +382,14 @@ jobs: matrix: python-version: ['3.11'] steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: fetch-depth: 1 - - uses: actions/setup-python@v4 + - uses: actions/setup-python@v5 with: python-version: ${{ matrix.python-version }} - name: Cache .cache/pip - uses: actions/cache@v3 + uses: actions/cache@v4 id: cache-pip with: path: ~/.cache/pip @@ -425,7 +423,7 @@ jobs: with: sha: ${{ github.event.after }} - name: Create comment - uses: peter-evans/create-or-update-comment@v2 + uses: peter-evans/create-or-update-comment@v4 with: token: ${{ secrets.PAT }} issue-number: ${{ steps.getpr.outputs.number }} diff --git a/tools/sleepwaste/.shed.yml b/tools/sleepwaste/.shed.yml new file mode 100644 index 00000000..a389de88 --- /dev/null +++ b/tools/sleepwaste/.shed.yml @@ -0,0 +1,10 @@ +name: sleepwaste +owner: mbernt +description: sleepwaste +long_description: | + Waste time and memory +categories: +- Text Manipulation +homepage_url: https://github.com/bernt-matthias/mb-galaxy-tools/tree/master/tools/sleepwaste +remote_repository_url: https://github.com/bernt-matthias/mb-galaxy-tools/tree/master/tools/sleepwaster/ +type: unrestricted \ No newline at end of file diff --git a/tools/sleepwaste/sleepwaste-c b/tools/sleepwaste/sleepwaste-c new file mode 100755 index 00000000..7d94c7e5 Binary files /dev/null and b/tools/sleepwaste/sleepwaste-c differ diff --git a/tools/sleepwaste/sleepwaste-cpp b/tools/sleepwaste/sleepwaste-cpp new file mode 100755 index 00000000..8a16bfac Binary files /dev/null and b/tools/sleepwaste/sleepwaste-cpp differ diff --git a/tools/sleepwaste/sleepwaste.py b/tools/sleepwaste/sleepwaste.py index 4925a462..01b09894 100644 --- a/tools/sleepwaste/sleepwaste.py +++ b/tools/sleepwaste/sleepwaste.py @@ -10,4 +10,4 @@ array = " "*(args.memory*1024*1024) time.sleep( args.time ) -print "slept for {time} s and {memory} MB".format( time = args.time, memory = args.memory ) +print("slept for {time} s and {memory} MB".format( time = args.time, memory = args.memory )) diff --git a/tools/sleepwaste/sleepwaste.xml b/tools/sleepwaste/sleepwaste.xml index 6635d644..7dbfbc7c 100644 --- a/tools/sleepwaste/sleepwaste.xml +++ b/tools/sleepwaste/sleepwaste.xml @@ -5,23 +5,23 @@ '$ofile' - ]]> + #elif $language == "python": + python $__tool_directory__/sleepwaste.py + #elif $language == "cpp": + $__tool_directory__/sleepwaste-cpp + #elif $language == "c": + $__tool_directory__/sleepwaste-c + #elif $language == "perl": + perl $__tool_directory__/sleepwaste.pl + #elif $language == "java": + java -classpath $__tool_directory__ -Xmx4548m sleepwaste + #end if + '$time' '$memory' > '$ofile' + ]]> @@ -33,70 +33,69 @@ - - + - + + + + + + + - - - + + + - - + + - - - + + + - - + + - + - + - - + + - + - + - - - - - - + + + + + +