Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into i869-default-stream
Browse files Browse the repository at this point in the history
  • Loading branch information
bzczb committed Jan 31, 2025
2 parents 858584d + d0513ae commit 924df2d
Show file tree
Hide file tree
Showing 530 changed files with 12,337 additions and 8,383 deletions.
15 changes: 13 additions & 2 deletions .github/ISSUE_TEMPLATE/bug-report.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ You can format code by putting ``` (that's 3 backticks) on a line by itself at t
from moviepy import *
clip = ColorClip((600, 400), color=(255, 100, 0), duration=2)
```
Please, include runnable working example of code that can trigger the bug so we can easily reproduce and investigate the bug.
-->


Expand All @@ -23,8 +25,17 @@ clip = ColorClip((600, 400), color=(255, 100, 0), duration=2)
#### Actual Behavior


#### Steps to Reproduce the Problem
<!-- Please include code that demonstrates this problem so that we can reproduce it. For advice on how to do this, see https://stackoverflow.com/help/mcve -->
#### Steps and code to Reproduce the Problem
<!-- Please include code that demonstrates this problem so that we can reproduce it. For advice on how to do this, see https://stackoverflow.com/help/mcve
It's higlhy helpfull if you can provide an exact and complete code reproducing the bug, *along with all necessary medias (videos, images, sounds, etc.).*
Ideally you should provide a functional code snippet that maintainers can run to investigate the bug.
-->


#### Used medias
<!-- If you use any external media in the code triggering the bug, please include them in this issue so we can easily reproduce -->


#### Specifications
Expand Down
4 changes: 2 additions & 2 deletions .github/ISSUE_TEMPLATE/question.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
---
name: Question
about: Ask a question about how to use MoviePy
about: Ask a question about an unexpected behavior of MoviePy
title: ''
labels: question
assignees: ''

---

<!--
Hello! If you think that it is a simple problem, then consider asking instead on our Gitter channel: https://gitter.im/movie-py/. This makes it easier to have a back-and-forth discussion in real-time.
If possible, please prioritize using discussions (https://github.com/Zulko/moviepy/discussions) or online forums for asking questions on how to use MoviePy, issues should be used mainly for questions about a specific behavior that seem incoherent and could possibly be a bug.
--------------------
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build and Deploy Sphinx Documentation

on:
push:
branches:
- master # Change to your default branch if needed

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x' # Specify Python version as needed

- name: Build v1.0.3 documentation
run: |
git fetch --tags
git checkout v1.0.3
pip install "jinja2<3" "MarkupSafe<2" "alabaster==0.7.12"
pip install -e .
pip install -e ".[doc]"
cd docs
make html
mkdir -p ../build/html/v1.0.3
cp -r build/html/* ../build/html/v1.0.3/
rm -rf build/html
git stash
- name: Install dependencies
run: |
git checkout master
python -m pip install --upgrade pip
pip install -e .
pip install -e .[doc]
- name: Build current documentation
run: |
cd docs
make html
cp -r build/html/* ../build/html/
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build/html/ # Adjusted path since we're copying docs to root build directory
16 changes: 5 additions & 11 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,4 @@
# For most projects, this workflow file will not need changing; you simply need
# to commit it to your repository.
#
# You may wish to alter this file to override the set of languages analyzed,
# or to provide custom queries or build logic.
name: "CodeQL"
name: Code scanning with CodeQL

on:
push:
Expand All @@ -18,7 +13,6 @@ jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest

strategy:
fail-fast: false
matrix:
Expand All @@ -30,11 +24,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4.1.6

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
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 +39,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@v2
uses: github/codeql-action/autobuild@v3

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

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
55 changes: 0 additions & 55 deletions .github/workflows/format_check.yml

This file was deleted.

69 changes: 69 additions & 0 deletions .github/workflows/formatting_linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# SPDX-FileCopyrightText: 2024 K Kollmann
# SPDX-License-Identifier: MIT

name: Code formatting and linting

on:
pull_request:
push:
branches:
- master
- main
workflow_dispatch:

env:
PYTHON_VERSION: "3.9"

jobs:
black:
name: Black code formatter
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4.1.6
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Run Black
uses: psf/black@24.4.2
with:
options: "--version --check --diff --color" # default: "--check --diff"

flake8:
name: Flake8 linter
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4.1.6
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python environment – ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5.1.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
python -m pip install --upgrade wheel pip
pip install .[lint]
- name: Show Flake8 version
run: flake8 --version
- name: Run Flake8
run: flake8 -v --show-source --max-line-length=92 moviepy docs/conf.py examples tests

isort:
name: isort import sorter
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v4.1.6
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Set up Python environment – ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v5.1.0
with:
python-version: ${{ env.PYTHON_VERSION }}
- name: Install dependencies
run: |
python -m pip install --upgrade wheel pip
pip install .[lint]
- name: Run isort
run: isort --check-only --diff moviepy scripts docs/conf.py examples tests
32 changes: 32 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish to PyPI

on:
release:
types: [published]
workflow_dispatch:
inputs:

permissions:
contents: read

jobs:
deploy:
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- name: Install dependencies
run: |
pip install setuptools wheel build
- name: Build
run: |
python -m build
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
Loading

0 comments on commit 924df2d

Please sign in to comment.