gnu: Add python-mdurl, python-markdown-it-py, python-mdit-py-plugins, python-sphinx-gallery-0.7.0 and python-jupytext.

  • Done
  • quality assurance status badge
Details
3 participants
  • MadalinIonel.Patrascu@mdc-berlin.de
  • Mădălin Ionel Patrașcu
  • Ricardo Wurmus
Owner
unassigned
Submitted by
MadalinIonel.Patrascu@mdc-berlin.de
Severity
normal

Debbugs page

MadalinIonel.Patrascu@mdc-berlin.de wrote 2 years ago
(name . guix-patches@gnu.org)(address . guix-patches@gnu.org)
750822584c9b40bf8bbd7e72a215e9ac@mdc-berlin.de

Attachment: file
Mădălin Ionel Patrașcu wrote 2 years ago
[PATCH 4/5] gnu: Add python-sphinx-gallery-0.7.0. X-Debbugs-Cc: rekado@elephly.net
(address . 58490@debbugs.gnu.org)
20221013114006.9513-4-madalinionel.patrascu@mdc-berlin.de
* gnu/packages/sphinx.scm (python-sphinx-gallery-0.7.0): New variable.
---
gnu/packages/sphinx.scm | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)

Toggle diff (38 lines)
diff --git a/gnu/packages/sphinx.scm b/gnu/packages/sphinx.scm
index 2d53b7f3ac..fddeeb96c6 100644
--- a/gnu/packages/sphinx.scm
+++ b/gnu/packages/sphinx.scm
@@ -18,6 +18,7 @@
;;; Copyright © 2021, 2022 Vinicius Monego <monego@posteo.net>
;;; Copyright © 2021 Hugo Lecomte <hugo.lecomte@inria.fr>
;;; Copyright © 2021, 2022 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2022 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -549,6 +550,23 @@ (define-public python-sphinx-gallery
from any set of Python scripts and puts it into an examples gallery.")
(license license:bsd-3)))
+(define-public python-sphinx-gallery-0.7.0
+ (package (inherit python-sphinx-gallery)
+ (version "0.7.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "sphinx-gallery" version))
+ (sha256
+ (base32
+ "10255yyj7104ad6cibkmrwfpfgkl5675jfn3hd0sn63pjhndgsh5"))))
+ (build-system python-build-system)
+ (arguments `())
+ (native-inputs
+ (list python-pytest
+ python-numpy))
+ (propagated-inputs (list python-sphinx))))
+
+
(define-public python-sphinx-me
(package
(name "python-sphinx-me")
--
2.37.3
Mădălin Ionel Patrașcu wrote 2 years ago
[PATCH 1/5] gnu: Add python-mdurl. X-Debbugs-Cc: rekado@elephly.net
(address . 58490@debbugs.gnu.org)
20221013114006.9513-1-madalinionel.patrascu@mdc-berlin.de
* gnu/packages/python-xyz.scm (python-mdurl): New variable.
---
gnu/packages/python-xyz.scm | 38 ++++++++++++++++++++++++++++++++++++-
1 file changed, 37 insertions(+), 1 deletion(-)

Toggle diff (60 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 8575d4a67e..b95d598c07 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -66,7 +66,7 @@
;;; Copyright © 2019, 2020, 2021 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2019 Wiktor Żelazny <wzelazny@vurv.cz>
;;; Copyright © 2019, 2020, 2021, 2022 Tanguy Le Carrour <tanguy@bioneland.org>
-;;; Copyright © 2019, 2021 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
+;;; Copyright © 2019, 2021, 2022 Mădălin Ionel Patrașcu <madalinionel.patrascu@mdc-berlin.de>
;;; Copyright © 2020 Riku Viitanen <riku.viitanen@protonmail.com>
;;; Copyright © 2020 Jakub Kądziołka <kuba@kadziolka.net>
;;; Copyright © 2020 sirgazil <sirgazil@zoho.com>
@@ -625,6 +625,42 @@ (define-public python-lunr
that best match text queries.")
(license license:expat)))
+(define-public python-mdurl
+ (package
+ (name "python-mdurl")
+ (version "0.1.2")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "mdurl" version))
+ (sha256
+ (base32
+ "1fn1hy35h9grggwqax90zcb52inlfxrxsm27vlqqz8zfyllkshdv"))))
+ (build-system python-build-system)
+ (arguments
+ (list
+ #:tests? #f ;pypi source does not contains tests
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'build
+ (lambda _
+ (invoke "flit" "build")))
+ (replace 'install
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (add-installed-pythonpath inputs outputs)
+ (for-each
+ (lambda (wheel)
+ (format #t wheel)
+ (invoke "python" "-m" "pip" "install"
+ wheel (string-append "--prefix=" #$output)))
+ (find-files "dist" "\\.whl$")))))))
+ (native-inputs (list python-flit))
+ (home-page "https://github.com/executablebooks/mdurl")
+ (synopsis "Markdown URL utilities")
+ (description
+ "This package implements a @code{Python} port of the @code{JavaScript}
+@code{mdurl}.")
+ (license license:expat)))
+
(define-public python-mrkd
(package
(name "python-mrkd")

base-commit: 9ed65e6af77893b658a7159b091b5002892c2f95
--
2.37.3
Mădălin Ionel Patrașcu wrote 2 years ago
[PATCH 2/5] gnu: Add python-markdown-it-py. X-Debbugs-Cc: rekado@elephly.net
(address . 58490@debbugs.gnu.org)
20221013114006.9513-2-madalinionel.patrascu@mdc-berlin.de
* gnu/packages/python-xyz.scm (python-markdown-it-py): New variable.
---
gnu/packages/python-xyz.scm | 41 +++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)

Toggle diff (54 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index b95d598c07..33b6c62346 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -4017,6 +4017,47 @@ (define-public python-virtualenv
"Virtualenv is a tool to create isolated Python environments.")
(license license:expat)))
+(define-public python-markdown-it-py
+ (package
+ (name "python-markdown-it-py")
+ (version "2.1.0")
+ (source (origin
+ (method url-fetch)
+ (uri (pypi-uri "markdown-it-py" version))
+ (sha256
+ (base32
+ "1nh75i72584r70alhqc479gys04s5m5g3vq601yf2njbs7z5jzng"))))
+ (build-system python-build-system)
+ (arguments
+ (list
+ #:tests? #f ;;pypi source does not contains tests
+ #:phases
+ #~(modify-phases %standard-phases
+ (replace 'build
+ (lambda _
+ (invoke "flit" "build")))
+ (replace 'install
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (add-installed-pythonpath inputs outputs)
+ (for-each
+ (lambda (wheel)
+ (format #t wheel)
+ (invoke "python" "-m" "pip" "install"
+ wheel (string-append "--prefix=" #$output)))
+ (find-files "dist" "\\.whl$")))))))
+ (native-inputs (list python-flit))
+ (propagated-inputs
+ (list python-mdurl
+ python-typing-extensions))
+ (home-page "https://github.com/executablebooks/markdown-it-py")
+ (synopsis "Python port of markdown-it")
+ (description
+ "This is a @code{Python} port of the well used @code{markdown-it}, and some
+of its associated plugins. The driving design philosophy of the port has been
+to change as little of the fundamental code structure (file names, function name,
+etc) as possible.")
+ (license license:expat)))
+
(define-public python-markupsafe
(package
(name "python-markupsafe")
--
2.37.3
Mădălin Ionel Patrașcu wrote 2 years ago
[PATCH 5/5] gnu: Add python-jupytext. X-Debbugs-Cc: rekado@elephly.net
(address . 58490@debbugs.gnu.org)
20221013114006.9513-5-madalinionel.patrascu@mdc-berlin.de
* gnu/packages/python-xyz.scm (python-jupytext): New variable.
---
gnu/packages/python-xyz.scm | 77 +++++++++++++++++++++++++++++++++++++
1 file changed, 77 insertions(+)

Toggle diff (90 lines)
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")
--
2.37.3
Mădălin Ionel Patrașcu wrote 2 years ago
[PATCH 3/5] gnu: Add python-mdit-py-plugins. X-Debbugs-Cc: rekado@elephly.net
(address . 58490@debbugs.gnu.org)
20221013114006.9513-3-madalinionel.patrascu@mdc-berlin.de
* gnu/packages/python-xyz.scm (python-mdit-py-plugins): New variable.
---
gnu/packages/python-xyz.scm | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)

Toggle diff (40 lines)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 33b6c62346..6c111bcb82 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -625,6 +625,33 @@ (define-public python-lunr
that best match text queries.")
(license license:expat)))
+(define-public python-mdit-py-plugins
+ (package
+ (name "python-mdit-py-plugins")
+ (version "0.3.0")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "mdit-py-plugins" version))
+ (sha256
+ (base32
+ "0l4pwsn2q30j160zjg79qa8v2brc4zl295rgrkpbfspcxr8lzhpc"))))
+ (build-system python-build-system)
+ (propagated-inputs (list python-markdown-it-py))
+ (native-inputs
+ (list python-coverage
+ python-pytest
+ python-pytest-cov
+ python-pytest-regressions))
+ (home-page "https://github.com/executablebooks/mdit-py-plugins")
+ (synopsis "Collection of plugins for markdown-it-py")
+ (description
+ "This package contains a collection of plugins for @code{markdown-it-py}
+like: @code{amsmath}, @code{attrs}, @code{container}, @code{definition list},
+@code{dollarmath}, @code{field list}, @code{footnote}, @code{textmath},
+@code{wordcount}.")
+ (license license:expat)))
+
(define-public python-mdurl
(package
(name "python-mdurl")
--
2.37.3
Ricardo Wurmus wrote 2 years ago
Add python-jupytext.
(address . 58490-done@debbugs.gnu.org)
87wn8lijx6.fsf@elephly.net
Hi,

I applied these patches with a number of changes.

- removed @code{} syntax around proper names
- removed unnecessary build phase
- fixed indentation
- used single semicolon for line comments
- did not apply patch for python-sphinx-gallery-0.7.0 because it’s not
needed
- use git-minimal

Thanks for the patches!

--
Ricardo
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 58490@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 58490
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help