From 8abe55dcc69ffcdbfd43918d686960033027d2f8 Mon Sep 17 00:00:00 2001 From: Tyler Goodlet Date: Thu, 13 Feb 2025 15:12:02 -0500 Subject: [PATCH] Add `ruff` to deps, bump `uv.lock` Such that we start encouraging devs to lint code they touch and hopefully we include a pass as part of our tests/CI eventually B) Also, mk local `tractor` install `--editable` since without it being a locally hackable repo it's kinda pointless to install from the local fs Xp --- pyproject.toml | 129 +++++++++++++++++++++++++++++++++++++++++++------ uv.lock | 31 +++++++++++- 2 files changed, 144 insertions(+), 16 deletions(-) diff --git a/pyproject.toml b/pyproject.toml index 14ec3ca8..16de8ae7 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -19,21 +19,119 @@ requires = ["hatchling"] build-backend = "hatchling.build" # ------ - ------ +# TODO, stop warnings around `anext()` builtin use? +# tool.ruff.target-version = "py310" -[tool.ruff.lint] +# [tool.ruff.lint] # https://docs.astral.sh/ruff/settings/#lint_ignore -ignore = [] +# ignore = [] # https://docs.astral.sh/ruff/settings/#lint_per-file-ignores -"piker/ui/qt.py" = [ - "E402", - 'F401', # unused imports (without __all__ or blah as blah) - # "F841", # unused variable rules -] +# "piker/ui/qt.py" = [ +# "E402", +# 'F401', # unused imports (without __all__ or blah as blah) +# # "F841", # unused variable rules +# ] # ignore-init-module-imports = false # ------ - ------ +# ORIGINAL POETRY STASH FROM PRE `gitea_feats` +# [tool.poetry] +# name = "piker" +# version = "0.1.0.alpha0.dev0" +# description = "trading gear for hackers" +# authors = ["Tyler Goodlet "] +# license = "AGPLv3" +# readme = "README.rst" + +# # ------ - ------ + +# [tool.poetry.dependencies] +# async-generator = "^1.10" +# attrs = "^23.1.0" +# bidict = "^0.22.1" +# colorama = "^0.4.6" +# colorlog = "^6.7.0" +# ib-insync = "^0.9.86" +# msgspec = "^0.18.6" +# numba = "^0.59.0" +# numpy = "^1.25" +# polars = "^0.18.13" +# pygments = "^2.16.1" +# python = ">=3.11, <3.13" +# rich = "^13.5.2" +# # setuptools = "^68.0.0" +# tomli = "^2.0.1" +# tomli-w = "^1.0.0" +# trio-util = "^0.7.0" +# trio-websocket = "^0.10.3" +# typer = "^0.9.0" +# rapidfuzz = "^3.5.2" +# pdbp = "^1.5.0" +# trio = "^0.24" +# pendulum = "^3.0.0" +# httpx = "^0.27.0" +# pyarrow = "^17.0.0" +# visidata = "^3.0.2" + +# [tool.poetry.dependencies.tractor] +# develop = true +# # git = 'https://pikers.dev/goodboy/tractor.git' +# # branch = 'aio_abandons' +# path = "../tractor" + +# [tool.poetry.dependencies.asyncvnc] +# git = 'https://github.com/pikers/asyncvnc.git' +# branch = 'main' + +# [tool.poetry.dependencies.tomlkit] +# develop = true +# # git = 'https://github.com/pikers/tomlkit.git' +# # branch = 'piker_pin' +# path = "../tomlkit/" + +# [tool.poetry.group.uis] +# optional = true +# [tool.poetry.group.uis.dependencies] +# # https://python-poetry.org/docs/managing-dependencies/#dependency-groups +# # TODO: make sure the levenshtein shit compiles on nix.. +# # rapidfuzz = {extras = ["speedup"], version = "^0.18.0"} +# rapidfuzz = "^3.2.0" +# qdarkstyle = ">=3.0.2" +# pyqtgraph = { git = 'https://github.com/pikers/pyqtgraph.git' } + +# # ------ - ------ +# pyqt6 = "^6.7.0" +# visidata = "^3.0.2" + +# [tool.poetry.group.dev] +# optional = true +# [tool.poetry.group.dev.dependencies] +# # testing / CI +# pytest = "^6.0.0" +# elasticsearch = "^8.9.0" +# xonsh = "^0.14.2" +# prompt-toolkit = "3.0.40" +# cython = "^3.0.0" +# greenback = "^1.1.1" + +# console ehancements and eventually remote debugging +# extras/helpers. +# TODO: add a toolset that makes debugging a `pikerd` service +# (tree) easy to hack on directly using more or less the local env: +# - xonsh + xxh +# - rsyscall + pdbp +# - actor runtime control console like BEAM/OTP + +# ------ - ------ + +# TODO: add an `--only daemon` group for running non-ui / pikerd +# service tree in distributed mode B) +# https://python-poetry.org/docs/managing-dependencies/#installing-group-dependencies +# [tool.poetry.group.daemon.dependencies] + + [project] name = "piker" version = "0.1.0a0dev0" @@ -112,6 +210,15 @@ uis = [ ] [dependency-groups] +# TODO: add a toolset that makes debugging a `pikerd` service +# (tree) easy to hack on directly using more or less the local env: +# - xonsh + xxh +# - rsyscall + pdbp +# - actor runtime control console like BEAM/OTP + +# console ehancements and eventually remote debugging +# extras/helpers. +# use `--dev` to enable dev = [ "pytest >=6.0.0, <7.0.0", "elasticsearch >=8.9.0, <9.0.0", @@ -119,13 +226,7 @@ dev = [ "prompt-toolkit ==3.0.40", "cython >=3.0.0, <4.0.0", "greenback >=1.1.1, <2.0.0", - # console ehancements and eventually remote debugging - # extras/helpers. - # TODO: add a toolset that makes debugging a `pikerd` service - # (tree) easy to hack on directly using more or less the local env: - # - xonsh + xxh - # - rsyscall + pdbp - # - actor runtime control console like BEAM/OTP + "ruff>=0.9.6", ] [project.scripts] diff --git a/uv.lock b/uv.lock index 0f0b8ff0..a1701521 100644 --- a/uv.lock +++ b/uv.lock @@ -708,6 +708,7 @@ dev = [ { name = "greenback" }, { name = "prompt-toolkit" }, { name = "pytest" }, + { name = "ruff" }, { name = "xonsh" }, ] @@ -739,7 +740,7 @@ requires-dist = [ { name = "tomli", specifier = ">=2.0.1,<3.0.0" }, { name = "tomli-w", specifier = ">=1.0.0,<2.0.0" }, { name = "tomlkit", git = "https://github.com/pikers/tomlkit.git?branch=piker_pin" }, - { name = "tractor", directory = "../tractor" }, + { name = "tractor", editable = "../tractor" }, { name = "trio", specifier = ">=0.24,<0.25" }, { name = "trio-util", specifier = ">=0.7.0,<0.8.0" }, { name = "trio-websocket", specifier = ">=0.10.3,<0.11.0" }, @@ -754,6 +755,7 @@ dev = [ { name = "greenback", specifier = ">=1.1.1,<2.0.0" }, { name = "prompt-toolkit", specifier = "==3.0.40" }, { name = "pytest", specifier = ">=6.0.0,<7.0.0" }, + { name = "ruff", specifier = ">=0.9.6" }, { name = "xonsh", specifier = ">=0.14.2,<0.15.0" }, ] @@ -1073,6 +1075,31 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/19/71/39c7c0d87f8d4e6c020a393182060eaefeeae6c01dab6a84ec346f2567df/rich-13.9.4-py3-none-any.whl", hash = "sha256:6049d5e6ec054bf2779ab3358186963bac2ea89175919d699e378b99738c2a90", size = 242424 }, ] +[[package]] +name = "ruff" +version = "0.9.6" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/2a/e1/e265aba384343dd8ddd3083f5e33536cd17e1566c41453a5517b5dd443be/ruff-0.9.6.tar.gz", hash = "sha256:81761592f72b620ec8fa1068a6fd00e98a5ebee342a3642efd84454f3031dca9", size = 3639454 } +wheels = [ + { url = "https://files.pythonhosted.org/packages/76/e3/3d2c022e687e18cf5d93d6bfa2722d46afc64eaa438c7fbbdd603b3597be/ruff-0.9.6-py3-none-linux_armv6l.whl", hash = "sha256:2f218f356dd2d995839f1941322ff021c72a492c470f0b26a34f844c29cdf5ba", size = 11714128 }, + { url = "https://files.pythonhosted.org/packages/e1/22/aff073b70f95c052e5c58153cba735748c9e70107a77d03420d7850710a0/ruff-0.9.6-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:b908ff4df65dad7b251c9968a2e4560836d8f5487c2f0cc238321ed951ea0504", size = 11682539 }, + { url = "https://files.pythonhosted.org/packages/75/a7/f5b7390afd98a7918582a3d256cd3e78ba0a26165a467c1820084587cbf9/ruff-0.9.6-py3-none-macosx_11_0_arm64.whl", hash = "sha256:b109c0ad2ececf42e75fa99dc4043ff72a357436bb171900714a9ea581ddef83", size = 11132512 }, + { url = "https://files.pythonhosted.org/packages/a6/e3/45de13ef65047fea2e33f7e573d848206e15c715e5cd56095589a7733d04/ruff-0.9.6-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:1de4367cca3dac99bcbd15c161404e849bb0bfd543664db39232648dc00112dc", size = 11929275 }, + { url = "https://files.pythonhosted.org/packages/7d/f2/23d04cd6c43b2e641ab961ade8d0b5edb212ecebd112506188c91f2a6e6c/ruff-0.9.6-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:ac3ee4d7c2c92ddfdaedf0bf31b2b176fa7aa8950efc454628d477394d35638b", size = 11466502 }, + { url = "https://files.pythonhosted.org/packages/b5/6f/3a8cf166f2d7f1627dd2201e6cbc4cb81f8b7d58099348f0c1ff7b733792/ruff-0.9.6-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:5dc1edd1775270e6aa2386119aea692039781429f0be1e0949ea5884e011aa8e", size = 12676364 }, + { url = "https://files.pythonhosted.org/packages/f5/c4/db52e2189983c70114ff2b7e3997e48c8318af44fe83e1ce9517570a50c6/ruff-0.9.6-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:4a091729086dffa4bd070aa5dab7e39cc6b9d62eb2bef8f3d91172d30d599666", size = 13335518 }, + { url = "https://files.pythonhosted.org/packages/66/44/545f8a4d136830f08f4d24324e7db957c5374bf3a3f7a6c0bc7be4623a37/ruff-0.9.6-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:d1bbc6808bf7b15796cef0815e1dfb796fbd383e7dbd4334709642649625e7c5", size = 12823287 }, + { url = "https://files.pythonhosted.org/packages/c5/26/8208ef9ee7431032c143649a9967c3ae1aae4257d95e6f8519f07309aa66/ruff-0.9.6-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:589d1d9f25b5754ff230dce914a174a7c951a85a4e9270613a2b74231fdac2f5", size = 14592374 }, + { url = "https://files.pythonhosted.org/packages/31/70/e917781e55ff39c5b5208bda384fd397ffd76605e68544d71a7e40944945/ruff-0.9.6-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:dc61dd5131742e21103fbbdcad683a8813be0e3c204472d520d9a5021ca8b217", size = 12500173 }, + { url = "https://files.pythonhosted.org/packages/84/f5/e4ddee07660f5a9622a9c2b639afd8f3104988dc4f6ba0b73ffacffa9a8c/ruff-0.9.6-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:5e2d9126161d0357e5c8f30b0bd6168d2c3872372f14481136d13de9937f79b6", size = 11906555 }, + { url = "https://files.pythonhosted.org/packages/f1/2b/6ff2fe383667075eef8656b9892e73dd9b119b5e3add51298628b87f6429/ruff-0.9.6-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:68660eab1a8e65babb5229a1f97b46e3120923757a68b5413d8561f8a85d4897", size = 11538958 }, + { url = "https://files.pythonhosted.org/packages/3c/db/98e59e90de45d1eb46649151c10a062d5707b5b7f76f64eb1e29edf6ebb1/ruff-0.9.6-py3-none-musllinux_1_2_i686.whl", hash = "sha256:c4cae6c4cc7b9b4017c71114115db0445b00a16de3bcde0946273e8392856f08", size = 12117247 }, + { url = "https://files.pythonhosted.org/packages/ec/bc/54e38f6d219013a9204a5a2015c09e7a8c36cedcd50a4b01ac69a550b9d9/ruff-0.9.6-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:19f505b643228b417c1111a2a536424ddde0db4ef9023b9e04a46ed8a1cb4656", size = 12554647 }, + { url = "https://files.pythonhosted.org/packages/a5/7d/7b461ab0e2404293c0627125bb70ac642c2e8d55bf590f6fce85f508f1b2/ruff-0.9.6-py3-none-win32.whl", hash = "sha256:194d8402bceef1b31164909540a597e0d913c0e4952015a5b40e28c146121b5d", size = 9949214 }, + { url = "https://files.pythonhosted.org/packages/ee/30/c3cee10f915ed75a5c29c1e57311282d1a15855551a64795c1b2bbe5cf37/ruff-0.9.6-py3-none-win_amd64.whl", hash = "sha256:03482d5c09d90d4ee3f40d97578423698ad895c87314c4de39ed2af945633caa", size = 10999914 }, + { url = "https://files.pythonhosted.org/packages/e8/a8/d71f44b93e3aa86ae232af1f2126ca7b95c0f515ec135462b3e1f351441c/ruff-0.9.6-py3-none-win_arm64.whl", hash = "sha256:0e2bb706a2be7ddfea4a4af918562fdc1bcb16df255e5fa595bbd800ce322a5a", size = 10177499 }, +] + [[package]] name = "shellingham" version = "1.5.4" @@ -1188,7 +1215,7 @@ source = { git = "https://github.com/pikers/tomlkit.git?branch=piker_pin#8e0239a [[package]] name = "tractor" version = "0.1.0a6.dev0" -source = { directory = "../tractor" } +source = { editable = "../tractor" } dependencies = [ { name = "colorlog" }, { name = "msgspec" },