From 2e30cafbac6950ea46ea5ff9d2cb3c53548fd81a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joakim=20Hells=C3=A9n?= Date: Thu, 2 Jan 2025 21:20:20 +0100 Subject: [PATCH] Bump version to 2.0.0 due to Python 3.13 requirement, also update dependencies --- pyproject.toml | 182 ++++++++++++++++++++++++------------------------- 1 file changed, 89 insertions(+), 93 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 3fd06a8..130188c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,119 +1,115 @@ +[project] +name = "discord-reminder-bot" +version = "2.0.0" +description = "Discord bot that allows you to set date, cron and interval reminders." +readme = "README.md" +requires-python = ">=3.13" +dependencies = [ + "dateparser", + "python-dotenv", + "sqlalchemy", + "apscheduler<4.0.0", + "discord-py", + "audioop-lts", +] + +[dependency-groups] +dev = ["pytest", "ruff", "pre-commit"] + [tool.poetry] name = "discord-reminder-bot" -version = "1.0.0" +version = "2.0.0" description = "Discord bot that allows you to set date, cron and interval reminders." authors = ["Joakim Hellsén "] license = "GPL-3.0-or-later" -readme = "README.md" -homepage = "https://github.com/TheLovinator1/discord-reminder-bot" -repository = "https://github.com/TheLovinator1/discord-reminder-bot" -keywords = [ - "bot", - "discord", - "discord-reminder-bot", - "discord-py-slash-command", -] - -[tool.poetry.urls] -"Bug Tracker" = "https://github.com/TheLovinator1/discord-reminder-bot/issues" [tool.poetry.scripts] bot = "discord_reminder_bot.main:start" [tool.poetry.dependencies] -python = "^3.9" -python-dotenv = "^1.0.0" -apscheduler = "^3.9.1-post.0" -dateparser = "^1.1.4" -sqlalchemy = "^2.0.0" -discord-py-interactions = "^4.4.0" -dinteractions-paginator = { git = "https://github.com/interactions-py/paginator.git", rev = "unstable" } -discord-webhook = "^1.0.0" -setuptools = "^69.0.2" +python = "^3.13" +apscheduler = "<4.0.0" +dateparser = "*" +python-dotenv = "*" +sqlalchemy = "*" +discord-py = "*" +audioop-lts = "*" [tool.poetry.dev-dependencies] -pytest = "^7.1.2" +pytest = "*" +pre-commit = "*" +ruff = "*" [build-system] requires = ["poetry-core>=1.0.0"] build-backend = "poetry.core.masonry.api" -[tool.isort] -profile = "black" - [tool.ruff] -line-length = 120 -select = [ - "E", - "F", - "B", - "W", - "C90", - "I", - "N", - "D", - "UP", - "YTT", - "ANN", - "S", - "BLE", - "FBT", - "A", - "COM", - "C4", - "DTZ", - "EM", - "EXE", - "ISC", - "ICN", - "G", - "INP", - "PIE", - "T20", - "PYI", - "PT", - "Q", - "RSE", - "RET", - "SLF", - "SIM", - "TID", - "TCH", - "ARG", - "PTH", - "ERA", - "PGH", - "PL", - "PLC", - "PLE", - "PLR", - "PLW", - "TRY", - "RUF", +# https://docs.astral.sh/ruff/linter/ +preview = true + +# Enable all rules +lint.select = ["ALL"] + +# Ignore some rules +lint.ignore = [ + "CPY001", # Checks for the absence of copyright notices within Python files. + "D100", # Checks for undocumented public module definitions. + "D104", # Checks for undocumented public package definitions. + "D106", # Checks for undocumented public class definitions, for nested classes. + "ERA001", # Checks for commented-out Python code. + "FIX002", # Checks for "TODO" comments. + + # Conflicting lint rules when using Ruff's formatter + # https://docs.astral.sh/ruff/formatter/#conflicting-lint-rules + "COM812", # Checks for the absence of trailing commas. + "COM819", # Checks for the presence of prohibited trailing commas. + "D206", # Checks for docstrings that are indented with tabs. + "D300", # Checks for docstrings that use '''triple single quotes''' instead of """triple double quotes""". + "E111", # Checks for indentation with a non-multiple of 4 spaces. + "E114", # Checks for indentation of comments with a non-multiple of 4 spaces. + "E117", # Checks for over-indented code. + "ISC001", # Checks for implicitly concatenated strings on a single line. + "ISC002", # Checks for implicitly concatenated strings that span multiple lines. + "Q000", # Checks for inline strings that use single quotes or double quotes, depending on the value of the lint.flake8-quotes.inline-quotes option. + "Q001", # Checks for multiline strings that use single quotes or double quotes, depending on the value of the lint.flake8-quotes.multiline-quotes setting. + "Q002", # Checks for docstrings that use single quotes or double quotes, depending on the value of the lint.flake8-quotes.docstring-quotes setting. + "Q003", # Checks for strings that include escaped quotes, and suggests changing the quote style to avoid the need to escape them. + "W191", # Checks for indentation that uses tabs. ] -ignore = [ - "D100", # pydocstyle - missing docstring in public module - "D101", # pydocstyle - missing docstring in public class - "D102", # pydocstyle - missing docstring in public method - "D103", # pydocstyle - missing docstring in public function - "D104", # pydocstyle - missing docstring in public package - "D105", # pydocstyle - missing docstring in magic method - "D106", # pydocstyle - missing docstring in public nested class - "D107", # pydocstyle - missing docstring in __init__ - "G002", # Allow % in logging - "UP031", # Allow % in logging -] +# https://sphinxcontrib-napoleon.readthedocs.io/en/latest/example_google.html +lint.pydocstyle.convention = "google" -[tool.ruff.per-file-ignores] -"tests/*" = ["S101"] +# Add "from __future__ import annotations" to all files +lint.isort.required-imports = ["from __future__ import annotations"] -[tool.ruff.pydocstyle] -convention = "google" +lint.pycodestyle.ignore-overlong-task-comments = true -[tool.black] +# Default is 88 characters line-length = 120 +[tool.ruff.format] +# https://docs.astral.sh/ruff/formatter/ +docstring-code-format = true +docstring-code-line-length = 20 + +[tool.ruff.lint.per-file-ignores] +"**/*_test.py" = [ + "ARG", # Unused function args -> fixtures nevertheless are functionally relevant... + "FBT", # Don't care about booleans as positional arguments in tests, e.g. via @pytest.mark.parametrize() + "PLR2004", # Magic value used in comparison, ... + "S101", # asserts allowed in tests... + "S311", # Standard pseudo-random generators are not suitable for cryptographic purposes +] + +# https://pytest-django.readthedocs.io/en/latest/ [tool.pytest.ini_options] -addopts = "-vvvvvv --exitfirst" -filterwarnings = ["ignore::DeprecationWarning:pkg_resources:121"] +# Enable logging in the console. +log_cli = true +log_cli_level = "INFO" +log_cli_format = "%(asctime)s [%(levelname)8s] %(message)s (%(filename)s:%(lineno)s)" +log_cli_date_format = "%Y-%m-%d %H:%M:%S" + +# Only test files with the following suffixes. +python_files = "test_*.py *_test.py *_tests.py"