Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
cooldown:
default-days: 12

# - package-ecosystem: "pip"
# directory: "/"
# schedule:
# interval: "weekly"
55 changes: 29 additions & 26 deletions .github/workflows/build_and_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,29 +10,31 @@ jobs:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.x"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build source and wheels
run: python3 -m build
- name: Store the distribution packages
uses: actions/upload-artifact@v7
with:
name: python-package-distributions
path: dist/
- uses: actions/checkout@v6
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.x"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user

- name: Build source and wheels
run: python3 -m build

- name: Store the distribution packages
uses: actions/upload-artifact@v7
with:
name: python-package-distributions
path: dist/

publish-to-pypi:
name: Upload to PyPi
needs:
- build
- build
runs-on: ubuntu-latest
environment:
name: pypi
Expand All @@ -41,10 +43,11 @@ jobs:
id-token: write

steps:
- name: Download all the dists
uses: actions/download-artifact@v4.1.7
with:
name: python-package-distributions
path: dist/
- name: Publish distribution to PyPi
uses: pypa/gh-action-pypi-publish@release/v1
- name: Download all the dists
uses: actions/download-artifact@v5
with:
name: python-package-distributions
path: dist/

- name: Publish distribution to PyPi
uses: pypa/gh-action-pypi-publish@release/v1
22 changes: 14 additions & 8 deletions .github/workflows/coverage_and_lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,13 @@ jobs:
name: "Type Coverage and Linting @ ${{ matrix.python-version }}"
steps:
- name: "Checkout Repository"
uses: actions/checkout@v3
uses: actions/checkout@v6
with:
fetch-depth: 0

- name: "Setup Python @ ${{ matrix.python-version }}"
id: setup-python
uses: actions/setup-python@v4
uses: actions/setup-python@v6
with:
python-version: "${{ matrix.python-version }}"
cache: "pip"
Expand All @@ -35,13 +35,19 @@ jobs:
id: install-deps
run: |
pip install -Ur requirements.txt

- name: "Run Pyright @ ${{ matrix.python-version }}"
uses: jakebailey/pyright-action@v1
uses: jakebailey/pyright-action@v3
with:
no-comments: ${{ matrix.python-version != '3.x' }}
annotate: ${{ matrix.python-version != '3.x' }}
warnings: false

- name: Lint with Ruff
if: ${{ always() && steps.install-deps.outcome == 'success' }}
uses: chartboost/ruff-action@v1

- name: Setup Ruff
if: ${{ steps.install-deps.outcome == 'success' }}
uses: astral-sh/ruff-action@v3
- name: Ruff check
if: ${{ steps.install-deps.outcome == 'success' }}
run: "ruff check ."
- name: Ruff format check
if: ${{ steps.install-deps.outcome == 'success' }}
run: "ruff format --check ."
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -162,4 +162,4 @@ cython_debug/
.vscode/

# Test
test.py
test.py
63 changes: 26 additions & 37 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,23 @@ build-backend = "setuptools.build_meta"
name = "wavelink"
version = "3.5.1"

authors = [
{ name="PythonistaGuild, EvieePy", email="evieepy@gmail.com" },
]
authors = [{ name = "PythonistaGuild, EvieePy", email = "evieepy@gmail.com" }]
dynamic = ["dependencies"]
description = "A robust and powerful, fully asynchronous Lavalink wrapper built for discord.py in Python."
readme = "README.md"
requires-python = ">=3.10"
classifiers = [
"License :: OSI Approved :: MIT License",
"Intended Audience :: Developers",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Internet",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Utilities",
"License :: OSI Approved :: MIT License",
"Intended Audience :: Developers",
"Natural Language :: English",
"Operating System :: OS Independent",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3.12",
"Topic :: Internet",
"Topic :: Software Development :: Libraries",
"Topic :: Software Development :: Libraries :: Python Modules",
"Topic :: Utilities",
]

[project.urls]
Expand All @@ -34,51 +32,43 @@ classifiers = [
packages = ["wavelink", "wavelink.types"]

[tool.setuptools.dynamic]
dependencies = {file = ["requirements.txt"]}
dependencies = { file = ["requirements.txt"] }

[tool.setuptools.package-data]
wavelink = ["py.typed"]

[dependency-groups]
dev = ["ruff>=0.15.10"]

[tool.ruff]
line-length = 120
indent-width = 4
exclude = ["venv", "docs/"]

[tool.ruff.lint]
select = [
"ANN",
"C4",
"E",
"F",
"G",
"I",
"PERF",
"PTH",
"RUF",
"SIM",
"TCH",
"TC",
"UP",
"W",
"PERF",
"ANN",
]
ignore = [
"F402",
"F403",
"F405",
"PERF203",
"RUF001",
"RUF009",
"SIM105",
"UP034",
"UP038",
"ANN101",
"ANN102",
"ANN401",
"UP031",
"PTH123",
"E203",
"E501",
"RUF006",
"SIM910",
"ANN401", # we allow `Any` type
"E203", # we allow whitespace separation after commas, etc
"F403", # allowing manual dict comprehension
"F405", # star imports are used commonly here
"PERF203", # allowing try-except blocks in loops is allowed here, performance hit is negligible
"RUF006", # due to the nature of the library we allow dangling tasks to be cleaned up eagerly
"SIM105", # contextlib.suppress is a performance hit and try-except is preferred.
]

[tool.ruff.lint.isort]
Expand Down Expand Up @@ -106,4 +96,3 @@ typeCheckingMode = "strict"
reportImportCycles = false
reportPrivateUsage = false
pythonVersion = "3.10"

Loading
Loading