diff --git a/pkgs/by-name/ha/harlequin/package.nix b/pkgs/by-name/ha/harlequin/package.nix index ca41bb550b6d..4f9afa90bd28 100644 --- a/pkgs/by-name/ha/harlequin/package.nix +++ b/pkgs/by-name/ha/harlequin/package.nix @@ -6,49 +6,48 @@ testers, nix-update-script, versionCheckHook, + glibcLocales, withPostgresAdapter ? true, withBigQueryAdapter ? true, }: python3Packages.buildPythonApplication rec { pname = "harlequin"; - version = "1.25.0"; + version = "1.25.2"; pyproject = true; src = fetchFromGitHub { owner = "tconbeer"; repo = "harlequin"; rev = "refs/tags/v${version}"; - hash = "sha256-iRl91GqYigD6t0aVVShBg835yhlPxgfZcQCdAGUoc1k="; + hash = "sha256-ov9pMvFzJAMfOM7JeSgnp6dZ424GiRaH7W5OCKin9Jk="; }; - build-system = with python3Packages; [ - poetry-core - ]; + pythonRelaxDeps = [ "textual" ]; + + build-system = with python3Packages; [ poetry-core ]; + + nativeBuildInputs = [ glibcLocales ]; dependencies = with python3Packages; [ + click + duckdb + importlib-metadata + numpy + packaging + platformdirs + questionary + rich-click + sqlfmt textual textual-fastdatatable textual-textarea - click - rich-click - duckdb - sqlfmt - platformdirs - importlib-metadata tomlkit - questionary - numpy - packaging ] ++ lib.optionals withPostgresAdapter [ harlequin-postgres ] ++ lib.optionals withBigQueryAdapter [ harlequin-bigquery ]; - pythonRelaxDeps = [ - "textual" - ]; - pythonImportsCheck = [ "harlequin" "harlequin_duckdb" @@ -60,17 +59,37 @@ python3Packages.buildPythonApplication rec { updateScript = nix-update-script { }; }; - nativeCheckInputs = [ - versionCheckHook + preCheck = '' + export HOME=$(mktemp -d) + ''; + + nativeCheckInputs = + [ + versionCheckHook + ] + ++ (with python3Packages; [ + pytest-asyncio + pytestCheckHook + ]); + + disabledTests = [ + # Tests require network access + "test_connect_extensions" + "test_connect_prql" + ]; + + disabledTestPaths = [ + # Tests requires more setup + "tests/functional_tests/" ]; meta = { description = "The SQL IDE for Your Terminal"; homepage = "https://harlequin.sh"; - mainProgram = "harlequin"; + changelog = "https://github.com/tconbeer/harlequin/releases/tag/v${version}"; license = lib.licenses.mit; + mainProgram = "harlequin"; maintainers = with lib.maintainers; [ pcboy ]; platforms = lib.platforms.unix; - changelog = "https://github.com/tconbeer/harlequin/releases/tag/v${version}"; }; } diff --git a/pkgs/development/python-modules/sqlfmt/default.nix b/pkgs/development/python-modules/sqlfmt/default.nix index 6b35dbcfc44f..3d191ea49208 100644 --- a/pkgs/development/python-modules/sqlfmt/default.nix +++ b/pkgs/development/python-modules/sqlfmt/default.nix @@ -1,17 +1,20 @@ { lib, - buildPythonPackage, - fetchPypi, - fetchFromGitHub, - importlib-metadata, black, - poetry-core, + buildPythonPackage, click, + fetchFromGitHub, + fetchPypi, + gitpython, + importlib-metadata, jinja2, platformdirs, + poetry-core, + pytest-asyncio, + pytestCheckHook, + pythonOlder, tomli, tqdm, - gitpython, }: buildPythonPackage rec { @@ -19,6 +22,8 @@ buildPythonPackage rec { version = "0.23.3"; pyproject = true; + disabled = pythonOlder "3.9"; + src = fetchFromGitHub { owner = "tconbeer"; repo = "sqlfmt"; @@ -26,9 +31,9 @@ buildPythonPackage rec { hash = "sha256-kbluj29P1HwTaCYv1Myslak9s8FFm2e/eHdGgi3H4i0="; }; - build-system = [ - poetry-core - ]; + pythonRelaxDeps = [ "platformdirs" ]; + + build-system = [ poetry-core ]; dependencies = [ click @@ -40,25 +45,26 @@ buildPythonPackage rec { ]; optional-dependencies = { - jinjafmt = [ - black - ]; - sqlfmt_primer = [ - gitpython - ]; + jinjafmt = [ black ]; + sqlfmt_primer = [ gitpython ]; }; - pythonRelaxDeps = [ - "platformdirs" - ]; + nativeCheckInputs = [ + pytest-asyncio + pytestCheckHook + ] ++ lib.flatten (builtins.attrValues optional-dependencies); - pythonImportsCheck = [ - "sqlfmt" - ]; + preCheck = '' + export HOME=$(mktemp -d) + export PATH="$PATH:$out/bin"; + ''; + + pythonImportsCheck = [ "sqlfmt" ]; meta = { description = "Sqlfmt formats your dbt SQL files so you don't have to"; homepage = "https://github.com/tconbeer/sqlfmt"; + changelog = "https://github.com/tconbeer/sqlfmt/blob/${src.rev}/CHANGELOG.md"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ pcboy ]; mainProgram = "sqlfmt"; diff --git a/pkgs/development/python-modules/textual-fastdatatable/default.nix b/pkgs/development/python-modules/textual-fastdatatable/default.nix index 16d5418a2736..54f830cc85d3 100644 --- a/pkgs/development/python-modules/textual-fastdatatable/default.nix +++ b/pkgs/development/python-modules/textual-fastdatatable/default.nix @@ -1,50 +1,63 @@ { lib, buildPythonPackage, - fetchPypi, + fetchFromGitHub, poetry-core, pyarrow, pytz, textual, tzdata, + pythonOlder, polars, + pytest-asyncio, + pytest-textual-snapshot, + pytestCheckHook, }: buildPythonPackage rec { pname = "textual-fastdatatable"; - version = "0.9.0"; + version = "0.10.0"; pyproject = true; - src = fetchPypi { - pname = "textual_fastdatatable"; - inherit version; - hash = "sha256-AS3SiwetCHkCMu8H81xbp5QvN/2GCvMlWgU4qZKvBRU="; + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "tconbeer"; + repo = "textual-fastdatatable"; + rev = "refs/tags/v${version}"; + hash = "sha256-r1evN69etFn21TkXPLuAh1OxIsurDDyPyYOKQR5uUos="; }; - build-system = [ - poetry-core - ]; + build-system = [ poetry-core ]; dependencies = [ pyarrow pytz textual tzdata - ]; + ] ++ textual.optional-dependencies.syntax; optional-dependencies = { - polars = [ - polars - ]; + polars = [ polars ]; }; - pythonImportsCheck = [ - "textual_fastdatatable" + nativeCheckInputs = [ + pytest-asyncio + pytest-textual-snapshot + pytestCheckHook + ] ++ lib.flatten (builtins.attrValues optional-dependencies); + + pythonImportsCheck = [ "textual_fastdatatable" ]; + + disabledTestPaths = [ + # Tests are comparing CLI output + "tests/snapshot_tests/test_snapshots.py" ]; meta = { description = "A performance-focused reimplementation of Textual's DataTable widget, with a pluggable data storage backend"; - homepage = "https://pypi.org/project/textual-fastdatatable/"; + homepage = "https://github.com/tconbeer/textual-fastdatatable"; + changelog = "https://github.com/tconbeer/textual-fastdatatable/releases/tag/v${version}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ pcboy ]; }; diff --git a/pkgs/development/python-modules/textual-textarea/default.nix b/pkgs/development/python-modules/textual-textarea/default.nix index 74293ee3c2e4..fb8639a84302 100644 --- a/pkgs/development/python-modules/textual-textarea/default.nix +++ b/pkgs/development/python-modules/textual-textarea/default.nix @@ -1,39 +1,47 @@ { lib, buildPythonPackage, - fetchPypi, + fetchFromGitHub, poetry-core, pyperclip, + pytest-asyncio, + pytestCheckHook, + pythonOlder, textual, }: buildPythonPackage rec { pname = "textual-textarea"; - version = "0.14.2"; + version = "0.14.4"; pyproject = true; - src = fetchPypi { - pname = "textual_textarea"; - inherit version; - hash = "sha256-AJU7BBoev6pBrLhvbfF4I7l+E8YnO5jCD5OIsNf6NW0="; + disabled = pythonOlder "3.8"; + + src = fetchFromGitHub { + owner = "tconbeer"; + repo = "textual-textarea"; + rev = "refs/tags/v${version}"; + hash = "sha256-tmbSCU1VgxR9aXG22UVpweD71dVmhKSRBTDm1Gf33jM="; }; - build-system = [ - poetry-core - ]; + build-system = [ poetry-core ]; dependencies = [ pyperclip textual + ] ++ textual.optional-dependencies.syntax; + + nativeCheckInputs = [ + pytest-asyncio + pytestCheckHook ]; - pythonImportsCheck = [ - "textual_textarea" - ]; + pythonImportsCheck = [ "textual_textarea" ]; meta = { description = "A text area (multi-line input) with syntax highlighting for Textual"; - homepage = "https://pypi.org/project/textual-textarea/"; + homepage = "https://github.com/tconbeer/textual-textarea"; + changelog = "https://github.com/tconbeer/textual-textarea/releases/tag/v${version}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ pcboy ]; }; diff --git a/pkgs/development/python-modules/textual/default.nix b/pkgs/development/python-modules/textual/default.nix index f04ba71578a9..826520242513 100644 --- a/pkgs/development/python-modules/textual/default.nix +++ b/pkgs/development/python-modules/textual/default.nix @@ -20,7 +20,7 @@ buildPythonPackage rec { pname = "textual"; - version = "0.82.0"; + version = "0.86.1"; pyproject = true; disabled = pythonOlder "3.8"; @@ -29,7 +29,7 @@ buildPythonPackage rec { owner = "Textualize"; repo = "textual"; rev = "refs/tags/v${version}"; - hash = "sha256-belpoXQ+CkTchK+FjI/Ur8v4cNgzX39xLdNfPCwaU6E="; + hash = "sha256-5msCFv79nAmoaP9gZxV3DXMLTyVlSFb+qyA5jHWwc50="; }; build-system = [ poetry-core ];