Skip to content

Commit

Permalink
Merge pull request #16 from qbic-pipelines/dev
Browse files Browse the repository at this point in the history
Release 1.0.0
  • Loading branch information
FriederikeHanssen authored Sep 10, 2020
2 parents d291de2 + 6e2352b commit 1d9d14f
Show file tree
Hide file tree
Showing 32 changed files with 1,180 additions and 541 deletions.
20 changes: 11 additions & 9 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,24 @@
# nf-core/bamtofastq: Contributing Guidelines
# qbic-pipelines/bamtofastq: Contributing Guidelines

Hi there! Many thanks for taking an interest in improving nf-core/bamtofastq.
Hi there! Many thanks for taking an interest in improving qbic-pipelines/bamtofastq.

We try to manage the required tasks for nf-core/bamtofastq using GitHub issues, you probably came to this page when creating one. Please use the pre-filled template to save time.
We try to manage the required tasks for qbic-pipelines/bamtofastq using GitHub issues, you probably came to this page when creating one. Please use the pre-filled template to save time.

However, don't be put off by this template - other more general issues and suggestions are welcome! Contributions to the code are even more welcome ;)

> If you need help using or modifying nf-core/bamtofastq then the best place to ask is on the pipeline channel on [Slack](https://nf-co.re/join/slack/).
> If you need help using or modifying qbic-pipelines/bamtofastq then the best place to ask is here.


## Contribution workflow
If you'd like to write some code for nf-core/bamtofastq, the standard workflow
If you'd like to write some code for qbic-pipelines/bamtofastq, the standard workflow
is as follows:

1. Check that there isn't already an issue about your idea in the
[nf-core/bamtofastq issues](https://github.com/nf-core/bamtofastq/issues) to avoid
[qbic-pipelines/bamtofastq issues](https://github.com/qbic-pipelines/bamtofastq/issues) to avoid
duplicating work.
* If there isn't one already, please create one so that others know you're working on this
2. Fork the [nf-core/bamtofastq repository](https://github.com/nf-core/bamtofastq) to your GitHub account
2. Fork the [qbic-pipelinesbamtofastq repository](https://github.com/qbic-pipelines/bamtofastq) to your GitHub account
3. Make the necessary changes / additions within your forked repository
4. Submit a Pull Request against the `dev` branch and wait for the code to be reviewed and merged.

Expand All @@ -32,9 +32,11 @@ Typically, pull-requests are only fully reviewed when these tests are passing, t
There are typically two types of tests that run:

### Lint Tests
The nf-core has a [set of guidelines](https://nf-co.re/developers/guidelines) which all pipelines must adhere to.
The nf-core has a [set of guidelines](https://nf-co.re/developers/guidelines) which all pipelines must adhere to.
To enforce these and ensure that all pipelines stay in sync, we have developed a helper tool which runs checks on the pipeline code. This is in the [nf-core/tools repository](https://github.com/nf-core/tools) and once installed can be run locally with the `nf-core lint <pipeline-directory>` command.

*This pipeline* was created using [nf-core/tools](https://github.com/nf-core/tools) and in the future will keep using it to continuously adhere to their best practices. However, you may encounter more warnings and failures, as the linting requires the `nf-core/` tag, whereas here we generally need to use `qbic-pipelines/`.

If any failures or warnings are encountered, please follow the listed URL for more documentation.

### Pipeline Tests
Expand All @@ -44,4 +46,4 @@ If there are any failures then the automated tests fail.
These tests are run both with the latest available version of Nextflow and also the minimum required version that is stated in the pipeline code.

## Getting help
For further information/help, please consult the [nf-core/bamtofastq documentation](https://github.com/nf-core/bamtofastq#documentation) and don't hesitate to get in touch on the [nf-core/bamtofastq pipeline channel](https://nfcore.slack.com/channels/nf-core/bamtofastq) on [Slack](https://nf-co.re/join/slack/).
For further information/help, please consult the [qbic-pipelines/bamtofastq documentation](https://github.com/qbic-pipelines/bamtofastq#documentation) and don't hesitate to get in touch.
8 changes: 4 additions & 4 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
Many thanks to contributing to nf-core/bamtofastq!
Many thanks to contributing to qbic-pipelines/bamtofastq!

Please fill in the appropriate checklist below (delete whatever is not relevant). These are the most common things requested on pull requests (PRs).

## PR checklist
- [ ] This comment contains a description of changes (with reason)
- [ ] If you've fixed a bug or added code that should be tested, add tests!
- [ ] If necessary, also make a PR on the [nf-core/bamtofastq branch on the nf-core/test-datasets repo]( https://github.com/nf-core/test-datasets/pull/new/nf-core/bamtofastq)
- [ ] If necessary, add test data to `testdata/`
- [ ] Ensure the test suite passes (`nextflow run . -profile test,docker`).
- [ ] Make sure your code lints (`nf-core lint .`).
- [ ] Make sure your code lints (`nf-core lint .`).
- [ ] Documentation in `docs` is updated
- [ ] `CHANGELOG.md` is updated
- [ ] `README.md` is updated

**Learn more about contributing:** https://github.com/nf-core/bamtofastq/tree/master/.github/CONTRIBUTING.md
**Learn more about contributing:** https://github.com/qbic-pipelines/bamtofastq/tree/master/.github/CONTRIBUTING.md
32 changes: 32 additions & 0 deletions .github/workflows/branch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: qbic-pipelines 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:
branches: [master]

jobs:
test:
runs-on: ubuntu-latest
steps:
# PRs to the nf-core repo master branch are only ok if coming from the nf-core repo `dev` or any `patch` branches
- name: Check PRs
if: github.repository == 'qbic-pipelines/bamtofastq'
run: |
{ [[ ${{github.event.pull_request.head.repo.full_name}} == qbic-pipelines/bamtofastq ]] && [[ $GITHUB_HEAD_REF = "dev" ]]; } || [[ $GITHUB_HEAD_REF == "patch" ]]
# If the above check failed, post a comment on the PR explaining the failure
# NOTE - this doesn't currently work if the PR is coming from a fork, due to limitations in GitHub actions secrets
- name: Post PR comment
if: failure()
uses: mshick/add-pr-comment@v1
with:
message: |
Hi @${{ github.event.pull_request.user.login }},
It looks like this pull-request is has been made against the ${{github.event.pull_request.head.repo.full_name}} `master` branch.
The `master` branch on qbic-pipelines repositories should always contain code from the latest release.
Because of this, PRs to `master` are only allowed if they come from the ${{github.event.pull_request.head.repo.full_name}} `dev` branch.
You do not need to close this PR, you can change the target branch to `dev` by clicking the _"Edit"_ button at the top of this page.
Thanks again for your contribution!
repo-token: ${{ secrets.GITHUB_TOKEN }}
allow-repeats: false
55 changes: 55 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: qbic-pipelines CI
# This workflow runs the pipeline with the minimal test dataset to check that it completes without any syntax errors
on:
push:
branches:
- dev
pull_request:
release:
types: [published]

jobs:
test:
name: Run workflow tests
# Only run on push if this is the qbic-pipelines dev branch (merged PRs)
runs-on: ubuntu-latest
env:
NXF_VER: ${{ matrix.nxf_ver }}
NXF_ANSI_LOG: false
strategy:
matrix:
# Nextflow versions: check pipeline minimum and current latest
nxf_ver: ['20.04.1', '']
config: ['test_chr']
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
with:
PREFIX_FILTER: |
Dockerfile
environment.yml
- name: Build new docker image
if: env.GIT_DIFF
run: docker build --no-cache . -t qbicpipelines/bamtofastq:1.0.0

- name: Pull docker image
if: ${{ !env.GIT_DIFF }}
run: |
docker pull qbicpipelines/bamtofastq:dev
docker tag qbicpipelines/bamtofastq:dev qbicpipelines/bamtofastq:1.0.0
- name: Install Nextflow
run: |
wget -qO- get.nextflow.io | bash
sudo mv nextflow /usr/local/bin/
- name: Run pipeline with test data
# TODO nf-core: You can customise CI pipeline run tests as required
# For example: adding multiple test runs with different parameters
# Remember that you can parallelise this by using strategy.matrix
run: |
nextflow run ${GITHUB_WORKSPACE} -profile test,docker
- name: Run pipeline with test data, only obtain reads mapping to chrX and chrY
run: |
nextflow run ${GITHUB_WORKSPACE} -profile ${{ matrix.config }},docker
51 changes: 51 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: qbic-pipelines linting
# This workflow is triggered on pushes and PRs to the repository.
# It runs the `nf-core lint` and markdown lint tests to ensure that the code meets the nf-core guidelines
on:
push:
pull_request:
release:
types: [published]

jobs:
Markdown:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: '10'
- name: Install markdownlint
run: npm install -g markdownlint-cli
- name: Run Markdownlint
run: markdownlint ${GITHUB_WORKSPACE} -c ${GITHUB_WORKSPACE}/.github/markdownlint.yml
YAML:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: '10'
- name: Install yaml-lint
run: npm install -g yaml-lint
- name: Run yaml-lint
run: yamllint $(find ${GITHUB_WORKSPACE} -type f -name "*.yml")
#Comment this for now, as it won't pass until the template update is done, which will come in the next release
# nf-core:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: Install Nextflow
# run: |
# wget -qO- get.nextflow.io | bash
# sudo mv nextflow /usr/local/bin/
# - uses: actions/setup-python@v1
# with:
# python-version: '3.6'
# architecture: 'x64'
# - name: Install dependencies
# run: |
# python -m pip install --upgrade pip
# pip install nf-core
# - name: Run nf-core lint
# run: nf-core lint ${GITHUB_WORKSPACE}
40 changes: 40 additions & 0 deletions .github/workflows/push_dockerhub.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: qbic-pipelines Docker push
# This builds the docker image and pushes it to DockerHub
# Runs on qbic-pipelines 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
runs-on: ubuntu-latest
# Only run for the qbic-pipelines repo, for releases and merged PRs
if: ${{ github.repository == 'qbic-pipelines/bamtofastq' }}
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 qbicpipelines/bamtofastq: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 qbicpipelines/bamtofastq:latest qbicpipelines/bamtofastq:dev
docker push qbicpipelines/bamtofastq: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 qbicpipelines/bamtofastq:latest
docker tag qbicpipelines/bamtofastq:latest qbicpipelines/bamtofastq:${{ github.event.release.tag_name }}
docker push qbicpipelines/bamtofastq:${{ github.event.release.tag_name }}
42 changes: 0 additions & 42 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# nf-core/bamtofastq: Changelog

## v1.0dev - [date]
Initial release of nf-core/bamtofastq, created with the [nf-core](http://nf-co.re/) template.
## v1.0.0 - Ada Lovelace
Initial release of qbic-pipelines/bamtofastq, created with the [nf-core](http://nf-co.re/) template.
2 changes: 1 addition & 1 deletion CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ This Code of Conduct applies both within project spaces and in public spaces whe

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team on [Slack](https://nf-co.re/join/slack/). The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team via email. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project's leadership.

Expand Down
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM nfcore/base:1.7
LABEL authors="Friederike Hanssen" \
description="Docker image containing all requirements for nf-core/bamtofastq pipeline"
description="Docker image containing all requirements for qbic-pipelines/bamtofastq pipeline"

COPY environment.yml /
RUN conda env create -f /environment.yml && conda clean -a
ENV PATH /opt/conda/envs/nf-core-bamtofastq-1.0dev/bin:$PATH
ENV PATH /opt/conda/envs/qbic-pipelines-bamtofastq-1.0.0/bin:$PATH
Loading

0 comments on commit 1d9d14f

Please sign in to comment.