From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([209.51.188.92]:36842) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1h5brP-0008TG-TM for guix-patches@gnu.org; Sun, 17 Mar 2019 15:54:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1h5bjP-0008Te-Ds for guix-patches@gnu.org; Sun, 17 Mar 2019 15:46:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:34236) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1h5bjO-0008TM-DF for guix-patches@gnu.org; Sun, 17 Mar 2019 15:46:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1h5bjO-0001VB-63 for guix-patches@gnu.org; Sun, 17 Mar 2019 15:46:02 -0400 Subject: [bug#34882] [PATCH] Update to Pandas, enable Excel writer support Resent-Message-ID: From: Marius Bakke In-Reply-To: <87k1gzqy2c.fsf@gmail.com> References: <87k1gzqy2c.fsf@gmail.com> Date: Sun, 17 Mar 2019 20:45:25 +0100 Message-ID: <87tvg18eui.fsf@fastmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: Maxim Cournoyer , 34882@debbugs.gnu.org --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hello Maxim, Overall LGTM, some comments inline. [...] > +(define-public python-et-xmlfile > + (package > + (name "python-et-xmlfile") > + (version "1.0.1") > + (source > + (origin > + (method url-fetch) > + (uri (pypi-uri "et_xmlfile" version)) > + (sha256 > + (base32 > + "0nrkhcb6jdrlb6pwkvd4rycw34y3s931hjf409ij9xkjsli9fkb1")))) > + (build-system python-build-system) > + (arguments > + `(#:phases (modify-phases %standard-phases > + (replace 'check > + (lambda _ > + (invoke "pytest")))))) > + (native-inputs > + `(("python-pytest" ,python-pytest) > + ("python-lxml" ,python-lxml))) Should python-lxml be a propagated-input? > + (home-page > + "https://bitbucket.org/openpyxl/et_xmlfile") > + (synopsis > + "Low memory implementation of @code{lxml.xmlfile}") Please remove the extra newlines in these patches. > + (description > + "This Python library is based upon the @code{xmlfile} module > +from @code{lxml}. It aims to provide a low memory, compatible implement= ation > +of @code{xmlfile}.") > + (license license:expat))) [...] =20=20 > +(define-public python-openpyxl > + (package > + (name "python-openpyxl") > + (version "2.6.0") > + (source > + (origin > + (method hg-fetch) > + (uri (hg-reference > + (url "https://bitbucket.org/openpyxl/openpyxl") > + (changeset version))) > + (file-name (string-append name "-" version "-checkout")) > + (sha256 > + (base32 > + "1x47ngn7ybaqdbvg90c8h2x0j6yfdfj25gjfinp2w5rf62gsany7")))) Can you leave a comment about why we take it from this repository instead of PyPi? > + (native-inputs > + `(("python-lxml" ,python-lxml) Why is python-lxml a native-input? > + ;; For the test suite. > + ("python-pillow" ,python-pillow) > + ("python-pytest" ,python-pytest))) > + (propagated-inputs > + `(("python-et-xmlfile" ,python-et-xmlfile) > + ("python-jdcal" ,python-jdcal))) > + (home-page "https://openpyxl.readthedocs.io") > + (synopsis > + "Python library to read/write Excel 2010 XLSX/XLSM files") > + (description > + "This Python library allows reading and writing to the Excel XLSX, = XLSM, > +XLTX and XLTM file formats that are defined by the Office Open XML (OOXM= L) > +standard.") > + (license license:expat))) [...] > From ad1f0efe4a5c3d28ee9d7e2e5da275721af9e172 Mon Sep 17 00:00:00 2001 > From: Maxim Cournoyer > Date: Sat, 9 Feb 2019 00:25:51 -0500 > Subject: [PATCH 5/5] gnu: python-pandas: Update to 0.24.2. > > * gnu/packages/python-xyz.scm (python-pandas): Update to 0.24.2. > [phases]{patch-which}: Add phase. > [inputs]: Add WHICH. > --- > gnu/packages/python-xyz.scm | 65 ++++++++++++++++++++++--------------- > 1 file changed, 38 insertions(+), 27 deletions(-) > > diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm > index 321c881f4d..bbf1403758 100644 > --- a/gnu/packages/python-xyz.scm > +++ b/gnu/packages/python-xyz.scm > @@ -1014,56 +1014,67 @@ human-friendly syntax.") > (define-public python-pandas > (package > (name "python-pandas") > - (version "0.23.4") > + (version "0.24.2") > (source > (origin > (method url-fetch) > (uri (pypi-uri "pandas" version)) > (sha256 > - (base32 "1x54pd7hr3y7qahx6b5bf2wzj54xvl8r3s1h4pl254pnmi3wl92v"))= )) > + (base32 "18imlm8xbhcbwy4wa957a1fkamrcb0z988z006jpfda3ki09z4ag"))= )) > (build-system python-build-system) > (arguments > `(#:modules ((guix build utils) > (guix build python-build-system) > (ice-9 ftw) > (srfi srfi-26)) > - #:phases (modify-phases %standard-phases > - (replace 'check > - (lambda _ > - (let ((build-directory > - (string-append > - (getcwd) "/build/" > - (car (scandir "build" > - (cut string-prefix? "lib." <= >)))))) > - ;; Disable the "strict data files" option which = causes > - ;; the build to error out if required data files= are not > - ;; available (as is the case with PyPI archives). > - (substitute* "setup.cfg" > - (("addopts =3D --strict-data-files") "addopts = =3D ")) > - (with-directory-excursion build-directory > - ;; Delete tests that require "moto" which is n= ot yet in Guix. > - (for-each delete-file > - '("pandas/tests/io/conftest.py" > - "pandas/tests/io/json/test_compres= sion.py" > - "pandas/tests/io/parser/test_netwo= rk.py" > - "pandas/tests/io/test_parquet.py")) > - (invoke "pytest" "-vv" "pandas" "--skip-slow" > - "--skip-network" "-k" > - ;; XXX: Due to the deleted tests above. > - "not test_read_s3_jsonl")))))))) > + #:phases > + (modify-phases %standard-phases > + (add-after 'unpack 'patch-which > + (lambda* (#:key inputs #:allow-other-keys) > + (let ((which (assoc-ref inputs "which"))) > + (substitute* "pandas/io/clipboard/__init__.py" > + (("^CHECK_CMD =3D .*") > + (string-append "CHECK_CMD =3D \"" which "\"\n")))) > + #t)) > + (replace 'check > + (lambda _ > + (let ((build-directory > + (string-append > + (getcwd) "/build/" > + (car (scandir "build" > + (cut string-prefix? "lib." <>)))))) > + ;; Disable the "strict data files" option which causes > + ;; the build to error out if required data files are not > + ;; available (as is the case with PyPI archives). > + (substitute* "setup.cfg" > + (("addopts =3D --strict-data-files") "addopts =3D ")) > + (with-directory-excursion build-directory > + ;; Delete tests that require "moto" which is not yet in= Guix. > + (for-each delete-file > + '("pandas/tests/io/conftest.py" > + "pandas/tests/io/json/test_compression.py" > + "pandas/tests/io/parser/test_network.py" > + "pandas/tests/io/test_parquet.py")) > + (invoke "pytest" "-vv" "pandas" "--skip-slow" > + "--skip-network" "-k" > + ;; XXX: Due to the deleted tests above. > + "not test_read_s3_jsonl")))))))) LGTM, although I'd prefer not to reindent the phases section. It makes the patch harder to read, and I prefer the "deep" indentation for logically separate chunks of code anyway (though I am probably in the minority here..). YMMV! Thanks! > (propagated-inputs > `(("python-numpy" ,python-numpy) > ("python-openpyxl" ,python-openpyxl) > ("python-pytz" ,python-pytz) > ("python-dateutil" ,python-dateutil) > ("python-xlrd" ,python-xlrd))) > + (inputs > + `(("which" ,which))) > (native-inputs > `(("python-cython" ,python-cython) > ("python-beautifulsoup4" ,python-beautifulsoup4) > ("python-lxml" ,python-lxml) > ("python-html5lib" ,python-html5lib) > ("python-nose" ,python-nose) > - ("python-pytest" ,python-pytest))) > + ("python-pytest" ,python-pytest) > + ("python-pytest-mock" ,python-pytest-mock))) > (home-page "https://pandas.pydata.org") > (synopsis "Data structures for data analysis, time series, and stati= stics") > (description > --=20 > 2.20.1 --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQEzBAEBCgAdFiEEu7At3yzq9qgNHeZDoqBt8qM6VPoFAlyOo9UACgkQoqBt8qM6 VPpsyAf+LbAF2/lfykwAQP9aML8BGZl8rcj190J77sjFRmbkm5/EKJDrViJNy0YW Yq0Hg0eSqHjYOq5aKvt3ED7NIC1fGz1nQZJw25zFuYqvkZoxsQL6ZAVs50MTLoIL 4In22sa72UVRqmgFrKMCHY0pLPvbY36aUA2cEmj7/GIfNkR3VeOX1lClSbyeB8X3 bpevihuvnbW3qdwd1BkzFJM+IYwXCNDq0g3IqONPKcSMYhph2E5c97PvpfVtsGNg ye5tsu+JAZ1KHoFjfB2t+XrlaOG2s5A3YCtQBjV4zM24HsYqf8jRkay7RHStVLcy WtPA2kFRh7x2mpffVAWChd+D09j6rw== =8slR -----END PGP SIGNATURE----- --=-=-=--