Skip to content

Commit e765843

Browse files
authored
Merge pull request #75 from nf-core/dev
PR for release 1.3.0
2 parents b79564a + 1a26f12 commit e765843

File tree

82 files changed

+9298
-1657
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+9298
-1657
lines changed

.devcontainer/devcontainer.json

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,11 @@
1010
"vscode": {
1111
// Set *default* container specific settings.json values on container create.
1212
"settings": {
13-
"python.defaultInterpreterPath": "/opt/conda/bin/python",
14-
"python.linting.enabled": true,
15-
"python.linting.pylintEnabled": true,
16-
"python.formatting.autopep8Path": "/opt/conda/bin/autopep8",
17-
"python.formatting.yapfPath": "/opt/conda/bin/yapf",
18-
"python.linting.flake8Path": "/opt/conda/bin/flake8",
19-
"python.linting.pycodestylePath": "/opt/conda/bin/pycodestyle",
20-
"python.linting.pydocstylePath": "/opt/conda/bin/pydocstyle",
21-
"python.linting.pylintPath": "/opt/conda/bin/pylint",
13+
"python.defaultInterpreterPath": "/opt/conda/bin/python"
2214
},
2315

2416
// Add the IDs of extensions you want installed when the container is created.
25-
"extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"],
26-
},
27-
},
17+
"extensions": ["ms-python.python", "ms-python.vscode-pylance", "nf-core.nf-core-extensionpack"]
18+
}
19+
}
2820
}

.editorconfig

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,16 @@ end_of_line = unset
1818
insert_final_newline = unset
1919
trim_trailing_whitespace = unset
2020
indent_style = unset
21-
indent_size = unset
21+
[/subworkflows/nf-core/**]
22+
charset = unset
23+
end_of_line = unset
24+
insert_final_newline = unset
25+
trim_trailing_whitespace = unset
26+
indent_style = unset
2227

2328
[/assets/email*]
2429
indent_size = unset
30+
31+
# ignore python and markdown
32+
[*.{py,md}]
33+
indent_style = unset

.github/CONTRIBUTING.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,8 @@ Please use the pre-filled template to save time.
99
However, don't be put off by this template - other more general issues and suggestions are welcome!
1010
Contributions to the code are even more welcome ;)
1111

12-
:::info
13-
If you need help using or modifying nf-core/nanostring then the best place to ask is on the nf-core Slack [#nanostring](https://nfcore.slack.com/channels/nanostring) channel ([join our Slack here](https://nf-co.re/join/slack)).
14-
:::
12+
> [!NOTE]
13+
> If you need help using or modifying nf-core/nanostring then the best place to ask is on the nf-core Slack [#nanostring](https://nfcore.slack.com/channels/nanostring) channel ([join our Slack here](https://nf-co.re/join/slack)).
1514
1615
## Contribution workflow
1716

@@ -27,8 +26,11 @@ If you're not used to this workflow with git, you can start with some [docs from
2726

2827
## Tests
2928

30-
You can optionally test your changes by running the pipeline locally. Then it is recommended to use the `debug` profile to
31-
receive warnings about process selectors and other debug info. Example: `nextflow run . -profile debug,test,docker --outdir <OUTDIR>`.
29+
You have the option to test your changes locally by running the pipeline. For receiving warnings about process selectors and other `debug` information, it is recommended to use the debug profile. Execute all the tests with the following command:
30+
31+
```bash
32+
nf-test test --profile debug,test,docker --verbose
33+
```
3234

3335
When you create a pull request with changes, [GitHub Actions](https://github.com/features/actions) will run automatic tests.
3436
Typically, pull-requests are only fully reviewed when these tests are passing, though of course we can help out before then.
@@ -90,7 +92,7 @@ Once there, use `nf-core schema build` to add to `nextflow_schema.json`.
9092

9193
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.
9294

93-
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.
95+
The process resources can be passed on to the tool dynamically within the process with the `${task.cpus}` and `${task.memory}` variables in the `script:` block.
9496

9597
### Naming schemes
9698

.github/workflows/awsfulltest.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ on:
88
types: [published]
99
workflow_dispatch:
1010
jobs:
11-
run-tower:
11+
run-platform:
1212
name: Run AWS full tests
1313
if: github.repository == 'nf-core/nanostring'
1414
runs-on: ubuntu-latest
1515
steps:
16-
- name: Launch workflow via tower
16+
- name: Launch workflow via Seqera Platform
1717
uses: seqeralabs/action-tower-launch@v2
1818
# Add full size test data (but still relatively small datasets for few samples)
1919
# on the `test_full.config` test runs with only one set of parameters
@@ -29,9 +29,10 @@ jobs:
2929
"outdir": "s3://${{ secrets.AWS_S3_BUCKET }}/nanostring/results-${{ github.sha }}"
3030
}
3131
profiles: test_full
32-
- uses: actions/upload-artifact@v3
32+
33+
- uses: actions/upload-artifact@v4
3334
with:
34-
name: Tower debug log file
35+
name: Seqera Platform debug log file
3536
path: |
36-
tower_action_*.log
37-
tower_action_*.json
37+
seqera_platform_action_*.log
38+
seqera_platform_action_*.json

.github/workflows/awstest.yml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ name: nf-core AWS test
55
on:
66
workflow_dispatch:
77
jobs:
8-
run-tower:
8+
run-platform:
99
name: Run AWS tests
1010
if: github.repository == 'nf-core/nanostring'
1111
runs-on: ubuntu-latest
1212
steps:
13-
# Launch workflow using Tower CLI tool action
14-
- name: Launch workflow via tower
13+
# Launch workflow using Seqera Platform CLI tool action
14+
- name: Launch workflow via Seqera Platform
1515
uses: seqeralabs/action-tower-launch@v2
1616
with:
1717
workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }}
@@ -24,9 +24,10 @@ jobs:
2424
"outdir": "s3://${{ secrets.AWS_S3_BUCKET }}/nanostring/results-test-${{ github.sha }}"
2525
}
2626
profiles: test
27-
- uses: actions/upload-artifact@v3
27+
28+
- uses: actions/upload-artifact@v4
2829
with:
29-
name: Tower debug log file
30+
name: Seqera Platform debug log file
3031
path: |
31-
tower_action_*.log
32-
tower_action_*.json
32+
seqera_platform_action_*.log
33+
seqera_platform_action_*.json

.github/workflows/branch.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ jobs:
1919
# NOTE - this doesn't currently work if the PR is coming from a fork, due to limitations in GitHub actions secrets
2020
- name: Post PR comment
2121
if: failure()
22-
uses: mshick/add-pr-comment@v1
22+
uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2
2323
with:
2424
message: |
2525
## This PR is against the `master` branch :x:

.github/workflows/ci.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,16 @@ jobs:
2828
- "latest-everything"
2929
steps:
3030
- name: Check out pipeline code
31-
uses: actions/checkout@v4
31+
uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
3232

3333
- name: Install Nextflow
34-
uses: nf-core/setup-nextflow@v1
34+
uses: nf-core/setup-nextflow@v2
3535
with:
3636
version: "${{ matrix.NXF_VER }}"
3737

38+
- name: Disk space cleanup
39+
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
40+
3841
- name: Run pipeline with test data
3942
run: |
4043
nextflow run ${GITHUB_WORKSPACE} -profile test,docker --outdir ./results

.github/workflows/clean-up.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ jobs:
1010
issues: write
1111
pull-requests: write
1212
steps:
13-
- uses: actions/stale@v7
13+
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9
1414
with:
1515
stale-issue-message: "This issue has been tagged as awaiting-changes or awaiting-feedback by an nf-core contributor. Remove stale label or add a comment otherwise this issue will be closed in 20 days."
1616
stale-pr-message: "This PR has been tagged as awaiting-changes or awaiting-feedback by an nf-core contributor. Remove stale label or add a comment if it is still useful."
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
name: Test successful pipeline download with 'nf-core download'
2+
3+
# Run the workflow when:
4+
# - dispatched manually
5+
# - when a PR is opened or reopened to master branch
6+
# - the head branch of the pull request is updated, i.e. if fixes for a release are pushed last minute to dev.
7+
on:
8+
workflow_dispatch:
9+
inputs:
10+
testbranch:
11+
description: "The specific branch you wish to utilize for the test execution of nf-core download."
12+
required: true
13+
default: "dev"
14+
pull_request:
15+
types:
16+
- opened
17+
- edited
18+
- synchronize
19+
branches:
20+
- master
21+
pull_request_target:
22+
branches:
23+
- master
24+
25+
env:
26+
NXF_ANSI_LOG: false
27+
28+
jobs:
29+
download:
30+
runs-on: ubuntu-latest
31+
steps:
32+
- name: Install Nextflow
33+
uses: nf-core/setup-nextflow@v2
34+
35+
- name: Disk space cleanup
36+
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1
37+
38+
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5
39+
with:
40+
python-version: "3.12"
41+
architecture: "x64"
42+
- uses: eWaterCycle/setup-singularity@931d4e31109e875b13309ae1d07c70ca8fbc8537 # v7
43+
with:
44+
singularity-version: 3.8.3
45+
46+
- name: Install dependencies
47+
run: |
48+
python -m pip install --upgrade pip
49+
pip install git+https://github.com/nf-core/tools.git@dev
50+
51+
- name: Get the repository name and current branch set as environment variable
52+
run: |
53+
echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >> ${GITHUB_ENV}
54+
echo "REPOTITLE_LOWERCASE=$(basename ${GITHUB_REPOSITORY,,})" >> ${GITHUB_ENV}
55+
echo "REPO_BRANCH=${{ github.event.inputs.testbranch || 'dev' }}" >> ${GITHUB_ENV}
56+
57+
- name: Download the pipeline
58+
env:
59+
NXF_SINGULARITY_CACHEDIR: ./
60+
run: |
61+
nf-core download ${{ env.REPO_LOWERCASE }} \
62+
--revision ${{ env.REPO_BRANCH }} \
63+
--outdir ./${{ env.REPOTITLE_LOWERCASE }} \
64+
--compress "none" \
65+
--container-system 'singularity' \
66+
--container-library "quay.io" -l "docker.io" -l "ghcr.io" \
67+
--container-cache-utilisation 'amend' \
68+
--download-configuration
69+
70+
- name: Inspect download
71+
run: tree ./${{ env.REPOTITLE_LOWERCASE }}
72+
73+
- name: Run the downloaded pipeline (stub)
74+
id: stub_run_pipeline
75+
continue-on-error: true
76+
env:
77+
NXF_SINGULARITY_CACHEDIR: ./
78+
NXF_SINGULARITY_HOME_MOUNT: true
79+
run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -stub -profile test,singularity --outdir ./results
80+
- name: Run the downloaded pipeline (stub run not supported)
81+
id: run_pipeline
82+
if: ${{ job.steps.stub_run_pipeline.status == failure() }}
83+
env:
84+
NXF_SINGULARITY_CACHEDIR: ./
85+
NXF_SINGULARITY_HOME_MOUNT: true
86+
run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -profile test,singularity --outdir ./results

.github/workflows/fix-linting.yml

Lines changed: 53 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ on:
44
types: [created]
55

66
jobs:
7-
deploy:
7+
fix-linting:
88
# Only run if comment is on a PR with the main repo, and if it contains the magic keywords
99
if: >
1010
contains(github.event.comment.html_url, '/pull/') &&
@@ -13,43 +13,77 @@ jobs:
1313
runs-on: ubuntu-latest
1414
steps:
1515
# Use the @nf-core-bot token to check out so we can push later
16-
- uses: actions/checkout@v4
16+
- uses: actions/checkout@0ad4b8fadaa221de15dcec353f45205ec38ea70b # v4
1717
with:
1818
token: ${{ secrets.nf_core_bot_auth_token }}
1919

20+
# indication that the linting is being fixed
21+
- name: React on comment
22+
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4
23+
with:
24+
comment-id: ${{ github.event.comment.id }}
25+
reactions: eyes
26+
2027
# Action runs on the issue comment, so we don't get the PR by default
2128
# Use the gh cli to check out the PR
2229
- name: Checkout Pull Request
2330
run: gh pr checkout ${{ github.event.issue.number }}
2431
env:
2532
GITHUB_TOKEN: ${{ secrets.nf_core_bot_auth_token }}
2633

27-
- uses: actions/setup-node@v4
34+
# Install and run pre-commit
35+
- uses: actions/setup-python@82c7e631bb3cdc910f68e0081d67478d79c6982d # v5
36+
with:
37+
python-version: "3.12"
2838

29-
- name: Install Prettier
30-
run: npm install -g prettier @prettier/plugin-php
39+
- name: Install pre-commit
40+
run: pip install pre-commit
3141

32-
# Check that we actually need to fix something
33-
- name: Run 'prettier --check'
34-
id: prettier_status
35-
run: |
36-
if prettier --check ${GITHUB_WORKSPACE}; then
37-
echo "result=pass" >> $GITHUB_OUTPUT
38-
else
39-
echo "result=fail" >> $GITHUB_OUTPUT
40-
fi
42+
- name: Run pre-commit
43+
id: pre-commit
44+
run: pre-commit run --all-files
45+
continue-on-error: true
4146

42-
- name: Run 'prettier --write'
43-
if: steps.prettier_status.outputs.result == 'fail'
44-
run: prettier --write ${GITHUB_WORKSPACE}
47+
# indication that the linting has finished
48+
- name: react if linting finished succesfully
49+
if: steps.pre-commit.outcome == 'success'
50+
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4
51+
with:
52+
comment-id: ${{ github.event.comment.id }}
53+
reactions: "+1"
4554

4655
- name: Commit & push changes
47-
if: steps.prettier_status.outputs.result == 'fail'
56+
id: commit-and-push
57+
if: steps.pre-commit.outcome == 'failure'
4858
run: |
4959
git config user.email "core@nf-co.re"
5060
git config user.name "nf-core-bot"
5161
git config push.default upstream
5262
git add .
5363
git status
54-
git commit -m "[automated] Fix linting with Prettier"
64+
git commit -m "[automated] Fix code linting"
5565
git push
66+
67+
- name: react if linting errors were fixed
68+
id: react-if-fixed
69+
if: steps.commit-and-push.outcome == 'success'
70+
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4
71+
with:
72+
comment-id: ${{ github.event.comment.id }}
73+
reactions: hooray
74+
75+
- name: react if linting errors were not fixed
76+
if: steps.commit-and-push.outcome == 'failure'
77+
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4
78+
with:
79+
comment-id: ${{ github.event.comment.id }}
80+
reactions: confused
81+
82+
- name: react if linting errors were not fixed
83+
if: steps.commit-and-push.outcome == 'failure'
84+
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4
85+
with:
86+
issue-number: ${{ github.event.issue.number }}
87+
body: |
88+
@${{ github.actor }} I tried to fix the linting errors, but it didn't work. Please fix them manually.
89+
See [CI log](https://github.com/nf-core/nanostring/actions/runs/${{ github.run_id }}) for more details.

0 commit comments

Comments
 (0)