pyuiua 0.0.2__tar.gz → 0.0.4__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.
- {pyuiua-0.0.2 → pyuiua-0.0.4}/Cargo.lock +5 -5
- {pyuiua-0.0.2 → pyuiua-0.0.4}/Cargo.toml +1 -1
- {pyuiua-0.0.2 → pyuiua-0.0.4}/PKG-INFO +4 -2
- {pyuiua-0.0.2 → pyuiua-0.0.4}/README.md +1 -1
- {pyuiua-0.0.2 → pyuiua-0.0.4}/pyproject.toml +5 -3
- {pyuiua-0.0.2 → pyuiua-0.0.4}/pyuiua.pyi +1 -1
- {pyuiua-0.0.2 → pyuiua-0.0.4}/src/convert/to_python.rs +0 -1
- {pyuiua-0.0.2 → pyuiua-0.0.4}/src/uiua_runtime.rs +0 -1
- {pyuiua-0.0.2 → pyuiua-0.0.4}/tests/test_stack.py +6 -6
- {pyuiua-0.0.2 → pyuiua-0.0.4}/tests/test_uiua.py +1 -1
- {pyuiua-0.0.2 → pyuiua-0.0.4}/uv.lock +1 -1
- {pyuiua-0.0.2 → pyuiua-0.0.4}/.gitattributes +0 -0
- {pyuiua-0.0.2 → pyuiua-0.0.4}/.github/workflows/build.yml +0 -0
- {pyuiua-0.0.2 → pyuiua-0.0.4}/.github/workflows/lint-and_test.yml +0 -0
- {pyuiua-0.0.2 → pyuiua-0.0.4}/.gitignore +0 -0
- {pyuiua-0.0.2 → pyuiua-0.0.4}/LICENSE +0 -0
- {pyuiua-0.0.2 → pyuiua-0.0.4}/Makefile +0 -0
- {pyuiua-0.0.2 → pyuiua-0.0.4}/py.typed +0 -0
- {pyuiua-0.0.2 → pyuiua-0.0.4}/src/convert/mod.rs +0 -0
- {pyuiua-0.0.2 → pyuiua-0.0.4}/src/convert/to_uiua.rs +0 -0
- {pyuiua-0.0.2 → pyuiua-0.0.4}/src/lib.rs +0 -0
- {pyuiua-0.0.2 → pyuiua-0.0.4}/tests/__init__.py +0 -0
- {pyuiua-0.0.2 → pyuiua-0.0.4}/tests/conftest.py +0 -0
- {pyuiua-0.0.2 → pyuiua-0.0.4}/tests/test_arrays.py +0 -0
- {pyuiua-0.0.2 → pyuiua-0.0.4}/tests/test_boxed.py +0 -0
- {pyuiua-0.0.2 → pyuiua-0.0.4}/tests/test_errors.py +0 -0
- {pyuiua-0.0.2 → pyuiua-0.0.4}/tests/test_scalars.py +0 -0
|
@@ -2062,7 +2062,7 @@ dependencies = [
|
|
|
2062
2062
|
|
|
2063
2063
|
[[package]]
|
|
2064
2064
|
name = "pyuiua"
|
|
2065
|
-
version = "0.0.
|
|
2065
|
+
version = "0.0.4"
|
|
2066
2066
|
dependencies = [
|
|
2067
2067
|
"pyo3",
|
|
2068
2068
|
"uiua",
|
|
@@ -3645,18 +3645,18 @@ checksum = "dd15f8e0dbb966fd9245e7498c7e9e5055d9e5c8b676b95bd67091cd11a1e697"
|
|
|
3645
3645
|
|
|
3646
3646
|
[[package]]
|
|
3647
3647
|
name = "zerocopy"
|
|
3648
|
-
version = "0.8.
|
|
3648
|
+
version = "0.8.30"
|
|
3649
3649
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3650
|
-
checksum = "
|
|
3650
|
+
checksum = "4ea879c944afe8a2b25fef16bb4ba234f47c694565e97383b36f3a878219065c"
|
|
3651
3651
|
dependencies = [
|
|
3652
3652
|
"zerocopy-derive",
|
|
3653
3653
|
]
|
|
3654
3654
|
|
|
3655
3655
|
[[package]]
|
|
3656
3656
|
name = "zerocopy-derive"
|
|
3657
|
-
version = "0.8.
|
|
3657
|
+
version = "0.8.30"
|
|
3658
3658
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
3659
|
-
checksum = "
|
|
3659
|
+
checksum = "cf955aa904d6040f70dc8e9384444cb1030aed272ba3cb09bbc4ab9e7c1f34f5"
|
|
3660
3660
|
dependencies = [
|
|
3661
3661
|
"proc-macro2",
|
|
3662
3662
|
"quote",
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyuiua
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.4
|
|
4
4
|
Classifier: Development Status :: 4 - Beta
|
|
5
5
|
Classifier: Intended Audience :: Developers
|
|
6
6
|
Classifier: License :: OSI Approved :: MIT License
|
|
@@ -22,6 +22,8 @@ Keywords: uiua,array-programming,python-bindings,interpreter
|
|
|
22
22
|
Author: Katie Gardner
|
|
23
23
|
Requires-Python: >=3.10
|
|
24
24
|
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
|
|
25
|
+
Project-URL: Homepage, https://github.com/KatieLG/pyuiua
|
|
26
|
+
Project-URL: Repository, https://github.com/KatieLG/pyuiua
|
|
25
27
|
|
|
26
28
|
# PyUiua
|
|
27
29
|
|
|
@@ -68,7 +70,7 @@ print(uiua.pop()) # 15
|
|
|
68
70
|
uiua.push(1)
|
|
69
71
|
uiua.push(2)
|
|
70
72
|
uiua.push(3)
|
|
71
|
-
print(uiua.stack()) # [
|
|
73
|
+
print(uiua.stack()) # [1, 2, 3]
|
|
72
74
|
print(len(uiua)) # 3
|
|
73
75
|
|
|
74
76
|
# Clear the stack
|
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "pyuiua"
|
|
3
|
-
version = "0.0.
|
|
3
|
+
version = "0.0.4"
|
|
4
4
|
description = "Python bindings for the Uiua programming language."
|
|
5
5
|
license = { file = "LICENSE" }
|
|
6
6
|
authors = [{ name = "Katie Gardner" }]
|
|
7
7
|
readme = "README.md"
|
|
8
8
|
requires-python = ">=3.10"
|
|
9
9
|
keywords = ["uiua", "array-programming", "python-bindings", "interpreter"]
|
|
10
|
-
homepage = "https://github.com/KatieLG/pyuiua"
|
|
11
|
-
repository = "https://github.com/KatieLG/pyuiua"
|
|
12
10
|
classifiers = [
|
|
13
11
|
"Development Status :: 4 - Beta",
|
|
14
12
|
"Intended Audience :: Developers",
|
|
@@ -27,6 +25,10 @@ classifiers = [
|
|
|
27
25
|
"Typing :: Typed",
|
|
28
26
|
]
|
|
29
27
|
|
|
28
|
+
[project.urls]
|
|
29
|
+
Homepage = "https://github.com/KatieLG/pyuiua"
|
|
30
|
+
Repository = "https://github.com/KatieLG/pyuiua"
|
|
31
|
+
|
|
30
32
|
[tool.maturin]
|
|
31
33
|
features = ["pyo3/extension-module"]
|
|
32
34
|
include = ["pyuiua.pyi", "py.typed"]
|
|
@@ -62,7 +62,6 @@ fn uiua_scalar_to_pyobject<'py>(
|
|
|
62
62
|
try_convert!(value.as_int(uiua, ""));
|
|
63
63
|
try_convert!(value.as_num(uiua, ""));
|
|
64
64
|
try_convert!(value.as_string(uiua, ""));
|
|
65
|
-
try_convert!(value.as_bytes(uiua, "").map(std::borrow::Cow::into_owned));
|
|
66
65
|
|
|
67
66
|
// If all conversions fail, raise a Type Error
|
|
68
67
|
Err(PyErr::new::<pyo3::exceptions::PyTypeError, _>(format!(
|
|
@@ -6,11 +6,11 @@ from pyuiua import Uiua, UiuaValue
|
|
|
6
6
|
@pytest.mark.parametrize(
|
|
7
7
|
"code,expected",
|
|
8
8
|
[
|
|
9
|
-
("1 2 3", [
|
|
9
|
+
("1 2 3", [3, 2, 1]),
|
|
10
10
|
("1", [1]),
|
|
11
11
|
("+2 3", [5]),
|
|
12
|
-
('1 "hello" 3.14', [
|
|
13
|
-
("[1 2 3] [4 5 6]", [[
|
|
12
|
+
('1 "hello" 3.14', [3.14, "hello", 1]),
|
|
13
|
+
("[1 2 3] [4 5 6]", [[4, 5, 6], [1, 2, 3]]),
|
|
14
14
|
],
|
|
15
15
|
)
|
|
16
16
|
def test_uiua_stack(uiua: Uiua, code: str, expected: list) -> None:
|
|
@@ -26,18 +26,18 @@ def test_push_stack_order(uiua: Uiua) -> None:
|
|
|
26
26
|
uiua.push(1)
|
|
27
27
|
uiua.push(2)
|
|
28
28
|
|
|
29
|
-
assert uiua.stack() == [
|
|
29
|
+
assert uiua.stack() == [0, 1, 2]
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
@pytest.mark.parametrize(
|
|
33
33
|
"code,expected_stack",
|
|
34
|
-
[("1 2 3 4 5", [
|
|
34
|
+
[("1 2 3 4 5", [5, 4, 3, 2, 1]), ("1_1 2_2", [[2, 2], [1, 1]])],
|
|
35
35
|
)
|
|
36
36
|
def test_stack_pop(uiua: Uiua, code: str, expected_stack: list) -> None:
|
|
37
37
|
"""Test popping from the uiua stack gives the top item on the stack"""
|
|
38
38
|
uiua.run(code)
|
|
39
39
|
assert uiua.stack() == expected_stack
|
|
40
|
-
assert uiua.pop() == expected_stack
|
|
40
|
+
assert uiua.pop() == expected_stack.pop()
|
|
41
41
|
|
|
42
42
|
|
|
43
43
|
@pytest.mark.parametrize(
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|