-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
v5.8.6+galaxy0 #26
Open
RJMW
wants to merge
19
commits into
main
Choose a base branch
from
v5.8.6+Galaxy0
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
v5.8.6+galaxy0 #26
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
ef1ca7d
Bump version Sirius to v5.8.6 and add credentials for login
RJMW ab15e3d
Add example config file for user preferences
RJMW a1232b7
Update tests
RJMW e6ba3db
Remove Travis testing
RJMW 189364e
Fix pylint
RJMW 694d36f
Update github workflow
RJMW 43e4fad
Update github workflow (2)
RJMW 66132b9
Update github workflow (2, lintr)
RJMW dcfb320
Add styler.R (to complete set of scripts for testing)
RJMW 3b15038
Chmod 755 styler.R
RJMW acfa1e0
Add write-summaries to sirius call (cmd)
RJMW da0d081
Add .tt_biocontainer_skip
RJMW d8611a5
Update pr.yaml
RJMW 98a88fe
Update job_config and ENVs
RJMW e50ba06
Update .tt_biocontainer_skip
RJMW d5761fe
Update github workflow
RJMW 54d97b9
Rename job config
RJMW abcb97f
Update additional-planemo-options
RJMW 778685e
Update pr.yaml (additional-planemo-options)
RJMW File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env Rscript | ||
|
||
library("argparse") | ||
library("styler") | ||
|
||
parser <- ArgumentParser(description = "Call styler") | ||
parser$add_argument("dir", | ||
metavar = "DIR", type = "character", | ||
help = "File to parse" | ||
) | ||
parser$add_argument("--dry", | ||
choices = c("off", "on"), default = "on" | ||
) | ||
args <- parser$parse_args() | ||
|
||
file_info <- file.info(args$dir) | ||
is_directory <- file_info$isdir | ||
|
||
if (is_directory) { | ||
captured_output <- capture.output({ | ||
result <- style_dir(args$dir, indent_by = 4, dry = args$dry, recursive = TRUE) | ||
}) | ||
} else { | ||
captured_output <- capture.output({ | ||
result <- style_file(args$dir, indent_by = 4, dry = args$dry) | ||
}) | ||
} | ||
|
||
n <- nrow(subset(result, changed == TRUE)) | ||
if (n > 0) { | ||
if (args$dry == "off") { | ||
print(paste("Changed", n, "files")) | ||
} else { | ||
stop(paste("Linting failed for", n, "files")) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,13 +2,13 @@ name: Galaxy Tool Linting and Tests for push and PR | |
on: [push, pull_request] | ||
env: | ||
GALAXY_FORK: galaxyproject | ||
GALAXY_BRANCH: release_21.09 | ||
GALAXY_BRANCH: release_24.1 | ||
MAX_CHUNKS: 4 | ||
MAX_FILE_SIZE: 1M | ||
concurrency: | ||
# group runs by PR, but keep runs on master separate | ||
# group runs by PR, but keep runs on main 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 }} | ||
group: pr-${{ (github.ref == 'refs/heads/main' || github.ref == 'refs/heads/main') && github.run_number || github.ref }} | ||
cancel-in-progress: true | ||
jobs: | ||
# the setup job does two things: | ||
|
@@ -19,6 +19,7 @@ jobs: | |
# - a file containing the list of changed repositories | ||
# which are needed in subsequent steps. | ||
setup: | ||
|
||
name: Setup cache and determine changed repositories | ||
runs-on: ubuntu-latest | ||
outputs: | ||
|
@@ -30,7 +31,7 @@ jobs: | |
commit-range: ${{ steps.discover.outputs.commit-range }} | ||
strategy: | ||
matrix: | ||
python-version: ['3.7'] | ||
python-version: ['3.11'] | ||
steps: | ||
- name: Print github context properties | ||
run: | | ||
|
@@ -96,7 +97,7 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ['3.7'] | ||
python-version: ['3.11'] | ||
steps: | ||
# checkout the repository | ||
# and use it as the current working directory | ||
|
@@ -134,7 +135,7 @@ jobs: | |
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ['3.7'] | ||
python-version: ['3.11'] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
|
@@ -166,52 +167,32 @@ jobs: | |
strategy: | ||
matrix: | ||
os: [ubuntu-20.04] | ||
r-version: ['4.0.1'] | ||
r-version: ['release'] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
- uses: r-lib/actions/setup-r@master | ||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
r-version: ${{ matrix.r-version }} | ||
- name: Cache R packages | ||
uses: actions/cache@v2 | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ env.R_LIBS_USER }} | ||
key: r_cache_${{ matrix.os }}_${{ matrix.r-version }} | ||
- name: Install non-R lintr dependencies | ||
run: sudo apt-get install libcurl4-openssl-dev | ||
- name: Install lintr | ||
run: | | ||
install.packages('remotes') | ||
remotes::install_cran("lintr") | ||
shell: Rscript {0} | ||
- name: Save repositories to file | ||
run: echo '${{ needs.setup.outputs.repository-list }}' > repository_list.txt | ||
- name: Install packages | ||
uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
packages: | | ||
any::argparse | ||
any::styler | ||
- name: lintr | ||
run: | | ||
library(lintr) | ||
linters <- with_defaults(line_length_linter = NULL, cyclocomp_linter = NULL, object_usage_linter = NULL) | ||
con <- file("repository_list.txt", "r") | ||
status <- 0 | ||
while (TRUE) { | ||
repo <- readLines(con, n = 1) | ||
if (length(repo) == 0) { | ||
break | ||
} | ||
lnt <- lint_dir(repo, relative_path=T, linters=linters) | ||
if (length(lnt) > 0) { | ||
status <- 1 | ||
for (l in lnt) { | ||
rel_path <- paste(repo, l$filename, sep="/") | ||
write(paste(paste(rel_path, l$line_number, l$column_number, sep=":"), l$message), stderr()) | ||
write(paste(paste(rel_path, l$line_number, l$column_number, sep=":"), l$message), "rlint_report.txt", append=TRUE) | ||
} | ||
} | ||
} | ||
quit(status = status) | ||
shell: Rscript {0} | ||
- uses: actions/upload-artifact@v2 | ||
set -eo pipefail | ||
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@v4 | ||
if: ${{ failure() }} | ||
with: | ||
name: 'R linting output' | ||
|
@@ -257,7 +238,7 @@ jobs: | |
fail-fast: false | ||
matrix: | ||
chunk: ${{ fromJson(needs.setup.outputs.chunk-list) }} | ||
python-version: ['3.7'] | ||
python-version: ['3.11'] | ||
services: | ||
postgres: | ||
image: postgres:11 | ||
|
@@ -288,16 +269,28 @@ jobs: | |
with: | ||
path: ~/.planemo | ||
key: planemo_cache_py_${{ matrix.python-version }}_gxy_${{ needs.setup.outputs.galaxy-head-sha }} | ||
- name: Prepare specific job_conf for Sirius | ||
uses: danielr1996/[email protected] | ||
env: | ||
USERNAME_SIRIUS: "${{ secrets.USERNAME_SIRIUS }}" | ||
PASSWORD_SIRIUS: "${{ secrets.PASSWORD_SIRIUS }}" | ||
with: | ||
input: "${{ github.workspace }}/config/job_conf_planemo.xml" | ||
output: "${{ github.workspace }}/config/job_conf_planemo_subst.xml" | ||
- name: Planemo test | ||
uses: galaxyproject/planemo-ci-action@v1 | ||
id: test | ||
env: | ||
USERNAME_SIRIUS: "${{ secrets.USERNAME_SIRIUS }}" | ||
PASSWORD_SIRIUS: "${{ secrets.PASSWORD_SIRIUS }}" | ||
with: | ||
mode: test | ||
repository-list: ${{ needs.setup.outputs.repository-list }} | ||
galaxy-fork: ${{ env.GALAXY_FORK }} | ||
galaxy-branch: ${{ env.GALAXY_BRANCH }} | ||
chunk: ${{ matrix.chunk }} | ||
chunk-count: ${{ needs.setup.outputs.chunk-count }} | ||
additional-planemo-options: --job_config_file ${{ github.workspace }}/config/job_conf_planemo_subst.xml | ||
- uses: actions/upload-artifact@v2 | ||
with: | ||
name: 'Tool test output ${{ matrix.chunk }}' | ||
|
@@ -307,63 +300,70 @@ jobs: | |
# to `|| true`) and create a global test report as json and html which | ||
# is provided as artifact | ||
# - check if any tool test actually failed (by lookup in the combined json) | ||
# # and fail this step if this is the case | ||
# SEEMS TO BE FAILING ON CONDA - UNABLE TO FIX | ||
# combine_outputs: | ||
# name: Combine chunked test results | ||
# needs: [setup, test] | ||
# if: ${{ needs.setup.outputs.repository-list != '' }} | ||
# runs-on: ubuntu-latest | ||
# strategy: | ||
# matrix: | ||
# python-version: ['3.7'] | ||
# steps: | ||
# - uses: actions/download-artifact@v2 | ||
# with: | ||
# path: artifacts | ||
# - uses: actions/setup-python@v1 | ||
# with: | ||
# python-version: ${{ matrix.python-version }} | ||
# - name: Cache .cache/pip | ||
# uses: actions/cache@v2 | ||
# id: cache-pip | ||
# with: | ||
# path: ~/.cache/pip | ||
# key: pip_cache_py_${{ matrix.python-version }}_gxy_${{ needs.setup.outputs.galaxy-head-sha }} | ||
# - name: Combine outputs | ||
# uses: galaxyproject/planemo-ci-action@v1 | ||
# id: combine | ||
# with: | ||
# mode: combine | ||
# html-report: true | ||
# - uses: actions/upload-artifact@v2 | ||
# with: | ||
# name: 'All tool test results' | ||
# path: upload | ||
# - name: Check outputs | ||
# uses: galaxyproject/planemo-ci-action@v1 | ||
# id: check | ||
# with: | ||
# mode: check | ||
# and fail this step if this is the case | ||
combine_outputs: | ||
name: Combine chunked test results | ||
needs: [setup, test] | ||
if: ${{ always() && needs.setup.outputs.repository-list != '' }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.11'] | ||
steps: | ||
- uses: actions/download-artifact@v4 | ||
with: | ||
path: artifacts | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Cache .cache/pip | ||
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: Combine outputs | ||
uses: galaxyproject/planemo-ci-action@v1 | ||
id: combine | ||
with: | ||
mode: combine | ||
html-report: true | ||
markdown-report: true | ||
- uses: actions/upload-artifact@v4 | ||
with: | ||
name: 'All tool test results' | ||
path: upload | ||
- run: cat upload/tool_test_output.md >> $GITHUB_STEP_SUMMARY | ||
- name: Check outputs | ||
uses: galaxyproject/planemo-ci-action@v1 | ||
id: check | ||
with: | ||
mode: check | ||
- name: Check if all test chunks succeeded | ||
run: | | ||
NFILES=$(ls artifacts/ | grep "Tool test output" | wc -l) | ||
if [[ "${{ needs.setup.outputs.chunk-count }}" != "$NFILES" ]]; then | ||
exit 1 | ||
fi | ||
|
||
# deploy the tools to the toolsheds (first TTS for testing) | ||
deploy: | ||
name: Deploy | ||
needs: [setup, lint, flake8, lintr] | ||
needs: [setup, lint, combine_outputs] | ||
if: ${{ (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main' ) && github.repository_owner == 'computational-metabolomics' }} | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ['3.7'] | ||
python-version: ['3.11'] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 1 | ||
- uses: actions/setup-python@v1 | ||
- uses: actions/setup-python@v5 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Cache .cache/pip | ||
uses: actions/cache@v2 | ||
uses: actions/cache@v4 | ||
id: cache-pip | ||
with: | ||
path: ~/.cache/pip | ||
|
@@ -386,7 +386,7 @@ jobs: | |
|
||
determine-success: | ||
name: Check workflow success | ||
needs: [setup, lint, flake8, lintr, file_sizes] | ||
needs: [setup, lint, flake8, lintr, file_sizes, combine_outputs] | ||
if: ${{ always() && github.ref != 'refs/heads/master' && github.ref != 'refs/heads/main' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -402,6 +402,6 @@ jobs: | |
- name: Indicate file size check status | ||
if: ${{ needs.file_sizes.result != 'success' && needs.file_sizes.result != 'skipped' }} | ||
run: exit 1 | ||
# - name: Check tool test status | ||
# if: ${{ needs.combine_outputs.result != 'success' && needs.combine_outputs.result != 'skipped' }} | ||
# run: exit 1 | ||
- name: Check tool test status | ||
if: ${{ needs.combine_outputs.result != 'success' && needs.combine_outputs.result != 'skipped' }} | ||
run: exit 1 |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You can leave this as it is. It covers
main
andmaster