Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
davidecarlson authored Sep 16, 2024
2 parents 3bff2fe + a43a1ea commit 0aab705
Show file tree
Hide file tree
Showing 384 changed files with 10,669 additions and 3,932 deletions.
109 changes: 109 additions & 0 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -0,0 +1,109 @@
**/abims** @lecorguille
**/adcra** @kalayaneech
**/alice** @bbartholdy
**/apollo** @drejom
**/aws_tower** @ggabernet
**/awsbatch** @apeltzer
**/azurebatch** @adamrtalbot
**/azurebatchdev** @abhi18av
**/bi** @apeltzer
**/bigpurple** @tobsecret
**/binac** @apeltzer
**/biohpc_gen** @phue
**/biowulf** @qiyubio
**/cambridge** @EmelineFavreau
**/cbe** @phue
**/ccga_dx** @marchoeppner
**/ccga_med** @marchoeppner
**/cedars** @rajewski
**/ceres** @MillironX
**/cfc** @FriederikeHanssen
**/cfc_dev** @FriederikeHanssen
**/cheaha** @lianov @atrull314
**/computerome** @marcmtk
**/crg** @joseespinosa
**/crick** @chris-cheshire @ChristopherBarrington
**/crukmi** @sppearce
**/czbiohub_aws** @olgabot
**/denbi_qbic** @apeltzer
**/dkfz** @kubranarci
**/ebc** @marcel-keller
**/ebi_codon** @saulpierotti
**/ebi_codon_slurm** @saulpierotti
**/eddie** @ameynert
**/engaging** @PhilPalmer
**/ethz_euler** @jpadesousa
**/eva** @jfy133
**/fgcz** @zajacn
**/fub_curta** @wassimsalam01
**/genotoul** @chklopp
**/genouest** @abretaud
**/gis** @andreas-wilm
**/google** @FIXME
**/googlebatch** @hnawar
**/googlels** @hnawar
**/hki** @jfy133
**/hypatia** @lusacristan
**/icr_davros** @adrlar
**/ifb_core** @FIXME
# **imperial** @FIXME
# **incliva** @FIXME
# **ipop_up** @FIXME
# **janelia** @FIXME
**/jax** @flynnb
# **ku_sund_dangpu** @FIXME
# **leicester** @FIXME
**/lugh** @BarryDigby
**/maestro** @pierrespc
# **mana** @FIXME
# **marvin** @FIXME
# **medair** @FIXME
**/mjolnir_globe** @ashildv
**/mpcdf** @jfy133
**/munin** @praveenraj2018 @maxulysse
**/nci_gadi** @mattdton
**/nu_genomics** @RoganGrant @NUjon
# **oist** @FIXME
**/pasteur** @rplanel
**/pawsey_nimbus** @marcodelapierre @SarahBeecroft
**/pawsey_setonix** @georgiesamaha @SarahBeecroft
**/pdc_kth** @pontus
**/phoenix** @apeltzer
**/uppmax** @ewels @MaxUlysse
**/demultiplex** @nf-core/demultiplex
**/azurebatch_pools_Edv4** @vsmalladi
# **icr_davros** @FIXME
**/hasta** @sofstam
**/psmn** @l-modolo
**/rosalind** @theoportlock
**/rosalind_uge** @gregorysprenger
**/sage** @BrunoGrandePhD
# **sahmri** @FIXME
**/ilifu** @pvanheus
**/sanger** @priyanka-surana
# **scw** @FIXME
**/seawulf** @davidecarlson
**/seg_globe** @ashildv
**/software_license** @maxulysse
**/tigem** @giusmar
**/tubingen_apg** @sc13-bioinf
# **tuos_stanage** @FIXME
**/ucd_sonic** @brucemoran
# **ucl_myriad** @FIXME
**/uct_hpc** @kviljoen
**/uge** @gregorysprenger
**/unc_lccc** @alanhoyle
**/unc_longleaf** @ahepperla
# **unibe_ibu** @FIXME
# **/uod_hpc** @FIXME
**/utd_ganymede** @edmundmiller @alyssa-ab
**/uw_hyak_pedslabs** @CarsonJM
**/uzh** @apeltzer
**/vai** @njspix
# **/vsc_kul_uhasselt** @FIXME
**/vsc_ugent** @nvnieuwk @matthdsm
**/wcm** @DoaneAS
# **/wehi** @FIXME
# **/wustl_htcf** @FIXME
# **/xanadu** @FIXME
**/tufts** @zhan4429
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ Steps for adding a new config profile:
- [ ] Add your profile name to the `profile:` scope in `.github/workflows/main.yml`

<!--
If you require/still waiting for a review, please feel free to request from @nf-core/configs-team
If you require/still waiting for a review, please feel free to request a review from @nf-core/maintainers
Please see uploading to`nf-core/configs` for more details:
https://github.com/nf-core/configs#uploading-to-nf-coreconfigs
Expand Down
22 changes: 22 additions & 0 deletions .github/generate_codeowners.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/usr/bin/env bash

CONFIGS=$(fd . -e .config 'conf/')

output_file=".github/CODEOWNERS"
rm $output_file

for file in $CONFIGS; do
# Get the line of the file that starts with config_profile_contact
line=$(rg "config_profile_contact" "$file")
# and then get the username after the @ and remove anything after it
username=$(echo "$line" | sed 's/^.*@/@/g')
# Remove the )'
username=$(echo "$username" | sed 's/).*$//g')

# Get the insitute name
# conf/<institute>.config
institute=$(echo "$file" | sed 's/^.*\///g' | sed 's/\.config$//g')

# # Remove quotes from authors
echo "**$institute**" $username >> $output_file
done
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@v2
# 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 "::set-output name=result::pass"
else
echo "::set-output name=result::fail"
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/configs/actions/runs/${{ github.run_id }}) for more details.
27 changes: 13 additions & 14 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
name: Code Linting
name: Lint tools code formatting
on:
pull_request:
push:
branches:
- master
pull_request:

# Cancel if a newer run is started
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
prettier:
pre-commit:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Check out repository
uses: actions/checkout@v2

- name: Install NodeJS
uses: actions/setup-node@v2

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

- name: Run Prettier --check
run: prettier --check ${GITHUB_WORKSPACE}
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
- uses: actions/setup-python@0a5c61591373683505ea898e09a3ea4f39ef2b9c # v5
- uses: pre-commit/[email protected]
28 changes: 28 additions & 0 deletions .github/workflows/linting_comment.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: nf-core linting comment
# This workflow is triggered after the linting action is complete
# It posts an automated comment to the PR, even if the PR is coming from a fork {%- raw %}

on:
workflow_run:
workflows: ["nf-core linting"]

jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Download lint results
uses: dawidd6/action-download-artifact@f6b0bace624032e30a85a8fd9c1a7f8f611f5737 # v3
with:
workflow: linting.yml
workflow_conclusion: completed

- name: Get PR number
id: pr_number
run: echo "pr_number=$(cat linting-logs/PR_number.txt)" >> $GITHUB_OUTPUT

- name: Post PR comment
uses: marocchino/sticky-pull-request-comment@331f8f5b4215f0445d3c07b4967662a32a2d3e31 # v2
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
number: ${{ steps.pr_number.outputs.pr_number }}
path: linting-logs/lint_results.md
Loading

0 comments on commit 0aab705

Please sign in to comment.