Skip to content

Commit

Permalink
Merge pull request #106 from umccr/cleanup
Browse files Browse the repository at this point in the history
Update GitHub Actions
  • Loading branch information
pdiakumis authored Dec 12, 2023
2 parents 8209cca + c08c420 commit 62baac9
Show file tree
Hide file tree
Showing 8 changed files with 22 additions and 93 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ CODE_OF_CONDUCT.md
inst/rmd/umccr_portal/html
inst/rmd/umccr_workflows/umccrise/html
inst/rmd/umccr_workflows/bcl_convert/html
inst/rmd/umccr_workflows/alignment_qc/html
25 changes: 11 additions & 14 deletions .github/workflows/conda_deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,26 +24,23 @@ jobs:

steps:
- name: Code checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Micromamba setup
uses: mamba-org/setup-micromamba@v1
with:
micromamba-version: '1.4.9-0'
environment-file: ${{ env.env_yaml_path }}/condabuild.yaml
- name: 🐍 Conda pkg build and upload
run: |
dvc pull
ls -l inst/extdata/*
conda mambabuild --R 4.2 ${recipe_path} --token ${atoken}
conda mambabuild --R 4.2 ${recipe_path} -c conda-forge --token ${atoken}
- name: 🔒 Conda lock
run: |
conda-lock --file ${env_yaml_path}/dracarys.yaml --platform linux-64
mv conda-lock.yml ${env_lock_path}/conda-lock.yml
conda-lock lock --file ${env_yaml_path}/dracarys.yaml -p linux-64
conda-lock render --kind explicit -p linux-64 conda-lock.yml --filename-template 'dracarys-{platform}.lock' && rm conda-lock.yml
mv dracarys-*.lock ${env_lock_path}/
- name: 💾 Commit lockfile
run: |
# TODO: the version bumping guarantees there will be changes,
# but during testing this can be problematic - need to
# commit only if changes exist.
git status
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
Expand All @@ -67,7 +64,7 @@ jobs:
LATEST_COMMIT_HASH="$(git --no-pager log -1 --format='%H')"
echo "latest_commit_hash=${LATEST_COMMIT_HASH}" >> $GITHUB_OUTPUT
- name: 🔖 Create tag
uses: actions/github-script@v6
uses: actions/github-script@v7
env:
LATEST_COMMIT_HASH: ${{ steps.pull_lock_commit.outputs.latest_commit_hash }}
with:
Expand All @@ -83,26 +80,26 @@ jobs:
# work with tag from above
- name: Code checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
ref: v${{ env.VERSION }}
- name: 🏰 QEMU setup
uses: docker/setup-qemu-action@v2
uses: docker/setup-qemu-action@v3
- name: 🏯 Buildx setup
uses: docker/setup-buildx-action@v2
uses: docker/setup-buildx-action@v3
with:
install: true
config-inline: |
[worker.oci]
max-parallelism = 2
- name: 🐙 GitHub CR login
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: 🐳 Docker img build and push
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
tags: ghcr.io/${{ github.repository }}:${{ env.VERSION }}
context: . # yes, dot
Expand Down
10 changes: 5 additions & 5 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@ RUN mamba config \
mamba install \
-c conda-forge \
-c nodefaults \
conda-lock==1.3.0 && \
conda-lock && \
mamba clean --all --force-pkgs-dirs

ARG DRACARYS_LOCK="dracarys-linux-64.lock"
ARG ENV_NAME="dracarys_env"
COPY ./conda/env/lock/conda-lock.yml .
RUN conda-lock install --name ${ENV_NAME} conda-lock.yml && \
mamba clean --all --force-pkgs-dirs && \
rm conda-lock.yml
COPY ./conda/env/lock/${DRACARYS_LOCK} .
RUN conda-lock install --name ${ENV_NAME} --file ${DRACARYS_LOCK} && \
mamba clean --all --force-pkgs-dirs

ARG MAMBA_PREFIX="/opt/conda"
ENV PATH="${MAMBA_PREFIX}/envs/${ENV_NAME}/bin:${PATH}"
Expand Down
1 change: 0 additions & 1 deletion NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ export(s3_files_list_filter_relevant)
export(s3_search)
export(session_info_kable)
export(time_metrics_process)
export(tso_rmd)
export(umccr_tidy)
importFrom(R6,R6Class)
importFrom(ggplot2,ggplot)
Expand Down
4 changes: 4 additions & 0 deletions R/multiqc.R
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,10 @@ multiqc_parse_xyline_plot <- function(dat) {
if (dat[["config"]][["id"]] %in% c("dragen_coverage_per_contig", "dragen_coverage_per_non_main_contig")) {
return(multiqc_parse_xyline_plot_contig_cvg(dat))
}
# some empty fastqc_adapter_content_plot - see https://github.com/umccr/dracarys/issues/104
if (length(dat[["datasets"]][[1]]) == 0) {
return(NULL)
}
dat[["datasets"]][[1]] |>
purrr::map(
function(nm_data) {
Expand Down
39 changes: 0 additions & 39 deletions R/rmd.R

This file was deleted.

33 changes: 0 additions & 33 deletions man/tso_rmd.Rd

This file was deleted.

2 changes: 1 addition & 1 deletion tests/testthat/test-roxytest-testexamples-dragen.R
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# File R/dragen.R: @testexamples

test_that("Function time_metrics_process() @ L771", {
test_that("Function time_metrics_process() @ L789", {

p <- system.file("extdata/wgs/SEQC-II.time_metrics.csv.gz", package = "dracarys")
x <- TimeMetricsFile$new(p)
Expand Down

0 comments on commit 62baac9

Please sign in to comment.