pythonic-fp.splitends 2.0.3__tar.gz → 6.0.0__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.
- pythonic_fp_splitends-6.0.0/PKG-INFO +56 -0
- pythonic_fp_splitends-6.0.0/README.md +30 -0
- {pythonic_fp_splitends-2.0.3 → pythonic_fp_splitends-6.0.0}/pyproject.toml +44 -25
- {pythonic_fp_splitends-2.0.3 → pythonic_fp_splitends-6.0.0}/src/pythonic_fp/splitends/splitend.py +7 -5
- {pythonic_fp_splitends-2.0.3 → pythonic_fp_splitends-6.0.0}/src/pythonic_fp/splitends/splitend_node.py +5 -6
- pythonic_fp_splitends-2.0.3/.github/workflows/static.yml +0 -64
- pythonic_fp_splitends-2.0.3/.gitignore +0 -9
- pythonic_fp_splitends-2.0.3/CHANGELOG.rst +0 -512
- pythonic_fp_splitends-2.0.3/PKG-INFO +0 -68
- pythonic_fp_splitends-2.0.3/README.rst +0 -41
- pythonic_fp_splitends-2.0.3/docs/Makefile +0 -78
- pythonic_fp_splitends-2.0.3/docs/gen_conf.py +0 -110
- pythonic_fp_splitends-2.0.3/docs/requirements.txt +0 -2
- pythonic_fp_splitends-2.0.3/docs/source/_static/.gitkeep +0 -0
- pythonic_fp_splitends-2.0.3/docs/source/_static/custom.css +0 -3
- pythonic_fp_splitends-2.0.3/docs/source/_templates/.gitkeep +0 -0
- pythonic_fp_splitends-2.0.3/docs/source/api/index.rst +0 -15
- pythonic_fp_splitends-2.0.3/docs/source/api/splitend.rst +0 -8
- pythonic_fp_splitends-2.0.3/docs/source/api/splitend_node.rst +0 -8
- pythonic_fp_splitends-2.0.3/docs/source/changelog.rst +0 -7
- pythonic_fp_splitends-2.0.3/docs/source/description.rst +0 -7
- pythonic_fp_splitends-2.0.3/docs/source/index.rst +0 -30
- pythonic_fp_splitends-2.0.3/docs/source/releases.rst +0 -24
- pythonic_fp_splitends-2.0.3/docs/source/usage.rst +0 -21
- pythonic_fp_splitends-2.0.3/src/pythonic_fp/splitends/__init__.pyi +0 -0
- pythonic_fp_splitends-2.0.3/src/pythonic_fp/splitends/splitend.pyi +0 -31
- pythonic_fp_splitends-2.0.3/src/pythonic_fp/splitends/splitend_node.pyi +0 -20
- pythonic_fp_splitends-2.0.3/tests/test_splitend.py +0 -290
- pythonic_fp_splitends-2.0.3/tests/test_splitend_node.py +0 -145
- {pythonic_fp_splitends-2.0.3 → pythonic_fp_splitends-6.0.0}/LICENSE +0 -0
- {pythonic_fp_splitends-2.0.3 → pythonic_fp_splitends-6.0.0}/src/pythonic_fp/splitends/__init__.py +0 -0
- {pythonic_fp_splitends-2.0.3 → pythonic_fp_splitends-6.0.0}/src/pythonic_fp/splitends/py.typed +0 -0
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: pythonic-fp-splitends
|
|
3
|
+
Version: 6.0.0
|
|
4
|
+
Summary: Mutable stack datastructures that can safely share data.
|
|
5
|
+
Keywords: SplitEnd,lifo,stack
|
|
6
|
+
Author-email: "Geoffrey R. Scheller" <geoffrey@scheller.com>
|
|
7
|
+
Requires-Python: >=3.14
|
|
8
|
+
Description-Content-Type: text/markdown
|
|
9
|
+
Classifier: Development Status :: 3 - Alpha
|
|
10
|
+
Classifier: Framework :: Pytest
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
|
+
Classifier: Operating System :: OS Independent
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.15
|
|
16
|
+
Classifier: Typing :: Typed
|
|
17
|
+
License-File: LICENSE
|
|
18
|
+
Requires-Dist: pythonic-fp-fptools>=6.2,<7
|
|
19
|
+
Requires-Dist: pythonic-fp-iterables>=6,<7
|
|
20
|
+
Requires-Dist: pythonic-fp-queues>=6,<7
|
|
21
|
+
Project-URL: Changelog, https://github.com/grscheller/pythonic-fp-splitends/blob/main/CHANGELOG.md
|
|
22
|
+
Project-URL: Documentation, https://grscheller.github.io/pythonic-fp-splitends
|
|
23
|
+
Project-URL: Homepage, https://grscheller.github.io/pythonic-fp
|
|
24
|
+
Project-URL: Source, https://github.com/grscheller/pythonic-fp-splitends
|
|
25
|
+
|
|
26
|
+
# Pythonic FP - SplitEnds
|
|
27
|
+
|
|
28
|
+
Package Implementing a singularly linked LIFO queue called
|
|
29
|
+
a `SplitEnd`. These data structures can safely share data nodes
|
|
30
|
+
between themselves.
|
|
31
|
+
|
|
32
|
+
PyPI project
|
|
33
|
+
[pythonic-fp.splitends](https://pypi.org/project/pythonic-fp-splitends/).
|
|
34
|
+
Part of the
|
|
35
|
+
[pythonic-fp](https://grscheller.github.io/pythonic-fp)
|
|
36
|
+
PyPI projects.
|
|
37
|
+
|
|
38
|
+
## Documentation
|
|
39
|
+
|
|
40
|
+
Documentation and other links for this project are hosted on
|
|
41
|
+
[GitHub Pages](https://grscheller.github.io/pythonic-fp-splitends).
|
|
42
|
+
|
|
43
|
+
- each `SplitEnd` is a very simple stateful (mutable) LIFO stack
|
|
44
|
+
- data can be "extended" to or "snipped" off of the end (tip)
|
|
45
|
+
- the "root" value of a `SplitEnd` is fixed and cannot be "snipped"
|
|
46
|
+
- different mutable split ends can safely share the same "tail"
|
|
47
|
+
- each `SplitEnd` sees itself as a singularly linked list
|
|
48
|
+
- bush-like datastructures can be formed using multiple `SplitEnds`
|
|
49
|
+
- the ``SplitEnd`` copy method and ``len`` are O(1)
|
|
50
|
+
- in boolean context returns true if the `SplitEnd` is not just a "root"
|
|
51
|
+
|
|
52
|
+
## Copyright and License
|
|
53
|
+
|
|
54
|
+
Copyright (c) 2023-2026 Geoffrey R. Scheller. Licensed under the Apache
|
|
55
|
+
License, Version 2.0. See the LICENSE file for details.
|
|
56
|
+
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
# Pythonic FP - SplitEnds
|
|
2
|
+
|
|
3
|
+
Package Implementing a singularly linked LIFO queue called
|
|
4
|
+
a `SplitEnd`. These data structures can safely share data nodes
|
|
5
|
+
between themselves.
|
|
6
|
+
|
|
7
|
+
PyPI project
|
|
8
|
+
[pythonic-fp.splitends](https://pypi.org/project/pythonic-fp-splitends/).
|
|
9
|
+
Part of the
|
|
10
|
+
[pythonic-fp](https://grscheller.github.io/pythonic-fp)
|
|
11
|
+
PyPI projects.
|
|
12
|
+
|
|
13
|
+
## Documentation
|
|
14
|
+
|
|
15
|
+
Documentation and other links for this project are hosted on
|
|
16
|
+
[GitHub Pages](https://grscheller.github.io/pythonic-fp-splitends).
|
|
17
|
+
|
|
18
|
+
- each `SplitEnd` is a very simple stateful (mutable) LIFO stack
|
|
19
|
+
- data can be "extended" to or "snipped" off of the end (tip)
|
|
20
|
+
- the "root" value of a `SplitEnd` is fixed and cannot be "snipped"
|
|
21
|
+
- different mutable split ends can safely share the same "tail"
|
|
22
|
+
- each `SplitEnd` sees itself as a singularly linked list
|
|
23
|
+
- bush-like datastructures can be formed using multiple `SplitEnds`
|
|
24
|
+
- the ``SplitEnd`` copy method and ``len`` are O(1)
|
|
25
|
+
- in boolean context returns true if the `SplitEnd` is not just a "root"
|
|
26
|
+
|
|
27
|
+
## Copyright and License
|
|
28
|
+
|
|
29
|
+
Copyright (c) 2023-2026 Geoffrey R. Scheller. Licensed under the Apache
|
|
30
|
+
License, Version 2.0. See the LICENSE file for details.
|
|
@@ -4,9 +4,10 @@ build-backend = "flit_core.buildapi"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "pythonic-fp-splitends"
|
|
7
|
-
version = "
|
|
8
|
-
|
|
9
|
-
|
|
7
|
+
version = "6.0.0"
|
|
8
|
+
description = "Mutable stack datastructures that can safely share data."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.14" # floor: PEP 649/749 deferred annotations — class-level self-reference NameErrors on <3.14
|
|
10
11
|
authors = [
|
|
11
12
|
{ name = "Geoffrey R. Scheller", email = "geoffrey@scheller.com" },
|
|
12
13
|
]
|
|
@@ -22,22 +23,26 @@ classifiers = [
|
|
|
22
23
|
"License :: OSI Approved :: Apache Software License",
|
|
23
24
|
"Operating System :: OS Independent",
|
|
24
25
|
"Programming Language :: Python :: 3.14",
|
|
26
|
+
"Programming Language :: Python :: 3.15",
|
|
25
27
|
"Typing :: Typed",
|
|
26
28
|
]
|
|
27
29
|
dependencies = [
|
|
28
|
-
"pythonic-fp-fptools>=
|
|
29
|
-
"pythonic-fp-iterables>=
|
|
30
|
-
"pythonic-fp-queues>=
|
|
30
|
+
"pythonic-fp-fptools>=6.2,<7",
|
|
31
|
+
"pythonic-fp-iterables>=6,<7",
|
|
32
|
+
"pythonic-fp-queues>=6,<7",
|
|
31
33
|
]
|
|
32
|
-
dynamic = ["description"]
|
|
33
34
|
|
|
34
35
|
[project.urls]
|
|
35
|
-
Changelog = "https://github.com/grscheller/pythonic-fp-splitends/blob/main/CHANGELOG.
|
|
36
|
-
Documentation =
|
|
37
|
-
Homepage = "https://grscheller.github.io/pythonic-fp
|
|
36
|
+
Changelog = "https://github.com/grscheller/pythonic-fp-splitends/blob/main/CHANGELOG.md"
|
|
37
|
+
Documentation ="https://grscheller.github.io/pythonic-fp-splitends"
|
|
38
|
+
Homepage = "https://grscheller.github.io/pythonic-fp"
|
|
38
39
|
Source = "https://github.com/grscheller/pythonic-fp-splitends"
|
|
39
40
|
|
|
40
|
-
[
|
|
41
|
+
[dependency-groups]
|
|
42
|
+
docs = [
|
|
43
|
+
"furo>=2025.12.19",
|
|
44
|
+
"sphinx>=9.1",
|
|
45
|
+
]
|
|
41
46
|
test = [
|
|
42
47
|
"pytest>=8.4.1",
|
|
43
48
|
]
|
|
@@ -45,31 +50,41 @@ test = [
|
|
|
45
50
|
[tool.flit.module]
|
|
46
51
|
name = "pythonic_fp.splitends"
|
|
47
52
|
|
|
53
|
+
[tool.flit.sdist]
|
|
54
|
+
exclude = [
|
|
55
|
+
"docs/",
|
|
56
|
+
"tests/",
|
|
57
|
+
"**/.mypy_cache/",
|
|
58
|
+
"**/.ruff_cache/",
|
|
59
|
+
"**/.pytest_cache/",
|
|
60
|
+
"**/__pycache__/",
|
|
61
|
+
"**/.dmypy.json",
|
|
62
|
+
]
|
|
63
|
+
|
|
64
|
+
[tool.pytest]
|
|
65
|
+
addopts = ["-ra"]
|
|
66
|
+
consider_namespace_packages = true
|
|
67
|
+
testpaths = ["tests/"]
|
|
68
|
+
|
|
48
69
|
[tool.mypy]
|
|
49
70
|
explicit_package_bases = true
|
|
50
71
|
local_partial_types = true
|
|
51
72
|
namespace_packages = true
|
|
73
|
+
strict = true
|
|
52
74
|
warn_redundant_casts = true
|
|
53
75
|
warn_return_any = true
|
|
54
76
|
warn_unused_configs = true
|
|
55
77
|
|
|
56
|
-
[tool.
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
dmypy = false
|
|
60
|
-
strict = true
|
|
61
|
-
report_progress = true
|
|
62
|
-
|
|
63
|
-
[tool.pytest]
|
|
64
|
-
addopts = [
|
|
65
|
-
"-ra",
|
|
66
|
-
]
|
|
67
|
-
consider_namespace_packages = true
|
|
68
|
-
testpaths = ["tests/"]
|
|
78
|
+
[[tool.mypy.overrides]]
|
|
79
|
+
module = ["tests.*"]
|
|
80
|
+
strict_equality = false
|
|
69
81
|
|
|
70
82
|
[tool.ruff]
|
|
71
83
|
target-version = "py314"
|
|
72
84
|
|
|
85
|
+
[tool.ruff.lint]
|
|
86
|
+
ignore = ["RUF022", "E741"]
|
|
87
|
+
|
|
73
88
|
[tool.ruff.lint.flake8-quotes]
|
|
74
89
|
docstring-quotes = "double"
|
|
75
90
|
|
|
@@ -78,8 +93,12 @@ docstring-quotes = "double"
|
|
|
78
93
|
"E731",
|
|
79
94
|
"C901",
|
|
80
95
|
]
|
|
81
|
-
"**/*.py" = ["E741"]
|
|
82
96
|
|
|
83
97
|
[tool.ruff.format]
|
|
84
98
|
quote-style = "single"
|
|
85
99
|
docstring-code-line-length = 72
|
|
100
|
+
|
|
101
|
+
[tool.uv.sources]
|
|
102
|
+
pythonic-fp-fptools = { path = "../pythonic-fp-fptools", editable = true }
|
|
103
|
+
pythonic-fp-iterables = { path = "../pythonic-fp-iterables", editable = true }
|
|
104
|
+
pythonic-fp-queues = { path = "../pythonic-fp-queues", editable = true }
|
{pythonic_fp_splitends-2.0.3 → pythonic_fp_splitends-6.0.0}/src/pythonic_fp/splitends/splitend.py
RENAMED
|
@@ -37,10 +37,12 @@ Class SplitEnds
|
|
|
37
37
|
"""
|
|
38
38
|
|
|
39
39
|
from collections.abc import Callable, Iterator
|
|
40
|
-
from typing import
|
|
40
|
+
from typing import Final, cast, overload
|
|
41
|
+
|
|
41
42
|
from pythonic_fp.gadgets.sentinels.flavored import Sentinel
|
|
42
|
-
from pythonic_fp.iterables.folding import
|
|
43
|
+
from pythonic_fp.iterables.folding import fold_left, reduce_left
|
|
43
44
|
from pythonic_fp.queues.lifo import LIFOQueue
|
|
45
|
+
|
|
44
46
|
from .splitend_node import SENode
|
|
45
47
|
|
|
46
48
|
__all__ = ['SplitEnd']
|
|
@@ -52,7 +54,7 @@ _sentinel: Final[_Sentinel] = Sentinel(_secret_value)
|
|
|
52
54
|
|
|
53
55
|
|
|
54
56
|
class SplitEnd[D]:
|
|
55
|
-
__slots__ = '
|
|
57
|
+
__slots__ = '_count', '_end', '_root'
|
|
56
58
|
|
|
57
59
|
def __init__(self, *ds: D, root: SENode[D] | _Sentinel = _sentinel) -> None:
|
|
58
60
|
"""
|
|
@@ -259,7 +261,7 @@ class SplitEnd[D]:
|
|
|
259
261
|
"""
|
|
260
262
|
return self._root
|
|
261
263
|
|
|
262
|
-
def reroot(self, root: SENode[D]) ->
|
|
264
|
+
def reroot(self, root: SENode[D]) -> SplitEnd[D]:
|
|
263
265
|
"""
|
|
264
266
|
.. admonition:: re-root SplitEnd
|
|
265
267
|
|
|
@@ -297,7 +299,7 @@ class SplitEnd[D]:
|
|
|
297
299
|
|
|
298
300
|
return SplitEnd(*lifo, root = root)
|
|
299
301
|
|
|
300
|
-
def split(self, *ds: D) ->
|
|
302
|
+
def split(self, *ds: D) -> SplitEnd[D]:
|
|
301
303
|
"""
|
|
302
304
|
.. admonition:: split
|
|
303
305
|
|
|
@@ -36,7 +36,8 @@
|
|
|
36
36
|
"""
|
|
37
37
|
|
|
38
38
|
from collections.abc import Callable, Iterator
|
|
39
|
-
from typing import
|
|
39
|
+
from typing import Final, Self, cast, overload
|
|
40
|
+
|
|
40
41
|
from pythonic_fp.gadgets.sentinels.flavored import Sentinel
|
|
41
42
|
|
|
42
43
|
__all__ = ['SENode']
|
|
@@ -106,9 +107,7 @@ class SENode[D]:
|
|
|
106
107
|
|
|
107
108
|
if self._prev is not other._prev:
|
|
108
109
|
return False
|
|
109
|
-
|
|
110
|
-
return True
|
|
111
|
-
return False
|
|
110
|
+
return self._data == other._data
|
|
112
111
|
|
|
113
112
|
def data(self) -> D:
|
|
114
113
|
"""
|
|
@@ -119,7 +118,7 @@ class SENode[D]:
|
|
|
119
118
|
"""
|
|
120
119
|
return self._data
|
|
121
120
|
|
|
122
|
-
def prev(self) ->
|
|
121
|
+
def prev(self) -> SENode[D]:
|
|
123
122
|
"""
|
|
124
123
|
.. admonition:: peak at previous node
|
|
125
124
|
|
|
@@ -128,7 +127,7 @@ class SENode[D]:
|
|
|
128
127
|
"""
|
|
129
128
|
return self._prev
|
|
130
129
|
|
|
131
|
-
def both(self) -> tuple[D,
|
|
130
|
+
def both(self) -> tuple[D, SENode[D]]:
|
|
132
131
|
"""
|
|
133
132
|
.. admonition:: both data and previous node
|
|
134
133
|
|
|
@@ -1,64 +0,0 @@
|
|
|
1
|
-
name: Build and Deploy Furo Themed Sphinx Documentation
|
|
2
|
-
|
|
3
|
-
on:
|
|
4
|
-
push:
|
|
5
|
-
branches: ["main"]
|
|
6
|
-
workflow_dispatch:
|
|
7
|
-
|
|
8
|
-
env:
|
|
9
|
-
RELEASE: '2.0.3'
|
|
10
|
-
DEVEL: '2.0.4'
|
|
11
|
-
PYTHON: '3.14'
|
|
12
|
-
|
|
13
|
-
permissions:
|
|
14
|
-
contents: read
|
|
15
|
-
pages: write
|
|
16
|
-
id-token: write
|
|
17
|
-
|
|
18
|
-
concurrency:
|
|
19
|
-
group: "pages"
|
|
20
|
-
cancel-in-progress: false
|
|
21
|
-
|
|
22
|
-
jobs:
|
|
23
|
-
deploy:
|
|
24
|
-
runs-on: ubuntu-latest
|
|
25
|
-
environment:
|
|
26
|
-
name: github-pages
|
|
27
|
-
url: ${{ steps.deployment.outputs.page_url }}
|
|
28
|
-
steps:
|
|
29
|
-
- name: Checkout
|
|
30
|
-
uses: actions/checkout@v6
|
|
31
|
-
|
|
32
|
-
- name: Select Python
|
|
33
|
-
uses: actions/setup-python@v6
|
|
34
|
-
with:
|
|
35
|
-
python-version: '3.14'
|
|
36
|
-
|
|
37
|
-
- name: Install Sphinx Dependencies
|
|
38
|
-
run: |
|
|
39
|
-
pip install -r docs/requirements.txt
|
|
40
|
-
sudo apt-get install -y graphviz
|
|
41
|
-
|
|
42
|
-
- name: Build Release Docs
|
|
43
|
-
run: |
|
|
44
|
-
pip install pythonic-fp-splitends
|
|
45
|
-
docs/gen_conf.py release ${{ env.RELEASE }} Splitends splitends > docs/source/conf.py
|
|
46
|
-
sphinx-build -M html docs/source docs/build/release
|
|
47
|
-
|
|
48
|
-
- name: Build Development Docs
|
|
49
|
-
run: |
|
|
50
|
-
pip install -e .
|
|
51
|
-
docs/gen_conf.py devel ${{ env.DEVEL }} Splitends splitends > docs/source/conf.py
|
|
52
|
-
sphinx-build -M html docs/source docs/build/development
|
|
53
|
-
|
|
54
|
-
- name: Setup Pages
|
|
55
|
-
uses: actions/configure-pages@v6
|
|
56
|
-
|
|
57
|
-
- name: Upload Artifact
|
|
58
|
-
uses: actions/upload-pages-artifact@v5
|
|
59
|
-
with:
|
|
60
|
-
path: docs/build
|
|
61
|
-
|
|
62
|
-
- name: Deploy to GitHub Pages
|
|
63
|
-
uses: actions/deploy-pages@v5
|
|
64
|
-
id: deployment
|