Update template to match new project style.

This commit is contained in:
2024-05-22 13:38:49 -04:00
parent a2099cf4b5
commit f3116ff283
7 changed files with 113 additions and 14 deletions
+2 -1
View File
@@ -1,2 +1,3 @@
.gitea/workflows/*.yml
bot.py
main.py
pyproject.toml
-3
View File
@@ -125,9 +125,6 @@ dmypy.json
# Pyre type checker
.pyre/
# IDE
.vscode/
# logging
nextcord.log
outputs/
+8
View File
@@ -0,0 +1,8 @@
{
"recommendations": [
"ms-python.vscode-pylance",
"ms-python.python",
"ms-python.debugpy",
"charliermarsh.ruff"
]
}
+2 -2
View File
@@ -6,9 +6,9 @@
"configurations": [
{
"name": "Python: Module",
"type": "python",
"type": "debugpy",
"request": "launch",
"module": "bot",
"module": "main",
"justMyCode": true
}
]
+5 -8
View File
@@ -1,16 +1,13 @@
FROM python:3.10.6-slim
RUN pip install --upgrade pip
FROM python:3.11.9-slim
WORKDIR /home
COPY requirements.txt requirements.txt
COPY config.py config.py
COPY bot.py bot.py
COPY main.py main.py
COPY pyproject.toml pyproject.toml
COPY cogs cogs/
RUN pip install -r requirements.txt
RUN pip install --upgrade pip && pip install poetry && poetry export -f requirements.txt --output requirements.txt && pip install -r requirements.txt
CMD ["python3", "-u", "./bot.py"]
CMD ["python3", "-u", "./main.py"]
View File
+96
View File
@@ -0,0 +1,96 @@
[tool.poetry]
name = "${REPO_NAME}"
version = "0.1.0"
description = ""
authors = ["${REPO_OWNER}"]
readme = "README.md"
[tool.poetry.dependencies]
python = "^3.11"
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]
# Exclude a variety of commonly ignored directories.
exclude = [
".bzr",
".direnv",
".eggs",
".git",
".git-rewrite",
".hg",
".ipynb_checkpoints",
".mypy_cache",
".nox",
".pants.d",
".pyenv",
".pytest_cache",
".pytype",
".ruff_cache",
".svn",
".tox",
".venv",
".vscode",
"__pypackages__",
"_build",
"buck-out",
"build",
"dist",
"node_modules",
"site-packages",
"venv",
]
# Same as Black.
line-length = 120
indent-width = 4
# Assume Python 3.8
target-version = "py38"
[tool.ruff.lint]
# Enable Pyflakes (`F`) and a subset of the pycodestyle (`E`) codes by default.
# Unlike Flake8, Ruff doesn't enable pycodestyle warnings (`W`) or
# McCabe complexity (`C901`) by default.
select = ["E4", "E7", "E9", "F", "D100", "D1"]
ignore = ["D107"]
# Allow fix for all enabled rules (when `--fix`) is provided.
fixable = ["ALL"]
unfixable = []
# Allow unused variables when underscore-prefixed.
dummy-variable-rgx = "^(_+|(_+[a-zA-Z0-9_]*[a-zA-Z0-9]+?))$"
[tool.ruff.format]
# Like Black, use double quotes for strings.
quote-style = "double"
# Like Black, indent with spaces, rather than tabs.
indent-style = "space"
# Like Black, respect magic trailing commas.
skip-magic-trailing-comma = false
# Like Black, automatically detect the appropriate line ending.
line-ending = "auto"
# Enable auto-formatting of code examples in docstrings. Markdown,
# reStructuredText code/literal blocks and doctests are all supported.
#
# This is currently disabled by default, but it is planned for this
# to be opt-out in the future.
docstring-code-format = true
# Set the line length limit used when formatting code snippets in
# docstrings.
#
# This only has an effect when the `docstring-code-format` setting is
# enabled.
docstring-code-line-length = "dynamic"