Skip to content

Commit

Permalink
Merge pull request #1998 from mashehu/update-deps
Browse files Browse the repository at this point in the history
fix deprecation warnings for python and github actions
  • Loading branch information
mashehu authored Nov 4, 2022
2 parents 71556eb + ca63f06 commit 15b2066
Show file tree
Hide file tree
Showing 10 changed files with 22 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/create-lint-wf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ jobs:
version: ${{ matrix.NXF_VER }}

# Install the Prettier linting tools
- uses: actions/setup-node@v2
- uses: actions/setup-node@v3

- name: Install Prettier
run: npm install -g prettier
Expand Down Expand Up @@ -121,7 +121,7 @@ jobs:

- name: Upload log file artifact
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: nf-core-log-file
path: log.txt
2 changes: 1 addition & 1 deletion .github/workflows/create-test-wf.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
- name: Upload log file artifact
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: nf-core-log-file
path: log.txt
6 changes: 3 additions & 3 deletions .github/workflows/fix-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.nf_core_bot_auth_token }}

- uses: actions/setup-node@v2
- uses: actions/setup-node@v3

- name: Install Prettier
run: npm install -g prettier @prettier/plugin-php
Expand All @@ -39,11 +39,11 @@ jobs:
options: "--color"

- name: Set up Python 3.8
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: python-isort
uses: isort/isort-action@v0.1.0
uses: isort/isort-action@v1.0.0
with:
isortVersion: "latest"
requirementsFiles: "requirements.txt requirements-dev.txt"
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/lint-code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v2
- uses: actions/setup-node@v3

- name: Install editorconfig-checker
run: npm install -g editorconfig-checker
Expand All @@ -32,7 +32,7 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v2
- uses: actions/setup-node@v3

- name: Install Prettier
run: npm install -g prettier
Expand Down Expand Up @@ -77,11 +77,11 @@ jobs:
uses: actions/checkout@v3

- name: Set up Python 3.8
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: 3.8
- name: python-isort
uses: isort/isort-action@v0.1.0
uses: isort/isort-action@v1.0.0
with:
isortVersion: "latest"
requirementsFiles: "requirements.txt requirements-dev.txt"
4 changes: 2 additions & 2 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
else
curl -O https://nf-co.re/pipeline_names.json
fi
echo "::set-output name=matrix::$(cat pipeline_names.json)"
echo "name=matrix::$(cat pipeline_names.json)" >> $GITHUB_OUTPUT
sync:
needs: get-pipelines
Expand Down Expand Up @@ -78,7 +78,7 @@ jobs:
- name: Upload sync log file artifact
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: sync_log_${{ matrix.pipeline }}
path: sync_log_${{ matrix.pipeline }}.txt
4 changes: 2 additions & 2 deletions nf_core/create.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
organization's specification based on a template.
"""
import configparser
import imghdr
import logging
import os
import random
Expand All @@ -13,6 +12,7 @@
import time
from pathlib import Path

import filetype
import git
import jinja2
import questionary
Expand Down Expand Up @@ -492,7 +492,7 @@ def download_pipeline_logo(self, url, img_fn):
with open(img_fn, "wb") as fh:
fh.write(r.content)
# Check that the file looks valid
image_type = imghdr.what(img_fn)
image_type = filetype.guess(img_fn).extension
if image_type != "png":
log.error(f"Logo from the website didn't look like an image: '{image_type}'")
continue
Expand Down
6 changes: 3 additions & 3 deletions nf_core/pipeline-template/.github/workflows/fix-linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ secrets.nf_core_bot_auth_token }}

- uses: actions/setup-node@v2
- uses: actions/setup-node@v3

- name: Install Prettier
run: npm install -g prettier @prettier/plugin-php
Expand All @@ -34,9 +34,9 @@ jobs:
id: prettier_status
run: |
if prettier --check ${GITHUB_WORKSPACE}; then
echo "::set-output name=result::pass"
echo "name=result::pass" >> $GITHUB_OUTPUT
else
echo "::set-output name=result::fail"
echo "name=result::fail" >> $GITHUB_OUTPUT
fi
- name: Run 'prettier --write'
Expand Down
6 changes: 3 additions & 3 deletions nf_core/pipeline-template/.github/workflows/linting.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v2
- uses: actions/setup-node@v3

- name: Install editorconfig-checker
run: npm install -g editorconfig-checker
Expand All @@ -29,7 +29,7 @@ jobs:
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v2
- uses: actions/setup-node@v3

- name: Install Prettier
run: npm install -g prettier
Expand Down Expand Up @@ -99,7 +99,7 @@ jobs:

- name: Upload linting log file artifact
if: ${{ always() }}
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: linting-logs
path: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:

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

- name: Post PR comment
uses: marocchino/sticky-pull-request-comment@v2
Expand Down
1 change: 1 addition & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
click
filetype
galaxy-tool-util
GitPython
jinja2
Expand Down

0 comments on commit 15b2066

Please sign in to comment.