You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardexpand all lines: .github/CONTRIBUTING.md
+75-4
Original file line number
Diff line number
Diff line change
@@ -18,8 +18,9 @@ If you'd like to write some code for nf-core/bacass, the standard workflow is as
18
18
1. Check that there isn't already an issue about your idea in the [nf-core/bacass issues](https://github.com/nf-core/bacass/issues) to avoid duplicating work
19
19
* If there isn't one already, please create one so that others know you're working on this
20
20
2.[Fork](https://help.github.com/en/github/getting-started-with-github/fork-a-repo) the [nf-core/bacass repository](https://github.com/nf-core/bacass) to your GitHub account
21
-
3. Make the necessary changes / additions within your forked repository
22
-
4. Submit a Pull Request against the `dev` branch and wait for the code to be reviewed and merged
21
+
3. Make the necessary changes / additions within your forked repository following [Pipeline conventions](#pipeline-contribution-conventions)
22
+
4. Use `nf-core schema build` and add any new parameters to the pipeline JSON schema (requires [nf-core tools](https://github.com/nf-core/tools) >= 1.10).
23
+
5. Submit a Pull Request against the `dev` branch and wait for the code to be reviewed and merged
23
24
24
25
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/).
25
26
@@ -30,14 +31,14 @@ Typically, pull-requests are only fully reviewed when these tests are passing, t
30
31
31
32
There are typically two types of tests that run:
32
33
33
-
### Lint Tests
34
+
### Lint tests
34
35
35
36
`nf-core` has a [set of guidelines](https://nf-co.re/developers/guidelines) which all pipelines must adhere to.
36
37
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.
37
38
38
39
If any failures or warnings are encountered, please follow the listed URL for more documentation.
39
40
40
-
### Pipeline Tests
41
+
### Pipeline tests
41
42
42
43
Each `nf-core` pipeline should be set up with a minimal set of test-data.
43
44
`GitHub Actions` then runs the pipeline on this data to ensure that it exits successfully.
@@ -55,3 +56,73 @@ These tests are run both with the latest available version of `Nextflow` and als
55
56
## Getting help
56
57
57
58
For further information/help, please consult the [nf-core/bacass documentation](https://nf-co.re/bacass/usage) and don't hesitate to get in touch on the nf-core Slack [#bacass](https://nfcore.slack.com/channels/bacass) channel ([join our Slack here](https://nf-co.re/join/slack)).
59
+
60
+
## Pipeline contribution conventions
61
+
62
+
To make the nf-core/bacass code and processing logic more understandable for new contributors and to ensure quality, we semi-standardise the way the code and other contributions are written.
63
+
64
+
### Adding a new step
65
+
66
+
If you wish to contribute a new step, please use the following coding standards:
67
+
68
+
1. Define the corresponding input channel into your new process from the expected previous process channel
69
+
2. Write the process block (see below).
70
+
3. Define the output channel if needed (see below).
71
+
4. Add any new flags/options to `nextflow.config` with a default (see below).
72
+
5. Add any new flags/options to `nextflow_schema.json` with help text (with `nf-core schema build`).
73
+
6. Add any new flags/options to the help message (for integer/text parameters, print to help the corresponding `nextflow.config` parameter).
74
+
7. Add sanity checks for all relevant parameters.
75
+
8. Add any new software to the `scrape_software_versions.py` script in `bin/` and the version command to the `scrape_software_versions` process in `main.nf`.
76
+
9. Do local tests that the new code works properly and as expected.
77
+
10. Add a new test command in `.github/workflow/ci.yml`.
78
+
11. If applicable add a [MultiQC](https://https://multiqc.info/) module.
79
+
12. Update MultiQC config `assets/multiqc_config.yaml` so relevant suffixes, name clean up, General Statistics Table column order, and module figures are in the right order.
80
+
13. Optional: Add any descriptions of MultiQC report sections and output files to `docs/output.md`.
81
+
82
+
### Default values
83
+
84
+
Parameters should be initialised / defined with default values in `nextflow.config` under the `params` scope.
85
+
86
+
Once there, use `nf-core schema build` to add to `nextflow_schema.json`.
87
+
88
+
### Default processes resource requirements
89
+
90
+
Sensible defaults for process resource requirements (CPUs / memory / time) for a process should be defined in `conf/base.config`. These should generally be specified generic with `withLabel:` selectors so they can be shared across multiple processes/steps of the pipeline. A nf-core standard set of labels that should be followed where possible can be seen in the [nf-core pipeline template](https://github.com/nf-core/tools/blob/master/nf_core/pipeline-template/conf/base.config), which has the default process as a single core-process, and then different levels of multi-core configurations for increasingly large memory requirements defined with standardised labels.
91
+
92
+
The process resources can be passed on to the tool dynamically within the process with the `${task.cpu}` and `${task.memory}` variables in the `script:` block.
93
+
94
+
### Naming schemes
95
+
96
+
Please use the following naming schemes, to make it easy to understand what is going where.
97
+
98
+
* initial process channel: `ch_output_from_<process>`
99
+
* intermediate and terminal channels: `ch_<previousprocess>_for_<nextprocess>`
100
+
101
+
### Nextflow version bumping
102
+
103
+
If you are using a new feature from core Nextflow, you may bump the minimum required version of nextflow in the pipeline with: `nf-core bump-version --nextflow . [min-nf-version]`
104
+
105
+
### Software version reporting
106
+
107
+
If you add a new tool to the pipeline, please ensure you add the information of the tool to the `get_software_version` process.
108
+
109
+
Add to the script block of the process, something like the following:
<YOUR_TOOL> --help | head -n 1 &> v_<YOUR_TOOL>.txt 2>&1||true
119
+
```
120
+
121
+
You then need to edit the script `bin/scrape_software_versions.py` to:
122
+
123
+
1. Add a Python regex for your tool's `--version` output (as in stored in the `v_<YOUR_TOOL>.txt` file), to ensure the version is reported as a `v` and the version number e.g. `v2.1.1`
124
+
2. Add a HTML entry to the `OrderedDict` for formatting in MultiQC.
125
+
126
+
### Images and figures
127
+
128
+
For overview images and other documents we follow the nf-core [style guidelines and examples](https://nf-co.re/developers/design_guidelines).
Copy file name to clipboardexpand all lines: .github/PULL_REQUEST_TEMPLATE.md
+10-4
Original file line number
Diff line number
Diff line change
@@ -10,11 +10,17 @@ Remember that PRs should be made against the dev branch, unless you're preparing
10
10
11
11
Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/bacass/tree/master/.github/CONTRIBUTING.md)
12
12
-->
13
+
<!-- markdownlint-disable ul-indent -->
13
14
14
15
## PR checklist
15
16
16
-
-[ ] This comment contains a description of changes (with reason)
17
-
-[ ]`CHANGELOG.md` is updated
17
+
-[ ] This comment contains a description of changes (with reason).
18
18
-[ ] If you've fixed a bug or added code that should be tested, add tests!
19
-
-[ ] Documentation in `docs` is updated
20
-
-[ ] If necessary, also make a PR on the [nf-core/bacass branch on the nf-core/test-datasets repo](https://github.com/nf-core/test-datasets/pull/new/nf-core/bacass)
19
+
-[ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](https://github.com/nf-core/bacass/tree/master/.github/CONTRIBUTING.md)
20
+
-[ ] If necessary, also make a PR on the nf-core/bacass _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository.
21
+
-[ ] Make sure your code lints (`nf-core lint`).
22
+
-[ ] Ensure the test suite passes (`nextflow run . -profile test,docker`).
23
+
-[ ] Usage Documentation in `docs/usage.md` is updated.
24
+
-[ ] Output Documentation in `docs/output.md` is updated.
25
+
-[ ]`CHANGELOG.md` is updated.
26
+
-[ ]`README.md` is updated (including new tool citations and authors/contributors).
# If the above check failed, post a comment on the PR explaining the failure
@@ -23,13 +23,22 @@ jobs:
23
23
uses: mshick/add-pr-comment@v1
24
24
with:
25
25
message: |
26
+
## This PR is against the `master` branch :x:
27
+
28
+
* Do not close this PR
29
+
* Click _Edit_ and change the `base` to `dev`
30
+
* This CI test will remain failed until you push a new commit
31
+
32
+
---
33
+
26
34
Hi @${{ github.event.pull_request.user.login }},
27
35
28
-
It looks like this pull-request is has been made against the ${{github.event.pull_request.head.repo.full_name}} `master` branch.
36
+
It looks like this pull-request is has been made against the [${{github.event.pull_request.head.repo.full_name }}](https://github.com/${{github.event.pull_request.head.repo.full_name }}) `master` branch.
29
37
The `master` branch on nf-core repositories should always contain code from the latest release.
30
-
Because of this, PRs to `master` are only allowed if they come from the ${{github.event.pull_request.head.repo.full_name}} `dev` branch.
38
+
Because of this, PRs to `master` are only allowed if they come from the [${{github.event.pull_request.head.repo.full_name }}](https://github.com/${{github.event.pull_request.head.repo.full_name }}) `dev` branch.
31
39
32
40
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.
41
+
Note that even after this, the test will continue to show as failing until you push a new commit.
0 commit comments