From patchwork Wed Apr 8 17:27:55 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christine Lemmer-Webber X-Patchwork-Id: 21168 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 313E127BBE1; Wed, 8 Apr 2020 18:29:19 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.9 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 0AB7B27BBE4 for ; Wed, 8 Apr 2020 18:29:18 +0100 (BST) Received: from localhost ([::1]:39024 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMEVp-0000v5-JJ for patchwork@mira.cbaines.net; Wed, 08 Apr 2020 13:29:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50299) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMEVc-0000rW-L4 for guix-patches@gnu.org; Wed, 08 Apr 2020 13:29:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jMEVa-0007Bo-Gj for guix-patches@gnu.org; Wed, 08 Apr 2020 13:29:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41337) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jMEVa-0007Bk-CM for guix-patches@gnu.org; Wed, 08 Apr 2020 13:29:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jMEVa-00043I-6H for guix-patches@gnu.org; Wed, 08 Apr 2020 13:29:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#40511] Add fava, a beancount web UI Resent-From: Christopher Lemmer Webber Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 08 Apr 2020 17:29:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 40511 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: 40511@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.158636689015513 (code B ref -1); Wed, 08 Apr 2020 17:29:02 +0000 Received: (at submit) by debbugs.gnu.org; 8 Apr 2020 17:28:10 +0000 Received: from localhost ([127.0.0.1]:52883 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jMEUd-000420-PK for submit@debbugs.gnu.org; Wed, 08 Apr 2020 13:28:10 -0400 Received: from lists.gnu.org ([209.51.188.17]:52646) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jMEUb-00041d-Oy for submit@debbugs.gnu.org; Wed, 08 Apr 2020 13:28:02 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50126) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jMEUZ-0000fD-Oi for guix-patches@gnu.org; Wed, 08 Apr 2020 13:28:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jMEUX-0006Dx-KO for guix-patches@gnu.org; Wed, 08 Apr 2020 13:27:59 -0400 Received: from dustycloud.org ([50.116.34.160]:45094) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jMEUX-0006DU-D1 for guix-patches@gnu.org; Wed, 08 Apr 2020 13:27:57 -0400 Received: from twig (localhost [127.0.0.1]) by dustycloud.org (Postfix) with ESMTPS id 47E5B2663C for ; Wed, 8 Apr 2020 13:27:56 -0400 (EDT) User-agent: mu4e 1.2.0; emacs 26.3 From: Christopher Lemmer Webber Date: Wed, 08 Apr 2020 13:27:55 -0400 Message-ID: <87d08h51lw.fsf@dustycloud.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches So it turns out fava, a web UI for beancount, is amazing, just amazing. I recommend everyone use it and switch to it and hug it and tell it how much they love and appreciate it. You can see an example version running here: https://fava.pythonanywhere.com/example-beancount-file/income_statement/ I got it "packaged" in the sense that the package works and runs. However it isn't good enough for Guix yet. - Needs to be separated out into separate commits - I lost patience with several dependencies' test requirments and disabled tests - At least one dependency's tests requires a newer pytest. That's not in master yet afaict because, based on this email: https://lists.gnu.org/archive/html/guix-devel/2019-10/msg00598.html It was waiting for Python 3.8.0 to hit core-updates. I haven't looked yet whether that's happening or not. I need to get back to other work right now, but figured that it was more helpful than nothing to leave a "it works, but isn't quite right" patch on the mailing list before I forgot. It's really quite close, but I'm drowning in tasks ATM. Maybe I can come back to this, though if someone else beat me to it, I wouldn't complain. - Chris From 220ab3414adb136d09d603ea96e5b321fe06af2e Mon Sep 17 00:00:00 2001 From: Christopher Lemmer Webber Date: Tue, 7 Apr 2020 16:10:21 -0400 Subject: [PATCH] fava and deps wip --- gnu/packages/finance.scm | 33 ++++ gnu/packages/python-xyz.scm | 317 ++++++++++++++++++++++++++++++++++++ 2 files changed, 350 insertions(+) diff --git a/gnu/packages/finance.scm b/gnu/packages/finance.scm index e666860392..5de5f168b0 100644 --- a/gnu/packages/finance.scm +++ b/gnu/packages/finance.scm @@ -1440,3 +1440,36 @@ a Qt GUI.") define financial transaction records in a text file, read them in memory, generate a variety of reports from them, and provides a web interface.") (license license:gpl2))) + +(define-public fava + (package + (name "fava") + (version "1.14") + (source + (origin + (method url-fetch) + (uri (pypi-uri "fava" version)) + (sha256 + (base32 + "181ypq2p7aaq2b76s55hxxbm1hykzf45mjjgm500h4dsaa167dqy")))) + (build-system python-build-system) + (propagated-inputs + `(("beancount" ,beancount) + ("python-babel" ,python-babel) + ("python-cheroot" ,python-cheroot) + ("python-click" ,python-click) + ("python-flask" ,python-flask) + ("python-flask-babel" ,python-flask-babel) + ("python-jinja2" ,python-jinja2) + ("python-markdown2" ,python-markdown2) + ("python-ply" ,python-ply) + ("python-simplejson" ,python-simplejson) + ("python-werkzeug" ,python-werkzeug))) + (native-inputs + `(("python-setuptools-scm" ,python-setuptools-scm))) + (home-page "https://beancount.github.io/fava/") + (synopsis + "Web interface for the accounting tool Beancount.") + (description + "Web interface for the accounting tool Beancount.") + (license license:expat))) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index d98b38411f..1191f4e780 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -19344,3 +19344,320 @@ an identity provider. The distribution contains examples of both. This package was originally written to work in a WSGI environment, but there are extensions that allow you to use it with other frameworks.") (license license:asl2.0))) + +(define-public python-jaraco-classes + (package + (name "python-jaraco.classes") + (version "3.1.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "jaraco.classes" version)) + (sha256 + (base32 + "1avsxzm5mwylmy2zbxq3xvn48z5djb0qy3hwv4ryncprivzri1n3")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + ;; Not importing the googleapis package for now + (add-after 'unpack 'ignore-googleapis + (lambda _ + (substitute* "setup.py" + (("'pytest-black-multipy',") "")) + #t))))) + (propagated-inputs + `(("python-more-itertools" ,python-more-itertools))) + (native-inputs + `(("python-pytest" ,python-pytest) + ("python-pytest-checkdocs" ,python-pytest-checkdocs) + ("python-pytest-cov" ,python-pytest-cov) + ("python-pytest-flake8" ,python-pytest-flake8) + ("python-setuptools-scm" ,python-setuptools-scm))) + (home-page + "https://github.com/jaraco/jaraco.classes") + (synopsis + "Utility functions for Python class constructs") + (description + "Utility functions for Python class constructs") + (license #f))) + +(define-public python-jaraco-functools + (package + (name "python-jaraco-functools") + (version "3.0.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "jaraco.functools" version)) + (sha256 + (base32 + "15vd7x4jillggb8xcg3cm00j1v6llhl16r0rqm0l4n2lyahfxc2w")))) + (build-system python-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + ;; Not importing the googleapis package for now + (add-after 'unpack 'ignore-googleapis + (lambda _ + (substitute* "setup.py" + (("'pytest-black-multipy',") "")) + #t))))) + (propagated-inputs + `(("python-more-itertools" ,python-more-itertools))) + (native-inputs + `(("python-mock" ,python-mock) + ("python-jaraco-classes" ,python-jaraco-classes) + ("python-pytest" ,python-pytest) + ("python-pytest-checkdocs" + ,python-pytest-checkdocs) + ("python-pytest-cov" ,python-pytest-cov) + ("python-pytest-flake8" ,python-pytest-flake8) + ("python-six" ,python-six) + ("python-setuptools-scm" ,python-setuptools-scm))) + (home-page + "https://github.com/jaraco/jaraco.functools") + (synopsis "Functools like those found in stdlib") + (description + "Functools like those found in stdlib") + (license #f))) + +(define-public python-jaraco-text + (package + (name "python-jaraco-text") + (version "3.2.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "jaraco.text" version)) + (sha256 + (base32 + "1v0hz3h74m31jlbc5bxwkvrx1h2n7887bajrg1n1c3yc4q8qn1z5")))) + (build-system python-build-system) + (propagated-inputs + `(("python-jaraco-functools" ,python-jaraco-functools) + ("python-six" ,python-six))) + (native-inputs + `(("python-setuptools-scm" ,python-setuptools-scm) + ("python-pytest" ,python-pytest) + ("python-pytest-checkdocs" + ,python-pytest-checkdocs) + ("python-pytest-cov" ,python-pytest-cov) + ("python-pytest-flake8" ,python-pytest-flake8))) + (home-page + "https://github.com/jaraco/jaraco.text") + (synopsis "Module for text manipulation") + (description "Module for text manipulation") + (license #f))) + +(define-public python-pytest-testmon + (package + (name "python-pytest-testmon") + (version "1.0.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pytest-testmon" version)) + (sha256 + (base32 + "1iasz23zrzjgbak8jiq12i4zmkk8f6dmcdhfxz8m2q03agcidc7x")))) + (build-system python-build-system) + (propagated-inputs + `(("python-coverage" ,python-coverage) + ("python-pytest" ,python-pytest))) + (home-page "https://testmon.org") + (synopsis + "selects tests affected by changed files and methods") + (description + "selects tests affected by changed files and methods") + (license #f))) + +(define-public python-pytest-watch + (package + (name "python-pytest-watch") + (version "4.2.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pytest-watch" version)) + (sha256 + (base32 + "1fflnd3varpqy8yzcs451n8h7wmjyx1408qdin5p2qdksl1ny4q6")))) + (build-system python-build-system) + (propagated-inputs + `(("python-colorama" ,python-colorama) + ("python-docopt" ,python-docopt) + ("python-pytest" ,python-pytest) + ("python-watchdog" ,python-watchdog))) + (home-page + "http://github.com/joeyespo/pytest-watch") + (synopsis + "Local continuous test runner with pytest and watchdog.") + (description + "Local continuous test runner with pytest and watchdog.") + (license license:expat))) + +(define-public python-requests-unixsocket + (package + (name "python-requests-unixsocket") + (version "0.2.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "requests-unixsocket" version)) + (sha256 + (base32 + "1sn12y4fw1qki5gxy9wg45gmdrxhrndwfndfjxhpiky3mwh1lp4y")))) + ;; why tied to waitress==0.9.0 I have no idea + (arguments + ;; We don't have all the test deps yet... missing pyttest-cache + `(#:tests? #f + #:phases + (modify-phases %standard-phases + ;; Not importing the googleapis package for now + (add-after 'unpack 'ignore-googleapis + (lambda _ + (delete-file "test-requirements.txt") + #t))))) + (build-system python-build-system) + (propagated-inputs + `(("python-requests" ,python-requests) + ("python-urllib3" ,python-urllib3))) + (native-inputs + `(("python-pbr-minimal" ,python-pbr-minimal) + + ;; ("python-waitress" ,python-waitress) + ;; ("python-pep8" ,python-pep8) + ;; ("python-apipkg" ,python-apipkg) + ;; ("python-appdirs" ,python-appdirs) + ;; ("python-execnet" ,python-execnet) + ;; ("python-packaging" ,python-packaging) + ;; ("python-py" ,python-py) + ;; ("python-pyparsing" ,python-pyparsing)) + )) + (home-page + "https://github.com/msabramo/requests-unixsocket") + (synopsis + "Use requests to talk HTTP via a UNIX domain socket") + (description + "Use requests to talk HTTP via a UNIX domain socket") + (license #f))) + +(define-public python-trustme + (package + (name "python-trustme") + (version "0.6.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "trustme" version)) + (sha256 + (base32 + "0v3vr5z6apnfmklf07m45kv5kaqvm6hxrkaqywch57bjd2siiywx")))) + (build-system python-build-system) + (propagated-inputs + `(("python-cryptography" ,python-cryptography) + ("python-idna" ,python-idna))) + (home-page + "https://github.com/python-trio/trustme") + (synopsis + "#1 quality TLS certs while you wait, for the discerning tester") + (description + "#1 quality TLS certs while you wait, for the discerning tester") + (license #f))) + +#;(define-public python-pytest-black-multipy + (package + (name "python-pytest-black-multipy") + (version "1.0.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pytest-black-multipy" version)) + (sha256 + (base32 + "1ciwa99fnz3ngbsvcjvxqz4k1vwfmvpxaj7qf5vxkx0awvczhsyd")))) + (build-system python-build-system) + (native-inputs + `(("python-pytest" ,python-pytest) + ("python-pytest-checkdocs" + ,python-pytest-checkdocs) + ("python-pytest-flake8" ,python-pytest-flake8))) + (home-page "https://github.com/jaraco/skeleton") + (synopsis "Allow '--black' on older Pythons") + (description "Allow '--black' on older Pythons") + (license #f))) + +(define-public python-cheroot + (package + (name "python-cheroot") + (version "8.3.0") + (source + (origin + (method url-fetch) + (uri (pypi-uri "cheroot" version)) + (sha256 + (base32 + "0cc9cb5via001zkna0i2qp5s0bn1w327q6k7fba2f5v650gpwmx0")))) + (build-system python-build-system) + (propagated-inputs + `(("python-jaraco-functools" ,python-jaraco-functools) + ("python-more-itertools" ,python-more-itertools) + ("python-six" ,python-six))) + (arguments + ;; needs a newer pytest :\ + `(#:tests? #f + ;; So we're also kicking out the dependency giving us + ;; trouble... + #:phases + (modify-phases %standard-phases + ;; Not importing the googleapis package for now + (add-after 'unpack 'ignore-googleapis + (lambda _ + (substitute* "setup.py" + (("'python-pytest-testmon',") "")) + #t))))) + (native-inputs + `(("python-codecov" ,python-codecov) + ("python-colorama" ,python-colorama) + ("python-coverage" ,python-coverage) + ("python-jaraco-text" ,python-jaraco-text) + ("python-pyopenssl" ,python-pyopenssl) + ("python-pytest" ,python-pytest) + ("python-pytest-cov" ,python-pytest-cov) + ("python-pytest-mock" ,python-pytest-mock) + ("python-pytest-sugar" ,python-pytest-sugar) + ; ("python-pytest-testmon" ,python-pytest-testmon) + ("python-pytest-watch" ,python-pytest-watch) + ("python-pytest-xdist" ,python-pytest-xdist) + ("python-requests-unixsocket" + ,python-requests-unixsocket) + ("python-trustme" ,python-trustme) + ("python-urllib3" ,python-urllib3) + ("python-setuptools-scm-git-archive" ,python-setuptools-scm-git-archive))) + (home-page "https://cheroot.cherrypy.org") + (synopsis + "Highly-optimized, pure-python HTTP server") + (description + "Highly-optimized, pure-python HTTP server") + (license #f))) + +(define-public python-markdown2 + (package + (name "python-markdown2") + (version "2.3.8") + (source + (origin + (method url-fetch) + (uri (pypi-uri "markdown2" version)) + (sha256 + (base32 + "1gjxy3j7qgl0fzmdqd0jx0gv13s1z9n1g3fd3s72rh4nnc08xy3z")))) + (build-system python-build-system) + (home-page + "https://github.com/trentm/python-markdown2") + (synopsis + "A fast and complete Python implementation of Markdown") + (description + "A fast and complete Python implementation of Markdown") + (license license:expat))) -- 2.26.0