[PATCH 0/4] gnu: add watson

  • Open
  • quality assurance status badge
Details
2 participants
  • Sebastian Gibb
  • Maxime Devos
Owner
unassigned
Submitted by
Sebastian Gibb
Severity
normal
S
S
Sebastian Gibb wrote on 12 Apr 2021 17:45
(address . guix-patches@gnu.org)(name . Sebastian Gibb)(address . mail@sebastiangibb.de)
20210412154600.10122-1-mail@sebastiangibb.de
Hi,

these commits add watson, a CLI time tracker to guix.

Best wishes,

Sebastian

Sebastian Gibb (4):
gnu: python-arrow: Update to 1.0.3.
gnu: Add python-click-didyoumean
gnu: Add python-pytest-datafiles.
gnu: Add watson.

gnu/packages/python-check.scm | 20 ++++++++++++++++
gnu/packages/python-xyz.scm | 20 ++++++++++++++++
gnu/packages/time.scm | 45 +++++++++++++++++++++++++++++++++--
3 files changed, 83 insertions(+), 2 deletions(-)

--
2.31.1
S
S
Sebastian Gibb wrote on 12 Apr 2021 17:48
[PATCH 1/4] gnu: python-arrow: Update to 1.0.3.
(address . 47730@debbugs.gnu.org)(name . Sebastian Gibb)(address . mail@sebastiangibb.de)
20210412154852.10255-1-mail@sebastiangibb.de
* gnu/packages/time.scm (python-arrow): Update to 1.0.3.
---
gnu/packages/time.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)

Toggle diff (22 lines)
diff --git a/gnu/packages/time.scm b/gnu/packages/time.scm
index d6ebb59a1e..dfade604a3 100644
--- a/gnu/packages/time.scm
+++ b/gnu/packages/time.scm
@@ -414,13 +414,13 @@ timestamps.")
(define-public python-arrow
(package
(name "python-arrow")
- (version "0.17.0")
+ (version "1.0.3")
(source (origin
(method url-fetch)
(uri (pypi-uri "arrow" version))
(sha256
(base32
- "1m3fpz96w3g08i9x9cpqh3cr795y9zbj1bfnay3ccdhxv86d227z"))))
+ "0793badh4hgbk2c5g70hmbl7n3d4g5d87bcflld0w9rjwy59r71r"))))
(build-system python-build-system)
(arguments
`(#:phases
--
2.31.1
S
S
Sebastian Gibb wrote on 12 Apr 2021 17:48
[PATCH 2/4] gnu: Add python-click-didyoumean
(address . 47730@debbugs.gnu.org)(name . Sebastian Gibb)(address . mail@sebastiangibb.de)
20210412154852.10255-2-mail@sebastiangibb.de
* gnu/packages/python-xyz.scm (python-click-didyoumean): New variable.
---
gnu/packages/python-xyz.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Toggle diff (30 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index bdb127935a..cbb0a38fff 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -24484,3 +24484,23 @@ apply various transformations to plain text in order to yield
typographically-improved HTML. While often used in conjunction with Jinja and
Django template systems, the filters can be used in any environment.")
(license license:bsd-3)))
+
+(define-public python-click-didyoumean
+ (package
+ (name "python-click-didyoumean")
+ (version "0.0.3")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "click-didyoumean" version))
+ (sha256
+ (base32
+ "1svaza5lpvdbmyrx5xi0riqzq4hb9wnlpqrg6r8zy14pbi42j8hi"))))
+ (build-system python-build-system)
+ (inputs
+ `(("python-click" ,python-click)))
+ (home-page "https://github.com/click-contrib/click-didyoumean")
+ (synopsis "Git-like did-you-mean feature in click")
+ (description
+ "This package provides a Python library for a git-like did-you-mean
+feature in click.")
+ (license license:expat)))
--
2.31.1
S
S
Sebastian Gibb wrote on 12 Apr 2021 17:48
[PATCH 3/4] gnu: Add python-pytest-datafiles.
(address . 47730@debbugs.gnu.org)(name . Sebastian Gibb)(address . mail@sebastiangibb.de)
20210412154852.10255-3-mail@sebastiangibb.de
* gnu/packages/python-check.scm (python-pytest-datafiles): New variable.
---
gnu/packages/python-check.scm | 20 ++++++++++++++++++++
1 file changed, 20 insertions(+)

Toggle diff (30 lines)
diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index 961d245630..b086218313 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -1310,3 +1310,23 @@ help in debugging failures and optimizing the scheduler to improve speed.")
(description "A pytest plugin for Sanic. It helps you to test your
code asynchronously.")
(license license:expat)))
+
+(define-public python-pytest-datafiles
+ (package
+ (name "python-pytest-datafiles")
+ (version "2.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "pytest-datafiles" version))
+ (sha256
+ (base32
+ "1yfvaqbqvjfikz215kwn6qiwwn9girka93zq4jphgfyvn75jjcql"))))
+ (build-system python-build-system)
+ (native-inputs
+ `(("python-pytest" ,python-pytest)))
+ (home-page "https://github.com/omarkohl/pytest-datafiles")
+ (synopsis "Pytest plugin to create a tmpdir")
+ (description
+ "A pytest plugin to create a tmpdir containing a preconfigured set of
+files and/or directories.")
+ (license license:expat)))
--
2.31.1
S
S
Sebastian Gibb wrote on 12 Apr 2021 17:48
[PATCH 4/4] gnu: Add watson.
(address . 47730@debbugs.gnu.org)(name . Sebastian Gibb)(address . mail@sebastiangibb.de)
20210412154852.10255-4-mail@sebastiangibb.de
* gnu/packages/time.scm (watson): New variable.
---
gnu/packages/time.scm | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)

Toggle diff (58 lines)
diff --git a/gnu/packages/time.scm b/gnu/packages/time.scm
index dfade604a3..057c72b125 100644
--- a/gnu/packages/time.scm
+++ b/gnu/packages/time.scm
@@ -41,6 +41,8 @@
#:use-module (gnu packages golang)
#:use-module (gnu packages perl)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-check)
+ #:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages terminals)
#:use-module (gnu packages textutils)
@@ -540,3 +542,42 @@ calls.")
from a starting point you provide. The user can pause and resume the
countdown from the text user interface.")
(license expat)))
+
+(define-public watson
+ (package
+ (name "watson")
+ (version "2.0.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/tailordev/watson")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1yxqjirv7cpg4hqj4l3a53p3p3kl82bcx6drgvl9v849vcc3l7s0"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases (modify-phases %standard-phases
+ (replace 'check
+ (lambda _
+ (invoke "pytest")
+ #t)))))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)
+ ("python-pytest-datafiles" ,python-pytest-datafiles)
+ ("python-pytest-mock" ,python-pytest-mock)))
+ (inputs
+ `(("python-arrow" ,python-arrow)
+ ("python-click" ,python-click)
+ ("python-click-didyoumean" ,python-click-didyoumean)
+ ("python-colorama" ,python-colorama)
+ ("python-requests" ,python-requests)))
+ (home-page "https://tailordev.github.io/watson/")
+ (synopsis
+ "Command-line time tracker")
+ (description
+ "Watson is command-line interface to manage your time. It supports
+ projects, tagging and reports.")
+ (license expat)))
--
2.31.1
M
M
Maxime Devos wrote on 12 Apr 2021 21:42
527b2cd7e2b325ea88fe34ebed0e158e4a9fc518.camel@telenet.be
On Mon, 2021-04-12 at 17:48 +0200, Sebastian Gibb via Guix-patches via wrote:
Toggle quote (7 lines)
> [...]
> + `(#:phases (modify-phases %standard-phases
> + (replace 'check
> + (lambda _
> + (invoke "pytest")
> + #t)))))

Phases do not need to return #t anymore. The warning that results
if a phase doesn't return #t has been removed on the core-updates
branch, which will at some point in time be merged in master.

From a cursory look, I don't see any other problems, except perhaps ...

Toggle quote (3 lines)
> + (synopsis
> + "Command-line time tracker")

I don't see a reason for a newline afer 'synopsis' here.

Thanks,
Maxime.
-----BEGIN PGP SIGNATURE-----

iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYHSikRccbWF4aW1lZGV2
b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7p7bAP9dy2BxTacefGfBldOMrPdPAvq2
r8+KQBhp2X2MiMWL+QEAnhj6R4nS4rjxES3K4hp8424e38R3UT/csyD8cgfoUgw=
=fy6c
-----END PGP SIGNATURE-----


S
S
Sebastian Gibb wrote on 15 Apr 2021 15:57
[PATCH 4/4] gnu: Add watson.
(address . 47730@debbugs.gnu.org)(name . Sebastian Gibb)(address . mail@sebastiangibb.de)
20210415135757.16173-1-mail@sebastiangibb.de
* gnu/packages/time.scm (watson): New variable.
---
Dear Maxime,

thanks for your review.

I removed the #t and the newline in the snyopsis as you suggested.

gnu/packages/time.scm | 39 +++++++++++++++++++++++++++++++++++++++
1 file changed, 39 insertions(+)

Toggle diff (56 lines)
diff --git a/gnu/packages/time.scm b/gnu/packages/time.scm
index dfade604a3..ab9e66285f 100644
--- a/gnu/packages/time.scm
+++ b/gnu/packages/time.scm
@@ -41,6 +41,8 @@
#:use-module (gnu packages golang)
#:use-module (gnu packages perl)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-check)
+ #:use-module (gnu packages python-web)
#:use-module (gnu packages python-xyz)
#:use-module (gnu packages terminals)
#:use-module (gnu packages textutils)
@@ -540,3 +542,40 @@ calls.")
from a starting point you provide. The user can pause and resume the
countdown from the text user interface.")
(license expat)))
+
+(define-public watson
+ (package
+ (name "watson")
+ (version "2.0.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/tailordev/watson")
+ (commit version)))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1yxqjirv7cpg4hqj4l3a53p3p3kl82bcx6drgvl9v849vcc3l7s0"))))
+ (build-system python-build-system)
+ (arguments
+ `(#:phases (modify-phases %standard-phases
+ (replace 'check
+ (lambda _
+ (invoke "pytest"))))))
+ (native-inputs
+ `(("python-pytest" ,python-pytest)
+ ("python-pytest-datafiles" ,python-pytest-datafiles)
+ ("python-pytest-mock" ,python-pytest-mock)))
+ (inputs
+ `(("python-arrow" ,python-arrow)
+ ("python-click" ,python-click)
+ ("python-click-didyoumean" ,python-click-didyoumean)
+ ("python-colorama" ,python-colorama)
+ ("python-requests" ,python-requests)))
+ (home-page "https://tailordev.github.io/Watson/")
+ (synopsis "Command-line time tracker")
+ (description
+ "Watson is command-line interface to manage your time. It supports
+ projects, tagging and reports.")
+ (license expat)))
--
2.31.1
?