From patchwork Thu Oct 13 11:40:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?b?TcSDZMSDbGluIElvbmVsIFBhdHJhyJljdQ==?= X-Patchwork-Id: 43374 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 3194627BBEA; Thu, 13 Oct 2022 12:46:56 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-3.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 963D127BBE9 for ; Thu, 13 Oct 2022 12:46:55 +0100 (BST) Received: from localhost ([::1]:49584 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oiwfu-00081p-Or for patchwork@mira.cbaines.net; Thu, 13 Oct 2022 07:46:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:38884) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oiwaH-00062T-Bj for guix-patches@gnu.org; Thu, 13 Oct 2022 07:41:05 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:60697) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oiwaF-0003by-O6 for guix-patches@gnu.org; Thu, 13 Oct 2022 07:41:04 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oiwaF-0001ps-Io for guix-patches@gnu.org; Thu, 13 Oct 2022 07:41:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#58490] [PATCH 5/5] gnu: Add python-jupytext. X-Debbugs-Cc: rekado@elephly.net Resent-From: =?utf-8?b?TcSDZMSDbGlu?= Ionel =?utf-8?b?UGF0cmHImWN1?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 13 Oct 2022 11:41:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 58490 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: <58490@debbugs.gnu.org> Received: via spool by 58490-submit@debbugs.gnu.org id=B58490.16656612597008 (code B ref 58490); Thu, 13 Oct 2022 11:41:03 +0000 Received: (at 58490) by debbugs.gnu.org; 13 Oct 2022 11:40:59 +0000 Received: from localhost ([127.0.0.1]:59770 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiwaA-0001ox-IC for submit@debbugs.gnu.org; Thu, 13 Oct 2022 07:40:59 -0400 Received: from a2062.mx.srv.dfn.de ([194.95.232.172]:51427) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oiwZz-0001nx-R9 for 58490@debbugs.gnu.org; Thu, 13 Oct 2022 07:40:57 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mdc-berlin.de; h= content-type:content-type:content-transfer-encoding:mime-version :references:in-reply-to:x-mailer:message-id:date:date:subject :subject:from:from:received; s=mdc; t=1665661238; x=1667475639; bh=/W5Z/hQPZzWOAbIObTl9xcxip7BsenlXuxtdPLhPwP0=; b=ADBwILGUB5He JTj3rKAhBbmFq7Fiy46nXnxIhtry7NrHuq9pgJaUqO1DYfjOTK26DF+KdY4dZLBb eiba4S7tSnHDiNUrR8L6jZZa6OT5HhNaOexAvu5dOKfG+x7NmH7q1VAhmBGFtVpH COrh6aAFWFqVhZY+sLkGUhVCKz/qdAQ= Received: from SW-IT-P-EX4.mdc-berlin.net (mgw4.mdc-berlin.de [141.80.113.62]) by a2062.mx.srv.dfn.de (Postfix) with ESMTPS id 39A7AA0226 for <58490@debbugs.gnu.org>; Thu, 13 Oct 2022 13:40:38 +0200 (CEST) Received: from Guix-Ubuntu18.04 (141.80.113.106) by SW-IT-P-EX4.mdc-berlin.net (141.80.113.62) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.12; Thu, 13 Oct 2022 13:40:24 +0200 From: =?utf-8?b?TcSDZMSDbGlu?= Ionel =?utf-8?b?UGF0cmHImWN1?= Date: Thu, 13 Oct 2022 13:40:06 +0200 Message-ID: <20221013114006.9513-5-madalinionel.patrascu@mdc-berlin.de> X-Mailer: git-send-email 2.37.3 In-Reply-To: <20221013114006.9513-1-madalinionel.patrascu@mdc-berlin.de> References: <20221013114006.9513-1-madalinionel.patrascu@mdc-berlin.de> MIME-Version: 1.0 X-Originating-IP: [141.80.113.106] X-ClientProxiedBy: SW-IT-P-EX1.mdc-berlin.net (141.80.113.54) To SW-IT-P-EX4.mdc-berlin.net (141.80.113.62) X-TM-AS-Product-Ver: SMEX-14.0.0.3092-9.0.1002-27198.007 X-TM-AS-Result: No-10--5.563500-5.000000 X-TMASE-MatchedRID: dEuj5lzoN6b/R1NSMc2qCU7nLUqYrlslFIuBIWrdOePfUZT83lbkEO87 m+OkgjhuRRa406V/YwyBUGewL2YXt10ieHN50/kHxi///JpaHQP4uJ1REX4MHaMZvngJnzipBAV MudebvJh7770R+ZHjWB6nlH/P8z5HWXUNckhMRyasxn4GpC3Y2gRryDXHx6oXWsMv01sS8mLqzk hCUQRGl47uFu0kSjHiEGKI4pOmFKZefGKycjsVDRFbgtHjUWLyjlQQ+MHi1dMenK78XFg4oTxTJ jE+nPo29kDZDbuDC6cKHw6Cq4swE/G831xGz+Q8194/5X9VfCwwLjM7t3iRozoUdFbHYUaw7fKx aM2xqkDgfHel+B9G5P0Aq1+uKwr9GYT8Jom9JI3i8zVgXoAltsIJ+4gwXrEtwrbXMGDYqV+J8YJ gRrgXFw/YL7biWKTUepUkvGrC5ZuqHdMJG2k5qzDlk26oYXHz X-TM-AS-User-Approved-Sender: Yes X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--5.563500-5.000000 X-TMASE-Version: SMEX-14.0.0.3092-9.0.1002-27198.007 X-TM-SNTS-SMTP: 47125E0EF49BD26373C48F1AD5CA807ED8305D3E13A1FD821DBD2D567B1D35882002:F X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list 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 * gnu/packages/python-xyz.scm (python-jupytext): New variable. --- gnu/packages/python-xyz.scm | 77 +++++++++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 6c111bcb82..51753e279a 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -319,6 +319,83 @@ (define-public python-janus design}.") (license license:asl2.0))) +(define-public python-jupytext + (package + (name "python-jupytext") + (version "1.14.1") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/mwouts/jupytext") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "0gqpvphrp2ja9ggadx0rrk0sqbpz6kqqg62qqmw4k17469lphc8c")))) + (build-system python-build-system) + (arguments + (list + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'relax-requirements + (lambda _ + (substitute* "tests/utils.py" + ;; is required isort > 5.3.0 but the authors made a confusion + ;; between string comparations and version parsing comparasion + (("or isort_version\\(\\) <= \"5\\.3\\.0\"") + "") + (("\"python_kernel\"") + "\"python3\"")))) + (replace 'check + (lambda* (#:key tests? inputs outputs #:allow-other-keys) + ;; some tests fails when HOME=/homeless-shelter. + (setenv "HOME" "/tmp") + ;; OSError: [Errno 18] Invalid cross-device link + (setenv "TMPDIR" "/tmp") + (add-installed-pythonpath inputs outputs) + (when tests? + (let ((disabled-tests + (list "test_create_header_with_set_formats" + "test_pre_commit_hook" + "test_sync_with_pre_commit_hook"))) + (invoke "pytest" "-vv" "-k" + (string-append "not " + (string-join disabled-tests + " and not ")))))))))) + (native-inputs + (list git + python-autopep8 + python-black + python-flake8 + python-gitpython + python-isort + python-ipython-genutils + python-jupyter-server + python-pre-commit + python-pytest + python-pyaml + python-sphinx-gallery-0.7.0)) + (propagated-inputs + (list python-markdown-it-py + python-mdit-py-plugins + python-nbformat)) + (home-page "https://github.com/mwouts/jupytext") + (synopsis + "Jupyter notebooks as Markdown documents, Julia, Python or R scripts") + (description + "@code{Jupytext} is a plugin for @code{Jupyter} that can save @code{Jupyter +notebooks} as either @code{Markdown} files or scripts in many languages. Common +use cases for @code{Jupytext} are: +@itemize +@item +version control on Jupyter Notebooks +@item +editing, merging or refactoring notebooks in your favorite text editor +@item +applying Q&A checks on notebooks. +@end itemize") + (license license:expat))) + (define-public python-logzero (package (name "python-logzero")