pregel-redux 0.6.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.
Files changed (28) hide show
  1. pregel_redux-0.6.0/LICENSE +21 -0
  2. pregel_redux-0.6.0/PKG-INFO +23 -0
  3. pregel_redux-0.6.0/README.md +0 -0
  4. pregel_redux-0.6.0/pyproject.toml +171 -0
  5. pregel_redux-0.6.0/pyproject.toml.orig +154 -0
  6. pregel_redux-0.6.0/src/pregel_redux/__init__.py +98 -0
  7. pregel_redux-0.6.0/src/pregel_redux/channels.py +339 -0
  8. pregel_redux-0.6.0/src/pregel_redux/checkpoints.py +269 -0
  9. pregel_redux-0.6.0/src/pregel_redux/commands.py +91 -0
  10. pregel_redux-0.6.0/src/pregel_redux/configs.py +53 -0
  11. pregel_redux-0.6.0/src/pregel_redux/dependencies.py +303 -0
  12. pregel_redux-0.6.0/src/pregel_redux/graph/__init__.py +6 -0
  13. pregel_redux-0.6.0/src/pregel_redux/graph/adapters.py +87 -0
  14. pregel_redux-0.6.0/src/pregel_redux/graph/builder.py +266 -0
  15. pregel_redux-0.6.0/src/pregel_redux/graph/compiled.py +520 -0
  16. pregel_redux-0.6.0/src/pregel_redux/graph/conversion.py +292 -0
  17. pregel_redux-0.6.0/src/pregel_redux/graph/persistent.py +296 -0
  18. pregel_redux-0.6.0/src/pregel_redux/graph/threads.py +383 -0
  19. pregel_redux-0.6.0/src/pregel_redux/messages.py +24 -0
  20. pregel_redux-0.6.0/src/pregel_redux/pregel.py +415 -0
  21. pregel_redux-0.6.0/src/pregel_redux/py.typed +0 -0
  22. pregel_redux-0.6.0/src/pregel_redux/results.py +29 -0
  23. pregel_redux-0.6.0/src/pregel_redux/settings.py +7 -0
  24. pregel_redux-0.6.0/src/pregel_redux/shutdown.py +173 -0
  25. pregel_redux-0.6.0/src/pregel_redux/snapshots.py +64 -0
  26. pregel_redux-0.6.0/src/pregel_redux/sqlite.py +127 -0
  27. pregel_redux-0.6.0/src/pregel_redux/streams.py +88 -0
  28. pregel_redux-0.6.0/src/pregel_redux/task_refs.py +55 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 estasney
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,23 @@
1
+ Metadata-Version: 2.4
2
+ Name: pregel-redux
3
+ Version: 0.6.0
4
+ Summary: Pregel-style graph computation
5
+ Keywords: pregel,graph,graph-computation
6
+ Author: estasney
7
+ Author-email: estasney <estasney@users.noreply.github.com>
8
+ License-Expression: MIT
9
+ License-File: LICENSE
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.12
12
+ Classifier: Programming Language :: Python :: 3.13
13
+ Classifier: Typing :: Typed
14
+ Requires-Dist: pydantic>=2.14.3
15
+ Requires-Dist: pydantic-settings>=2.16.2
16
+ Requires-Dist: typing-extensions>=4.16.0
17
+ Requires-Dist: sqlalchemy>=2.1.8 ; extra == 'sqlite'
18
+ Requires-Python: >=3.12
19
+ Project-URL: Repository, https://github.com/estasney/pregel_redux
20
+ Project-URL: Issues, https://github.com/estasney/pregel_redux/issues
21
+ Provides-Extra: sqlite
22
+ Description-Content-Type: text/markdown
23
+
File without changes
@@ -0,0 +1,171 @@
1
+ [project]
2
+ name = "pregel-redux"
3
+ version = "0.6.0"
4
+ description = "Pregel-style graph computation"
5
+ readme = "README.md"
6
+ license = "MIT"
7
+ license-files = ["LICENSE"]
8
+ keywords = [
9
+ "pregel",
10
+ "graph",
11
+ "graph-computation",
12
+ ]
13
+ classifiers = [
14
+ "Programming Language :: Python :: 3",
15
+ "Programming Language :: Python :: 3.12",
16
+ "Programming Language :: Python :: 3.13",
17
+ "Typing :: Typed",
18
+ ]
19
+ requires-python = ">=3.12"
20
+ dependencies = [
21
+ "pydantic>=2.14.3",
22
+ "pydantic-settings>=2.16.2",
23
+ "typing-extensions>=4.16.0",
24
+ ]
25
+
26
+ [[project.authors]]
27
+ name = "estasney"
28
+ email = "estasney@users.noreply.github.com"
29
+
30
+ [project.urls]
31
+ Repository = "https://github.com/estasney/pregel_redux"
32
+ Issues = "https://github.com/estasney/pregel_redux/issues"
33
+
34
+ [project.optional-dependencies]
35
+ sqlite = ["sqlalchemy>=2.1.8"]
36
+
37
+ [build-system]
38
+ requires = ["uv_build>=0.13.7,<0.14.0"]
39
+ build-backend = "uv_build"
40
+
41
+ [dependency-groups]
42
+ dev = [
43
+ "ast-grep-cli>=0.51.2",
44
+ "basedpyright>=1.40.2",
45
+ "hypothesis>=6.170.15",
46
+ "pytest>=9.1.1,<9.2",
47
+ "pytest-cov>=7.1.0",
48
+ "pytest-xdist>=3.8.0",
49
+ "ruff>=0.17.4",
50
+ "sqlalchemy>=2.1.8",
51
+ ]
52
+
53
+ [tool.pytest]
54
+ minversion = "9.1"
55
+ strict = true
56
+ testpaths = ["tests"]
57
+ addopts = [
58
+ "-ra",
59
+ "--cov",
60
+ "--cov-report=term-missing",
61
+ "--numprocesses=2",
62
+ "--dist=loadgroup",
63
+ ]
64
+ filterwarnings = ["error"]
65
+
66
+ [tool.basedpyright]
67
+ pythonVersion = "3.12"
68
+ include = [
69
+ "src",
70
+ "tests",
71
+ ]
72
+ typeCheckingMode = "recommended"
73
+ enableTypeIgnoreComments = false
74
+ reportAny = "hint"
75
+ reportConstantRedefinition = "none"
76
+ reportImplicitOverride = "none"
77
+ reportImplicitStringConcatenation = "none"
78
+ reportInvalidCast = "none"
79
+ reportMissingModuleSource = "none"
80
+ reportMissingSuperCall = "none"
81
+ reportMissingTypeStubs = "hint"
82
+ reportUnannotatedClassAttribute = "none"
83
+ reportUnknownLambdaType = "none"
84
+ reportUnknownMemberType = "information"
85
+ reportUnnecessaryComparison = "hint"
86
+ reportUnsafeMultipleInheritance = "none"
87
+ reportUnusedCallResult = "none"
88
+ reportUnusedImport = "none"
89
+ reportUnusedParameter = "none"
90
+
91
+ [tool.ruff]
92
+ line-length = 120
93
+ target-version = "py312"
94
+
95
+ [tool.ruff.lint]
96
+ select = [
97
+ "A",
98
+ "ANN001",
99
+ "ANN201",
100
+ "ANN205",
101
+ "ANN206",
102
+ "ASYNC",
103
+ "B",
104
+ "BLE",
105
+ "C4",
106
+ "DTZ",
107
+ "ERA",
108
+ "F",
109
+ "FA",
110
+ "FAST",
111
+ "FBT",
112
+ "FLY",
113
+ "FURB",
114
+ "I",
115
+ "INP",
116
+ "N",
117
+ "NPY",
118
+ "PD",
119
+ "PERF",
120
+ "PIE",
121
+ "PLC0105",
122
+ "PLC0131",
123
+ "PLC0132",
124
+ "PLC0207",
125
+ "PLC0208",
126
+ "PLE",
127
+ "PLR",
128
+ "PLW",
129
+ "PYI",
130
+ "RET",
131
+ "RUF",
132
+ "SIM",
133
+ "TRY",
134
+ "UP",
135
+ "YTT",
136
+ ]
137
+ ignore = [
138
+ "A002",
139
+ "ASYNC119",
140
+ "N818",
141
+ "PLR0904",
142
+ "PLR0911",
143
+ "PLR0912",
144
+ "PLR0913",
145
+ "PLR0915",
146
+ "PLR0917",
147
+ "PLR2004",
148
+ "PLW0603",
149
+ "RET504",
150
+ "RUF001",
151
+ "RUF077",
152
+ "RUF105",
153
+ "RUF106",
154
+ "RUF201",
155
+ "TRY003",
156
+ "UP048",
157
+ "UP051",
158
+ "UP052",
159
+ ]
160
+
161
+ [tool.coverage.run]
162
+ branch = true
163
+ source = ["pregel_redux"]
164
+
165
+ [tool.coverage.report]
166
+ exclude_lines = [
167
+ 'assert_never\(',
168
+ '^\s*(((async )?def .*?)?\)(\s*->.*?)?:\s*)?\.\.\.\s*(#|$)',
169
+ ]
170
+ partial_branches = []
171
+ fail_under = 90
@@ -0,0 +1,154 @@
1
+ [project]
2
+ name = "pregel-redux"
3
+ version = "0.6.0"
4
+ description = "Pregel-style graph computation"
5
+ readme = "README.md"
6
+ authors = [{ name = "estasney", email = "estasney@users.noreply.github.com" }]
7
+ license = "MIT"
8
+ license-files = ["LICENSE"]
9
+ keywords = ["pregel", "graph", "graph-computation"]
10
+ classifiers = [
11
+ "Programming Language :: Python :: 3",
12
+ "Programming Language :: Python :: 3.12",
13
+ "Programming Language :: Python :: 3.13",
14
+ "Typing :: Typed",
15
+ ]
16
+ requires-python = ">=3.12"
17
+ dependencies = [
18
+ "pydantic>=2.14.3",
19
+ "pydantic-settings>=2.16.2",
20
+ "typing-extensions>=4.16.0",
21
+ ]
22
+
23
+ [project.urls]
24
+ Repository = "https://github.com/estasney/pregel_redux"
25
+ Issues = "https://github.com/estasney/pregel_redux/issues"
26
+
27
+ [project.optional-dependencies]
28
+ sqlite = [
29
+ "sqlalchemy>=2.1.8",
30
+ ]
31
+
32
+ [build-system]
33
+ requires = ["uv_build>=0.13.7,<0.14.0"]
34
+ build-backend = "uv_build"
35
+
36
+ [dependency-groups]
37
+ dev = [
38
+ "ast-grep-cli>=0.51.2",
39
+ "basedpyright>=1.40.2",
40
+ "hypothesis>=6.170.15",
41
+ "pytest>=9.1.1,<9.2",
42
+ "pytest-cov>=7.1.0",
43
+ "pytest-xdist>=3.8.0",
44
+ "ruff>=0.17.4",
45
+ "sqlalchemy>=2.1.8",
46
+ ]
47
+
48
+ [tool.pytest]
49
+ minversion = "9.1"
50
+ strict = true
51
+ testpaths = ["tests"]
52
+ addopts = ["-ra", "--cov", "--cov-report=term-missing", "--numprocesses=2", "--dist=loadgroup"]
53
+ filterwarnings = ["error"]
54
+
55
+ [tool.basedpyright]
56
+ pythonVersion = "3.12"
57
+ include = ["src", "tests"]
58
+ typeCheckingMode = "recommended"
59
+ enableTypeIgnoreComments = false
60
+ reportAny = "hint"
61
+ reportConstantRedefinition = "none"
62
+ reportImplicitOverride = "none"
63
+ reportImplicitStringConcatenation = "none"
64
+ reportInvalidCast = "none"
65
+ reportMissingModuleSource = "none"
66
+ reportMissingSuperCall = "none"
67
+ reportMissingTypeStubs = "hint"
68
+ reportUnannotatedClassAttribute = "none"
69
+ reportUnknownLambdaType = "none"
70
+ reportUnknownMemberType = "information"
71
+ reportUnnecessaryComparison = "hint"
72
+ reportUnsafeMultipleInheritance = "none"
73
+ reportUnusedCallResult = "none"
74
+ reportUnusedImport = "none"
75
+ reportUnusedParameter = "none"
76
+
77
+ [tool.ruff]
78
+ line-length = 120
79
+ target-version = "py312"
80
+
81
+ [tool.ruff.lint]
82
+ select = [
83
+ "A",
84
+ "ANN001",
85
+ "ANN201",
86
+ "ANN205",
87
+ "ANN206",
88
+ "ASYNC",
89
+ "B",
90
+ "BLE",
91
+ "C4",
92
+ "DTZ",
93
+ "ERA",
94
+ "F",
95
+ "FA",
96
+ "FAST",
97
+ "FBT",
98
+ "FLY",
99
+ "FURB",
100
+ "I",
101
+ "INP",
102
+ "N",
103
+ "NPY",
104
+ "PD",
105
+ "PERF",
106
+ "PIE",
107
+ "PLC0105",
108
+ "PLC0131",
109
+ "PLC0132",
110
+ "PLC0207",
111
+ "PLC0208",
112
+ "PLE",
113
+ "PLR",
114
+ "PLW",
115
+ "PYI",
116
+ "RET",
117
+ "RUF",
118
+ "SIM",
119
+ "TRY",
120
+ "UP",
121
+ "YTT",
122
+ ]
123
+ ignore = [
124
+ "A002",
125
+ "ASYNC119",
126
+ "N818",
127
+ "PLR0904",
128
+ "PLR0911",
129
+ "PLR0912",
130
+ "PLR0913",
131
+ "PLR0915",
132
+ "PLR0917",
133
+ "PLR2004",
134
+ "PLW0603",
135
+ "RET504",
136
+ "RUF001",
137
+ "RUF077",
138
+ "RUF105",
139
+ "RUF106",
140
+ "RUF201",
141
+ "TRY003",
142
+ "UP048",
143
+ "UP051",
144
+ "UP052",
145
+ ]
146
+
147
+ [tool.coverage.run]
148
+ branch = true
149
+ source = ["pregel_redux"]
150
+
151
+ [tool.coverage.report]
152
+ exclude_lines = ['assert_never\(', '^\s*(((async )?def .*?)?\)(\s*->.*?)?:\s*)?\.\.\.\s*(#|$)']
153
+ partial_branches = []
154
+ fail_under = 90
@@ -0,0 +1,98 @@
1
+ from pregel_redux.channels import Channel, Overwrite, Reducer
2
+ from pregel_redux.checkpoints import (
3
+ AsyncCheckpointer,
4
+ Checkpoint,
5
+ Checkpointer,
6
+ CheckpointSource,
7
+ CheckpointTuple,
8
+ InMemoryCheckpointer,
9
+ PendingWrite,
10
+ )
11
+ from pregel_redux.commands import Command, Endpoint, Send
12
+ from pregel_redux.configs import Namespace, RunTarget, Segment
13
+ from pregel_redux.dependencies import Depends, Received, Scope, StateDep
14
+ from pregel_redux.graph import CompiledGraph, PersistentGraph, StateGraph
15
+ from pregel_redux.messages import Entrance, Message
16
+ from pregel_redux.results import Finished, Stopped, StopReason, Waiting
17
+ from pregel_redux.shutdown import RunAborted, ShutdownController, ShutdownSignal, graceful_shutdown
18
+ from pregel_redux.snapshots import (
19
+ FailedTask,
20
+ FinishedTask,
21
+ PendingTask,
22
+ StateSnapshot,
23
+ TaskSnapshot,
24
+ TaskStatus,
25
+ WaitingTask,
26
+ )
27
+ from pregel_redux.streams import (
28
+ CheckpointPart,
29
+ ChildPart,
30
+ CustomPart,
31
+ StoppedPart,
32
+ StreamPart,
33
+ StreamWriter,
34
+ TaskResultPart,
35
+ TaskStartPart,
36
+ UpdatesPart,
37
+ ValuesPart,
38
+ WaitingPart,
39
+ )
40
+ from pregel_redux.task_refs import PullRef, PushRef, StartRef, TaskRef
41
+
42
+ __all__ = [
43
+ "AsyncCheckpointer",
44
+ "Channel",
45
+ "Checkpoint",
46
+ "CheckpointPart",
47
+ "CheckpointSource",
48
+ "CheckpointTuple",
49
+ "Checkpointer",
50
+ "ChildPart",
51
+ "Command",
52
+ "CompiledGraph",
53
+ "CustomPart",
54
+ "Depends",
55
+ "Endpoint",
56
+ "Entrance",
57
+ "FailedTask",
58
+ "Finished",
59
+ "FinishedTask",
60
+ "InMemoryCheckpointer",
61
+ "Message",
62
+ "Namespace",
63
+ "Overwrite",
64
+ "PendingTask",
65
+ "PendingWrite",
66
+ "PersistentGraph",
67
+ "PullRef",
68
+ "PushRef",
69
+ "Received",
70
+ "Reducer",
71
+ "RunAborted",
72
+ "RunTarget",
73
+ "Scope",
74
+ "Segment",
75
+ "Send",
76
+ "ShutdownController",
77
+ "ShutdownSignal",
78
+ "StartRef",
79
+ "StateDep",
80
+ "StateGraph",
81
+ "StateSnapshot",
82
+ "StopReason",
83
+ "Stopped",
84
+ "StoppedPart",
85
+ "StreamPart",
86
+ "StreamWriter",
87
+ "TaskRef",
88
+ "TaskResultPart",
89
+ "TaskSnapshot",
90
+ "TaskStartPart",
91
+ "TaskStatus",
92
+ "UpdatesPart",
93
+ "ValuesPart",
94
+ "Waiting",
95
+ "WaitingPart",
96
+ "WaitingTask",
97
+ "graceful_shutdown",
98
+ ]