python312Packages.textual-fastdatatable: refactor

- enable tests
- add changelog to meta
This commit is contained in:
Fabian Affolter 2024-11-18 16:06:34 +01:00
parent 201985dc66
commit add9ba09bb

View File

@ -1,13 +1,17 @@
{
lib,
buildPythonPackage,
fetchPypi,
fetchFromGitHub,
poetry-core,
pyarrow,
pytz,
textual,
tzdata,
pythonOlder,
polars,
pytest-asyncio,
pytest-textual-snapshot,
pytestCheckHook,
}:
buildPythonPackage rec {
@ -15,36 +19,45 @@ buildPythonPackage rec {
version = "0.10.0";
pyproject = true;
src = fetchPypi {
pname = "textual_fastdatatable";
inherit version;
hash = "sha256-45uLpUzBb+xH+a+DIFiXB4YjabyFE4wmv1Tw3JtpNow=";
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 ];
};