From e1c547c5620196e45f2edd8c00f4c7807d2ce5fd Mon Sep 17 00:00:00 2001 From: electron271 <66094410+electron271@users.noreply.github.com> Date: Sat, 19 Apr 2025 15:25:53 -0500 Subject: [PATCH 01/14] fix: update poetry.lock and pyproject.toml for versioning and dependency management --- poetry.lock | 76 +++++++++++++++++++++---------------------------- pyproject.toml | 28 ++++++++++++++---- tux/__init__.py | 6 ++-- 3 files changed, 56 insertions(+), 54 deletions(-) diff --git a/poetry.lock b/poetry.lock index e13e97cc4..a008a3cc9 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,4 +1,4 @@ -# This file is automatically @generated by Poetry 2.1.2 and should not be changed by hand. +# This file is automatically @generated by Poetry 2.0.1 and should not be changed by hand. [[package]] name = "aiocache" @@ -30,7 +30,7 @@ files = [ ] [package.extras] -dev = ["pytest", "pytest-asyncio", "pytest-cov", "pytest-repeat", "uvloop ; platform_python_implementation != \"PyPy\" and sys_platform != \"win32\""] +dev = ["pytest", "pytest-asyncio", "pytest-cov", "pytest-repeat", "uvloop"] [[package]] name = "aiofiles" @@ -157,7 +157,7 @@ propcache = ">=0.2.0" yarl = ">=1.17.0,<2.0" [package.extras] -speedups = ["Brotli ; platform_python_implementation == \"CPython\"", "aiodns (>=3.2.0) ; sys_platform == \"linux\" or sys_platform == \"darwin\"", "brotlicffi ; platform_python_implementation != \"CPython\""] +speedups = ["Brotli", "aiodns (>=3.2.0)", "brotlicffi"] [[package]] name = "aiosignal" @@ -204,7 +204,7 @@ sniffio = ">=1.1" [package.extras] doc = ["Sphinx (>=8.2,<9.0)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphinx_rtd_theme"] -test = ["anyio[trio]", "blockbuster (>=1.5.23)", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "trustme", "truststore (>=0.9.1) ; python_version >= \"3.10\"", "uvloop (>=0.21) ; platform_python_implementation == \"CPython\" and platform_system != \"Windows\" and python_version < \"3.14\""] +test = ["anyio[trio]", "blockbuster (>=1.5.23)", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "trustme", "truststore (>=0.9.1)", "uvloop (>=0.21)"] trio = ["trio (>=0.26.1)"] [[package]] @@ -255,12 +255,12 @@ files = [ ] [package.extras] -benchmark = ["cloudpickle ; platform_python_implementation == \"CPython\"", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pympler", "pytest (>=4.3.0)", "pytest-codspeed", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"] -cov = ["cloudpickle ; platform_python_implementation == \"CPython\"", "coverage[toml] (>=5.3)", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"] -dev = ["cloudpickle ; platform_python_implementation == \"CPython\"", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pre-commit-uv", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"] +benchmark = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-codspeed", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +cov = ["cloudpickle", "coverage[toml] (>=5.3)", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +dev = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pre-commit-uv", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] docs = ["cogapp", "furo", "myst-parser", "sphinx", "sphinx-notfound-page", "sphinxcontrib-towncrier", "towncrier"] -tests = ["cloudpickle ; platform_python_implementation == \"CPython\"", "hypothesis", "mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-xdist[psutil]"] -tests-mypy = ["mypy (>=1.11.1) ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\"", "pytest-mypy-plugins ; platform_python_implementation == \"CPython\" and python_version >= \"3.10\""] +tests = ["cloudpickle", "hypothesis", "mypy (>=1.11.1)", "pympler", "pytest (>=4.3.0)", "pytest-mypy-plugins", "pytest-xdist[psutil]"] +tests-mypy = ["mypy (>=1.11.1)", "pytest-mypy-plugins"] [[package]] name = "audioop-lts" @@ -318,7 +318,7 @@ files = [ ] [package.extras] -dev = ["backports.zoneinfo ; python_version < \"3.9\"", "freezegun (>=1.0,<2.0)", "jinja2 (>=3.0)", "pytest (>=6.0)", "pytest-cov", "pytz", "setuptools", "tzdata ; sys_platform == \"win32\""] +dev = ["backports.zoneinfo", "freezegun (>=1.0,<2.0)", "jinja2 (>=3.0)", "pytest (>=6.0)", "pytest-cov", "pytz", "setuptools", "tzdata"] [[package]] name = "backrefs" @@ -676,10 +676,10 @@ files = [ cffi = {version = ">=1.12", markers = "platform_python_implementation != \"PyPy\""} [package.extras] -docs = ["sphinx (>=5.3.0)", "sphinx-rtd-theme (>=3.0.0) ; python_version >= \"3.8\""] +docs = ["sphinx (>=5.3.0)", "sphinx-rtd-theme (>=3.0.0)"] docstest = ["pyenchant (>=3)", "readme-renderer (>=30.0)", "sphinxcontrib-spelling (>=7.3.1)"] -nox = ["nox (>=2024.4.15)", "nox[uv] (>=2024.3.2) ; python_version >= \"3.8\""] -pep8test = ["check-sdist ; python_version >= \"3.8\"", "click (>=8.0.1)", "mypy (>=1.4)", "ruff (>=0.3.6)"] +nox = ["nox (>=2024.4.15)", "nox[uv] (>=2024.3.2)"] +pep8test = ["check-sdist", "click (>=8.0.1)", "mypy (>=1.4)", "ruff (>=0.3.6)"] sdist = ["build (>=1.0.0)"] ssh = ["bcrypt (>=3.1.5)"] test = ["certifi (>=2024)", "cryptography-vectors (==44.0.2)", "pretend (>=0.7)", "pytest (>=7.4.0)", "pytest-benchmark (>=4.0)", "pytest-cov (>=2.10.1)", "pytest-xdist (>=3.5.0)"] @@ -758,9 +758,9 @@ audioop-lts = {version = "*", markers = "python_version >= \"3.13\""} [package.extras] dev = ["black (==22.6)", "typing_extensions (>=4.3,<5)"] -docs = ["imghdr-lts (==1.0.0) ; python_version >= \"3.13\"", "sphinx (==4.4.0)", "sphinx-inline-tabs (==2023.4.21)", "sphinxcontrib-applehelp (==1.0.4)", "sphinxcontrib-devhelp (==1.0.2)", "sphinxcontrib-htmlhelp (==2.0.1)", "sphinxcontrib-jsmath (==1.0.1)", "sphinxcontrib-qthelp (==1.0.3)", "sphinxcontrib-serializinghtml (==1.1.5)", "sphinxcontrib-websupport (==1.2.4)", "sphinxcontrib_trio (==1.1.2)", "typing-extensions (>=4.3,<5)"] -speed = ["Brotli", "aiodns (>=1.1) ; sys_platform != \"win32\"", "cchardet (==2.1.7) ; python_version < \"3.10\"", "orjson (>=3.5.4)", "zstandard (>=0.23.0)"] -test = ["coverage[toml]", "pytest", "pytest-asyncio", "pytest-cov", "pytest-mock", "typing-extensions (>=4.3,<5)", "tzdata ; sys_platform == \"win32\""] +docs = ["imghdr-lts (==1.0.0)", "sphinx (==4.4.0)", "sphinx-inline-tabs (==2023.4.21)", "sphinxcontrib-applehelp (==1.0.4)", "sphinxcontrib-devhelp (==1.0.2)", "sphinxcontrib-htmlhelp (==2.0.1)", "sphinxcontrib-jsmath (==1.0.1)", "sphinxcontrib-qthelp (==1.0.3)", "sphinxcontrib-serializinghtml (==1.1.5)", "sphinxcontrib-websupport (==1.2.4)", "sphinxcontrib_trio (==1.1.2)", "typing-extensions (>=4.3,<5)"] +speed = ["Brotli", "aiodns (>=1.1)", "cchardet (==2.1.7)", "orjson (>=3.5.4)", "zstandard (>=0.23.0)"] +test = ["coverage[toml]", "pytest", "pytest-asyncio", "pytest-cov", "pytest-mock", "typing-extensions (>=4.3,<5)", "tzdata"] voice = ["PyNaCl (>=1.3.0,<1.6)"] [[package]] @@ -802,7 +802,7 @@ files = [ [package.extras] docs = ["furo (>=2024.8.6)", "sphinx (>=8.1.3)", "sphinx-autodoc-typehints (>=3)"] testing = ["covdefaults (>=2.3)", "coverage (>=7.6.10)", "diff-cover (>=9.2.1)", "pytest (>=8.3.4)", "pytest-asyncio (>=0.25.2)", "pytest-cov (>=6)", "pytest-mock (>=3.14)", "pytest-timeout (>=2.3.1)", "virtualenv (>=20.28.1)"] -typing = ["typing-extensions (>=4.12.2) ; python_version < \"3.11\""] +typing = ["typing-extensions (>=4.12.2)"] [[package]] name = "frozenlist" @@ -994,7 +994,7 @@ gitdb = ">=4.0.1,<5" [package.extras] doc = ["sphinx (>=7.1.2,<7.2)", "sphinx-autodoc-typehints", "sphinx_rtd_theme"] -test = ["coverage[toml]", "ddt (>=1.1.1,!=1.4.3)", "mock ; python_version < \"3.8\"", "mypy", "pre-commit", "pytest (>=7.3.1)", "pytest-cov", "pytest-instafail", "pytest-mock", "pytest-sugar", "typing-extensions ; python_version < \"3.11\""] +test = ["coverage[toml]", "ddt (>=1.1.1,!=1.4.3)", "mock", "mypy", "pre-commit", "pytest (>=7.3.1)", "pytest-cov", "pytest-instafail", "pytest-mock", "pytest-sugar", "typing-extensions"] [[package]] name = "griffe" @@ -1106,7 +1106,7 @@ httpx = ">=0.28.0" [package.extras] redis = ["redis (==5.0.4)"] -s3 = ["boto3 (>=1.15.0,<=1.15.3) ; python_version < \"3.12\"", "boto3 (>=1.15.3) ; python_version >= \"3.12\""] +s3 = ["boto3 (>=1.15.0,<=1.15.3)", "boto3 (>=1.15.3)"] sqlite = ["anysqlite (>=0.0.5)"] yaml = ["pyyaml (==6.0.1)"] @@ -1151,7 +1151,7 @@ httpcore = "==1.*" idna = "*" [package.extras] -brotli = ["brotli ; platform_python_implementation == \"CPython\"", "brotlicffi ; platform_python_implementation != \"CPython\""] +brotli = ["brotli", "brotlicffi"] cli = ["click (==8.*)", "pygments (==2.*)", "rich (>=10,<14)"] http2 = ["h2 (>=3,<5)"] socks = ["socksio (==1.*)"] @@ -1397,7 +1397,7 @@ colorama = {version = ">=0.3.4", markers = "sys_platform == \"win32\""} win32-setctime = {version = ">=1.0.0", markers = "sys_platform == \"win32\""} [package.extras] -dev = ["Sphinx (==8.1.3) ; python_version >= \"3.11\"", "build (==1.2.2) ; python_version >= \"3.11\"", "colorama (==0.4.5) ; python_version < \"3.8\"", "colorama (==0.4.6) ; python_version >= \"3.8\"", "exceptiongroup (==1.1.3) ; python_version >= \"3.7\" and python_version < \"3.11\"", "freezegun (==1.1.0) ; python_version < \"3.8\"", "freezegun (==1.5.0) ; python_version >= \"3.8\"", "mypy (==v0.910) ; python_version < \"3.6\"", "mypy (==v0.971) ; python_version == \"3.6\"", "mypy (==v1.13.0) ; python_version >= \"3.8\"", "mypy (==v1.4.1) ; python_version == \"3.7\"", "myst-parser (==4.0.0) ; python_version >= \"3.11\"", "pre-commit (==4.0.1) ; python_version >= \"3.9\"", "pytest (==6.1.2) ; python_version < \"3.8\"", "pytest (==8.3.2) ; python_version >= \"3.8\"", "pytest-cov (==2.12.1) ; python_version < \"3.8\"", "pytest-cov (==5.0.0) ; python_version == \"3.8\"", "pytest-cov (==6.0.0) ; python_version >= \"3.9\"", "pytest-mypy-plugins (==1.9.3) ; python_version >= \"3.6\" and python_version < \"3.8\"", "pytest-mypy-plugins (==3.1.0) ; python_version >= \"3.8\"", "sphinx-rtd-theme (==3.0.2) ; python_version >= \"3.11\"", "tox (==3.27.1) ; python_version < \"3.8\"", "tox (==4.23.2) ; python_version >= \"3.8\"", "twine (==6.0.1) ; python_version >= \"3.11\""] +dev = ["Sphinx (==8.1.3)", "build (==1.2.2)", "colorama (==0.4.5)", "colorama (==0.4.6)", "exceptiongroup (==1.1.3)", "freezegun (==1.1.0)", "freezegun (==1.5.0)", "mypy (==v0.910)", "mypy (==v0.971)", "mypy (==v1.13.0)", "mypy (==v1.4.1)", "myst-parser (==4.0.0)", "pre-commit (==4.0.1)", "pytest (==6.1.2)", "pytest (==8.3.2)", "pytest-cov (==2.12.1)", "pytest-cov (==5.0.0)", "pytest-cov (==6.0.0)", "pytest-mypy-plugins (==1.9.3)", "pytest-mypy-plugins (==3.1.0)", "sphinx-rtd-theme (==3.0.2)", "tox (==3.27.1)", "tox (==4.23.2)", "twine (==6.0.1)"] [[package]] name = "markdown" @@ -1564,7 +1564,7 @@ watchdog = ">=2.0" [package.extras] i18n = ["babel (>=2.9.0)"] -min-versions = ["babel (==2.9.0)", "click (==7.0)", "colorama (==0.4) ; platform_system == \"Windows\"", "ghp-import (==1.0)", "importlib-metadata (==4.4) ; python_version < \"3.10\"", "jinja2 (==2.11.1)", "markdown (==3.3.6)", "markupsafe (==2.0.1)", "mergedeep (==1.3.4)", "mkdocs-get-deps (==0.2.0)", "packaging (==20.5)", "pathspec (==0.11.1)", "pyyaml (==5.1)", "pyyaml-env-tag (==0.1)", "watchdog (==2.0)"] +min-versions = ["babel (==2.9.0)", "click (==7.0)", "colorama (==0.4)", "ghp-import (==1.0)", "importlib-metadata (==4.4)", "jinja2 (==2.11.1)", "markdown (==3.3.6)", "markupsafe (==2.0.1)", "mergedeep (==1.3.4)", "mkdocs-get-deps (==0.2.0)", "packaging (==20.5)", "pathspec (==0.11.1)", "pyyaml (==5.1)", "pyyaml-env-tag (==0.1)", "watchdog (==2.0)"] [[package]] name = "mkdocs-api-autonav" @@ -1998,7 +1998,7 @@ fpx = ["olefile"] mic = ["olefile"] test-arrow = ["pyarrow"] tests = ["check-manifest", "coverage (>=7.4.2)", "defusedxml", "markdown2", "olefile", "packaging", "pyroma", "pytest", "pytest-cov", "pytest-timeout", "trove-classifiers (>=2024.10.12)"] -typing = ["typing-extensions ; python_version < \"3.10\""] +typing = ["typing-extensions"] xmp = ["defusedxml"] [[package]] @@ -2239,7 +2239,7 @@ typing-inspection = ">=0.4.0" [package.extras] email = ["email-validator (>=2.0.0)"] -timezone = ["tzdata ; python_version >= \"3.9\" and platform_system == \"Windows\""] +timezone = ["tzdata"] [[package]] name = "pydantic-core" @@ -2973,25 +2973,13 @@ files = [ ] [package.extras] -check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1) ; sys_platform != \"cygwin\"", "ruff (>=0.8.0) ; sys_platform != \"cygwin\""] -core = ["importlib_metadata (>=6) ; python_version < \"3.10\"", "jaraco.functools (>=4)", "jaraco.text (>=3.7)", "more_itertools", "more_itertools (>=8.8)", "packaging (>=24.2)", "platformdirs (>=4.2.2)", "tomli (>=2.0.1) ; python_version < \"3.11\"", "wheel (>=0.43.0)"] +check = ["pytest-checkdocs (>=2.4)", "pytest-ruff (>=0.2.1)", "ruff (>=0.8.0)"] +core = ["importlib_metadata (>=6)", "jaraco.functools (>=4)", "jaraco.text (>=3.7)", "more_itertools", "more_itertools (>=8.8)", "packaging (>=24.2)", "platformdirs (>=4.2.2)", "tomli (>=2.0.1)", "wheel (>=0.43.0)"] cover = ["pytest-cov"] doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "pygments-github-lexers (==0.0.5)", "pyproject-hooks (!=1.1)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-favicon", "sphinx-inline-tabs", "sphinx-lint", "sphinx-notfound-page (>=1,<2)", "sphinx-reredirects", "sphinxcontrib-towncrier", "towncrier (<24.7)"] enabler = ["pytest-enabler (>=2.2)"] -test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21) ; python_version >= \"3.9\" and sys_platform != \"cygwin\"", "jaraco.envs (>=2.2)", "jaraco.path (>=3.7.2)", "jaraco.test (>=5.5)", "packaging (>=24.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-home (>=0.5)", "pytest-perf ; sys_platform != \"cygwin\"", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel (>=0.44.0)"] -type = ["importlib_metadata (>=7.0.2) ; python_version < \"3.10\"", "jaraco.develop (>=7.21) ; sys_platform != \"cygwin\"", "mypy (==1.14.*)", "pytest-mypy"] - -[[package]] -name = "single-source" -version = "0.4.0" -description = "Access to the project version in Python code for PEP 621-style projects" -optional = false -python-versions = "<4.0,>=3.8" -groups = ["main"] -files = [ - {file = "single_source-0.4.0-py3-none-any.whl", hash = "sha256:38880b16e6e0ca2e012f85dc3820eb31999ace5f1d9a588395ea38f8bd0775f5"}, - {file = "single_source-0.4.0.tar.gz", hash = "sha256:7917aa113bda60072f01952e2966cd7247f0ec16fe52a1555f3c066b553e98b4"}, -] +test = ["build[virtualenv] (>=1.0.3)", "filelock (>=3.4.0)", "ini2toml[lite] (>=0.14)", "jaraco.develop (>=7.21)", "jaraco.envs (>=2.2)", "jaraco.path (>=3.7.2)", "jaraco.test (>=5.5)", "packaging (>=24.2)", "pip (>=19.1)", "pyproject-hooks (!=1.1)", "pytest (>=6,!=8.1.*)", "pytest-home (>=0.5)", "pytest-perf", "pytest-subprocess", "pytest-timeout", "pytest-xdist (>=3)", "tomli-w (>=1.0.0)", "virtualenv (>=13.0.0)", "wheel (>=0.44.0)"] +type = ["importlib_metadata (>=7.0.2)", "jaraco.develop (>=7.21)", "mypy (==1.14.*)", "pytest-mypy"] [[package]] name = "six" @@ -3230,7 +3218,7 @@ files = [ ] [package.extras] -brotli = ["brotli (>=1.0.9) ; platform_python_implementation == \"CPython\"", "brotlicffi (>=0.8.0) ; platform_python_implementation != \"CPython\""] +brotli = ["brotli (>=1.0.9)", "brotlicffi (>=0.8.0)"] h2 = ["h2 (>=4,<5)"] socks = ["pysocks (>=1.5.6,!=1.5.7,<2.0)"] zstd = ["zstandard (>=0.18.0)"] @@ -3254,7 +3242,7 @@ platformdirs = ">=3.9.1,<5" [package.extras] docs = ["furo (>=2023.7.26)", "proselint (>=0.13)", "sphinx (>=7.1.2,!=7.3)", "sphinx-argparse (>=0.4)", "sphinxcontrib-towncrier (>=0.2.1a0)", "towncrier (>=23.6)"] -test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=23.1)", "pytest (>=7.4)", "pytest-env (>=0.8.2)", "pytest-freezer (>=0.4.8) ; platform_python_implementation == \"PyPy\" or platform_python_implementation == \"GraalVM\" or platform_python_implementation == \"CPython\" and sys_platform == \"win32\" and python_version >= \"3.13\"", "pytest-mock (>=3.11.1)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)", "setuptools (>=68)", "time-machine (>=2.10) ; platform_python_implementation == \"CPython\""] +test = ["covdefaults (>=2.3)", "coverage (>=7.2.7)", "coverage-enable-subprocess (>=1)", "flaky (>=3.7)", "packaging (>=23.1)", "pytest (>=7.4)", "pytest-env (>=0.8.2)", "pytest-freezer (>=0.4.8)", "pytest-mock (>=3.11.1)", "pytest-randomly (>=3.12)", "pytest-timeout (>=2.1)", "setuptools (>=68)", "time-machine (>=2.10)"] [[package]] name = "watchdog" @@ -3325,7 +3313,7 @@ files = [ ] [package.extras] -dev = ["black (>=19.3b0) ; python_version >= \"3.6\"", "pytest (>=4.6.2)"] +dev = ["black (>=19.3b0)", "pytest (>=4.6.2)"] [[package]] name = "yarl" @@ -3449,4 +3437,4 @@ propcache = ">=0.2.1" [metadata] lock-version = "2.1" python-versions = ">=3.13.2,<3.14" -content-hash = "bfa2884f2055d2e828ec8a86368f63ab0d1625642614fc4300bc0a28c6c98421" +content-hash = "b34469f86107ef8585594b04ac495d568cdf7e890b419108f90faf12076d71f9" diff --git a/pyproject.toml b/pyproject.toml index 29fb4fdc7..31438ae9f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,22 +1,39 @@ [project] name = "tux" -version = "0.1.0" description = "Tux is an all in one bot for the All Things Linux discord server." authors = [{ name = "All Things Linux", email = "tux@allthingslinux.org" }] requires-python = ">=3.13.2,<3.14" readme = "README.md" urls = { repository = "https://github.com/allthingslinux/tux" } -dynamic = ["dependencies"] +dynamic = ["dependencies", "version"] [project.scripts] tux = "tux.cli:main" [build-system] -requires = ["poetry-core>=2.0"] -build-backend = "poetry.core.masonry.api" +requires = ["poetry-core>=2.0", "poetry-dynamic-versioning>=1.0.0,<2.0.0"] +build-backend = "poetry_dynamic_versioning.backend" [tool.poetry] packages = [{ include = "tux" }] +version = "0.0.0" + +[tool.poetry-dynamic-versioning] +enable = true +metadata = true +dirty = true +format-jinja = """ + {%- if distance == 0 -%} + {{ serialize_pep440(base, stage, revision) }} + {%- elif branch == "main" -%} + {{ serialize_pep440(base, stage, revision, dev=distance, metadata=[commit]) }} + {%- else -%} + {{ serialize_pep440(base, stage, revision, dev=distance, metadata=[commit, branch_escaped]) }} + {%- endif -%} +""" + +[tool.poetry.requires-plugins] +poetry-dynamic-versioning = { version = ">=1.0.0,<2.0.0", extras = ["plugin"] } [tool.poetry.dependencies] python = ">=3.13.2,<3.14" @@ -49,7 +66,6 @@ rich = "^13.9.4" watchdog = "^6.0.0" arrow = "^1.3.0" click = "^8.1.8" -single-source = "^0.4.0" levenshtein = "^0.27.1" [tool.poetry.group.dev.dependencies] @@ -147,4 +163,4 @@ strictListInference = true strictSetInference = true typeCheckingMode = "strict" venv = ".venv" -venvPath = "." +venvPath = "." \ No newline at end of file diff --git a/tux/__init__.py b/tux/__init__.py index 3fa1687b3..8fdf77f5e 100644 --- a/tux/__init__.py +++ b/tux/__init__.py @@ -1,6 +1,4 @@ -from pathlib import Path - -from single_source import get_version +from importlib import metadata # Dynamically get the version from pyproject.toml -__version__ = get_version("tux", Path(__file__).parent.parent) +__version__: str = metadata.version("tux") From 8a3185ed4e0d8ce48fff39ae8e22c7643b95cb17 Mon Sep 17 00:00:00 2001 From: electron271 <66094410+electron271@users.noreply.github.com> Date: Sat, 19 Apr 2025 15:33:49 -0500 Subject: [PATCH 02/14] fix(settings.yml.example): remove BOT_VERSION entry from configuration --- config/settings.yml.example | 1 - 1 file changed, 1 deletion(-) diff --git a/config/settings.yml.example b/config/settings.yml.example index 1bf9cd614..92772bffc 100644 --- a/config/settings.yml.example +++ b/config/settings.yml.example @@ -5,7 +5,6 @@ BOT_INFO: PROD_PREFIX: "$" DEV_PREFIX: "~" # You can enable dev mode in .env BOT_NAME: "Tux" # This may not apply everywhere, WIP (Best to keep it as Tux for now). Help command will be changed to be less Tux-specific if you change this. - BOT_VERSION: "git" # vX.Y.Z or git HIDE_BOT_OWNER: false # Hide bot owner and sysadmin from help command # Available substitutions: # {member_count} - total member count of all guilds From 152f3c55822261aa87a7392ba49231406ccb6de9 Mon Sep 17 00:00:00 2001 From: electron271 <66094410+electron271@users.noreply.github.com> Date: Sat, 19 Apr 2025 15:38:36 -0500 Subject: [PATCH 03/14] fix(.dockerignore): remove .git from dockerignore as its needed for dynamic versioning --- .dockerignore | 1 - 1 file changed, 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index 4548a7a17..e6a784dde 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,6 +1,5 @@ .devcontainer/ .env -.git/ .github/ .venv/ .vscode/ From efac8276597a8a2349f7e977c1d7e7f5f5c25c62 Mon Sep 17 00:00:00 2001 From: electron271 <66094410+electron271@users.noreply.github.com> Date: Sat, 19 Apr 2025 15:42:48 -0500 Subject: [PATCH 04/14] fix(Dockerfile): add .git copy for dynamic versioning --- Dockerfile | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Dockerfile b/Dockerfile index 9ba4ba313..49b25223a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -54,6 +54,9 @@ RUN --mount=type=cache,target=/root/.cache pip install poetry==$POETRY_VERSION WORKDIR /app +# Copy .git for dynamic versioning +COPY --chown=nonroot:nonroot .git .git + # Copy only the metadata files to increase build cache hit rate COPY pyproject.toml poetry.lock ./ RUN --mount=type=cache,target=$POETRY_CACHE_DIR \ From a79c6ca6a95f6fcf3c3ec731ab82bbb1abeb1e99 Mon Sep 17 00:00:00 2001 From: electron271 <66094410+electron271@users.noreply.github.com> Date: Sat, 19 Apr 2025 15:45:23 -0500 Subject: [PATCH 05/14] fix(Dockerfile): adjust .git copy command to include ownership --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 49b25223a..f7a905a8b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -55,7 +55,7 @@ RUN --mount=type=cache,target=/root/.cache pip install poetry==$POETRY_VERSION WORKDIR /app # Copy .git for dynamic versioning -COPY --chown=nonroot:nonroot .git .git +COPY .git .git ./ # Copy only the metadata files to increase build cache hit rate COPY pyproject.toml poetry.lock ./ From 0e691cd65fcc4e7474fb01c6da19cf45c6b821d5 Mon Sep 17 00:00:00 2001 From: electron271 <66094410+electron271@users.noreply.github.com> Date: Sat, 19 Apr 2025 15:49:57 -0500 Subject: [PATCH 06/14] fix(Dockerfile): correct .git copy command placement for dynamic versioning --- Dockerfile | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Dockerfile b/Dockerfile index f7a905a8b..c1ea7212a 100644 --- a/Dockerfile +++ b/Dockerfile @@ -54,11 +54,10 @@ RUN --mount=type=cache,target=/root/.cache pip install poetry==$POETRY_VERSION WORKDIR /app -# Copy .git for dynamic versioning -COPY .git .git ./ - # Copy only the metadata files to increase build cache hit rate +# .git also needs to be copied for versioning COPY pyproject.toml poetry.lock ./ +COPY .git .git RUN --mount=type=cache,target=$POETRY_CACHE_DIR \ poetry install --only main --no-root --no-directory From 661e06b7b23a10cc9865ad16e1f195aeb83b3a69 Mon Sep 17 00:00:00 2001 From: electron271 <66094410+electron271@users.noreply.github.com> Date: Sat, 19 Apr 2025 15:58:12 -0500 Subject: [PATCH 07/14] fix(docker-image.yml) proper checkout --- .github/workflows/docker-image.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 10d7ecd9f..97628cf93 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -13,6 +13,11 @@ jobs: packages: write steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + fetch-depth: 0 # Fetch the full repository history including .git + - name: Docker meta id: meta uses: docker/metadata-action@v5 From 68d62c2c682294405a9166375abff8b54b58347a Mon Sep 17 00:00:00 2001 From: electron271 <66094410+electron271@users.noreply.github.com> Date: Sat, 19 Apr 2025 15:59:55 -0500 Subject: [PATCH 08/14] fix(Dockerfile): correct .git copy command to include trailing slash --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index c1ea7212a..eade1ef3f 100644 --- a/Dockerfile +++ b/Dockerfile @@ -57,7 +57,7 @@ WORKDIR /app # Copy only the metadata files to increase build cache hit rate # .git also needs to be copied for versioning COPY pyproject.toml poetry.lock ./ -COPY .git .git +COPY .git .git ./ RUN --mount=type=cache,target=$POETRY_CACHE_DIR \ poetry install --only main --no-root --no-directory From 567b80430815410c00f197fd6054b0a93a49d23b Mon Sep 17 00:00:00 2001 From: electron271 <66094410+electron271@users.noreply.github.com> Date: Sat, 19 Apr 2025 16:06:37 -0500 Subject: [PATCH 09/14] fix(Dockerfile): ninth times the charm --- Dockerfile | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/Dockerfile b/Dockerfile index eade1ef3f..16416933b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -54,15 +54,10 @@ RUN --mount=type=cache,target=/root/.cache pip install poetry==$POETRY_VERSION WORKDIR /app -# Copy only the metadata files to increase build cache hit rate -# .git also needs to be copied for versioning -COPY pyproject.toml poetry.lock ./ -COPY .git .git ./ +COPY . . RUN --mount=type=cache,target=$POETRY_CACHE_DIR \ poetry install --only main --no-root --no-directory -# Now install the application itself -COPY . . RUN --mount=type=cache,target=$POETRY_CACHE_DIR \ --mount=type=cache,target=/root/.cache \ poetry install --only main && \ From 97e97354e422aba7a43f643ff8b2bd4dfc136ad0 Mon Sep 17 00:00:00 2001 From: electron271 <66094410+electron271@users.noreply.github.com> Date: Sat, 19 Apr 2025 16:13:13 -0500 Subject: [PATCH 10/14] fix(Dockerfile): add debug commands to list files in working directory and .git --- Dockerfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Dockerfile b/Dockerfile index 16416933b..a885977eb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -55,6 +55,8 @@ RUN --mount=type=cache,target=/root/.cache pip install poetry==$POETRY_VERSION WORKDIR /app COPY . . +RUN ls -la +RUN ls -la .git/ RUN --mount=type=cache,target=$POETRY_CACHE_DIR \ poetry install --only main --no-root --no-directory From c9bce9d05e7362ebab3a04c5d9c345e6cbad1893 Mon Sep 17 00:00:00 2001 From: electron271 <66094410+electron271@users.noreply.github.com> Date: Sat, 19 Apr 2025 16:16:42 -0500 Subject: [PATCH 11/14] fix(docker-image.yml): add debug step to list files in Docker context --- .github/workflows/docker-image.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 97628cf93..7fa5f04e7 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -17,6 +17,9 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 # Fetch the full repository history including .git + + - name: Debug Docker context + run: ls -la - name: Docker meta id: meta From c8e3ca66db3db9fe1b52082d8fdadadc9bab351f Mon Sep 17 00:00:00 2001 From: electron271 <66094410+electron271@users.noreply.github.com> Date: Sat, 19 Apr 2025 16:17:44 -0500 Subject: [PATCH 12/14] fix(.dockerignore): make .git included --- .dockerignore | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.dockerignore b/.dockerignore index e6a784dde..be5d5441e 100644 --- a/.dockerignore +++ b/.dockerignore @@ -17,4 +17,5 @@ site/ .pre-commit-config.yaml .gitignore .cursorrules -.editorconfig \ No newline at end of file +.editorconfig +!.git \ No newline at end of file From 132a063bdfbbff94689de6d89b83d802a2c3da83 Mon Sep 17 00:00:00 2001 From: electron271 <66094410+electron271@users.noreply.github.com> Date: Sat, 19 Apr 2025 16:22:31 -0500 Subject: [PATCH 13/14] fix(.dockerignore): exclude .git from Docker context --- .dockerignore | 1 - .github/workflows/docker-image.yml | 5 ++--- Dockerfile | 2 -- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/.dockerignore b/.dockerignore index be5d5441e..9f3f01bd9 100644 --- a/.dockerignore +++ b/.dockerignore @@ -18,4 +18,3 @@ site/ .gitignore .cursorrules .editorconfig -!.git \ No newline at end of file diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index 7fa5f04e7..ae99b01c0 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -17,9 +17,6 @@ jobs: uses: actions/checkout@v3 with: fetch-depth: 0 # Fetch the full repository history including .git - - - name: Debug Docker context - run: ls -la - name: Docker meta id: meta @@ -48,3 +45,5 @@ jobs: push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} + env: + BUILDKIT_CONTEXT_KEEP_GIT_DIR: 1 diff --git a/Dockerfile b/Dockerfile index a885977eb..16416933b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -55,8 +55,6 @@ RUN --mount=type=cache,target=/root/.cache pip install poetry==$POETRY_VERSION WORKDIR /app COPY . . -RUN ls -la -RUN ls -la .git/ RUN --mount=type=cache,target=$POETRY_CACHE_DIR \ poetry install --only main --no-root --no-directory From dd80f67ec6b54bcaef6913bb90891edbacaf95a9 Mon Sep 17 00:00:00 2001 From: electron271 <66094410+electron271@users.noreply.github.com> Date: Sat, 19 Apr 2025 16:25:00 -0500 Subject: [PATCH 14/14] fix(docker-image.yml): move BUILDKIT_CONTEXT_KEEP_GIT_DIR to build-args section --- .github/workflows/docker-image.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docker-image.yml b/.github/workflows/docker-image.yml index ae99b01c0..d0947966b 100644 --- a/.github/workflows/docker-image.yml +++ b/.github/workflows/docker-image.yml @@ -45,5 +45,6 @@ jobs: push: ${{ github.event_name != 'pull_request' }} tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - env: - BUILDKIT_CONTEXT_KEEP_GIT_DIR: 1 + build-args: | + BUILDKIT_CONTEXT_KEEP_GIT_DIR=1 +