Template
Update template to use uv and have renovate.
This commit is contained in:
Vendored
+7
@@ -0,0 +1,7 @@
|
|||||||
|
{
|
||||||
|
"python.analysis.diagnosticSeverityOverrides": {
|
||||||
|
"reportOptionalMemberAccess": "warning",
|
||||||
|
"reportArgumentType": "information",
|
||||||
|
"reportAttributeAccessIssue": "warning"
|
||||||
|
}
|
||||||
|
}
|
||||||
+6
-3
@@ -1,4 +1,7 @@
|
|||||||
FROM python:3.11.9-slim
|
FROM python:3.12.3-slim
|
||||||
|
|
||||||
|
# install uv
|
||||||
|
COPY --from=ghcr.io/astral-sh/uv:0.6.5 /uv /uvx /bin/
|
||||||
|
|
||||||
WORKDIR /home
|
WORKDIR /home
|
||||||
|
|
||||||
@@ -8,6 +11,6 @@ COPY pyproject.toml pyproject.toml
|
|||||||
|
|
||||||
COPY cogs cogs/
|
COPY cogs cogs/
|
||||||
|
|
||||||
RUN pip install --upgrade pip && pip install poetry && poetry export -f requirements.txt --output requirements.txt && pip install -r requirements.txt
|
RUN uv sync --frozen --no-dev
|
||||||
|
|
||||||
CMD ["python3", "-u", "./main.py"]
|
CMD ["uv", "run", "./main.py"]
|
||||||
+36
-13
@@ -1,21 +1,24 @@
|
|||||||
[tool.poetry]
|
[project]
|
||||||
name = "${REPO_NAME}"
|
name = "${REPO_NAME}"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
description = ""
|
description = ""
|
||||||
authors = ["${REPO_OWNER}"]
|
authors = [{name="${REPO_OWNER}", email=""}]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
dependencies = [
|
||||||
|
"cryptography>=43.0.3",
|
||||||
|
"nextcord>=2.6.0",
|
||||||
|
"pandas>=2.2.3",
|
||||||
|
"pymysql>=1.1.1",
|
||||||
|
"python-dotenv>=1.0.1",
|
||||||
|
"setuptools>=75.3.0",
|
||||||
|
"sqlmodel>=0.0.22",
|
||||||
|
]
|
||||||
|
requires-python = ">=3.12"
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.uv]
|
||||||
python = "^3.11"
|
dev-dependencies = ["ruff>=0.7.2"]
|
||||||
hydra-core = "1.3.2"
|
|
||||||
nextcord = "2.6.1"
|
|
||||||
python-dotenv = "1.0.0"
|
|
||||||
|
|
||||||
|
|
||||||
[build-system]
|
|
||||||
requires = ["poetry-core"]
|
|
||||||
build-backend = "poetry.core.masonry.api"
|
|
||||||
|
|
||||||
[tool.ruff]
|
[tool.ruff]
|
||||||
# Exclude a variety of commonly ignored directories.
|
# Exclude a variety of commonly ignored directories.
|
||||||
exclude = [
|
exclude = [
|
||||||
@@ -58,8 +61,28 @@ target-version = "py38"
|
|||||||
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
|
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
|
||||||
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
|
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
|
||||||
# McCabe complexity (`C901`) by default.
|
# McCabe complexity (`C901`) by default.
|
||||||
select = ["E4", "E7", "E9", "F", "D100", "D1"]
|
select = ["ALL"]
|
||||||
ignore = ["D107"]
|
ignore = [
|
||||||
|
"B008", # I build SlashOptions as arguments.
|
||||||
|
"COM812",
|
||||||
|
"COM819",
|
||||||
|
"D107", # don't want docstrings on init functions
|
||||||
|
"D203",
|
||||||
|
"D206",
|
||||||
|
"D212",
|
||||||
|
"D300",
|
||||||
|
"E111",
|
||||||
|
"E114",
|
||||||
|
"E117",
|
||||||
|
"ISC001",
|
||||||
|
"ISC002",
|
||||||
|
"PD011", # doesn't like me using '.values' on embeds....
|
||||||
|
"Q000",
|
||||||
|
"Q001",
|
||||||
|
"Q002",
|
||||||
|
"Q003",
|
||||||
|
"W191",
|
||||||
|
]
|
||||||
|
|
||||||
# Allow fix for all enabled rules (when `--fix`) is provided.
|
# Allow fix for all enabled rules (when `--fix`) is provided.
|
||||||
fixable = ["ALL"]
|
fixable = ["ALL"]
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
|
"lockFileMaintenance": {
|
||||||
|
"automerge": true
|
||||||
|
},
|
||||||
|
"major": {
|
||||||
|
"automerge": false,
|
||||||
|
"automergeType": "pr"
|
||||||
|
},
|
||||||
|
"minor": {
|
||||||
|
"automerge": true,
|
||||||
|
"automergeType": "branch"
|
||||||
|
},
|
||||||
|
"patch": {
|
||||||
|
"automerge": true,
|
||||||
|
"automergeType": "branch"
|
||||||
|
},
|
||||||
|
"pin": {
|
||||||
|
"automerge": true,
|
||||||
|
"automergeType": "branch"
|
||||||
|
},
|
||||||
|
"ignoreTests": true,
|
||||||
|
"dockerfile": {
|
||||||
|
"minor": {
|
||||||
|
"automerge": false,
|
||||||
|
"automergeType": "pr"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
nextcord==2.4.2
|
|
||||||
hydra-core==1.3.2
|
|
||||||
Reference in New Issue
Block a user