Skip to content

Commit

Permalink
Merge branch 'V3/develop' into V3/enhancement/streams_twitchteams
Browse files Browse the repository at this point in the history
  • Loading branch information
palmtree5 committed Apr 1, 2024
2 parents 925c219 + e9ed52c commit ec5e70a
Show file tree
Hide file tree
Showing 1,200 changed files with 225,588 additions and 142,838 deletions.
40 changes: 40 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# Since version 2.23 (released in August 2019), git-blame has a feature
# to ignore or bypass certain commits.
#
# This file contains a list of commits that are not likely what you
# are looking for in a blame, such as mass reformatting or renaming.
# You can set this file as a default ignore file for blame by running
# the following command.
#
# $ git config blame.ignoreRevsFile .git-blame-ignore-revs

# [V3] Update code standards (black code format pass) (#1650)
b88b5a2601f56bda985729352d24842f087a8ade

# Black tests and setup.py (#1657)
e01cdbb0912387749d9459e1d934f9ed393a9b51

# Black formatting for generate_strings.py and docs/conf.py (#1658)
1ecaf6f8d5f2af731bec3eb6ad3a9721ab7a2812

# [V3 Travis] Update travis to not skip pipfile lock... (#1678)
# additional black formatting pass to conform to black 18.5b
d3f406a34a5cae6ea63664e76e8e74be43f9949f

# [V3] Update black version and reformat (#1745)
14cc701b25cea385fd0d537cdb6475d341c017c5

# [V3] Clean up some ugly auto-formatted strings (#1753)
622382f42588ac1d8a52bd3e39bf171c89ff0224

# [CI] Improve automated checks (#2702)
16443c8cc0c24cbc5b3dc7de858edb71b9ca6cd3

# Bump black to 20.8b1 (and reformat) (#4371)
85afe19455f91af21a0f603705eeb5d9599b45cc

# Reformat with Black 22.1.0 (#5633)
c69e8d31fdadbe10230ec0ea2ef35402e5c4cf43

# Reformat with Black 2023 formatting changes
226d8d734de43e1d5ea96a528a8e480641604db1
4 changes: 4 additions & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@

# include commit/tag information in `.git_archive_info.txt` when packing with git-archive
.git_archive_info.txt export-subst

# hide diffs for .po files by default
# https://docs.github.com/en/repositories/working-with-files/managing-files/customizing-how-changed-files-appear-on-github
*.po linguist-generated
35 changes: 22 additions & 13 deletions .github/labeler.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
- "!redbot/cogs/audio/**/locales/*"
# Docs
- docs/cog_guides/audio.rst
# Tests
- tests/cogs/audio/**/*
"Category: Cogs - Bank": [] # historical label for a removed cog
"Category: Cogs - Cleanup":
# Source
Expand All @@ -41,6 +43,8 @@
- redbot/core/dev_commands.py
# Docs
- docs/cog_guides/dev.rst
# Tests
- tests/core/test_dev_commands.py
"Category: Cogs - Downloader":
# Source
- redbot/cogs/downloader/*
Expand Down Expand Up @@ -134,6 +138,11 @@
- redbot/core/bank.py
# Docs
- docs/framework_bank.rst
"Category: Core - API - App Commands Package":
# Source
- redbot/core/app_commands/*
# Tests
- tests/core/test_app_commands.py
"Category: Core - API - Commands Package":
# Source
- any:
Expand All @@ -149,8 +158,8 @@
"Category: Core - API - Config":
# Source
- any:
- redbot/core/drivers/**/*
- "!redbot/core/drivers/**/locales/*"
- redbot/core/_drivers/**/*
- "!redbot/core/_drivers/**/locales/*"
- redbot/core/config.py
# Docs
- docs/framework_config.rst
Expand All @@ -160,14 +169,13 @@
# Source
- redbot/__init__.py
- redbot/core/__init__.py
- redbot/core/cog_manager.py # TODO: privatize cog manager module
- redbot/core/data_manager.py
- redbot/core/errors.py
- redbot/core/tree.py
# Docs
- docs/framework_cogmanager.rst # TODO: privatize cog manager module
- docs/framework_datamanager.rst
- docs/framework_tree.rst
# Tests
- redbot/pytest/cog_manager.py # TODO: privatize cog manager module
- redbot/pytest/data_manager.py
- tests/core/test_cog_manager.py
- tests/core/test_data_manager.py
Expand Down Expand Up @@ -198,8 +206,8 @@
"Category: Core - Command-line Interfaces":
- redbot/__main__.py
- redbot/logging.py
- redbot/core/_cli.py
- redbot/core/_debuginfo.py
- redbot/core/cli.py
- redbot/setup.py
"Category: Core - Help":
- redbot/core/commands/help.py
Expand All @@ -218,18 +226,20 @@
- docs/framework_modlog.rst
"Category: Core - Other Internals":
# Source
- redbot/core/_cog_manager.py
- redbot/core/_events.py
- redbot/core/_global_checks.py
- redbot/core/_settings_caches.py
- redbot/core/_sharedlibdeprecation.py
- redbot/core/events.py
- redbot/core/global_checks.py
- redbot/core/settings_caches.py
- redbot/core/utils/_internal_utils.py
# Tests
- redbot/pytest/__init__.py
- redbot/pytest/cog_manager.py
- redbot/pytest/core.py
- tests/core/test_installation.py
"Category: Core - RPC/ZMQ":
# Source
- redbot/core/rpc.py
- redbot/core/_rpc.py
# Docs
- docs/framework_rpc.rst
# Tests
Expand All @@ -244,12 +254,14 @@
"Category: Docs - Changelogs":
- CHANGES.rst
- docs/changelog.rst
- docs/incompatible_changes/**/*
"Category: Docs - For Developers":
- docs/framework_events.rst
- docs/guide_cog_creation.rst
- docs/guide_cog_creators.rst
- docs/guide_migration.rst
- docs/guide_publish_cogs.rst
- docs/guide_slash_and_interactions.rst
"Category: Docs - Install Guides":
- docs/about_venv.rst
- docs/autostart_*.rst
Expand Down Expand Up @@ -295,9 +307,6 @@
- docs/_templates/**/*
# empty file
- redbot/cogs/__init__.py
# can't go more meta than that :)
# TODO: remove this useless file
- redbot/meta.py
# py.typed file
- redbot/py.typed
# requirements files
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/crowdin_upload_strings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
curl https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -
echo "deb https://artifacts.crowdin.com/repo/deb/ /" | sudo tee -a /etc/apt/sources.list
sudo apt-get update -qq
sudo apt-get install -y crowdin
sudo apt-get install -y crowdin3
pip install redgettext==3.4.2
- name: Generate source files
run: |
Expand All @@ -28,5 +28,5 @@ jobs:
run: |
make upload_translations
env:
CROWDIN_API_KEY: ${{ secrets.crowdin_token}}
CROWDIN_PROJECT_ID: ${{ secrets.crowdin_identifier }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_IDENTIFIER }}
10 changes: 5 additions & 5 deletions .github/workflows/prepare_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
curl https://artifacts.crowdin.com/repo/GPG-KEY-crowdin | sudo apt-key add -
echo "deb https://artifacts.crowdin.com/repo/deb/ /" | sudo tee -a /etc/apt/sources.list
sudo apt-get update -qq
sudo apt-get install -y crowdin
sudo apt-get install -y crowdin3
pip install redgettext==3.4.2
- name: Generate source files
Expand All @@ -36,20 +36,20 @@ jobs:
run: |
make download_translations
env:
CROWDIN_API_KEY: ${{ secrets.crowdin_token}}
CROWDIN_PROJECT_ID: ${{ secrets.crowdin_identifier }}
CROWDIN_PERSONAL_TOKEN: ${{ secrets.CROWDIN_PERSONAL_TOKEN }}
CROWDIN_PROJECT_ID: ${{ secrets.CROWDIN_IDENTIFIER }}

- name: Create Pull Request
id: cpr_crowdin
uses: peter-evans/create-pull-request@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Automated Crowdin downstream
title: "[i18n] Automated Crowdin downstream"
title: "Automated Crowdin downstream"
body: |
This is an automated PR that is part of Prepare Release automated workflow (2 out of 2).
Please ensure that there are no errors or invalid files are in the PR.
labels: "Automated PR, Category: i18n, Changelog Entry: Skipped"
labels: "Automated PR, Changelog Entry: Skipped"
branch: "automated/i18n"
author: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
milestone: ${{ needs.pr_stable_bump.outputs.milestone_number }}
Expand Down
55 changes: 42 additions & 13 deletions .github/workflows/publish_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Publish Release
on:
push:
tags:
- "*"
- "3.[0-9]+.[0-9]+"

jobs:
release_information:
Expand Down Expand Up @@ -53,28 +53,57 @@ jobs:
echo 'Continuing...'
fi
release_to_pypi:
needs: release_information
environment: Release
name: Release to PyPI
build:
name: Build package
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.8'

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build twine
- name: Build and publish
env:
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.pypi_token }}
run: |
python -m build
twine upload dist/*
python -m pip install --upgrade build twine
- name: Build
run: python -m build
- name: Check built distributions
run: python -m twine check dist/*

- name: Upload packaged distributions
uses: actions/upload-artifact@v3
with:
name: build-output
path: ./dist

release_to_pypi:
needs:
- release_information
- build
environment: Release
name: Release to PyPI
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- name: Download packaged distributions
uses: actions/download-artifact@v3
with:
name: build-output
path: dist/

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
# This is already checked during the build.
verify-metadata: false
# Allow security-minded people to verify whether the files on PyPI
# were automatically uploaded by a CI script.
print-hash: true

pr_dev_bump:
permissions:
Expand Down
23 changes: 19 additions & 4 deletions .github/workflows/run_pip_compile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,27 @@ jobs:
- name: Set up Python 3.8.
uses: actions/setup-python@v4
with:
python-version: '3.8'
python-version: |
3.11
3.10
3.9
3.8
- name: Install dependencies
- name: Install dependencies on Linux/macOS
if: matrix.os != 'windows-latest'
run: |
python3.11 -m pip install -U pip pip-tools
python3.10 -m pip install -U pip pip-tools
python3.9 -m pip install -U pip pip-tools
python3.8 -m pip install -U pip pip-tools
- name: Install dependencies on Windows
if: matrix.os == 'windows-latest'
run: |
python -m pip install -U pip
python -m pip install -U pip-tools
py -3.11 -m pip install -U pip pip-tools
py -3.10 -m pip install -U pip pip-tools
py -3.9 -m pip install -U pip pip-tools
py -3.8 -m pip install -U pip pip-tools
- name: Generate requirements files.
id: compile_requirements
Expand Down
24 changes: 17 additions & 7 deletions .github/workflows/scripts/compile_requirements.py
Original file line number Diff line number Diff line change
@@ -1,35 +1,45 @@
import os
import re
import shutil
import subprocess
import sys
from pathlib import Path


EXCLUDE_STEM_RE = re.compile(r".*-3\.(?!8-)(\d+)-extra-(doc|style)")
GITHUB_OUTPUT = os.environ["GITHUB_OUTPUT"]
REQUIREMENTS_FOLDER = Path(__file__).parents[3].absolute() / "requirements"
os.chdir(REQUIREMENTS_FOLDER)


def pip_compile(name: str) -> None:
def pip_compile(version: str, name: str) -> None:
stem = f"{sys.platform}-{version}-{name}"
if EXCLUDE_STEM_RE.fullmatch(stem):
return

executable = ("py", f"-{version}") if sys.platform == "win32" else (f"python{version}",)
subprocess.check_call(
(
sys.executable,
*executable,
"-m",
"piptools",
"compile",
"--upgrade",
"--resolver=backtracking",
"--verbose",
f"{name}.in",
"--output-file",
f"{sys.platform}-{name}.txt",
f"{stem}.txt",
)
)


pip_compile("base")
shutil.copyfile(f"{sys.platform}-base.txt", "base.txt")
for file in REQUIREMENTS_FOLDER.glob("extra-*.in"):
pip_compile(file.stem)
for minor in range(8, 11 + 1):
version = f"3.{minor}"
pip_compile(version, "base")
shutil.copyfile(f"{sys.platform}-{version}-base.txt", "base.txt")
for file in REQUIREMENTS_FOLDER.glob("extra-*.in"):
pip_compile(version, file.stem)

with open(GITHUB_OUTPUT, "a", encoding="utf-8") as fp:
fp.write(f"sys_platform={sys.platform}\n")
Loading

0 comments on commit ec5e70a

Please sign in to comment.