Skip to content

Commit

Permalink
updated files to match editorconfig linting
Browse files Browse the repository at this point in the history
  • Loading branch information
wsjung committed Feb 13, 2024
1 parent 64b33a0 commit 4171993
Show file tree
Hide file tree
Showing 35 changed files with 325 additions and 380 deletions.
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@v2
with:
message: |
## This PR is against the `master` branch :x:
Expand Down
61 changes: 11 additions & 50 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,61 +11,22 @@ on:
types: [published]

jobs:
EditorConfig:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4

- name: Install editorconfig-checker
run: npm install -g editorconfig-checker

- name: Run ECLint check
run: editorconfig-checker -exclude README.md $(find .* -type f | grep -v '.git\|.py\|.md\|json\|yml\|yaml\|html\|css\|work\|.nextflow\|build\|nf_core.egg-info\|log.txt\|Makefile')

Prettier:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: actions/setup-node@v4

- name: Install Prettier
run: npm install -g prettier

- name: Run Prettier --check
run: prettier --check ${GITHUB_WORKSPACE}

PythonBlack:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Check code lints with Black
uses: psf/black@stable

# If the above check failed, post a comment on the PR explaining the failure
- name: Post PR comment
if: failure()
uses: mshick/add-pr-comment@v1
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
message: |
## Python linting (`black`) is failing
To keep the code consistent with lots of contributors, we run automated code consistency checks.
To fix this CI test, please run:
* Install [`black`](https://black.readthedocs.io/en/stable/): `pip install black`
* Fix formatting errors in your pipeline: `black .`
Once you push these changes the test should pass, and you can hide this comment :+1:
python-version: 3.11
cache: "pip"

We highly recommend setting up Black in your code editor so that this formatting is done automatically on save. Ask about it on Slack for help!
- name: Install pre-commit
run: pip install pre-commit

Thanks again for your contribution!
repo-token: ${{ secrets.GITHUB_TOKEN }}
allow-repeats: false
- name: Run pre-commit
run: pre-commit run --all-files

nf-core:
runs-on: ubuntu-latest
Expand All @@ -76,7 +37,7 @@ jobs:
- name: Install Nextflow
uses: nf-core/setup-nextflow@v1

- uses: actions/setup-python@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
architecture: "x64"
Expand All @@ -99,7 +60,7 @@ jobs:

- name: Upload linting log file artifact
if: ${{ always() }}
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: linting-logs
path: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/linting_comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download lint results
uses: dawidd6/action-download-artifact@v2
uses: dawidd6/action-download-artifact@v3
with:
workflow: linting.yml
workflow_conclusion: completed
Expand Down
4 changes: 4 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"tabWidth": 4,
"useTabs": false
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c)
Copyright (c)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ Now, you can run the pipeline using:

```bash
nextflow run nf-core/omicsgenetraitassociation \
-profile <docker/singularity/.../institute> \
--input samplesheet.csv \
--outdir <OUTDIR>
-profile <docker/singularity/.../institute> \
--input samplesheet.csv \
--outdir <OUTDIR>
```

> [!WARNING]
Expand Down
2 changes: 1 addition & 1 deletion assets/email_template.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

<img src="cid:nfcorepipelinelogo">

<h1>nf-core/omicsgenetraitassociation v${version}</h1>
<h1>nf-core/omicsgenetraitassociation ${version}</h1>
<h2>Run Name: $runName</h2>

<% if (!success){
Expand Down
2 changes: 1 addition & 1 deletion assets/email_template.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
|\\ | |__ __ / ` / \\ |__) |__ } {
| \\| | \\__, \\__/ | \\ |___ \\`-._,-`-,
`._,._,'
nf-core/omicsgenetraitassociation v${version}
nf-core/omicsgenetraitassociation ${version}
----------------------------------------------------
Run Name: $runName

Expand Down
Binary file modified assets/nf-core-omicsgenetraitassociation_logo_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions conf/cma_mea.config
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ process {


singularity {
enabled = true
autoMounts = true
cacheDir = "singularity_images"
enabled = true
autoMounts = true
cacheDir = "singularity_images"
}

conda.enabled = true
Expand Down
131 changes: 55 additions & 76 deletions conf/modules.config
Original file line number Diff line number Diff line change
Expand Up @@ -19,79 +19,79 @@ process {
]

withName: MMAP {
publishDir = [
path: { "${params.outdir}/mmap/mmap" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.endsWith('.poly.cov.csv') ? filename : null }
]
publishDir = [
path: { "${params.outdir}/mmap/mmap" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.endsWith('.poly.cov.csv') ? filename : null }
]
}

withName: MMAP_PARSE {
publishDir = [
path: { "${params.outdir}/mmap" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.startsWith('parsed_output_') ? filename : null }
]
publishDir = [
path: { "${params.outdir}/mmap" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.startsWith('parsed_output_') ? filename : null }
]
}

withName: PREPROCESS_PASCAL {
publishDir = [
path: { "${params.outdir}/mea" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
publishDir = [
path: { "${params.outdir}/mea" },
mode: params.publish_dir_mode,
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

withName: RUN_PASCAL {
publishDir = [
path: { "${params.outdir}/mea" },
mode: params.publish_dir_mode,
saveAs: { filename ->
if (filename.equals('versions.yml')) { null }
else if (filename.startsWith('GO_')) { null }
else if (filename.startsWith('GS_')) { null }
else { filename }
}
]
publishDir = [
path: { "${params.outdir}/mea" },
mode: params.publish_dir_mode,
saveAs: { filename ->
if (filename.equals('versions.yml')) { null }
else if (filename.startsWith('GO_')) { null }
else if (filename.startsWith('GS_')) { null }
else { filename }
}
]
}

withName: POSTPROCESS_PASCAL {
publishDir = [
path: { "${params.outdir}/mea" },
mode: params.publish_dir_mode,
saveAs: { filename ->
if (filename.equals('versions.yml')) { null }
else if (filename.startsWith('GO_')) { null }
else if (filename.startsWith('GS_')) { null }
else { filename }
}
]
publishDir = [
path: { "${params.outdir}/mea" },
mode: params.publish_dir_mode,
saveAs: { filename ->
if (filename.equals('versions.yml')) { null }
else if (filename.startsWith('GO_')) { null }
else if (filename.startsWith('GS_')) { null }
else { filename }
}
]
}

withName: GO_ANALYSIS {
publishDir = [
path: { "${params.outdir}/mea/" },
mode: params.publish_dir_mode,
saveAs: { filename ->
if (filename.equals('versions.yml')) { null }
else if (filename.endsWith(".txt")) { null }
else if (filename.startsWith('GS_')) { null }
else { filename }
publishDir = [
path: { "${params.outdir}/mea/" },
mode: params.publish_dir_mode,
saveAs: { filename ->
if (filename.equals('versions.yml')) { null }
else if (filename.endsWith(".txt")) { null }
else if (filename.startsWith('GS_')) { null }
else { filename }
}
]
}
]
}

withName: MERGE_ORA_AND_SUMMARY {
publishDir = [
path: { "${params.outdir}/mea/" },
mode: params.publish_dir_mode,
saveAs: { filename ->
if (filename.equals('versions.yml')) { null }
else if (filename.startsWith('GO_')) { null }
else if (filename.startsWith('GS_')) { null }
else { filename }
}
]
publishDir = [
path: { "${params.outdir}/mea/" },
mode: params.publish_dir_mode,
saveAs: { filename ->
if (filename.equals('versions.yml')) { null }
else if (filename.startsWith('GO_')) { null }
else if (filename.startsWith('GS_')) { null }
else { filename }
}
]
}

withName: SAMPLESHEET_CHECK {
Expand All @@ -101,25 +101,4 @@ process {
saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
]
}

//withName: FASTQC {
// ext.args = '--quiet'
//}

//withName: CUSTOM_DUMPSOFTWAREVERSIONS {
// publishDir = [
// path: { "${params.outdir}/pipeline_info" },
// mode: params.publish_dir_mode,
// pattern: '*_versions.yml'
// ]
//}

//withName: 'MULTIQC' {
// ext.args = { params.multiqc_title ? "--title \"$params.multiqc_title\"" : '' }
// publishDir = [
// path: { "${params.outdir}/multiqc" },
// mode: params.publish_dir_mode,
// saveAs: { filename -> filename.equals('versions.yml') ? null : filename }
// ]
//}
}
Binary file modified docs/images/nf-core-omicsgenetraitassociation_logo_dark.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/nf-core-omicsgenetraitassociation_logo_light.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 4171993

Please sign in to comment.