mirror of
https://github.com/MillironX/nf-core_modules.git
synced 2024-12-22 11:08:17 +00:00
Update README to include some git best practices (#415)
* Update README to include some git best practices * correct linting errors * extra info about returning to master and deleting the branch * use rebase * stress importance of rebase * Update README to include some git best practices * correct linting errors * extra info about returning to master and deleting the branch * Changed position of git commands * move later git commands down the action list
This commit is contained in:
parent
466ab67808
commit
f9433639cf
1 changed files with 42 additions and 3 deletions
45
README.md
45
README.md
|
@ -170,7 +170,19 @@ We have implemented a number of commands in the `nf-core/tools` package to make
|
|||
2. Install [`nextflow`](https://nf-co.re/usage/installation) (`>=20.11.0-edge`; see [Nextflow edge releases](#nextflow-edge-releases))
|
||||
3. Install any of [`Docker`](https://docs.docker.com/engine/installation/), [`Singularity`](https://www.sylabs.io/guides/3.0/user-guide/) or [`Conda`](https://conda.io/miniconda.html)
|
||||
4. [Fork and clone this repo locally](#uploading-to-nf-coremodules)
|
||||
5. Create a module using the [nf-core DSL2 module template](https://github.com/nf-core/tools/blob/master/nf_core/module-template/software/main.nf):
|
||||
5. Set up git by adding a new remote of the nf-core git repo called `upstream`
|
||||
|
||||
```bash
|
||||
git remote add upstream https://github.com/nf-core/modules.git
|
||||
```
|
||||
|
||||
Make a new branch for your module and check it out
|
||||
|
||||
```bash
|
||||
git checkout -b fastqc
|
||||
```
|
||||
|
||||
6. Create a module using the [nf-core DSL2 module template](https://github.com/nf-core/tools/blob/master/nf_core/module-template/software/main.nf):
|
||||
|
||||
```console
|
||||
$ nf-core modules create . --tool fastqc --author @joebloggs --label process_low --meta
|
||||
|
@ -218,7 +230,7 @@ We have implemented a number of commands in the `nf-core/tools` package to make
|
|||
|
||||
`md5sum` checks are the preferable choice of test to determine file changes, however, this may not be possible for all outputs generated by some tools e.g. if they include time stamps or command-related headers. Please do your best to avoid just checking for the file being present e.g. it may still be possible to check that the file contains the appropriate text snippets.
|
||||
|
||||
6. Create a yaml file containing information required for module unit testing
|
||||
7. Create a yaml file containing information required for module unit testing
|
||||
|
||||
```console
|
||||
$ nf-core modules create-test-yml
|
||||
|
@ -251,7 +263,7 @@ We have implemented a number of commands in the `nf-core/tools` package to make
|
|||
|
||||
> NB: See docs for [running tests manually](#running-tests-manually) if you would like to run the tests manually.
|
||||
|
||||
7. Lint the module locally to check that it adheres to nf-core guidelines before submission
|
||||
8. Lint the module locally to check that it adheres to nf-core guidelines before submission
|
||||
|
||||
```console
|
||||
$ nf-core modules lint . --tool fastqc
|
||||
|
@ -294,6 +306,33 @@ We have implemented a number of commands in the `nf-core/tools` package to make
|
|||
╰──────────────────────╯
|
||||
```
|
||||
|
||||
9. Once ready, the code can be pushed and a pull request (PR) created
|
||||
|
||||
On a regular basis you can pull upstream changes into this branch and it is recommended to do so before pushing and creating a pull request - see below. Rather than merging changes directly from upstream the rebase strategy is recommended so that your changes are applied on top of the latest master branch from the nf-core repo. This can be performed as follows
|
||||
|
||||
```bash
|
||||
git pull --rebase upstream master
|
||||
```
|
||||
|
||||
Once you are ready you can push the code and create a PR
|
||||
|
||||
```bash
|
||||
git push -u origin fastqc
|
||||
```
|
||||
|
||||
Once the PR has been accepted you should delete the branch and checkout master again.
|
||||
|
||||
```bash
|
||||
git checkout master
|
||||
git branch -d fastqc
|
||||
```
|
||||
|
||||
In case there are commits on the local branch that didn't make it into the PR (usually commits made after the PR), git will warn about this and not delete the branch. If you are sure you want to delete, use the following command
|
||||
|
||||
```bash
|
||||
git branch -D fastqc
|
||||
```
|
||||
|
||||
### Test data
|
||||
|
||||
In order to test that each module added to `nf-core/modules` is actually working and to be able to track any changes to results files between module updates we have set-up a number of Github Actions CI tests to run each module on a minimal test dataset using Docker, Singularity and Conda.
|
||||
|
|
Loading…
Reference in a new issue