Skip to content

Commit

Permalink
Upgrade tooling
Browse files Browse the repository at this point in the history
  • Loading branch information
mondeja committed May 11, 2022
1 parent 7e3e8bb commit 11bd433
Show file tree
Hide file tree
Showing 6 changed files with 38 additions and 39 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Expand Up @@ -30,11 +30,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -45,7 +45,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -59,4 +59,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
22 changes: 11 additions & 11 deletions .github/workflows/format_check.yml
Expand Up @@ -8,28 +8,28 @@ jobs:
runs-on: ubuntu-latest
name: Black
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
- name: Black
uses: psf/black@20.8b1 # already includes args "--check --diff"
uses: psf/black@22.3.0 # already includes args "--check --diff"
flake8:
runs-on: ubuntu-latest
name: Flake8
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: 3.9
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade wheel pip
pip install .[lint]
- name: Lint examples
run: flake8 examples --show-source
- name: Lint scripts
run: flake8 setup.py docs/conf.py --show-source
run: flake8 setup.py docs/conf.py scripts --show-source
- name: Lint tests
run: flake8 tests --show-source
- name: Lint moviepy
Expand All @@ -38,14 +38,14 @@ jobs:
runs-on: ubuntu-latest
name: isort
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: '3.x'
python-version: '3.9'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install isort
- name: Check imports
run: isort --check-only moviepy tests examples docs/conf.py
run: isort --check-only moviepy tests examples docs/conf.py scripts
20 changes: 7 additions & 13 deletions .github/workflows/test_suite.yml
Expand Up @@ -3,13 +3,7 @@

name: Run Test Suite

on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
on: [push, pull_request]

jobs:
# Uses Python Framework build because on macos matplotlib requires it
Expand All @@ -19,7 +13,7 @@ jobs:
matrix:
python-version: [3.7]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- uses: s-weigand/setup-conda@v1
with:
activate-conda: true
Expand Down Expand Up @@ -70,15 +64,15 @@ jobs:
python-version: [3.6, 3.7, 3.8, 3.9]
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

- name: Get ImageMagick installer from cache
id: imagemagick-installer-cache
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: |
ImageMagick.exe
Expand Down Expand Up @@ -135,9 +129,9 @@ jobs:
python-version: [3.6, 3.7, 3.8, 3.9]
fail-fast: false
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}

Expand Down
12 changes: 7 additions & 5 deletions .pre-commit-config.yaml
@@ -1,22 +1,24 @@
repos:
- repo: https://github.com/PyCQA/flake8
rev: 3.9.2
rev: 4.0.1
hooks:
- id: flake8
additional_dependencies:
- flake8-implicit-str-concat
- flake8-absolute-import
- flake8-absolute-import>=1.0
- flake8-docstrings>=1.6.0
- flake8-rst-docstrings>=0.2.5
- flake8-implicit-str-concat==0.3.0
name: flake8-test
files: \.py$
- repo: https://github.com/PyCQA/isort
rev: 5.8.0
rev: 5.10.1
hooks:
- id: isort
args:
- '--filter-files'
files: \.py$
- repo: https://github.com/psf/black
rev: 20.8b1
rev: 22.3.0
hooks:
- id: black
language_version: python3.6
Expand Down
3 changes: 3 additions & 0 deletions scripts/get-latest-imagemagick-win.py
@@ -1,6 +1,9 @@
"""Obtain the latest ImageMagick version from official repositories."""

import sys
from urllib.request import urlopen


BINARIES_URL = "https://download.imagemagick.org/ImageMagick/download/binaries/"

content = urlopen(BINARIES_URL).read().decode("utf-8")
Expand Down
12 changes: 6 additions & 6 deletions setup.py
Expand Up @@ -104,13 +104,13 @@ def run_tests(self):
]

lint_reqs = [
"black>=20.8b1",
"flake8>3.7.0,<4.0.0",
"black>=22.3.0",
"flake8>=4.0.1",
"flake8-absolute-import>=1.0",
"flake8-docstrings>=1.5.0",
"flake8-rst-docstrings>=0.0.14",
"flake8-implicit-str-concat==0.2.0",
"isort>=5.7.0",
"flake8-docstrings>=1.6.0",
"flake8-rst-docstrings>=0.2.5",
"flake8-implicit-str-concat==0.3.0",
"isort>=5.10.1",
"pre-commit>=2.9.3",
]

Expand Down

0 comments on commit 11bd433

Please sign in to comment.