Skip to content
This repository has been archived by the owner on May 6, 2024. It is now read-only.

quantms release 1.3.0 #147

Closed
wants to merge 145 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
145 commits
Select commit Hold shift + click to select a range
ec28eab
stuff
jspaezp Sep 15, 2023
5508231
Merge pull request #2 from bigbio/dev
ypriverol Oct 30, 2023
e41cc4c
Merge pull request #6 from nf-core/dev
daichengxin Nov 1, 2023
fc19df9
Merge pull request #7 from nf-core/dev
daichengxin Nov 1, 2023
17382f0
version reset for development
fabianegli Nov 2, 2023
89acf99
prepare changelog for next version
fabianegli Nov 2, 2023
af45e32
prepare dev branch for further development
fabianegli Nov 2, 2023
445e2f8
Merge pull request #10 from bigbio/dev
daichengxin Dec 14, 2023
c2b4ca4
Template update for nf-core/tools version 2.11
nf-core-bot Dec 19, 2023
c1de156
Template update for nf-core/tools version 2.11.1
nf-core-bot Dec 20, 2023
7dc473a
remove multiqc warning
daichengxin Dec 21, 2023
80b18d3
Merge branch 'dev' into nf-template
daichengxin Dec 21, 2023
6b73ded
Update CHANGELOG.md
daichengxin Dec 21, 2023
371c9d6
Update CHANGELOG.md
daichengxin Dec 21, 2023
23d4e2f
remove fastqc
daichengxin Dec 21, 2023
788bd79
Merge pull request #11 from daichengxin/nf-template
daichengxin Dec 21, 2023
2d4b836
fixed sage cache
daichengxin Dec 24, 2023
a7f6444
Merge branch 'dev' of https://github.com/daichengxin/quantms into dev
daichengxin Dec 24, 2023
b3b47e2
fixed regular match
daichengxin Dec 26, 2023
898f721
Update diann_convert.py
daichengxin Dec 26, 2023
e80ba58
fixed schema json
daichengxin Dec 27, 2023
d770c74
Merge pull request #331 from daichengxin/dev
ypriverol Dec 27, 2023
b1cee70
first branch commit
jspaezp Jan 9, 2024
0bbfaaf
added params
jspaezp Jan 9, 2024
0c12076
fixed unused reference
jspaezp Jan 9, 2024
2ab21a3
trailing comma
jspaezp Jan 9, 2024
4217740
stuff
jspaezp Jan 9, 2024
4b0badc
added node modules to gitignore
jspaezp Jan 9, 2024
8237a29
merged branch onto bigbio dev
jspaezp Jan 9, 2024
94e6d16
rolled back sdrf parsing
jspaezp Jan 9, 2024
66a0f7a
Merge branch 'dev' into bb_feature/skip_prelim
jspaezp Jan 9, 2024
639e507
removed accidental file
jspaezp Jan 9, 2024
3c80318
Merge pull request #12 from TalusBio/bb_feature/skip_prelim
daichengxin Jan 10, 2024
eb6985f
Merge pull request #335 from TalusBio/bb_feature/skip_prelim
ypriverol Jan 10, 2024
666467d
library creation
daichengxin Jan 13, 2024
e9ae266
Merge pull request #341 from daichengxin/dev
ypriverol Jan 13, 2024
177b998
Merge branch 'dev' of https://github.com/bigbio/quantms into dev
ypriverol Jan 23, 2024
b2a626e
change id svg workflow
ypriverol Jan 23, 2024
083516d
solve prettier
ypriverol Jan 23, 2024
8c48eb1
solve prettier
ypriverol Jan 23, 2024
1c082e0
Merge pull request #13 from ypriverol/dev
daichengxin Jan 24, 2024
bc1745e
solve prettier
ypriverol Jan 24, 2024
fd20331
Merge pull request #348 from ypriverol/dev
ypriverol Jan 25, 2024
514c2b8
Template update for nf-core/tools version 2.12
nf-core-bot Jan 29, 2024
161dda5
first PR about identification subworkflow
daichengxin Feb 1, 2024
987f8a3
Merge branch 'dev' into nf-template-12
daichengxin Feb 1, 2024
acf154f
prettier
daichengxin Feb 1, 2024
3da5541
fixed format
daichengxin Feb 1, 2024
470dd37
fixed
daichengxin Feb 1, 2024
77f4ce0
Merge pull request #14 from daichengxin/nf-template-12
daichengxin Feb 1, 2024
3963c6e
minor changes, assembly only in preliminary mzmls
ypriverol Feb 11, 2024
2e09374
Merge branch 'nf-core-template-merge-2.12' of https://github.com/nf-c…
ypriverol Feb 11, 2024
7185a2a
updating some paraemeters
ypriverol Feb 11, 2024
1847cb3
updating some paraemeters
ypriverol Feb 11, 2024
1ed68a5
updating some parameters
ypriverol Feb 11, 2024
8d60470
updating some parameters
ypriverol Feb 11, 2024
766d0d4
updating some parameters
ypriverol Feb 11, 2024
0cf1782
updating some parameters
ypriverol Feb 11, 2024
429d251
updating some parameters
ypriverol Feb 11, 2024
7a2b085
updating some parameters
ypriverol Feb 11, 2024
e4aee14
minor changes
ypriverol Feb 12, 2024
95b9da9
update msstats to 4.10.0
ypriverol Feb 12, 2024
9dd6e0a
skip msstats for dia
ypriverol Feb 12, 2024
7633677
skip msstats for dia
ypriverol Feb 12, 2024
7d43f3b
skip msstats for dia
ypriverol Feb 12, 2024
ca7a7bc
skip msstats for dia
ypriverol Feb 12, 2024
41ff18f
Merge pull request #352 from ypriverol/dev
ypriverol Feb 15, 2024
195e4e5
Template update for nf-core/tools version 2.13
nf-core-bot Feb 20, 2024
6e0de62
template updated
ypriverol Feb 20, 2024
10ddda1
Merge branch 'dev' into dev
ypriverol Feb 20, 2024
b790d2a
Merge branch 'dev' of https://github.com/bigbio/quantms into dev
ypriverol Feb 20, 2024
951126f
Merge remote-tracking branch 'origin/dev' into dev
ypriverol Feb 20, 2024
c0f0a41
template updated 2.13
ypriverol Feb 20, 2024
a7c0a06
template updated 2.13
ypriverol Feb 20, 2024
49a3144
template updated 2.13
ypriverol Feb 20, 2024
e6b2e9f
template updated 2.13
ypriverol Feb 20, 2024
86dc10b
template updated 2.13
ypriverol Feb 20, 2024
2bd8763
template updated 2.13
ypriverol Feb 20, 2024
e807caa
Merge pull request #15 from ypriverol/dev
daichengxin Feb 21, 2024
66d4a95
fixed lint
daichengxin Feb 21, 2024
516be91
Update quantms.nf
daichengxin Feb 21, 2024
9561c2b
Merge pull request #4 from daichengxin/nf-template2.13
ypriverol Feb 21, 2024
d76d24f
Update quantms.nf
daichengxin Feb 21, 2024
9f4cd5b
Bugfix/aws staging (#9)
jspaezp Feb 23, 2024
d74cfd1
Merge branch 'dev' into dev
jspaezp Feb 23, 2024
c18e6ec
update template
daichengxin Feb 24, 2024
dbbf9ba
Merge pull request #5 from daichengxin/nf-template2.13
ypriverol Feb 24, 2024
213da5e
Merge pull request #355 from TalusBio/dev
ypriverol Feb 24, 2024
929a15a
Merge branch 'dev' of https://github.com/bigbio/quantms into dev
ypriverol Feb 24, 2024
632d4f1
template updated 2.13
ypriverol Feb 24, 2024
a960ac9
Merge branch 'dev' of https://github.com/ypriverol/quantms into ypriv…
daichengxin Feb 26, 2024
1ed3ce2
Merge branch 'ypriverol-dev' into dev
daichengxin Feb 26, 2024
ea2fdf2
fixed
daichengxin Feb 26, 2024
d2ccd5f
fixed
daichengxin Feb 26, 2024
a193eb7
Update nextflow_schema.json
daichengxin Feb 26, 2024
e74dfbf
Update nextflow_schema.json
daichengxin Feb 26, 2024
8b846c5
pmultiqc 0.0.23 -> 0.0.24
ypriverol Feb 26, 2024
ade8c07
Merge pull request #353 from ypriverol/dev
ypriverol Feb 26, 2024
3b95f2d
Merge branch 'dev' into dev
ypriverol Feb 26, 2024
fa46512
sdrf-pipelines 0.0.24 -> 0.0.25
ypriverol Feb 28, 2024
60f5315
Merge branch 'dev' of https://github.com/bigbio/quantms into dev
ypriverol Feb 28, 2024
4bbee85
sdrf-pipelines 0.0.24 -> 0.0.25
ypriverol Feb 28, 2024
43418a1
Merge pull request #356 from ypriverol/dev
ypriverol Feb 28, 2024
130c80d
Merge branch 'dev' into dev
ypriverol Feb 28, 2024
e9b903f
sdrf-pipelines 0.0.24 -> 0.0.25
ypriverol Feb 29, 2024
15eb0f0
Merge branch 'dev' into dev
ypriverol Feb 29, 2024
aa019c6
Merge pull request #357 from ypriverol/dev
ypriverol Feb 29, 2024
b0a87ee
Merge branch 'dev' into dev
ypriverol Feb 29, 2024
fbf50c6
Template update for nf-core/tools version 2.13.1
nf-core-bot Feb 29, 2024
6d6626f
update dda_id
daichengxin Mar 2, 2024
67357d1
Merge branch 'dev' into nf-template2.13.1
daichengxin Mar 2, 2024
64c53a6
Merge pull request #17 from daichengxin/nf-template2.13.1
daichengxin Mar 2, 2024
a8576db
fixed
daichengxin Mar 2, 2024
0b9c5ab
Merge branch 'dev' of https://github.com/daichengxin/quantms into dev
daichengxin Mar 2, 2024
7e28a0f
Merge branch 'nf-core-template-merge-2.13.1' of https://github.com/nf…
ypriverol Mar 21, 2024
37a20cd
sdrf-pipelines 0.0.24 -> 0.0.25
ypriverol Mar 21, 2024
8589315
Merge pull request #358 from ypriverol/dev
ypriverol Mar 21, 2024
a7205a4
Update modules/local/diann_preliminary_analysis/main.nf
ypriverol Mar 22, 2024
d125eb4
pmultiqc 0.0.25
ypriverol Mar 23, 2024
96c2353
Merge pull request #359 from ypriverol/dev
ypriverol Mar 23, 2024
2b4fc1d
pmultiqc 0.0.25
ypriverol Mar 23, 2024
0e83ecb
Merge branch 'dev' into dev
ypriverol Mar 23, 2024
d090107
Merge pull request #360 from ypriverol/dev
ypriverol Mar 23, 2024
0c87e02
Merge branch 'dev' into dev
daichengxin Mar 24, 2024
fef3595
pmultiqc 0.0.25
ypriverol Mar 25, 2024
0dc94b5
SAGE charges
ypriverol Mar 25, 2024
3bf668d
SAGE charges
ypriverol Mar 25, 2024
4549fb8
SAGE charges
ypriverol Mar 25, 2024
25b28f8
SAGE charges
ypriverol Mar 25, 2024
a003f4b
SAGE charges
ypriverol Mar 25, 2024
6a5e319
added min number of peaks per spectrum
ypriverol Mar 26, 2024
6269367
Merge pull request #363 from ypriverol/dev
ypriverol Mar 28, 2024
ce04da9
sdrf-pipelines 0.0.25 -> 0.0.26
ypriverol Apr 6, 2024
8fb9c85
Merge pull request #365 from ypriverol/dev
ypriverol Apr 6, 2024
72e2b6a
Merge pull request #146 from bigbio/dev
ypriverol Apr 8, 2024
8b97618
1.3.0dev -> 1.3.0
ypriverol Apr 8, 2024
187984f
1.3.0dev -> 1.3.0
ypriverol Apr 8, 2024
45675cc
Merge pull request #148 from bigbio/dev
ypriverol Apr 8, 2024
e9acd59
minor changes
ypriverol Apr 8, 2024
19bc1d6
Merge branch 'nf-core:dev' into dev
ypriverol Apr 8, 2024
fc262f3
Merge pull request #149 from bigbio/dev
ypriverol Apr 8, 2024
c49ef81
[automated] Fix linting with Prettier
nf-core-bot Apr 8, 2024
41b2ce8
Dependecies updated
ypriverol Apr 8, 2024
0093955
Merge branch 'dev' of https://github.com/bigbio/quantms into dev
ypriverol Apr 8, 2024
1ba5808
Merge pull request #150 from bigbio/dev
ypriverol Apr 8, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 1 addition & 9 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,7 @@
"vscode": {
// Set *default* container specific settings.json values on container create.
"settings": {
"python.defaultInterpreterPath": "/opt/conda/bin/python",
"python.linting.enabled": true,
"python.linting.pylintEnabled": true,
"python.formatting.autopep8Path": "/opt/conda/bin/autopep8",
"python.formatting.yapfPath": "/opt/conda/bin/yapf",
"python.linting.flake8Path": "/opt/conda/bin/flake8",
"python.linting.pycodestylePath": "/opt/conda/bin/pycodestyle",
"python.linting.pydocstylePath": "/opt/conda/bin/pydocstyle",
"python.linting.pylintPath": "/opt/conda/bin/pylint"
"python.defaultInterpreterPath": "/opt/conda/bin/python"
},

// Add the IDs of extensions you want installed when the container is created.
Expand Down
15 changes: 14 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,20 @@ end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset
indent_size = unset
[/subworkflows/nf-core/**]
charset = unset
end_of_line = unset
insert_final_newline = unset
trim_trailing_whitespace = unset
indent_style = unset

[/assets/email*]
indent_size = unset

# ignore Readme
[README.md]
indent_style = unset

# ignore python
[*.{py,md}]
indent_style = unset
13 changes: 9 additions & 4 deletions .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,8 @@ 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 ;)

:::info
If you need help using or modifying nf-core/quantms then the best place to ask is on the nf-core Slack [#quantms](https://nfcore.slack.com/channels/quantms) channel ([join our Slack here](https://nf-co.re/join/slack)).
:::
> [!NOTE]
> If you need help using or modifying nf-core/quantms then the best place to ask is on the nf-core Slack [#quantms](https://nfcore.slack.com/channels/quantms) channel ([join our Slack here](https://nf-co.re/join/slack)).

## Contribution workflow

Expand All @@ -27,6 +26,12 @@ If you're not used to this workflow with git, you can start with some [docs from

## Tests

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:

```bash
nf-test test --profile debug,test,docker --verbose
```

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.

Expand Down Expand Up @@ -87,7 +92,7 @@ Once there, use `nf-core schema build` to add to `nextflow_schema.json`.

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.

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

### Naming schemes

Expand Down
3 changes: 2 additions & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ Learn more about contributing: [CONTRIBUTING.md](https://github.com/nf-core/quan
- [ ] If you've added a new tool - have you followed the pipeline conventions in the [contribution docs](https://github.com/nf-core/quantms/tree/master/.github/CONTRIBUTING.md)
- [ ] If necessary, also make a PR on the nf-core/quantms _branch_ on the [nf-core/test-datasets](https://github.com/nf-core/test-datasets) repository.
- [ ] Make sure your code lints (`nf-core lint`).
- [ ] Ensure the test suite passes (`nextflow run . -profile test,docker --outdir <OUTDIR>`).
- [ ] Ensure the test suite passes (`nf-test test main.nf.test -profile test,docker`).
- [ ] Check for unexpected warnings in debug mode (`nextflow run . -profile debug,test,docker --outdir <OUTDIR>`).
- [ ] Usage Documentation in `docs/usage.md` is updated.
- [ ] Output Documentation in `docs/output.md` is updated.
- [ ] `CHANGELOG.md` is updated.
Expand Down
6 changes: 4 additions & 2 deletions .github/workflows/awsfulltest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ jobs:
steps:
- name: Launch workflow via tower
uses: seqeralabs/action-tower-launch@v2

# TODO nf-core: You can customise AWS full pipeline tests as required
# Add full size test data (but still relatively small datasets for few samples)
# on the `test_full.config` test runs with only one set of parameters
with:
workspace_id: ${{ secrets.TOWER_WORKSPACE_ID }}
access_token: ${{ secrets.TOWER_ACCESS_TOKEN }}
Expand All @@ -34,7 +36,7 @@ jobs:
}
profiles: test_${{ matrix.mode }}

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: Tower debug log file
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/awstest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
}
profiles: test_tmt

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: Tower debug log file
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/branch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
# 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
uses: mshick/add-pr-comment@b8f338c590a895d50bcbfa6c5859251edc8952fc # v2
with:
message: |
## This PR is against the `master` branch :x:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,16 @@ jobs:
exec_profile: "conda"
steps:
- name: Check out pipeline code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Install Nextflow
uses: nf-core/setup-nextflow@v1
with:
version: "${{ matrix.NXF_VER }}"

- name: Disk space cleanup
uses: jlumbroso/free-disk-space@54081f138730dfa15788a46383842cd2f914a1be # v1.3.1

- name: Install micromamba
if: matrix.exec_profile == 'conda'
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/clean-up.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
issues: write
pull-requests: write
steps:
- uses: actions/stale@v7
- uses: actions/stale@28ca1036281a5e5922ead5184a1bbf96e5fc984e # v9
with:
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."
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."
Expand Down
72 changes: 72 additions & 0 deletions .github/workflows/download_pipeline.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
name: Test successful pipeline download with 'nf-core download'

# Run the workflow when:
# - dispatched manually
# - when a PR is opened or reopened to master branch
# - the head branch of the pull request is updated, i.e. if fixes for a release are pushed last minute to dev.
on:
workflow_dispatch:
inputs:
testbranch:
description: "The specific branch you wish to utilize for the test execution of nf-core download."
required: true
default: "dev"
pull_request:
types:
- opened
branches:
- master
pull_request_target:
branches:
- master

env:
NXF_ANSI_LOG: false

jobs:
download:
runs-on: ubuntu-latest
steps:
- name: Install Nextflow
uses: nf-core/setup-nextflow@v1

- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5
with:
python-version: "3.11"
architecture: "x64"
- uses: eWaterCycle/setup-singularity@931d4e31109e875b13309ae1d07c70ca8fbc8537 # v7
with:
singularity-version: 3.8.3

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install git+https://github.com/nf-core/tools.git@dev

- name: Get the repository name and current branch set as environment variable
run: |
echo "REPO_LOWERCASE=${GITHUB_REPOSITORY,,}" >> ${GITHUB_ENV}
echo "REPOTITLE_LOWERCASE=$(basename ${GITHUB_REPOSITORY,,})" >> ${GITHUB_ENV}
echo "REPO_BRANCH=${{ github.event.inputs.testbranch || 'dev' }}" >> ${GITHUB_ENV}

- name: Download the pipeline
env:
NXF_SINGULARITY_CACHEDIR: ./
run: |
nf-core download ${{ env.REPO_LOWERCASE }} \
--revision ${{ env.REPO_BRANCH }} \
--outdir ./${{ env.REPOTITLE_LOWERCASE }} \
--compress "none" \
--container-system 'singularity' \
--container-library "quay.io" -l "docker.io" -l "ghcr.io" \
--container-cache-utilisation 'amend' \
--download-configuration

- name: Inspect download
run: tree ./${{ env.REPOTITLE_LOWERCASE }}

- name: Run the downloaded pipeline
env:
NXF_SINGULARITY_CACHEDIR: ./
NXF_SINGULARITY_HOME_MOUNT: true
run: nextflow run ./${{ env.REPOTITLE_LOWERCASE }}/$( sed 's/\W/_/g' <<< ${{ env.REPO_BRANCH }}) -stub -profile test,singularity --outdir ./results
72 changes: 53 additions & 19 deletions .github/workflows/fix-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ on:
types: [created]

jobs:
deploy:
fix-linting:
# Only run if comment is on a PR with the main repo, and if it contains the magic keywords
if: >
contains(github.event.comment.html_url, '/pull/') &&
Expand All @@ -13,43 +13,77 @@ jobs:
runs-on: ubuntu-latest
steps:
# Use the @nf-core-bot token to check out so we can push later
- uses: actions/checkout@v3
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
with:
token: ${{ secrets.nf_core_bot_auth_token }}

# indication that the linting is being fixed
- name: React on comment
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4
with:
comment-id: ${{ github.event.comment.id }}
reactions: eyes

# Action runs on the issue comment, so we don't get the PR by default
# Use the gh cli to check out the PR
- name: Checkout Pull Request
run: gh pr checkout ${{ github.event.issue.number }}
env:
GITHUB_TOKEN: ${{ secrets.nf_core_bot_auth_token }}

- uses: actions/setup-node@v3
# Install and run pre-commit
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5
with:
python-version: 3.11

- name: Install Prettier
run: npm install -g prettier @prettier/plugin-php
- name: Install pre-commit
run: pip install pre-commit

# Check that we actually need to fix something
- name: Run 'prettier --check'
id: prettier_status
run: |
if prettier --check ${GITHUB_WORKSPACE}; then
echo "result=pass" >> $GITHUB_OUTPUT
else
echo "result=fail" >> $GITHUB_OUTPUT
fi
- name: Run pre-commit
id: pre-commit
run: pre-commit run --all-files
continue-on-error: true

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

- name: Commit & push changes
if: steps.prettier_status.outputs.result == 'fail'
id: commit-and-push
if: steps.pre-commit.outcome == 'failure'
run: |
git config user.email "[email protected]"
git config user.name "nf-core-bot"
git config push.default upstream
git add .
git status
git commit -m "[automated] Fix linting with Prettier"
git commit -m "[automated] Fix code linting"
git push

- name: react if linting errors were fixed
id: react-if-fixed
if: steps.commit-and-push.outcome == 'success'
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4
with:
comment-id: ${{ github.event.comment.id }}
reactions: hooray

- name: react if linting errors were not fixed
if: steps.commit-and-push.outcome == 'failure'
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4
with:
comment-id: ${{ github.event.comment.id }}
reactions: confused

- name: react if linting errors were not fixed
if: steps.commit-and-push.outcome == 'failure'
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043 # v4
with:
issue-number: ${{ github.event.issue.number }}
body: |
@${{ github.actor }} I tried to fix the linting errors, but it didn't work. Please fix them manually.
See [CI log](https://github.com/nf-core/quantms/actions/runs/${{ github.run_id }}) for more details.
Loading
Loading