nshutils 0.11.2__tar.gz → 0.12.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {nshutils-0.11.2 → nshutils-0.12.2}/PKG-INFO +5 -2
- {nshutils-0.11.2 → nshutils-0.12.2}/README.md +1 -1
- {nshutils-0.11.2 → nshutils-0.12.2}/pyproject.toml +5 -2
- {nshutils-0.11.2 → nshutils-0.12.2}/src/nshutils/snoop.py +3 -3
- {nshutils-0.11.2 → nshutils-0.12.2}/src/nshutils/__init__.py +0 -0
- {nshutils-0.11.2 → nshutils-0.12.2}/src/nshutils/actsave/__init__.py +0 -0
- {nshutils-0.11.2 → nshutils-0.12.2}/src/nshutils/actsave/_loader.py +0 -0
- {nshutils-0.11.2 → nshutils-0.12.2}/src/nshutils/actsave/_saver.py +0 -0
- {nshutils-0.11.2 → nshutils-0.12.2}/src/nshutils/collections.py +0 -0
- {nshutils-0.11.2 → nshutils-0.12.2}/src/nshutils/logging.py +0 -0
- {nshutils-0.11.2 → nshutils-0.12.2}/src/nshutils/typecheck.py +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: nshutils
|
3
|
-
Version: 0.
|
3
|
+
Version: 0.12.2
|
4
4
|
Summary:
|
5
5
|
Author: Nima Shoghi
|
6
6
|
Author-email: nimashoghi@gmail.com
|
@@ -12,8 +12,11 @@ Classifier: Programming Language :: Python :: 3.12
|
|
12
12
|
Provides-Extra: extra
|
13
13
|
Requires-Dist: beartype
|
14
14
|
Requires-Dist: jaxtyping
|
15
|
+
Requires-Dist: lovely-numpy ; extra == "extra"
|
16
|
+
Requires-Dist: lovely-tensors ; extra == "extra"
|
15
17
|
Requires-Dist: numpy
|
16
18
|
Requires-Dist: pysnooper ; extra == "extra"
|
19
|
+
Requires-Dist: rich ; extra == "extra"
|
17
20
|
Requires-Dist: typing-extensions
|
18
21
|
Requires-Dist: uuid7
|
19
22
|
Project-URL: homepage, https://github.com/nimashoghi/nshutils
|
@@ -35,7 +38,7 @@ pip install nshutils
|
|
35
38
|
|
36
39
|
### Typechecking
|
37
40
|
|
38
|
-
`nshutils` provides a simple way to typecheck your code using the `jaxtyping` library. Simply call `typecheck_this_module()` at the top of your module (i.e., in the root `__init__.py` file) to enable typechecking for the entire module:
|
41
|
+
`nshutils` provides a simple way to typecheck your code using the [`jaxtyping`](https://github.com/patrick-kidger/jaxtyping) library. Simply call `typecheck_this_module()` at the top of your module (i.e., in the root `__init__.py` file) to enable typechecking for the entire module:
|
39
42
|
|
40
43
|
```python
|
41
44
|
from nshutils.typecheck import typecheck_this_module
|
@@ -14,7 +14,7 @@ pip install nshutils
|
|
14
14
|
|
15
15
|
### Typechecking
|
16
16
|
|
17
|
-
`nshutils` provides a simple way to typecheck your code using the `jaxtyping` library. Simply call `typecheck_this_module()` at the top of your module (i.e., in the root `__init__.py` file) to enable typechecking for the entire module:
|
17
|
+
`nshutils` provides a simple way to typecheck your code using the [`jaxtyping`](https://github.com/patrick-kidger/jaxtyping) library. Simply call `typecheck_this_module()` at the top of your module (i.e., in the root `__init__.py` file) to enable typechecking for the entire module:
|
18
18
|
|
19
19
|
```python
|
20
20
|
from nshutils.typecheck import typecheck_this_module
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[tool.poetry]
|
2
2
|
name = "nshutils"
|
3
|
-
version = "0.
|
3
|
+
version = "0.12.2"
|
4
4
|
description = ""
|
5
5
|
authors = ["Nima Shoghi <nimashoghi@gmail.com>"]
|
6
6
|
readme = "README.md"
|
@@ -15,7 +15,10 @@ jaxtyping = "*"
|
|
15
15
|
typing-extensions = "*"
|
16
16
|
beartype = "*"
|
17
17
|
uuid7 = "*"
|
18
|
+
lovely-numpy = { version = "*", optional = true }
|
19
|
+
lovely-tensors = { version = "*", optional = true }
|
18
20
|
pysnooper = { version = "*", optional = true }
|
21
|
+
rich = { version = "*", optional = true }
|
19
22
|
|
20
23
|
[tool.poetry.group.dev.dependencies]
|
21
24
|
pyright = "^1.1.373"
|
@@ -39,4 +42,4 @@ reportPrivateImportUsage = false
|
|
39
42
|
ignore = ["F722", "F821", "E731", "E741"]
|
40
43
|
|
41
44
|
[tool.poetry.extras]
|
42
|
-
extra = ["pysnooper"]
|
45
|
+
extra = ["pysnooper", "lovely-numpy", "lovely-tensors", "rich"]
|
@@ -16,8 +16,8 @@ try:
|
|
16
16
|
import warnings
|
17
17
|
from contextlib import nullcontext
|
18
18
|
|
19
|
-
import pysnooper
|
20
|
-
import pysnooper.utils
|
19
|
+
import pysnooper # type: ignore
|
20
|
+
import pysnooper.utils # type: ignore
|
21
21
|
from pkg_resources import DistributionNotFound, get_distribution
|
22
22
|
|
23
23
|
try:
|
@@ -165,7 +165,7 @@ try:
|
|
165
165
|
+ self.tensor_format(x.QR)
|
166
166
|
+ ")"
|
167
167
|
)
|
168
|
-
|
168
|
+
raise ValueError("Unknown return_types encountered, open a bug report!")
|
169
169
|
|
170
170
|
def compute_repr(self, x):
|
171
171
|
orig_repr_func = pysnooper.utils.get_repr_function(x, self.orig_custom_repr)
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|