* [bug#73910] [PATCH 2/3] gnu: Add python-icontract.
2024-10-20 12:46 [bug#73910] [PATCH 0/3] gnu: Add python-crosshair Troy Figiel
@ 2024-10-19 22:46 ` Troy Figiel
2024-10-19 22:49 ` [bug#73910] [PATCH 1/3] gnu: Add python-asyncstdlib Troy Figiel
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Troy Figiel @ 2024-10-19 22:46 UTC (permalink / raw)
To: 73910
* gnu/packages/python-check.scm (python-icontract): New variable.
Change-Id: I48dc21cbed1ff68356099b1c3db351427dff60c7
---
gnu/packages/python-check.scm | 37 +++++++++++++++++++++++++++++++++++
1 file changed, 37 insertions(+)
diff --git a/gnu/packages/python-check.scm b/gnu/packages/python-check.scm
index 4eb6cb1a10..4bfb88fd39 100644
--- a/gnu/packages/python-check.scm
+++ b/gnu/packages/python-check.scm
@@ -161,6 +161,43 @@ (define-public python-beartype
written in pure Python.")
(license license:expat)))
+(define-public python-icontract
+ (package
+ (name "python-icontract")
+ (version "2.7.1")
+ (source
+ (origin
+ ;; There are no tests in the PyPI tarball.
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/Parquery/icontract")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "1fix7wx899kn8vp9aa5m6q71la48gx3qqx4qd74535m61pb50r7f"))))
+ (arguments
+ (list
+ #:phases #~(modify-phases %standard-phases
+ (add-before 'check 'set-icontract-slow
+ (lambda _
+ ;; Setting ICONTRACT_SLOW, does not enable a slow test
+ ;; suite. It only causes a single test to run, that
+ ;; checks the value of icontract.SLOW is set correctly.
+ (setenv "ICONTRACT_SLOW" "1"))))))
+ (build-system pyproject-build-system)
+ (propagated-inputs (list python-asttokens python-typing-extensions))
+ (native-inputs (list python-asyncstdlib python-numpy python-astor
+ python-typeguard-4 python-mypy))
+ (home-page "https://icontract.readthedocs.io")
+ (synopsis "Design-by-contract programming for Python")
+ (description
+ "@code{icontract} brings design-by-contract to Python with informative
+violation messages and inheritance. @code{icontract} provides two function,
+@code{require} and @code{ensure} for preconditions and postconditions
+respectively. Additionally, it provides a class decorator, @code{invariant},
+to establish class invariants.")
+ (license license:expat)))
+
(define-public python-pytest-click
(package
(name "python-pytest-click")
--
2.46.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#73910] [PATCH 1/3] gnu: Add python-asyncstdlib.
2024-10-20 12:46 [bug#73910] [PATCH 0/3] gnu: Add python-crosshair Troy Figiel
2024-10-19 22:46 ` [bug#73910] [PATCH 2/3] gnu: Add python-icontract Troy Figiel
@ 2024-10-19 22:49 ` Troy Figiel
2024-10-19 23:03 ` [bug#73910] [PATCH 3/3] gnu: Add python-crosshair Troy Figiel
2024-10-26 10:14 ` bug#73910: [PATCH 0/3] " Sharlatan Hellseher
3 siblings, 0 replies; 5+ messages in thread
From: Troy Figiel @ 2024-10-19 22:49 UTC (permalink / raw)
To: 73910
* gnu/packages/python-xyz.scm (python-asyncstdlib): New variable.
Change-Id: I2554c120e070b0c84a7228a20cfa22abfd84c846
---
gnu/packages/python-xyz.scm | 24 ++++++++++++++++++++++++
1 file changed, 24 insertions(+)
diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm
index 8849096026..84c642f485 100644
--- a/gnu/packages/python-xyz.scm
+++ b/gnu/packages/python-xyz.scm
@@ -404,6 +404,30 @@ (define-public python-archspec
APIs to detect, query, and compare them.")
(license license:expat)))
+(define-public python-asyncstdlib
+ (package
+ (name "python-asyncstdlib")
+ (version "3.12.5")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "asyncstdlib" version))
+ (sha256
+ (base32 "1nr7rhfcqyzhv8lnj2rpgg60sw795xqp11a58dky8nfbd9gh5c3y"))))
+ (build-system pyproject-build-system)
+ (native-inputs (list python-flit-core python-pytest))
+ (home-page "https://asyncstdlib.readthedocs.io")
+ (synopsis "Compatibility layer between the Python stdlib and @code{async}
+callables")
+ (description
+ "The @code{asyncstdlib} library re-implements functions and classes of
+the Python standard library to make them compatible with @code{async}
+callables, iterables and context managers. It is fully agnostic to
+@code{async} event loops and seamlessly works with @code{asyncio}, third-party
+libraries such as @code{trio}, as well as any custom @code{async} event
+loop.")
+ (license license:expat)))
+
(define-public python-awkward-cpp
(package
(name "python-awkward-cpp")
--
2.46.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#73910] [PATCH 3/3] gnu: Add python-crosshair.
2024-10-20 12:46 [bug#73910] [PATCH 0/3] gnu: Add python-crosshair Troy Figiel
2024-10-19 22:46 ` [bug#73910] [PATCH 2/3] gnu: Add python-icontract Troy Figiel
2024-10-19 22:49 ` [bug#73910] [PATCH 1/3] gnu: Add python-asyncstdlib Troy Figiel
@ 2024-10-19 23:03 ` Troy Figiel
2024-10-26 10:14 ` bug#73910: [PATCH 0/3] " Sharlatan Hellseher
3 siblings, 0 replies; 5+ messages in thread
From: Troy Figiel @ 2024-10-19 23:03 UTC (permalink / raw)
To: 73910
* gnu/packages/check.scm (python-crosshair): New variable.
Change-Id: I7af183df882049c19d562cd15a23f3f3233309a9
---
gnu/packages/check.scm | 55 +++++++++++++++++++++++++++++++++++++++++-
1 file changed, 54 insertions(+), 1 deletion(-)
diff --git a/gnu/packages/check.scm b/gnu/packages/check.scm
index 8d41996c71..32a6d32791 100644
--- a/gnu/packages/check.scm
+++ b/gnu/packages/check.scm
@@ -47,7 +47,7 @@
;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu>
;;; Copyright © 2023 Reza Housseini <reza@housseini.me>
;;; Copyright © 2023 Hilton Chain <hako@ultrarare.space>
-;;; Copyright © 2023 Troy Figiel <troy@troyfigiel.com>
+;;; Copyright © 2023, 2024 Troy Figiel <troy@troyfigiel.com>
;;; Copyright © 2024 Giacomo Leidi <goodoldpaul@autistici.org>
;;; Copyright © 2024 Zheng Junjie <873216071@qq.com>
;;; Copyright © 2024 Navid Afkhami <navid.afkhami@mdc-berlin.de>
@@ -2730,6 +2730,59 @@ (define-public python-pytest-sugar
instantly.")
(license license:bsd-3)))
+(define-public python-crosshair
+ (package
+ (name "python-crosshair")
+ (version "0.0.76")
+ (source
+ (origin
+ (method url-fetch)
+ (uri (pypi-uri "crosshair-tool" version))
+ (sha256
+ (base32 "1yvbhzs7r85gn4d7drl7p7vi1f5cga1xyy3mzxy3fglyf8kxyakh"))))
+ (build-system pyproject-build-system)
+ (arguments
+ (list
+ #:test-flags #~(list "-n" "auto")
+ #:phases #~(modify-phases %standard-phases
+ (add-after 'unpack 'fix-dependencies
+ (lambda _
+ (substitute* "setup.py"
+ ;; pygls is only used by crosshair/lsp_server.py.
+ (("pygls>=1.0.0")
+ "")
+ ;; Tests still pass with typing-inspect==0.6.0
+ ;; packaged by Guix.
+ (("typing-inspect>=0.7.1")
+ "typing-inspect>=0.6.0")
+ ;; 'sanity-check fails for z3-solver, although it is
+ ;; included in 'propagated-inputs.
+ (("z3-solver==4.13.0.0")
+ ""))))
+ (add-before 'check 'disable-broken-tests
+ (lambda _
+ (setenv "PYTHONHASHSEED" "0") ;tests rely on this value
+ ;; check_examples_test.py contains failing tests that
+ ;; show what happens if a counterexample is found.
+ (delete-file
+ "crosshair/examples/check_examples_test.py")
+ (delete-file "crosshair/lsp_server_test.py")))))) ;requires pygls
+ (propagated-inputs (list python-typeshed-client python-typing-inspect z3))
+ (native-inputs (list python-icontract ;optional
+ python-importlib-metadata
+ python-mypy
+ python-numpy
+ python-pytest
+ python-pytest-xdist))
+ (home-page "https://crosshair.readthedocs.io")
+ (synopsis "Analysis tool for Python using symbolic execution")
+ (description
+ "@code{crosshair} is an analysis tool for Python that works by repeatedly
+calling your functions with symbolic inputs. It uses an @acronym{SMT,
+Satisfiability modulo theories} solver explore viable execution paths and find
+counterexamples for you.")
+ (license (list license:asl2.0 license:expat license:psfl))))
+
(define-public python-hypothesis
(package
(name "python-hypothesis")
--
2.46.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [bug#73910] [PATCH 0/3] gnu: Add python-crosshair.
@ 2024-10-20 12:46 Troy Figiel
2024-10-19 22:46 ` [bug#73910] [PATCH 2/3] gnu: Add python-icontract Troy Figiel
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Troy Figiel @ 2024-10-20 12:46 UTC (permalink / raw)
To: 73910
This patch series adds python-crosshair. While packaging, I noticed
python-icontract is only an optional requirement. Since I had already
packaged it, it is included in this patch series as well.
Troy Figiel (3):
gnu: Add python-asyncstdlib.
gnu: Add python-icontract.
gnu: Add python-crosshair.
gnu/packages/check.scm | 55 ++++++++++++++++++++++++++++++++++-
gnu/packages/python-check.scm | 37 +++++++++++++++++++++++
gnu/packages/python-xyz.scm | 24 +++++++++++++++
3 files changed, 115 insertions(+), 1 deletion(-)
base-commit: e951a375a01262dfd470ee343baf7c41dbc6ff58
--
2.46.0
^ permalink raw reply [flat|nested] 5+ messages in thread
* bug#73910: [PATCH 0/3] gnu: Add python-crosshair.
2024-10-20 12:46 [bug#73910] [PATCH 0/3] gnu: Add python-crosshair Troy Figiel
` (2 preceding siblings ...)
2024-10-19 23:03 ` [bug#73910] [PATCH 3/3] gnu: Add python-crosshair Troy Figiel
@ 2024-10-26 10:14 ` Sharlatan Hellseher
3 siblings, 0 replies; 5+ messages in thread
From: Sharlatan Hellseher @ 2024-10-26 10:14 UTC (permalink / raw)
To: 73910-done
[-- Attachment #1: Type: text/plain, Size: 980 bytes --]
Hi,
Thanks for the patches.
I've built them successfully and adjust styling a little.
Lint, build, test passed. I've checked licenses and looked correct.
--8<---------------cut here---------------start------------->8---
> ./pre-inst-env guix build python-crosshair python-icontract python-asyncstdlib --rounds=2
/gnu/store/9d4qfkc6b0sld88hwjb0mrmikbphgpg1-python-asyncstdlib-3.12.5
/gnu/store/k34h0dr46qyy74krwb06c0gazi3xkk50-python-icontract-2.7.1
/gnu/store/3yflhfzi17yrxxqkp1f21shcl1m4awb8-python-crosshair-0.0.766
python-asyncstdlib updated to 3.13.0
> ./pre-inst-env guix build python-crosshair python-icontract python-asyncstdlib --rounds=2
/gnu/store/yp66kgvjy5s72x2bnyd4ym9s8n7wn7cv-python-asyncstdlib-3.13.0
/gnu/store/ra9xflhr5mq6hbmgasx5cyc8yc85lrq0-python-icontract-2.7.1
/gnu/store/kqrwc4xnpjnxk58zxf375q53ckjaqp58-python-crosshair-0.0.76
--8<---------------cut here---------------end--------------->8---
Pushed as 2d08212d47..3ffb386e3f to master.
--
Oleg
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 832 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-10-26 10:16 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-20 12:46 [bug#73910] [PATCH 0/3] gnu: Add python-crosshair Troy Figiel
2024-10-19 22:46 ` [bug#73910] [PATCH 2/3] gnu: Add python-icontract Troy Figiel
2024-10-19 22:49 ` [bug#73910] [PATCH 1/3] gnu: Add python-asyncstdlib Troy Figiel
2024-10-19 23:03 ` [bug#73910] [PATCH 3/3] gnu: Add python-crosshair Troy Figiel
2024-10-26 10:14 ` bug#73910: [PATCH 0/3] " Sharlatan Hellseher
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.