Skip to content
Snippets Groups Projects
Unverified Commit 982b70b9 authored by Nicolas Servant's avatar Nicolas Servant Committed by GitHub
Browse files

Merge pull request #82 from nf-core/TEMPLATE

Important! Template update for nf-core/tools v1.12
parents 1df86493 5d1f2265
No related branches found
No related tags found
No related merge requests found
Showing with 109 additions and 40 deletions
---
name: Bug report
about: Let us know about something that is not working
about: Report something that is broken or incorrect
labels: bug
---
......
blank_issues_enabled: false
contact_links:
- name: Join nf-core
url: https://nf-co.re/join
about: Please join the nf-core community here
- name: "Slack #hic channel"
url: https://nfcore.slack.com/channels/hic
about: Discussion about the nf-core/hic pipeline
---
name: Feature request
about: Suggest a new feature for this pipeline
about: Suggest an idea for the nf-core website
labels: enhancement
---
......
......@@ -4,8 +4,9 @@ name: nf-core AWS full size tests
# It runs the -profile 'test_full' on AWS batch
on:
release:
types: [published]
workflow_run:
workflows: ["nf-core Docker push (release)"]
types: [completed]
workflow_dispatch:
jobs:
......@@ -15,7 +16,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup Miniconda
uses: goanpeca/setup-miniconda@v1.0.2
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: 3.7
......
......@@ -13,7 +13,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Setup Miniconda
uses: goanpeca/setup-miniconda@v1.0.2
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: 3.7
......
......@@ -2,7 +2,7 @@ name: nf-core branch protection
# This workflow is triggered on PRs to master branch on the repository
# It fails when someone tries to make a PR against the nf-core `master` branch instead of `dev`
on:
pull_request:
pull_request_target:
branches: [master]
jobs:
......
......@@ -20,29 +20,31 @@ jobs:
strategy:
matrix:
# Nextflow versions: check pipeline minimum and current latest
nxf_ver: ['19.10.0', '']
nxf_ver: ['20.04.0', '']
steps:
- name: Check out pipeline code
uses: actions/checkout@v2
- name: Check if Dockerfile or Conda environment changed
uses: technote-space/get-diff-action@v1
uses: technote-space/get-diff-action@v4
with:
PREFIX_FILTER: |
FILES: |
Dockerfile
environment.yml
- name: Build new docker image
if: env.GIT_DIFF
if: env.MATCHED_FILES
run: docker build --no-cache . -t nfcore/hic:dev
- name: Pull docker image
if: ${{ !env.GIT_DIFF }}
if: ${{ !env.MATCHED_FILES }}
run: |
docker pull nfcore/hic:dev
docker tag nfcore/hic:dev nfcore/hic:dev
- name: Install Nextflow
env:
CAPSULE_LOG: none
run: |
wget -qO- get.nextflow.io | bash
sudo mv nextflow /usr/local/bin/
......
......@@ -36,6 +36,8 @@ jobs:
- name: Check out pipeline code
uses: actions/checkout@v2
- name: Install Nextflow
env:
CAPSULE_LOG: none
run: |
wget -qO- get.nextflow.io | bash
sudo mv nextflow /usr/local/bin/
......@@ -55,11 +57,20 @@ jobs:
GITHUB_COMMENTS_URL: ${{ github.event.pull_request.comments_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PR_COMMIT: ${{ github.event.pull_request.head.sha }}
run: nf-core -l lint_log.txt lint ${GITHUB_WORKSPACE}
run: nf-core -l lint_log.txt lint ${GITHUB_WORKSPACE} --markdown lint_results.md
- name: Save PR number
if: ${{ always() }}
run: echo ${{ github.event.pull_request.number }} > PR_number.txt
- name: Upload linting log file artifact
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: linting-log-file
path: lint_log.txt
path: |
lint_log.txt
lint_results.md
PR_number.txt
name: nf-core linting comment
# This workflow is triggered after the linting action is complete
# It posts an automated comment to the PR, even if the PR is coming from a fork
on:
workflow_run:
workflows: ["nf-core linting"]
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Download lint results
uses: dawidd6/action-download-artifact@v2
with:
workflow: linting.yml
- name: Get PR number
id: pr_number
run: echo "::set-output name=pr_number::$(cat linting-logs/PR_number.txt)"
- name: Post PR comment
uses: marocchino/sticky-pull-request-comment@v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
number: ${{ steps.pr_number.outputs.pr_number }}
path: linting-logs/lint_results.md
name: nf-core Docker push (dev)
# This builds the docker image and pushes it to DockerHub
# Runs on nf-core repo releases and push event to 'dev' branch (PR merges)
on:
push:
branches:
- dev
jobs:
push_dockerhub:
name: Push new Docker image to Docker Hub (dev)
runs-on: ubuntu-latest
# Only run for the nf-core repo, for releases and merged PRs
if: ${{ github.repository == 'nf-core/hic' }}
env:
DOCKERHUB_USERNAME: ${{ secrets.DOCKERHUB_USERNAME }}
DOCKERHUB_PASS: ${{ secrets.DOCKERHUB_PASS }}
steps:
- name: Check out pipeline code
uses: actions/checkout@v2
- name: Build new docker image
run: docker build --no-cache . -t nfcore/hic:dev
- name: Push Docker image to DockerHub (dev)
run: |
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
docker push nfcore/hic:dev
name: nf-core Docker push
name: nf-core Docker push (release)
# This builds the docker image and pushes it to DockerHub
# Runs on nf-core repo releases and push event to 'dev' branch (PR merges)
on:
push:
branches:
- dev
release:
types: [published]
jobs:
push_dockerhub:
name: Push new Docker image to Docker Hub
name: Push new Docker image to Docker Hub (release)
runs-on: ubuntu-latest
# Only run for the nf-core repo, for releases and merged PRs
if: ${{ github.repository == 'nf-core/hic' }}
......@@ -24,15 +21,7 @@ jobs:
- name: Build new docker image
run: docker build --no-cache . -t nfcore/hic:latest
- name: Push Docker image to DockerHub (dev)
if: ${{ github.event_name == 'push' }}
run: |
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
docker tag nfcore/hic:latest nfcore/hic:dev
docker push nfcore/hic:dev
- name: Push Docker image to DockerHub (release)
if: ${{ github.event_name == 'release' }}
run: |
echo "$DOCKERHUB_PASS" | docker login -u "$DOCKERHUB_USERNAME" --password-stdin
docker push nfcore/hic:latest
......
......@@ -3,7 +3,7 @@
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## v1.3.0dev
## v1.3.0dev - 2020-11-01
* Template update for nf-core/tools v1.11
* Minor fix to summary log messages in pipeline header
......
FROM nfcore/base:1.11
FROM nfcore/base:1.12
LABEL authors="Nicolas Servant" \
description="Docker image containing all software requirements for the nf-core/hic pipeline"
......
......@@ -4,7 +4,7 @@
[![GitHub Actions CI Status](https://github.com/nf-core/hic/workflows/nf-core%20CI/badge.svg)](https://github.com/nf-core/hic/actions)
[![GitHub Actions Linting Status](https://github.com/nf-core/hic/workflows/nf-core%20linting/badge.svg)](https://github.com/nf-core/hic/actions)
[![Nextflow](https://img.shields.io/badge/nextflow-%E2%89%A519.10.0-brightgreen.svg)](https://www.nextflow.io/)
[![Nextflow](https://img.shields.io/badge/nextflow-%E2%89%A520.04.0-brightgreen.svg)](https://www.nextflow.io/)
[![install with bioconda](https://img.shields.io/badge/install%20with-bioconda-brightgreen.svg)](https://bioconda.github.io/)
[![Docker](https://img.shields.io/docker/automated/nfcore/hic.svg)](https://hub.docker.com/r/nfcore/hic)
......
......@@ -14,7 +14,7 @@ Content-Transfer-Encoding: base64
Content-ID: <nfcorepipelinelogo>
Content-Disposition: inline; filename="nf-core-hic_logo.png"
<% out << new File("$baseDir/assets/nf-core-hic_logo.png").
<% out << new File("$projectDir/assets/nf-core-hic_logo.png").
bytes.
encodeBase64().
toString().
......
......@@ -128,10 +128,10 @@ if (workflow.profile.contains('awsbatch')) {
}
// Stage config files
ch_multiqc_config = file("$baseDir/assets/multiqc_config.yaml", checkIfExists: true)
ch_multiqc_config = file("$projectDir/assets/multiqc_config.yaml", checkIfExists: true)
ch_multiqc_custom_config = params.multiqc_config ? Channel.fromPath(params.multiqc_config, checkIfExists: true) : Channel.empty()
ch_output_docs = file("$baseDir/docs/output.md", checkIfExists: true)
ch_output_docs_images = file("$baseDir/docs/images/", checkIfExists: true)
ch_output_docs = file("$projectDir/docs/output.md", checkIfExists: true)
ch_output_docs_images = file("$projectDir/docs/images/", checkIfExists: true)
/**********************************************************
* SET UP CHANNELS
......@@ -941,18 +941,18 @@ workflow.onComplete {
// Render the TXT template
def engine = new groovy.text.GStringTemplateEngine()
def tf = new File("$baseDir/assets/email_template.txt")
def tf = new File("$projectDir/assets/email_template.txt")
def txt_template = engine.createTemplate(tf).make(email_fields)
def email_txt = txt_template.toString()
// Render the HTML template
def hf = new File("$baseDir/assets/email_template.html")
def hf = new File("$projectDir/assets/email_template.html")
def html_template = engine.createTemplate(hf).make(email_fields)
def email_html = html_template.toString()
// Render the sendmail template
def smail_fields = [ email: email_address, subject: subject, email_txt: email_txt, email_html: email_html, baseDir: "$baseDir", mqcFile: mqc_report, mqcMaxSize: params.max_multiqc_email_size.toBytes() ]
def sf = new File("$baseDir/assets/sendmail_template.txt")
def smail_fields = [ email: email_address, subject: subject, email_txt: email_txt, email_html: email_html, baseDir: "$projectDir", mqcFile: mqc_report, mqcMaxSize: params.max_multiqc_email_size.toBytes() ]
def sf = new File("$projectDir/assets/sendmail_template.txt")
def sendmail_template = engine.createTemplate(sf).make(smail_fields)
def sendmail_html = sendmail_template.toString()
......
......@@ -94,7 +94,7 @@ try {
// Create profiles
profiles {
conda { process.conda = "$baseDir/environment.yml" }
conda { process.conda = "$projectDir/environment.yml" }
debug { process.beforeScript = 'echo $HOSTNAME' }
docker {
docker.enabled = true
......@@ -112,6 +112,7 @@ profiles {
podman.enabled = true
}
test { includeConfig 'conf/test.config' }
test_full { includeConfig 'conf/test_full.config' }
}
// Load igenomes.config if required
......@@ -152,7 +153,7 @@ manifest {
homePage = 'https://github.com/nf-core/hic'
description = 'Analysis of Chromosome Conformation Capture data (Hi-C)'
mainScript = 'main.nf'
nextflowVersion = '>=19.10.0'
nextflowVersion = '>=20.04.0'
version = '1.3.0dev'
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment