Skip to content

Commit

Permalink
Merge branch 'main' into robin/feat/queue-pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
Robin5605 committed Jul 2, 2024
2 parents 573ece1 + 92e2b33 commit 97a315f
Show file tree
Hide file tree
Showing 35 changed files with 887 additions and 309 deletions.
14 changes: 14 additions & 0 deletions .devcontainer/devcontainer-lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"features": {
"ghcr.io/devcontainers/features/powershell:1": {
"version": "1.3.2",
"resolved": "ghcr.io/devcontainers/features/powershell@sha256:c11122f0fc8352fcf3a1c2eab1023daab9db7982a83725af803307fd18fb64f4",
"integrity": "sha256:c11122f0fc8352fcf3a1c2eab1023daab9db7982a83725af803307fd18fb64f4"
},
"ghcr.io/devcontainers/features/python:1": {
"version": "1.4.1",
"resolved": "ghcr.io/devcontainers/features/python@sha256:d7e393af2440444dddb3c275cf7f90c899a24f8e853e4d6315e1be3be7e1d49f",
"integrity": "sha256:d7e393af2440444dddb3c275cf7f90c899a24f8e853e4d6315e1be3be7e1d49f"
}
}
}
5 changes: 5 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
version: 2
updates:
- package-ecosystem: "devcontainers"
directory: "/"
schedule:
interval: "monthly"

- package-ecosystem: "github-actions"
directory: "/"
schedule:
Expand Down
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
name: "Docker Build and Push"
name: "Container Build and Push"

on:
push:
branches:
- main
tags:
- v*
pull_request:

permissions:
contents: read
Expand All @@ -16,4 +17,6 @@ permissions:

jobs:
build-push:
uses: darbiadev/.github/.github/workflows/docker-build-push.yaml@9160d4ddd590c15fe8a1f6d1704bf8806969d2b6 # v4.0.1
uses: darbiadev/.github/.github/workflows/docker-build-push.yaml@ea97d99e1520c46080c4c9032a69552e491474ac # v13.0.0
with:
file-name: Dockerfile
2 changes: 1 addition & 1 deletion .github/workflows/dependency-review.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,6 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: "Dependency Review"
uses: actions/dependency-review-action@fde92acd0840415674c16b39c7d703fc28bc511e # v3.1.2
uses: actions/dependency-review-action@9129d7d40b8c12c1ed0f60400d00c92d437adcce # v4.1.3
with:
config-file: darbiadev/.github/.github/dependency-review-config.yaml@f185cc076161b47921c6fb6da4c1fd5e40b50bff # v3.0.0
8 changes: 4 additions & 4 deletions .github/workflows/python-ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,13 @@ on:

jobs:
pre-commit:
uses: darbiadev/.github/.github/workflows/generic-precommit.yaml@9160d4ddd590c15fe8a1f6d1704bf8806969d2b6 # v4.0.1
uses: darbiadev/.github/.github/workflows/generic-precommit.yaml@ea97d99e1520c46080c4c9032a69552e491474ac # v13.0.0
with:
python-version: "3.11"

lint:
needs: pre-commit
uses: darbiadev/.github/.github/workflows/python-lint.yaml@9160d4ddd590c15fe8a1f6d1704bf8806969d2b6 # v4.0.1
uses: darbiadev/.github/.github/workflows/python-lint.yaml@6a6eb74ae11149881c29adf5a5f7af23349c8762 # v9.0.0
with:
python-version: "3.11"

Expand All @@ -25,7 +25,7 @@ jobs:
os: [ ubuntu-latest ]
python-version: [ "3.11" ]

uses: darbiadev/.github/.github/workflows/python-test.yaml@9160d4ddd590c15fe8a1f6d1704bf8806969d2b6 # v4.0.1
uses: darbiadev/.github/.github/workflows/python-test.yaml@ea97d99e1520c46080c4c9032a69552e491474ac # v13.0.0
with:
os: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
Expand All @@ -37,6 +37,6 @@ jobs:
pages: write
id-token: write

uses: darbiadev/.github/.github/workflows/github-pages-python-sphinx.yaml@9160d4ddd590c15fe8a1f6d1704bf8806969d2b6 # v4.0.1
uses: darbiadev/.github/.github/workflows/github-pages-python-sphinx.yaml@ea97d99e1520c46080c4c9032a69552e491474ac # v13.0.0
with:
python-version: "3.11"
2 changes: 1 addition & 1 deletion .github/workflows/sentry-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1

- name: "Create Sentry release"
uses: getsentry/action-release@4744f6a65149f441c5f396d5b0877307c0db52c7 # v1.4.1
uses: getsentry/action-release@e769183448303de84c5a06aaaddf9da7be26d6c7 # v1.7.0
env:
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
SENTRY_ORG: ${{ vars.SENTRY_ORG }}
Expand Down
4 changes: 2 additions & 2 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
rev: v4.5.0
hooks:
- id: check-case-conflict
- id: check-merge-conflict
Expand All @@ -13,7 +13,7 @@ repos:
args: [ --fix=lf ]
- id: end-of-file-fixer
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.1.4"
rev: "v0.2.0"
hooks:
- id: ruff
- id: ruff-format
File renamed without changes.
3 changes: 3 additions & 0 deletions docs/source/changelog.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
Changelog
=========

- :release:`5.0.0 <4th February 2024>`
- :feature:`-` Reestablish versioning

- :release:`4.1.0 <25th October 2023>`
- :feature:`188` Make Dragonfly embeds consistent

Expand Down
6 changes: 3 additions & 3 deletions docs/source/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@ def linkcode_resolve(domain: str, info: dict) -> str:
if not info["module"]:
return None

import importlib
import inspect
import types
import importlib # noqa: PLC0415
import inspect # noqa: PLC0415
import types # noqa: PLC0415

mod = importlib.import_module(info["module"])

Expand Down
21 changes: 11 additions & 10 deletions make.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ COMMANDS
install-dev install local package in editable mode
update-deps update the dependencies
upgrade-deps upgrade the dependencies
lint run `pre-commit` and `black` and `ruff`
lint run `pre-commit` and `ruff`
test run `pytest`
build-dist run `python -m build`
clean delete generated content
Expand Down Expand Up @@ -41,27 +41,28 @@ function Invoke-Install-Dev
function Invoke-Update-Deps
{
python -m pip install --upgrade pip-tools
pip-compile --resolver=backtracking requirements/requirements.in --output-file requirements/requirements.txt
pip-compile --resolver=backtracking requirements/requirements-dev.in --output-file requirements/requirements-dev.txt
pip-compile --resolver=backtracking requirements/requirements-tests.in --output-file requirements/requirements-tests.txt
pip-compile --resolver=backtracking requirements/requirements-docs.in --output-file requirements/requirements-docs.txt
pip-compile requirements/requirements.in
pip-compile requirements/requirements-dev.in
pip-compile requirements/requirements-tests.in
pip-compile requirements/requirements-docs.in
}

function Invoke-Upgrade-Deps
{
python -m pip install --upgrade pip-tools pre-commit
pre-commit autoupdate
pip-compile --resolver=backtracking --upgrade requirements/requirements.in --output-file requirements/requirements.txt
pip-compile --resolver=backtracking --upgrade requirements/requirements-dev.in --output-file requirements/requirements-dev.txt
pip-compile --resolver=backtracking --upgrade requirements/requirements-tests.in --output-file requirements/requirements-tests.txt
pip-compile --resolver=backtracking --upgrade requirements/requirements-docs.in --output-file requirements/requirements-docs.txt
pip-compile --upgrade requirements/requirements.in
pip-compile --upgrade requirements/requirements-dev.in
pip-compile --upgrade requirements/requirements-tests.in
pip-compile --upgrade requirements/requirements-docs.in
}

function Invoke-Lint
{
pre-commit run --all-files
python -m black .
python -m ruff --fix .
python -m ruff format .
python -m mypy --strict src/
}

function Invoke-Test
Expand Down
28 changes: 21 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "bot"
version = "4.1.0"
version = "5.0.0"
dynamic = ["dependencies", "optional-dependencies"]

[project.urls]
Expand All @@ -19,20 +19,22 @@ dev = { file = ["requirements/requirements-dev.txt"] }
tests = { file = ["requirements/requirements-tests.txt"] }
docs = { file = ["requirements/requirements-docs.txt"] }

[tool.black]
target-version = ["py311"]
line-length = 120

[tool.ruff]
preview = true
unsafe-fixes = true
target-version = "py311"
line-length = 120

[tool.ruff.lint]
select = ["ALL"]
ignore = [
"CPY001", # (Missing copyright notice at top of file)
"G004", # (Logging statement uses f-string) - Developer UX
"S101", # (Use of `assert` detected) - This should probably be changed
"PLR6301", # (Method `x` could be a function, class method, or static method) - false positives
]

[tool.ruff.extend-per-file-ignores]
[tool.ruff.lint.extend-per-file-ignores]
"docs/*" = [
"INP001", # (File `tests/*.py` is part of an implicit namespace package. Add an `__init__.py`.) - Docs are not modules
]
Expand All @@ -41,5 +43,17 @@ ignore = [
"S101", # (Use of `assert` detected) - Yes, that's the point
]

[tool.ruff.pydocstyle]
[tool.ruff.lint.pydocstyle]
convention = "numpy"

[[tool.mypy.overrides]]
module = [
"coloredlogs",
"pydis_core.*"
]
ignore_missing_imports = true

[tool.coverage.run]
source = [
"bot",
]
1 change: 1 addition & 0 deletions requirements/requirements-dev.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@
pip-tools
pre-commit
ruff
mypy
30 changes: 20 additions & 10 deletions requirements/requirements-dev.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,33 +10,43 @@ cfgv==3.4.0
# via pre-commit
click==8.1.7
# via pip-tools
distlib==0.3.7
distlib==0.3.8
# via virtualenv
filelock==3.12.4
filelock==3.13.1
# via
# -c requirements/requirements.txt
# virtualenv
identify==2.5.30
identify==2.5.33
# via pre-commit
mypy==1.8.0
# via -r requirements/requirements-dev.in
mypy-extensions==1.0.0
# via mypy
nodeenv==1.8.0
# via pre-commit
packaging==23.2
# via build
pip-tools==7.3.0
pip-tools==7.4.0
# via -r requirements/requirements-dev.in
platformdirs==3.11.0
platformdirs==4.2.0
# via virtualenv
pre-commit==3.5.0
pre-commit==3.6.2
# via -r requirements/requirements-dev.in
pyproject-hooks==1.0.0
# via build
# via
# build
# pip-tools
pyyaml==6.0.1
# via pre-commit
ruff==0.1.5
ruff==0.3.0
# via -r requirements/requirements-dev.in
virtualenv==20.24.5
typing-extensions==4.9.0
# via
# -c requirements/requirements.txt
# mypy
virtualenv==20.25.0
# via pre-commit
wheel==0.41.2
wheel==0.42.0
# via pip-tools

# The following packages are considered to be unsafe in a requirements file:
Expand Down
41 changes: 18 additions & 23 deletions requirements/requirements-docs.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,45 +2,45 @@
# This file is autogenerated by pip-compile with Python 3.11
# by the following command:
#
# pip-compile --output-file=requirements/requirements-docs.txt requirements/requirements-docs.in
# pip-compile requirements/requirements-docs.in
#
alabaster==0.7.13
alabaster==0.7.16
# via sphinx
anyascii==0.3.2
# via sphinx-autoapi
astroid==3.0.0
astroid==3.0.2
# via sphinx-autoapi
babel==2.13.0
babel==2.14.0
# via sphinx
beautifulsoup4==4.12.2
beautifulsoup4==4.12.3
# via furo
certifi==2023.7.22
certifi==2024.2.2
# via
# -c requirements/requirements.txt
# requests
charset-normalizer==3.3.0
charset-normalizer==3.3.2
# via
# -c requirements/requirements.txt
# requests
docutils==0.20.1
# via sphinx
furo==2023.9.10
furo==2024.1.29
# via -r requirements/requirements-docs.in
idna==3.4
idna==3.6
# via
# -c requirements/requirements.txt
# requests
imagesize==1.4.1
# via sphinx
jinja2==3.1.2
jinja2==3.1.3
# via
# sphinx
# sphinx-autoapi
markupsafe==2.1.3
markupsafe==2.1.5
# via jinja2
packaging==23.2
# via sphinx
pygments==2.16.1
pygments==2.17.2
# via
# furo
# sphinx
Expand All @@ -65,28 +65,23 @@ sphinx==7.2.6
# releases
# sphinx-autoapi
# sphinx-basic-ng
# sphinxcontrib-applehelp
# sphinxcontrib-devhelp
# sphinxcontrib-htmlhelp
# sphinxcontrib-qthelp
# sphinxcontrib-serializinghtml
sphinx-autoapi==3.0.0
# via -r requirements/requirements-docs.in
sphinx-basic-ng==1.0.0b2
# via furo
sphinxcontrib-applehelp==1.0.7
sphinxcontrib-applehelp==1.0.8
# via sphinx
sphinxcontrib-devhelp==1.0.5
sphinxcontrib-devhelp==1.0.6
# via sphinx
sphinxcontrib-htmlhelp==2.0.4
sphinxcontrib-htmlhelp==2.0.5
# via sphinx
sphinxcontrib-jsmath==1.0.1
# via sphinx
sphinxcontrib-qthelp==1.0.6
sphinxcontrib-qthelp==1.0.7
# via sphinx
sphinxcontrib-serializinghtml==1.1.9
sphinxcontrib-serializinghtml==1.1.10
# via sphinx
urllib3==2.0.6
urllib3==2.2.0
# via
# -c requirements/requirements.txt
# requests
Loading

0 comments on commit 97a315f

Please sign in to comment.