guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#51623] [PATCH] gnu: Add python-ta-lib.


From: Vinicius Monego
Subject: [bug#51623] [PATCH] gnu: Add python-ta-lib.
Date: Thu, 11 Nov 2021 06:07:37 +0000

Hi,

Em sáb, 2021-11-06 às 04:30 +0000, Foo Chuan Wei escreveu:
> * gnu/packages/python-xyz.scm (python-ta-lib): New variable.

Thanks for your contribution. Patch looks good overall, I have only a
few nitpicks.

> ---
>  gnu/packages/python-xyz.scm | 28 ++++++++++++++++++++++++++++
>  1 file changed, 28 insertions(+)
> 

IMO this package would make more sense in finance.scm.

> diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-
> xyz.scm
> index 8ba72170c0..e2e51db25f 100644
> --- a/gnu/packages/python-xyz.scm
> +++ b/gnu/packages/python-xyz.scm
> @@ -111,6 +111,7 @@
>  ;;; Copyright © 2021 Felix Gruber <felgru@posteo.net>
>  ;;; Copyright © 2021 Sébastien Lerique <sl@eauchat.org>
>  ;;; Copyright © 2021 Raphaël Mélotte <raphael.melotte@mind.be>
> +;;; Copyright © 2021 Foo Chuan Wei <chuanwei.foo@hotmail.com>
>  ;;;
>  ;;; This file is part of GNU Guix.
>  ;;;
> @@ -146,6 +147,7 @@
>    #:use-module (gnu packages docker)
>    #:use-module (gnu packages enchant)
>    #:use-module (gnu packages file)
> +  #:use-module (gnu packages finance)
>    #:use-module (gnu packages fontutils)
>    #:use-module (gnu packages gcc)
>    #:use-module (gnu packages geo)
> @@ -27684,3 +27686,29 @@ simple mock/record and a complete
> capture/replay framework.")
>       "Ijson is an iterative JSON parser with standard Python
> iterator
>  interfaces.")
>      (license license:bsd-3)))
> +
> +(define-public python-ta-lib
> +  (package
> +    (name "python-ta-lib")
> +    (version "0.4.21")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (pypi-uri "TA-Lib" version))
> +       (sha256
> +        (base32
> "17sf222mq2vx924f15qlz5czkkq5vsnsjy9ibwkrk8lalr6g5lkl"))))
> +    (build-system python-build-system)
> +    (inputs
> +     `(("ta-lib" ,ta-lib)))
> +    (propagated-inputs
> +     `(("python-numpy" ,python-numpy)))

Description says it's based on Cython, so python-cython should be a
native input.

> +    (native-inputs
> +     `(("python-nose" ,python-nose)
> +       ("python-pandas" ,python-pandas)))
> +    (home-page "https://github.com/mrjbq7/ta-lib";)
> +    (synopsis "Python wrapper for TA-Lib")

There's one extra space in the description. The double quote should be
aligned with the "d" in description.

The description must also be a full sentence. It can be "This package
provides a [...]" or something along these lines.

> +    (description
> +      "Python wrapper for TA-Lib based on Cython.  TA-Lib is a
> library
> +providing common functions for the technical analysis of financial
> market
> +data.")
> +    (license license:bsd-2)))

It is also recommended to declare packages somewhere in the middle, not
at the end of the file, to avoid merge conflicts.

> 
> base-commit: c55a64cb7e82e88e26c26995f983fc9675b6276e

Vinicius






reply via email to

[Prev in Thread] Current Thread [Next in Thread]