From a285bfe8a6a312d730a7d94df056324e97bb528a Mon Sep 17 00:00:00 2001 From: MaxUlysse Date: Tue, 16 Feb 2021 11:07:43 +0100 Subject: [PATCH 1/5] fix: add guidelines to PRs and issues --- .github/CONTRIBUTING.md | 70 +++++++++++++++++++++++ .github/ISSUE_TEMPLATE/bug_report.md | 64 +++++++++++++++++++++ .github/ISSUE_TEMPLATE/config.yml | 8 +++ .github/ISSUE_TEMPLATE/feature_request.md | 32 +++++++++++ .github/PULL_REQUEST_TEMPLATE.md | 27 +++++++++ 5 files changed, 201 insertions(+) create mode 100644 .github/CONTRIBUTING.md create mode 100644 .github/ISSUE_TEMPLATE/bug_report.md create mode 100644 .github/ISSUE_TEMPLATE/config.yml create mode 100644 .github/ISSUE_TEMPLATE/feature_request.md create mode 100644 .github/PULL_REQUEST_TEMPLATE.md diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md new file mode 100644 index 00000000..dca78f0f --- /dev/null +++ b/.github/CONTRIBUTING.md @@ -0,0 +1,70 @@ +# nf-core/modules: Contributing Guidelines + +Hi there! +Many thanks for taking an interest in improving nf-core/modules. + +We try to manage the required tasks for nf-core/modules 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/modules then the best place to ask is on the nf-core Slack [#modules](https://nfcore.slack.com/channels/modules) channel ([join our Slack here](https://nf-co.re/join/slack)). + +## Contribution workflow + +If you'd like to write some code for nf-core/modules, the standard workflow is as follows: + +1. Check that there isn't already an issue about your idea in the [nf-core/modules issues](https://github.com/nf-core/modules/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](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) the [nf-core/modules repository](https://github.com/nf-core/modules) to your GitHub account +3. Make the necessary changes / additions within your forked repository following [Pipeline conventions](#pipeline-contribution-conventions) +4. When adding a module file, follow the [guidelines](https://github.com/nf-core/modules#adding-a-new-module-file) +5. Ensure that [tests are working locally](https://github.com/nf-core/modules#running-tests-locally) +6. Submit a Pull Request against the `dev` branch and wait for the code to be reviewed and merged + +If you're not used to this workflow with git, you can start with some [docs from GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests) or even their [excellent `git` resources](https://try.github.io/). + +## Tests + +When you create a pull request with changes, [GitHub Actions](https://github.com/features/actions) will run automatic tests. +Typically, pull-requests are only fully reviewed when these tests are passing, though of course we can help out before then. + +### Module tests + +Each `nf-core/module` should be set up with a minimal set of test-data. +`GitHub Actions` then runs the module on this data to ensure that it exits successfully. +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. + +## Patch + +:warning: Only in the unlikely and regretful event of a release happening with a bug. + +* On your own fork, make a new branch `patch` based on `upstream/master`. +* Fix the bug, and bump version (X.Y.Z+1). +* A PR should be made on `master` from patch to directly this particular bug. + +## Getting help + +For further information/help, please consult the [nf-core/modules README](https://github.com/nf-core/modules) and don't hesitate to get in touch on the nf-core Slack [#modules](https://nfcore.slack.com/channels/modules) channel ([join our Slack here](https://nf-co.re/join/slack)). + +### Software version reporting + +If you add a new module, please ensure you add the information of the tool. + +Add to the script block of the process, something like the following: + +```bash + --version &> v_.txt 2>&1 || true +``` + +or + +```bash + --help | head -n 1 &> v_.txt 2>&1 || true +``` + +### Images and figures + +For overview images and other documents we follow the nf-core [style guidelines and examples](https://nf-co.re/developers/design_guidelines). diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md new file mode 100644 index 00000000..f1122ea3 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -0,0 +1,64 @@ +--- +name: Bug report +about: Report something that is broken or incorrect +title: "[BUG]" +--- + + + +## Check Documentation + +I have checked the following places for your error: + +- [ ] [nf-core website: troubleshooting](https://nf-co.re/usage/troubleshooting) +- [ ] [nf-core/module documentation](https://github.com/nf-core/modules/blob/master/README.md) + +## Description of the bug + + + +## Steps to reproduce + +Steps to reproduce the behaviour: + +1. Command line: +2. See error: + +## Expected behaviour + + + +## Log files + +Have you provided the following extra information/files: + +- [ ] The command used to run the module +- [ ] The `.nextflow.log` file + +## System + +- Hardware: +- Executor: +- OS: +- Version + +## Nextflow Installation + +- Version: + +## Container engine + +- Engine: +- version: +- Image tag: + +## Additional context + + diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml new file mode 100644 index 00000000..332486c4 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -0,0 +1,8 @@ +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 #modules channel" + url: https://nfcore.slack.com/channels/modules + about: Discussion about nf-core/modules diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md new file mode 100644 index 00000000..72d6c058 --- /dev/null +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -0,0 +1,32 @@ +--- +name: Feature request +about: Suggest an idea for nf-core/modules +title: "[FEATURE]" +--- + + + +## Is your feature request related to a problem? Please describe + + + + + +## Describe the solution you'd like + + + +## Describe alternatives you've considered + + + +## Additional context + + diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 00000000..61f8f071 --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,27 @@ + + +## 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 you've added a new tool - have you followed the module conventions in the [contribution docs](https://github.com/nf-core/modules/tree/master/.github/CONTRIBUTING.md) + - [ ] If necessary, include test data in your PR. +- [ ] Remove all TODO statements. +- [ ] Emit the `.version.txt` file. +- [ ] Follow the naming conventions. +- [ ] Follow the parameters requirements. +- [ ] Follow the input/output options guidelines. +- [ ] Add a resource `label` +- [ ] Use BioConda and BioContainers if possible to fulfil software requirements. +- [ ] Ensure that the test works (`PROFILE=docker pytest --tag --symlink --wt 2 --keep-workflow-wd`) From 303687d42a3943ea21b8d3532558b57c236c15aa Mon Sep 17 00:00:00 2001 From: Maxime Garcia Date: Tue, 16 Feb 2021 11:30:29 +0100 Subject: [PATCH 2/5] Update .github/PULL_REQUEST_TEMPLATE.md --- .github/PULL_REQUEST_TEMPLATE.md | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 61f8f071..a4f5a3fb 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -17,6 +17,7 @@ Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/modu - [ ] If you've fixed a bug or added code that should be tested, add tests! - [ ] If you've added a new tool - have you followed the module conventions in the [contribution docs](https://github.com/nf-core/modules/tree/master/.github/CONTRIBUTING.md) - [ ] If necessary, include test data in your PR. +- [ ] Add to `.github/filters.yml` - [ ] Remove all TODO statements. - [ ] Emit the `.version.txt` file. - [ ] Follow the naming conventions. From bbee0efd758b7420c418086d6ef41547c204f51d Mon Sep 17 00:00:00 2001 From: MaxUlysse Date: Tue, 16 Feb 2021 13:59:21 +0100 Subject: [PATCH 3/5] fix: add suggestions from reviews --- .github/CONTRIBUTING.md | 11 +++++------ .github/PULL_REQUEST_TEMPLATE.md | 6 ++++-- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index dca78f0f..cb36a9c5 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -18,10 +18,9 @@ If you'd like to write some code for nf-core/modules, the standard workflow is a 1. Check that there isn't already an issue about your idea in the [nf-core/modules issues](https://github.com/nf-core/modules/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](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) the [nf-core/modules repository](https://github.com/nf-core/modules) to your GitHub account -3. Make the necessary changes / additions within your forked repository following [Pipeline conventions](#pipeline-contribution-conventions) -4. When adding a module file, follow the [guidelines](https://github.com/nf-core/modules#adding-a-new-module-file) -5. Ensure that [tests are working locally](https://github.com/nf-core/modules#running-tests-locally) -6. Submit a Pull Request against the `dev` branch and wait for the code to be reviewed and merged +3. When adding a module file, follow the [guidelines](https://github.com/nf-core/modules#adding-a-new-module-file) +4. Ensure that [tests are working locally](https://github.com/nf-core/modules#running-tests-locally) +5. Submit a Pull Request against the `master` branch and wait for the code to be reviewed and merged If you're not used to this workflow with git, you can start with some [docs from GitHub](https://help.github.com/en/github/collaborating-with-issues-and-pull-requests) or even their [excellent `git` resources](https://try.github.io/). @@ -56,13 +55,13 @@ If you add a new module, please ensure you add the information of the tool. Add to the script block of the process, something like the following: ```bash - --version &> v_.txt 2>&1 || true + --version &> v_.txt 2>&1 ``` or ```bash - --help | head -n 1 &> v_.txt 2>&1 || true + --help | head -n 1 &> v_.txt 2>&1 ``` ### Images and figures diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 61f8f071..94c5bb95 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -15,8 +15,8 @@ Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/modu - [ ] 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 you've added a new tool - have you followed the module conventions in the [contribution docs](https://github.com/nf-core/modules/tree/master/.github/CONTRIBUTING.md) - - [ ] If necessary, include test data in your PR. +- [ ] If you've added a new tool - have you followed the module conventions in the [contribution docs](https://github.com/nf-core/modules/tree/master/.github/CONTRIBUTING.md) +- [ ] If necessary, include test data in your PR. - [ ] Remove all TODO statements. - [ ] Emit the `.version.txt` file. - [ ] Follow the naming conventions. @@ -25,3 +25,5 @@ Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/modu - [ ] Add a resource `label` - [ ] Use BioConda and BioContainers if possible to fulfil software requirements. - [ ] Ensure that the test works (`PROFILE=docker pytest --tag --symlink --wt 2 --keep-workflow-wd`) +- [ ] Ensure that the test works (`PROFILE=singularity pytest --tag --symlink --wt 2 --keep-workflow-wd`) +- [ ] Ensure that the test works (`PROFILE=conda pytest --tag --symlink --wt 2 --keep-workflow-wd`) From 75d148341790afb4a34f489f2dad76fc73b6e121 Mon Sep 17 00:00:00 2001 From: Maxime Garcia Date: Wed, 17 Feb 2021 00:32:06 +0100 Subject: [PATCH 4/5] Apply suggestions from code review Co-authored-by: Harshil Patel --- .github/CONTRIBUTING.md | 23 ----------------------- 1 file changed, 23 deletions(-) diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index cb36a9c5..7faf4340 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -36,33 +36,10 @@ Each `nf-core/module` should be set up with a minimal set of test-data. 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. -## Patch - -:warning: Only in the unlikely and regretful event of a release happening with a bug. - -* On your own fork, make a new branch `patch` based on `upstream/master`. -* Fix the bug, and bump version (X.Y.Z+1). -* A PR should be made on `master` from patch to directly this particular bug. - ## Getting help For further information/help, please consult the [nf-core/modules README](https://github.com/nf-core/modules) and don't hesitate to get in touch on the nf-core Slack [#modules](https://nfcore.slack.com/channels/modules) channel ([join our Slack here](https://nf-co.re/join/slack)). -### Software version reporting - -If you add a new module, please ensure you add the information of the tool. - -Add to the script block of the process, something like the following: - -```bash - --version &> v_.txt 2>&1 -``` - -or - -```bash - --help | head -n 1 &> v_.txt 2>&1 -``` ### Images and figures From ebb6d5de1f969a17fdaac9afed599258f75e05e8 Mon Sep 17 00:00:00 2001 From: MaxUlysse Date: Wed, 17 Feb 2021 00:34:55 +0100 Subject: [PATCH 5/5] fix: Apply suggestions from code review --- .github/PULL_REQUEST_TEMPLATE.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 94c5bb95..41367bf7 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -24,6 +24,7 @@ Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/modu - [ ] Follow the input/output options guidelines. - [ ] Add a resource `label` - [ ] Use BioConda and BioContainers if possible to fulfil software requirements. -- [ ] Ensure that the test works (`PROFILE=docker pytest --tag --symlink --wt 2 --keep-workflow-wd`) -- [ ] Ensure that the test works (`PROFILE=singularity pytest --tag --symlink --wt 2 --keep-workflow-wd`) -- [ ] Ensure that the test works (`PROFILE=conda pytest --tag --symlink --wt 2 --keep-workflow-wd`) +- Ensure that the test works with either Docker / Singularity. Conda CI tests can be quite flaky: + - [ ] `PROFILE=docker pytest --tag --symlink --wt 2 --keep-workflow-wd` + - [ ] `PROFILE=singularity pytest --tag --symlink --wt 2 --keep-workflow-wd` + - [ ] `PROFILE=conda pytest --tag --symlink --wt 2 --keep-workflow-wd`