vcsgraph 0.1.2__tar.gz → 0.3.3__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.
- {vcsgraph-0.1.2 → vcsgraph-0.3.3}/Cargo.lock +28 -21
- {vcsgraph-0.1.2 → vcsgraph-0.3.3}/Cargo.toml +2 -2
- {vcsgraph-0.1.2/vcsgraph.egg-info → vcsgraph-0.3.3}/PKG-INFO +18 -18
- {vcsgraph-0.1.2 → vcsgraph-0.3.3}/README.md +14 -14
- vcsgraph-0.3.3/crates/graph/Cargo.toml +25 -0
- vcsgraph-0.3.3/crates/graph/src/bfs.rs +754 -0
- vcsgraph-0.3.3/crates/graph/src/graph.rs +2228 -0
- vcsgraph-0.3.3/crates/graph/src/known_graph.rs +1142 -0
- {vcsgraph-0.1.2 → vcsgraph-0.3.3}/crates/graph/src/lib.rs +65 -40
- vcsgraph-0.3.3/crates/graph/src/parents_provider.rs +366 -0
- {vcsgraph-0.1.2 → vcsgraph-0.3.3}/crates/graph/src/test.rs +1 -1
- {vcsgraph-0.1.2 → vcsgraph-0.3.3}/crates/graph/src/tsort.rs +182 -185
- {vcsgraph-0.1.2 → vcsgraph-0.3.3}/crates/graph-py/Cargo.toml +2 -1
- vcsgraph-0.3.3/crates/graph-py/src/lib.rs +2280 -0
- vcsgraph-0.3.3/pyproject.toml +120 -0
- {vcsgraph-0.1.2 → vcsgraph-0.3.3}/vcsgraph/__init__.py +1 -1
- vcsgraph-0.3.3/vcsgraph/graph.py +338 -0
- vcsgraph-0.3.3/vcsgraph/known_graph.py +24 -0
- {vcsgraph-0.1.2 → vcsgraph-0.3.3}/vcsgraph/tests/test_graph.py +38 -20
- {vcsgraph-0.1.2 → vcsgraph-0.3.3/vcsgraph.egg-info}/PKG-INFO +18 -18
- {vcsgraph-0.1.2 → vcsgraph-0.3.3}/vcsgraph.egg-info/SOURCES.txt +3 -12
- vcsgraph-0.3.3/vcsgraph.egg-info/requires.txt +4 -0
- vcsgraph-0.1.2/.coveragerc +0 -7
- vcsgraph-0.1.2/.dockerignore +0 -2
- vcsgraph-0.1.2/.github/CODEOWNERS +0 -1
- vcsgraph-0.1.2/.github/dependabot.yaml +0 -18
- vcsgraph-0.1.2/.github/workflows/pythonpackage.yml +0 -48
- vcsgraph-0.1.2/.github/workflows/wheels.yaml +0 -137
- vcsgraph-0.1.2/.gitignore +0 -16
- vcsgraph-0.1.2/.mailmap +0 -5
- vcsgraph-0.1.2/.rsyncexclude +0 -23
- vcsgraph-0.1.2/.testr.conf +0 -4
- vcsgraph-0.1.2/CODE_OF_CONDUCT.md +0 -76
- vcsgraph-0.1.2/crates/graph/Cargo.toml +0 -20
- vcsgraph-0.1.2/crates/graph/src/parents_provider.rs +0 -75
- vcsgraph-0.1.2/crates/graph-py/src/lib.rs +0 -425
- vcsgraph-0.1.2/pyproject.toml +0 -107
- vcsgraph-0.1.2/vcsgraph/.gitignore +0 -1
- vcsgraph-0.1.2/vcsgraph/graph.py +0 -1661
- vcsgraph-0.1.2/vcsgraph/known_graph.py +0 -370
- vcsgraph-0.1.2/vcsgraph.egg-info/requires.txt +0 -4
- {vcsgraph-0.1.2 → vcsgraph-0.3.3}/COPYING.txt +0 -0
- {vcsgraph-0.1.2 → vcsgraph-0.3.3}/MANIFEST.in +0 -0
- {vcsgraph-0.1.2 → vcsgraph-0.3.3}/setup.cfg +0 -0
- {vcsgraph-0.1.2 → vcsgraph-0.3.3}/setup.py +0 -0
- {vcsgraph-0.1.2 → vcsgraph-0.3.3}/vcsgraph/errors.py +0 -0
- {vcsgraph-0.1.2 → vcsgraph-0.3.3}/vcsgraph/py.typed +0 -0
- {vcsgraph-0.1.2 → vcsgraph-0.3.3}/vcsgraph/tests/__init__.py +0 -0
- {vcsgraph-0.1.2 → vcsgraph-0.3.3}/vcsgraph/tests/test_known_graph.py +0 -0
- {vcsgraph-0.1.2 → vcsgraph-0.3.3}/vcsgraph/tests/test_tsort.py +0 -0
- {vcsgraph-0.1.2 → vcsgraph-0.3.3}/vcsgraph/tsort.py +0 -0
- {vcsgraph-0.1.2 → vcsgraph-0.3.3}/vcsgraph.egg-info/dependency_links.txt +0 -0
- {vcsgraph-0.1.2 → vcsgraph-0.3.3}/vcsgraph.egg-info/top_level.txt +0 -0
|
@@ -4,10 +4,11 @@ version = 4
|
|
|
4
4
|
|
|
5
5
|
[[package]]
|
|
6
6
|
name = "graph-py"
|
|
7
|
-
version = "0.
|
|
7
|
+
version = "0.3.3"
|
|
8
8
|
dependencies = [
|
|
9
9
|
"pyo3",
|
|
10
|
-
"
|
|
10
|
+
"rustc-hash",
|
|
11
|
+
"vcs-graph",
|
|
11
12
|
]
|
|
12
13
|
|
|
13
14
|
[[package]]
|
|
@@ -18,15 +19,15 @@ checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
|
|
|
18
19
|
|
|
19
20
|
[[package]]
|
|
20
21
|
name = "lazy_static"
|
|
21
|
-
version = "1.5.
|
|
22
|
+
version = "1.5.1"
|
|
22
23
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
23
|
-
checksum = "
|
|
24
|
+
checksum = "20870f649af7073d53e38067b2a84312175d56ea15217e1b15bc83506ec50afb"
|
|
24
25
|
|
|
25
26
|
[[package]]
|
|
26
27
|
name = "libc"
|
|
27
|
-
version = "0.2.
|
|
28
|
+
version = "0.2.186"
|
|
28
29
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
29
|
-
checksum = "
|
|
30
|
+
checksum = "68ab91017fe16c622486840e4c83c9a37afeff978bd239b5293d61ece587de66"
|
|
30
31
|
|
|
31
32
|
[[package]]
|
|
32
33
|
name = "maplit"
|
|
@@ -57,9 +58,9 @@ dependencies = [
|
|
|
57
58
|
|
|
58
59
|
[[package]]
|
|
59
60
|
name = "pyo3"
|
|
60
|
-
version = "0.
|
|
61
|
+
version = "0.30.1"
|
|
61
62
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
62
|
-
checksum = "
|
|
63
|
+
checksum = "229ca13b8a15bb0d1487b81ab975bfcd97513416499a8312011b6036e42e0de4"
|
|
63
64
|
dependencies = [
|
|
64
65
|
"libc",
|
|
65
66
|
"once_cell",
|
|
@@ -71,18 +72,18 @@ dependencies = [
|
|
|
71
72
|
|
|
72
73
|
[[package]]
|
|
73
74
|
name = "pyo3-build-config"
|
|
74
|
-
version = "0.
|
|
75
|
+
version = "0.30.1"
|
|
75
76
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
76
|
-
checksum = "
|
|
77
|
+
checksum = "70130e2b6dd1ee589a8788026a429561ca5c40fa7a2fa7914c2282eddae24700"
|
|
77
78
|
dependencies = [
|
|
78
79
|
"target-lexicon",
|
|
79
80
|
]
|
|
80
81
|
|
|
81
82
|
[[package]]
|
|
82
83
|
name = "pyo3-ffi"
|
|
83
|
-
version = "0.
|
|
84
|
+
version = "0.30.1"
|
|
84
85
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
85
|
-
checksum = "
|
|
86
|
+
checksum = "5e7ff73c555c286d212d4ce7e5fbda845a973c4f61bd5f160f5f2c3c2a04d1c4"
|
|
86
87
|
dependencies = [
|
|
87
88
|
"libc",
|
|
88
89
|
"pyo3-build-config",
|
|
@@ -90,9 +91,9 @@ dependencies = [
|
|
|
90
91
|
|
|
91
92
|
[[package]]
|
|
92
93
|
name = "pyo3-macros"
|
|
93
|
-
version = "0.
|
|
94
|
+
version = "0.30.1"
|
|
94
95
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
95
|
-
checksum = "
|
|
96
|
+
checksum = "c46d2e5862c7bb8207e3b639f713dda3c499933444784154c11d013c5a691b60"
|
|
96
97
|
dependencies = [
|
|
97
98
|
"proc-macro2",
|
|
98
99
|
"pyo3-macros-backend",
|
|
@@ -102,13 +103,12 @@ dependencies = [
|
|
|
102
103
|
|
|
103
104
|
[[package]]
|
|
104
105
|
name = "pyo3-macros-backend"
|
|
105
|
-
version = "0.
|
|
106
|
+
version = "0.30.1"
|
|
106
107
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
107
|
-
checksum = "
|
|
108
|
+
checksum = "38b89f066f2ae72a2aef52d1537ca2fcd104440ebfadee06e97aa90738a25b9b"
|
|
108
109
|
dependencies = [
|
|
109
110
|
"heck",
|
|
110
111
|
"proc-macro2",
|
|
111
|
-
"pyo3-build-config",
|
|
112
112
|
"quote",
|
|
113
113
|
"syn",
|
|
114
114
|
]
|
|
@@ -122,11 +122,17 @@ dependencies = [
|
|
|
122
122
|
"proc-macro2",
|
|
123
123
|
]
|
|
124
124
|
|
|
125
|
+
[[package]]
|
|
126
|
+
name = "rustc-hash"
|
|
127
|
+
version = "2.1.3"
|
|
128
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
129
|
+
checksum = "6b1e7f9a428571be2dc5bc0505c13fb6bf936822b894ec87abf8a08a4e51742d"
|
|
130
|
+
|
|
125
131
|
[[package]]
|
|
126
132
|
name = "syn"
|
|
127
|
-
version = "
|
|
133
|
+
version = "3.0.9"
|
|
128
134
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
129
|
-
checksum = "
|
|
135
|
+
checksum = "d78c8dee4c7bf0e14673097256fed6142ce9d3b85a408189d07482442145823b"
|
|
130
136
|
dependencies = [
|
|
131
137
|
"proc-macro2",
|
|
132
138
|
"quote",
|
|
@@ -146,10 +152,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
|
146
152
|
checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
|
|
147
153
|
|
|
148
154
|
[[package]]
|
|
149
|
-
name = "
|
|
150
|
-
version = "3.
|
|
155
|
+
name = "vcs-graph"
|
|
156
|
+
version = "3.6.0"
|
|
151
157
|
dependencies = [
|
|
152
158
|
"lazy_static",
|
|
153
159
|
"maplit",
|
|
154
160
|
"pyo3",
|
|
161
|
+
"rustc-hash",
|
|
155
162
|
]
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: vcsgraph
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.3
|
|
4
4
|
Summary: Graph algorithms for version control systems
|
|
5
|
-
Requires-Python: >=3.
|
|
5
|
+
Requires-Python: >=3.10
|
|
6
6
|
Description-Content-Type: text/markdown
|
|
7
7
|
License-File: COPYING.txt
|
|
8
8
|
Provides-Extra: dev
|
|
9
|
-
Requires-Dist: mypy==
|
|
10
|
-
Requires-Dist: ruff==0.
|
|
9
|
+
Requires-Dist: mypy==2.4.0; extra == "dev"
|
|
10
|
+
Requires-Dist: ruff==0.17.1; extra == "dev"
|
|
11
11
|
Dynamic: license-file
|
|
12
12
|
|
|
13
13
|
# vcsgraph
|
|
@@ -66,10 +66,10 @@ from vcsgraph import topo_sort
|
|
|
66
66
|
|
|
67
67
|
# Define a graph as a list of (node, parents) tuples
|
|
68
68
|
graph = [
|
|
69
|
-
(b
|
|
70
|
-
(b
|
|
71
|
-
(b
|
|
72
|
-
(b
|
|
69
|
+
(b"rev1", []),
|
|
70
|
+
(b"rev2", [b"rev1"]),
|
|
71
|
+
(b"rev3", [b"rev1"]),
|
|
72
|
+
(b"rev4", [b"rev2", b"rev3"]),
|
|
73
73
|
]
|
|
74
74
|
|
|
75
75
|
# Sort nodes topologically (parents before children)
|
|
@@ -83,17 +83,17 @@ from vcsgraph import Graph, DictParentsProvider
|
|
|
83
83
|
|
|
84
84
|
# Create a parents provider from a dictionary
|
|
85
85
|
ancestry = {
|
|
86
|
-
b
|
|
87
|
-
b
|
|
88
|
-
b
|
|
89
|
-
b
|
|
90
|
-
b
|
|
86
|
+
b"rev1": (b"null:",),
|
|
87
|
+
b"rev2a": (b"rev1",),
|
|
88
|
+
b"rev2b": (b"rev1",),
|
|
89
|
+
b"rev3": (b"rev2a",),
|
|
90
|
+
b"rev4": (b"rev3", b"rev2b"),
|
|
91
91
|
}
|
|
92
92
|
parents_provider = DictParentsProvider(ancestry)
|
|
93
93
|
|
|
94
94
|
# Create a graph and find merge bases
|
|
95
95
|
graph = Graph(parents_provider)
|
|
96
|
-
merge_base = graph.find_merge_base(b
|
|
96
|
+
merge_base = graph.find_merge_base(b"rev2a", b"rev2b")
|
|
97
97
|
```
|
|
98
98
|
|
|
99
99
|
### Working with Known Graphs
|
|
@@ -103,14 +103,14 @@ from vcsgraph import KnownGraph
|
|
|
103
103
|
|
|
104
104
|
# Create a known graph from parent relationships
|
|
105
105
|
parent_map = {
|
|
106
|
-
b
|
|
107
|
-
b
|
|
108
|
-
b
|
|
106
|
+
b"rev1": (b"null:",),
|
|
107
|
+
b"rev2": (b"rev1",),
|
|
108
|
+
b"rev3": (b"rev2",),
|
|
109
109
|
}
|
|
110
110
|
kg = KnownGraph(parent_map)
|
|
111
111
|
|
|
112
112
|
# Get heads (revisions with no children)
|
|
113
|
-
heads = kg.heads([b
|
|
113
|
+
heads = kg.heads([b"rev1", b"rev2", b"rev3"])
|
|
114
114
|
```
|
|
115
115
|
|
|
116
116
|
## Performance
|
|
@@ -54,10 +54,10 @@ from vcsgraph import topo_sort
|
|
|
54
54
|
|
|
55
55
|
# Define a graph as a list of (node, parents) tuples
|
|
56
56
|
graph = [
|
|
57
|
-
(b
|
|
58
|
-
(b
|
|
59
|
-
(b
|
|
60
|
-
(b
|
|
57
|
+
(b"rev1", []),
|
|
58
|
+
(b"rev2", [b"rev1"]),
|
|
59
|
+
(b"rev3", [b"rev1"]),
|
|
60
|
+
(b"rev4", [b"rev2", b"rev3"]),
|
|
61
61
|
]
|
|
62
62
|
|
|
63
63
|
# Sort nodes topologically (parents before children)
|
|
@@ -71,17 +71,17 @@ from vcsgraph import Graph, DictParentsProvider
|
|
|
71
71
|
|
|
72
72
|
# Create a parents provider from a dictionary
|
|
73
73
|
ancestry = {
|
|
74
|
-
b
|
|
75
|
-
b
|
|
76
|
-
b
|
|
77
|
-
b
|
|
78
|
-
b
|
|
74
|
+
b"rev1": (b"null:",),
|
|
75
|
+
b"rev2a": (b"rev1",),
|
|
76
|
+
b"rev2b": (b"rev1",),
|
|
77
|
+
b"rev3": (b"rev2a",),
|
|
78
|
+
b"rev4": (b"rev3", b"rev2b"),
|
|
79
79
|
}
|
|
80
80
|
parents_provider = DictParentsProvider(ancestry)
|
|
81
81
|
|
|
82
82
|
# Create a graph and find merge bases
|
|
83
83
|
graph = Graph(parents_provider)
|
|
84
|
-
merge_base = graph.find_merge_base(b
|
|
84
|
+
merge_base = graph.find_merge_base(b"rev2a", b"rev2b")
|
|
85
85
|
```
|
|
86
86
|
|
|
87
87
|
### Working with Known Graphs
|
|
@@ -91,14 +91,14 @@ from vcsgraph import KnownGraph
|
|
|
91
91
|
|
|
92
92
|
# Create a known graph from parent relationships
|
|
93
93
|
parent_map = {
|
|
94
|
-
b
|
|
95
|
-
b
|
|
96
|
-
b
|
|
94
|
+
b"rev1": (b"null:",),
|
|
95
|
+
b"rev2": (b"rev1",),
|
|
96
|
+
b"rev3": (b"rev2",),
|
|
97
97
|
}
|
|
98
98
|
kg = KnownGraph(parent_map)
|
|
99
99
|
|
|
100
100
|
# Get heads (revisions with no children)
|
|
101
|
-
heads = kg.heads([b
|
|
101
|
+
heads = kg.heads([b"rev1", b"rev2", b"rev3"])
|
|
102
102
|
```
|
|
103
103
|
|
|
104
104
|
## Performance
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "vcs-graph"
|
|
3
|
+
version = "3.6.0"
|
|
4
|
+
authors = [ "Martin Packman <gzlist@googlemail.com>", "Jelmer Vernooij <jelmer@jelmer.uk>"]
|
|
5
|
+
edition = "2021"
|
|
6
|
+
description = "Graph algorithms for version control systems: topological sort, merge-aware sort, parent maps, and ancestry queries."
|
|
7
|
+
license = "GPL-2.0-or-later"
|
|
8
|
+
homepage = "https://www.breezy-vcs.org/"
|
|
9
|
+
repository = "https://github.com/breezy-team/vcsgraph"
|
|
10
|
+
readme = "README.md"
|
|
11
|
+
keywords = ["vcs", "graph", "toposort", "dag", "breezy"]
|
|
12
|
+
categories = ["algorithms", "data-structures"]
|
|
13
|
+
|
|
14
|
+
[lib]
|
|
15
|
+
|
|
16
|
+
[dependencies]
|
|
17
|
+
lazy_static = "1.4.0"
|
|
18
|
+
pyo3 = { workspace = true, optional = true }
|
|
19
|
+
rustc-hash = "2"
|
|
20
|
+
|
|
21
|
+
[dev-dependencies]
|
|
22
|
+
maplit = "1.0.2"
|
|
23
|
+
|
|
24
|
+
[features]
|
|
25
|
+
pyo3 = ["dep:pyo3"]
|