From 16589d357def7a11fab186d5a92f0fca0f759897 Mon Sep 17 00:00:00 2001 From: Fang-Pen Lin Date: Sun, 12 May 2024 18:37:02 +0000 Subject: [PATCH 1/5] maintainers: add fangpen --- maintainers/maintainer-list.nix | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/maintainers/maintainer-list.nix b/maintainers/maintainer-list.nix index f43f46f7c4df..62917ae7b104 100644 --- a/maintainers/maintainer-list.nix +++ b/maintainers/maintainer-list.nix @@ -6469,6 +6469,15 @@ githubId = 225893; name = "James Cook"; }; + fangpen = { + email = "hello@fangpenlin.com"; + github = "fangpenlin"; + githubId = 201615; + name = "Fang-Pen Lin"; + keys = [{ + fingerprint = "7130 3454 A7CD 0F0A 941A F9A3 2A26 9964 AD29 2131"; + }]; + }; farcaller = { name = "Vladimir Pouzanov"; email = "farcaller@gmail.com"; From b29fd82b11964588948547833bf19d77efb2cdfd Mon Sep 17 00:00:00 2001 From: Fang-Pen Lin Date: Fri, 10 May 2024 04:01:47 +0000 Subject: [PATCH 2/5] beanhub-extract: init at 0.0.7 --- .../beanhub-extract/default.nix | 47 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 49 insertions(+) create mode 100644 pkgs/development/python-modules/beanhub-extract/default.nix diff --git a/pkgs/development/python-modules/beanhub-extract/default.nix b/pkgs/development/python-modules/beanhub-extract/default.nix new file mode 100644 index 000000000000..c0c623b88f30 --- /dev/null +++ b/pkgs/development/python-modules/beanhub-extract/default.nix @@ -0,0 +1,47 @@ +{ lib +, fetchFromGitHub +, buildPythonPackage +, pythonOlder +, pytestCheckHook +, poetry-core +, pytz +}: + +buildPythonPackage rec { + pname = "beanhub-extract"; + version = "0.0.7"; + pyproject = true; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "LaunchPlatform"; + repo = "beanhub-extract"; + rev = "refs/tags/${version}"; + hash = "sha256-Wt8ZCyCaERNXEd0/Q89QWUW/wGFSHAP2RZLhnv5xkgY="; + }; + + build-system = [ + poetry-core + ]; + + dependencies = [ + pytz + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "beanhub_extract" + ]; + + meta = { + description = "The simple library for extracting all kind of bank account transaction export files, mostly for beanhub-import to ingest and generate transactions"; + homepage = "https://github.com/LaunchPlatform/beanhub-extract/"; + changelog = "https://github.com/LaunchPlatform/beanhub-extract/releases/tag/${version}"; + license = with lib.licenses; [ mit ]; + maintainers = with lib.maintainers; [ fangpen ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index d552fd2ffc50..e84832d9829b 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1463,6 +1463,8 @@ self: super: with self; { beancount-docverif = callPackage ../development/python-modules/beancount-docverif { }; + beanhub-extract = callPackage ../development/python-modules/beanhub-extract { }; + beanstalkc = callPackage ../development/python-modules/beanstalkc { }; beartype = callPackage ../development/python-modules/beartype { }; From 9ec842fbf4408216ad47e571cde4febaf618ca73 Mon Sep 17 00:00:00 2001 From: Fang-Pen Lin Date: Fri, 10 May 2024 18:41:01 +0000 Subject: [PATCH 3/5] beanhub-import: init at 0.1.5 --- .../python-modules/beanhub-import/default.nix | 59 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 61 insertions(+) create mode 100644 pkgs/development/python-modules/beanhub-import/default.nix diff --git a/pkgs/development/python-modules/beanhub-import/default.nix b/pkgs/development/python-modules/beanhub-import/default.nix new file mode 100644 index 000000000000..7097c45356a1 --- /dev/null +++ b/pkgs/development/python-modules/beanhub-import/default.nix @@ -0,0 +1,59 @@ +{ lib +, fetchFromGitHub +, buildPythonPackage +, pythonOlder +, pytestCheckHook +, beancount-black +, beancount-parser +, beanhub-extract +, jinja2 +, poetry-core +, pydantic +, pytz +, pyyaml +}: + +buildPythonPackage rec { + pname = "beanhub-import"; + version = "0.1.5"; + pyproject = true; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "LaunchPlatform"; + repo = "beanhub-import"; + rev = "refs/tags/${version}"; + hash = "sha256-BH+d7cKC83b7T2Z1Xlwpsv3KACo1vDn6v65tElhir/c="; + }; + + build-system = [ + poetry-core + ]; + + dependencies = [ + beancount-black + beancount-parser + beanhub-extract + jinja2 + pydantic + pytz + pyyaml + ]; + + nativeCheckInputs = [ + pytestCheckHook + ]; + + pythonImportsCheck = [ + "beanhub_import" + ]; + + meta = { + description = "Declarative idempotent rule-based Beancount transaction import engine in Python"; + homepage = "https://github.com/LaunchPlatform/beanhub-import/"; + changelog = "https://github.com/LaunchPlatform/beanhub-import/releases/tag/${version}"; + license = with lib.licenses; [ mit ]; + maintainers = with lib.maintainers; [ fangpen ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index e84832d9829b..cbffa4d2e602 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1465,6 +1465,8 @@ self: super: with self; { beanhub-extract = callPackage ../development/python-modules/beanhub-extract { }; + beanhub-import = callPackage ../development/python-modules/beanhub-import { }; + beanstalkc = callPackage ../development/python-modules/beanstalkc { }; beartype = callPackage ../development/python-modules/beartype { }; From 9438b410295cde4afcbdbeb85263bfc51c2fd594 Mon Sep 17 00:00:00 2001 From: Fang-Pen Lin Date: Fri, 10 May 2024 18:42:33 +0000 Subject: [PATCH 4/5] beanhub-forms: init at 0.1.3 --- .../python-modules/beanhub-forms/default.nix | 55 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 57 insertions(+) create mode 100644 pkgs/development/python-modules/beanhub-forms/default.nix diff --git a/pkgs/development/python-modules/beanhub-forms/default.nix b/pkgs/development/python-modules/beanhub-forms/default.nix new file mode 100644 index 000000000000..27cf644b96f0 --- /dev/null +++ b/pkgs/development/python-modules/beanhub-forms/default.nix @@ -0,0 +1,55 @@ +{ lib +, fetchFromGitHub +, buildPythonPackage +, pythonOlder +, pytestCheckHook +, jinja2 +, multidict +, poetry-core +, pydantic +, pyyaml +, wtforms +}: + +buildPythonPackage rec { + pname = "beanhub-forms"; + version = "0.1.3"; + pyproject = true; + + disabled = pythonOlder "3.9"; + + src = fetchFromGitHub { + owner = "LaunchPlatform"; + repo = "beanhub-forms"; + rev = "refs/tags/${version}"; + hash = "sha256-313c+ENmTe1LyfEiMXNB9AUoGx3Yv/1D0T3HnAbd+Zw="; + }; + + build-system = [ + poetry-core + ]; + + dependencies = [ + jinja2 + pydantic + pyyaml + wtforms + ]; + + nativeCheckInputs = [ + multidict + pytestCheckHook + ]; + + pythonImportsCheck = [ + "beanhub_forms" + ]; + + meta = { + description = "Library for generating and processing BeanHub's custom forms"; + homepage = "https://github.com/LaunchPlatform/beanhub-forms/"; + changelog = "https://github.com/LaunchPlatform/beanhub-forms/releases/tag/${version}"; + license = with lib.licenses; [ mit ]; + maintainers = with lib.maintainers; [ fangpen ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index cbffa4d2e602..bbd3af049c0e 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1465,6 +1465,8 @@ self: super: with self; { beanhub-extract = callPackage ../development/python-modules/beanhub-extract { }; + beanhub-forms = callPackage ../development/python-modules/beanhub-forms { }; + beanhub-import = callPackage ../development/python-modules/beanhub-import { }; beanstalkc = callPackage ../development/python-modules/beanstalkc { }; From 34225aa06941e699157ec22d205ea2970b986874 Mon Sep 17 00:00:00 2001 From: Fang-Pen Lin Date: Fri, 10 May 2024 18:44:41 +0000 Subject: [PATCH 5/5] beanhub-cli: init at 1.1.3 --- .../python-modules/beanhub-cli/default.nix | 78 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + pkgs/top-level/python-packages.nix | 2 + 3 files changed, 82 insertions(+) create mode 100644 pkgs/development/python-modules/beanhub-cli/default.nix diff --git a/pkgs/development/python-modules/beanhub-cli/default.nix b/pkgs/development/python-modules/beanhub-cli/default.nix new file mode 100644 index 000000000000..25c003e19292 --- /dev/null +++ b/pkgs/development/python-modules/beanhub-cli/default.nix @@ -0,0 +1,78 @@ +{ lib +, fetchFromGitHub +, buildPythonPackage +, pythonOlder +, pytestCheckHook +, beancount-black +, beancount-parser +, beanhub-forms +, beanhub-import +, click +, fastapi +, httpx +, jinja2 +, poetry-core +, pydantic +, pydantic-core +, pydantic-settings +, pytz +, pyyaml +, rich +, starlette-wtf +, uvicorn +}: + +buildPythonPackage rec { + pname = "beanhub-cli"; + version = "1.1.3"; + pyproject = true; + + disabled = pythonOlder "3.10"; + + src = fetchFromGitHub { + owner = "LaunchPlatform"; + repo = "beanhub-cli"; + rev = "refs/tags/${version}"; + hash = "sha256-vYBbaUVJAs+aIp6aQpJb62DEDxe/sQTzgOkjPq6ADoc="; + }; + + build-system = [ + poetry-core + ]; + + dependencies = [ + beancount-black + beancount-parser + beanhub-forms + beanhub-import + click + fastapi + jinja2 + pydantic + pydantic-core + pydantic-settings + pytz + pyyaml + rich + starlette-wtf + uvicorn + ]; + + nativeCheckInputs = [ + pytestCheckHook + httpx + ]; + + pythonImportsCheck = [ + "beanhub_cli" + ]; + + meta = { + description = "Command line tools for BeanHub or Beancount users"; + mainProgram = "bh"; + homepage = "https://github.com/LaunchPlatform/beanhub-cli/"; + changelog = "https://github.com/LaunchPlatform/beanhub-cli/releases/tag/${version}"; + license = with lib.licenses; [ mit ]; + maintainers = with lib.maintainers; [ fangpen ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 981162944ef7..1b4f6afd9c26 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -36260,6 +36260,8 @@ with pkgs; beancount-black = with python3.pkgs; toPythonApplication beancount-black; + beanhub-cli = with python3.pkgs; toPythonApplication beanhub-cli; + bean-add = callPackage ../applications/office/beancount/bean-add.nix { }; bench = haskell.lib.compose.justStaticExecutables haskellPackages.bench; diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index bbd3af049c0e..387102961276 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -1463,6 +1463,8 @@ self: super: with self; { beancount-docverif = callPackage ../development/python-modules/beancount-docverif { }; + beanhub-cli = callPackage ../development/python-modules/beanhub-cli { }; + beanhub-extract = callPackage ../development/python-modules/beanhub-extract { }; beanhub-forms = callPackage ../development/python-modules/beanhub-forms { };