Skip `ruff` dev-dep on nix(os) overlays
Since the linking will be borked if we pull the wheel using `uv`; we need to instead delegate to the `nixpkgs` version in the dev-shell. `pyrpoject` deats, - add a new deps-group: 'lint' which contains `ruff`. - drop `ruff` from std deps (not sure how it got there anyway). - mv `elasticsearch` to a new `dbs` deps group (we don't really even want to be using it in the near furure). - mv `uis` group into dep-groups section from `project.optionals-deps`. - add a `tool.uv.default-groups = ['uis', 'dev']` setting which then will avoid install of any non-explicit extras. - put `rapidfuzz` only in `uis` group. `flake.nix` tweaks, - include `ruff` and `pypkgs.ruff` in the overlay. - pass `--no-group ruff` to the `uv sync` line of shell init.wayland_nix_py313
parent
ffd6438b88
commit
51fb871f57
|
|
@ -38,6 +38,10 @@
|
|||
bashInteractive
|
||||
bash-completion
|
||||
|
||||
# dev utils
|
||||
ruff
|
||||
pypkgs.ruff
|
||||
|
||||
qt6.qtwayland
|
||||
qt6.qtbase
|
||||
|
||||
|
|
@ -85,7 +89,7 @@
|
|||
# - always use the ./py313/ venv-subdir
|
||||
export UV_PROJECT_ENVIRONMENT="py313"
|
||||
# sync project-env with all extras
|
||||
uv sync --dev --all-extras
|
||||
uv sync --dev --all-extras --no-group lint
|
||||
|
||||
# ------ TIPS ------
|
||||
# NOTE, to launch the py-venv installed `xonsh` (like @goodboy)
|
||||
|
|
|
|||
|
|
@ -63,8 +63,6 @@ dependencies = [
|
|||
"trio-util >=0.7.0, <0.8.0",
|
||||
"trio-websocket >=0.10.3, <0.11.0",
|
||||
"typer >=0.9.0, <1.0.0",
|
||||
"rapidfuzz >=3.5.2, <4.0.0",
|
||||
"pdbp >=1.5.0, <2.0.0",
|
||||
"trio >=0.27",
|
||||
"pendulum",
|
||||
"httpx >=0.27.0, <0.28.0",
|
||||
|
|
@ -77,9 +75,13 @@ dependencies = [
|
|||
"trio-typing>=0.10.0",
|
||||
"numba>=0.61.0",
|
||||
"pyvnc",
|
||||
# TODO? mv to dev group?
|
||||
"pdbp >=1.5.0, <2.0.0",
|
||||
]
|
||||
# ------ dependencies ------
|
||||
|
||||
[project.optional-dependencies]
|
||||
|
||||
[dependency-groups]
|
||||
uis = [
|
||||
# https://docs.astral.sh/uv/concepts/projects/dependencies/#optional-dependencies
|
||||
# TODO: make sure the levenshtein shit compiles on nix..
|
||||
|
|
@ -94,7 +96,6 @@ uis = [
|
|||
# https://docs.astral.sh/uv/concepts/projects/dependencies/#optional-dependencies
|
||||
]
|
||||
|
||||
[dependency-groups]
|
||||
# TODO: a toolset that makes debugging a `pikerd` service (tree) easy
|
||||
# to hack on directly using more or less the local env:
|
||||
# - xonsh + xxh
|
||||
|
|
@ -105,12 +106,11 @@ uis = [
|
|||
# use `uv --dev` to enable
|
||||
dev = [
|
||||
"pytest",
|
||||
"elasticsearch >=8.9.0, <9.0.0",
|
||||
"prompt-toolkit ==3.0.40",
|
||||
"cython >=3.0.0, <4.0.0",
|
||||
"greenback >=1.1.1, <2.0.0",
|
||||
"ruff>=0.9.6",
|
||||
"pyperclip>=1.9.0",
|
||||
# DE-specific
|
||||
"i3ipc>=2.2.1",
|
||||
|
||||
# ?from git, see below.
|
||||
|
|
@ -120,6 +120,19 @@ dev = [
|
|||
"pyqtgraph",
|
||||
|
||||
]
|
||||
lint = [
|
||||
# XXX, with flake.nix needs to be from nixpkgs
|
||||
"ruff>=0.9.6"
|
||||
#
|
||||
# ^TODO? these markers don't work; use deps-flags for now?
|
||||
# ; os_name != 'nixos' and platform_system != 'NixOS'",
|
||||
# ; defined('IN_NIX_SHELL')",
|
||||
]
|
||||
dbs = [
|
||||
"elasticsearch >=8.9.0, <9.0.0",
|
||||
]
|
||||
# ------ dependency-groups ------
|
||||
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
# https://docs.pytest.org/en/stable/reference/reference.html#configuration-options
|
||||
|
|
@ -132,24 +145,29 @@ console_output_style = 'progress'
|
|||
# https://docs.pytest.org/en/stable/how-to/plugins.html#disabling-plugins-from-autoloading
|
||||
# https://docs.pytest.org/en/stable/how-to/plugins.html#deactivating-unregistering-a-plugin-by-name
|
||||
addopts = '-p no:xonsh'
|
||||
# ------ tool.pytest ------
|
||||
|
||||
|
||||
[project.scripts]
|
||||
piker = "piker.cli:cli"
|
||||
pikerd = "piker.cli:pikerd"
|
||||
ledger = "piker.accounting.cli:ledger"
|
||||
# ------ project.scripts ------
|
||||
|
||||
[tool.hatch.build.targets.sdist]
|
||||
include = ["piker"]
|
||||
|
||||
[tool.hatch.build.targets.wheel]
|
||||
include = ["piker"]
|
||||
# ------ tool.hatch ------
|
||||
|
||||
|
||||
# TODO? move to a `uv.toml`?
|
||||
[tool.uv]
|
||||
python-preference = 'system'
|
||||
python-downloads = 'manual'
|
||||
# https://docs.astral.sh/uv/concepts/projects/dependencies/#default-groups
|
||||
default-groups = ['uis', 'dev']
|
||||
# ------ tool.uv ------
|
||||
|
||||
|
||||
[tool.uv.sources]
|
||||
|
|
|
|||
Loading…
Reference in New Issue