pgraph-python 0.6.3__tar.gz → 0.6.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.
- pgraph_python-0.6.4/.github/workflows/ci.yml +77 -0
- pgraph_python-0.6.4/.gitignore +9 -0
- pgraph_python-0.6.4/CHANGELOG.md +9 -0
- pgraph_python-0.6.4/Makefile +51 -0
- {pgraph_python-0.6.3/pgraph_python.egg-info → pgraph_python-0.6.4}/PKG-INFO +28 -28
- {pgraph_python-0.6.3 → pgraph_python-0.6.4}/README.md +8 -8
- pgraph_python-0.6.4/RELEASE +1 -0
- pgraph_python-0.6.4/build/lib/pgraph/PGraph.py +1918 -0
- pgraph_python-0.6.4/docs/Makefile +20 -0
- pgraph_python-0.6.4/docs/make.bat +35 -0
- pgraph_python-0.6.4/docs/source/PGraph.rst +7 -0
- pgraph_python-0.6.4/docs/source/conf.py +69 -0
- pgraph_python-0.6.4/docs/source/datastructures.ezdraw +2353 -0
- pgraph_python-0.6.4/docs/source/datastructures.png +0 -0
- pgraph_python-0.6.4/docs/source/dgraph.rst +9 -0
- pgraph_python-0.6.4/docs/source/directed.rst +9 -0
- pgraph_python-0.6.4/docs/source/dvertex.rst +8 -0
- pgraph_python-0.6.4/docs/source/edge.rst +8 -0
- pgraph_python-0.6.4/docs/source/index.rst +26 -0
- pgraph_python-0.6.4/docs/source/matrices.rst +7 -0
- pgraph_python-0.6.4/docs/source/modules.rst +7 -0
- pgraph_python-0.6.4/docs/source/planning.rst +7 -0
- pgraph_python-0.6.4/docs/source/ugraph.rst +9 -0
- pgraph_python-0.6.4/docs/source/undirected.rst +9 -0
- pgraph_python-0.6.4/docs/source/uvertex.rst +8 -0
- pgraph_python-0.6.4/examples/README.md +8 -0
- pgraph_python-0.6.4/examples/create_json.py +69 -0
- pgraph_python-0.6.4/examples/places.json +182 -0
- pgraph_python-0.6.4/examples/queensland.json +1 -0
- pgraph_python-0.6.4/examples/roads.png +0 -0
- pgraph_python-0.6.4/examples/roads.py +39 -0
- pgraph_python-0.6.4/examples/routes.json +31 -0
- pgraph_python-0.6.4/posegraph.py +105 -0
- {pgraph_python-0.6.3 → pgraph_python-0.6.4}/pyproject.toml +9 -9
- {pgraph_python-0.6.3 → pgraph_python-0.6.4/src}/pgraph/PGraph.py +12 -4
- pgraph_python-0.6.4/src/pgraph/__init__.py +1 -0
- pgraph_python-0.6.4/tests/__init__.py +0 -0
- pgraph_python-0.6.3/PKG-INFO +0 -176
- pgraph_python-0.6.3/pgraph_python.egg-info/SOURCES.txt +0 -11
- pgraph_python-0.6.3/pgraph_python.egg-info/dependency_links.txt +0 -1
- pgraph_python-0.6.3/pgraph_python.egg-info/requires.txt +0 -15
- pgraph_python-0.6.3/pgraph_python.egg-info/top_level.txt +0 -1
- pgraph_python-0.6.3/setup.cfg +0 -4
- {pgraph_python-0.6.3 → pgraph_python-0.6.4}/LICENSE +0 -0
- {pgraph_python-0.6.3 → pgraph_python-0.6.4/build/lib}/pgraph/__init__.py +0 -0
- {pgraph_python-0.6.3 → pgraph_python-0.6.4}/tests/test_graph.py +0 -0
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
jobs:
|
|
10
|
+
unittest:
|
|
11
|
+
runs-on: ubuntu-latest
|
|
12
|
+
strategy:
|
|
13
|
+
matrix:
|
|
14
|
+
python-version: ["3.9", "3.10", "3.11", "3.12"]
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v4
|
|
17
|
+
- name: Set up Python ${{ matrix.python-version }}
|
|
18
|
+
uses: actions/setup-python@v5
|
|
19
|
+
with:
|
|
20
|
+
python-version: ${{ matrix.python-version }}
|
|
21
|
+
- name: Install dependencies
|
|
22
|
+
run: |
|
|
23
|
+
python -m pip install --upgrade pip
|
|
24
|
+
pip install .[dev]
|
|
25
|
+
- name: Test with pytest
|
|
26
|
+
run: pytest
|
|
27
|
+
|
|
28
|
+
codecov:
|
|
29
|
+
needs: unittest
|
|
30
|
+
runs-on: ubuntu-latest
|
|
31
|
+
steps:
|
|
32
|
+
- uses: actions/checkout@v4
|
|
33
|
+
- name: Set up Python 3.11
|
|
34
|
+
uses: actions/setup-python@v5
|
|
35
|
+
with:
|
|
36
|
+
python-version: "3.11"
|
|
37
|
+
- name: Install dependencies
|
|
38
|
+
run: |
|
|
39
|
+
python -m pip install --upgrade pip
|
|
40
|
+
pip install -e .[dev]
|
|
41
|
+
- name: Run coverage
|
|
42
|
+
run: |
|
|
43
|
+
pytest --cov=pgraph --cov-report=xml:coverage.xml
|
|
44
|
+
coverage report
|
|
45
|
+
- name: Upload coverage to Codecov
|
|
46
|
+
uses: codecov/codecov-action@v4
|
|
47
|
+
with:
|
|
48
|
+
files: ./coverage.xml
|
|
49
|
+
verbose: true
|
|
50
|
+
|
|
51
|
+
docs:
|
|
52
|
+
if: github.event_name == 'push'
|
|
53
|
+
needs: unittest
|
|
54
|
+
runs-on: ubuntu-latest
|
|
55
|
+
steps:
|
|
56
|
+
- uses: actions/checkout@v4
|
|
57
|
+
- name: Set up Python 3.11
|
|
58
|
+
uses: actions/setup-python@v5
|
|
59
|
+
with:
|
|
60
|
+
python-version: "3.11"
|
|
61
|
+
- name: Install dependencies
|
|
62
|
+
run: |
|
|
63
|
+
python -m pip install --upgrade pip
|
|
64
|
+
pip install .[docs]
|
|
65
|
+
pip install git+https://github.com/petercorke/sphinx-autorun.git
|
|
66
|
+
sudo apt-get update
|
|
67
|
+
sudo apt-get install -y graphviz
|
|
68
|
+
- name: Build docs
|
|
69
|
+
run: |
|
|
70
|
+
make -C docs html
|
|
71
|
+
touch docs/build/html/.nojekyll
|
|
72
|
+
- name: Deploy docs to gh-pages
|
|
73
|
+
uses: peaceiris/actions-gh-pages@v4
|
|
74
|
+
with:
|
|
75
|
+
github_token: ${{ secrets.GITHUB_TOKEN }}
|
|
76
|
+
publish_branch: gh-pages
|
|
77
|
+
publish_dir: ./docs/build/html
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
0.6.3
|
|
2
|
+
|
|
3
|
+
- runs with Numpy2.x
|
|
4
|
+
- changed build system to .toml file
|
|
5
|
+
- misc doco and changes
|
|
6
|
+
- migrate package to src layout (pgraph under src/pgraph)
|
|
7
|
+
- switch build backend to hatchling
|
|
8
|
+
- update CI workflow for main branch and docs publish to gh-pages
|
|
9
|
+
- update repository links and badges from master to main
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
.FORCE:
|
|
2
|
+
|
|
3
|
+
BLUE=\033[0;34m
|
|
4
|
+
BLACK=\033[0;30m
|
|
5
|
+
|
|
6
|
+
help:
|
|
7
|
+
@echo "$(BLUE) make test - run all unit tests"
|
|
8
|
+
@echo " make coverage - run unit tests and coverage report"
|
|
9
|
+
@echo " make docs - build Sphinx documentation"
|
|
10
|
+
@echo " make docupdate - upload Sphinx documentation to GitHub pages"
|
|
11
|
+
@echo " make dist - build dist files"
|
|
12
|
+
@echo " make upload - upload to PyPI"
|
|
13
|
+
@echo " make clean - remove dist and docs build files"
|
|
14
|
+
@echo " make help - this message$(BLACK)"
|
|
15
|
+
|
|
16
|
+
test:
|
|
17
|
+
python -m unittest
|
|
18
|
+
|
|
19
|
+
coverage:
|
|
20
|
+
coverage run --omit=\*/test_\* -m unittest
|
|
21
|
+
coverage report
|
|
22
|
+
|
|
23
|
+
docs: .FORCE
|
|
24
|
+
(cd docs; make html)
|
|
25
|
+
open docs/build/html/index.html
|
|
26
|
+
|
|
27
|
+
docupdate: docs
|
|
28
|
+
git clone https://github.com/petercorke/pgraph-python.git --branch gh-pages --single-branch /tmp/gh-pages
|
|
29
|
+
cp -r docs/build/html/. /tmp/gh-pages
|
|
30
|
+
(cd /tmp/gh-pages; git add .; git commit -m "rebuilt docs"; git push origin gh-pages)
|
|
31
|
+
rm -rf /tmp/gh-pages
|
|
32
|
+
|
|
33
|
+
dist: .FORCE
|
|
34
|
+
#$(MAKE) test
|
|
35
|
+
python -m build
|
|
36
|
+
|
|
37
|
+
pypi: .FORCE
|
|
38
|
+
validate-pyproject pyproject.toml
|
|
39
|
+
@if ! git diff --quiet || ! git diff --cached --quiet; then \
|
|
40
|
+
echo "Error: uncommitted changes present, aborting upload"; exit 1; \
|
|
41
|
+
fi
|
|
42
|
+
$(eval VERSION := $(shell grep '^version' pyproject.toml | sed 's/version = "\(.*\)"/\1/'))
|
|
43
|
+
python -m build
|
|
44
|
+
twine upload dist/*
|
|
45
|
+
git tag v$(VERSION)
|
|
46
|
+
git push origin v$(VERSION)
|
|
47
|
+
|
|
48
|
+
clean: .FORCE
|
|
49
|
+
(cd docs; make clean)
|
|
50
|
+
-rm -r *.egg-info
|
|
51
|
+
-rm -r dist
|
|
@@ -1,65 +1,65 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: pgraph-python
|
|
3
|
-
Version: 0.6.
|
|
3
|
+
Version: 0.6.4
|
|
4
4
|
Summary: Mathematical graphs for Python
|
|
5
|
-
Author-email: Peter Corke <rvc@petercorke.com>
|
|
6
5
|
Project-URL: Homepage, https://github.com/petercorke/pgraph-python
|
|
7
|
-
Project-URL: Bug Tracker, https://github.com/
|
|
6
|
+
Project-URL: Bug Tracker, https://github.com/petercorke/pgraph-python/issues
|
|
8
7
|
Project-URL: Documentation, https://petercorke.github.io/pgraph-python
|
|
9
8
|
Project-URL: GitHub Source, https://github.com/petercorke/pgraph-python
|
|
10
|
-
Project-URL: Changelog, https://github.com/petercorke/pgraph-python/blob/
|
|
11
|
-
Project-URL: Coverage, https://codecov.io/gh/petercorke/
|
|
12
|
-
|
|
9
|
+
Project-URL: Changelog, https://github.com/petercorke/pgraph-python/blob/main/CHANGELOG.md
|
|
10
|
+
Project-URL: Coverage, https://codecov.io/gh/petercorke/pgraph-python
|
|
11
|
+
Author-email: Peter Corke <rvc@petercorke.com>
|
|
12
|
+
License-File: LICENSE
|
|
13
|
+
Keywords: Laplacian matrix,a* search,adjacency matrix,directed graph,graph,optimal path,plotting,python,undirected graph
|
|
13
14
|
Classifier: Development Status :: 5 - Production/Stable
|
|
14
15
|
Classifier: Intended Audience :: Developers
|
|
16
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
15
18
|
Classifier: Programming Language :: Python :: 3.9
|
|
16
19
|
Classifier: Programming Language :: Python :: 3.10
|
|
17
20
|
Classifier: Programming Language :: Python :: 3.11
|
|
18
21
|
Classifier: Programming Language :: Python :: 3.12
|
|
19
22
|
Classifier: Programming Language :: Python :: 3.13
|
|
20
|
-
Classifier: License :: OSI Approved :: MIT License
|
|
21
|
-
Classifier: Operating System :: OS Independent
|
|
22
23
|
Requires-Python: >=3.7
|
|
23
|
-
|
|
24
|
-
License-File: LICENSE
|
|
25
|
-
Requires-Dist: spatialmath-python
|
|
24
|
+
Requires-Dist: matplotlib
|
|
26
25
|
Requires-Dist: numpy>=1.18.0
|
|
27
26
|
Requires-Dist: scipy
|
|
28
|
-
Requires-Dist:
|
|
27
|
+
Requires-Dist: spatialmath-python
|
|
29
28
|
Provides-Extra: dev
|
|
30
|
-
Requires-Dist: pytest; extra ==
|
|
31
|
-
Requires-Dist: pytest-cov; extra ==
|
|
29
|
+
Requires-Dist: pytest; extra == 'dev'
|
|
30
|
+
Requires-Dist: pytest-cov; extra == 'dev'
|
|
32
31
|
Provides-Extra: docs
|
|
33
|
-
Requires-Dist:
|
|
34
|
-
Requires-Dist:
|
|
35
|
-
Requires-Dist: sphinx-
|
|
36
|
-
Requires-Dist: sphinx-
|
|
37
|
-
Requires-Dist: sphinx-
|
|
32
|
+
Requires-Dist: recommonmark; extra == 'docs'
|
|
33
|
+
Requires-Dist: sphinx; extra == 'docs'
|
|
34
|
+
Requires-Dist: sphinx-autorun; extra == 'docs'
|
|
35
|
+
Requires-Dist: sphinx-favicon; extra == 'docs'
|
|
36
|
+
Requires-Dist: sphinx-rtd-theme; extra == 'docs'
|
|
37
|
+
Description-Content-Type: text/markdown
|
|
38
38
|
|
|
39
39
|
# PGraph: graphs for Python
|
|
40
40
|
|
|
41
|
-
[](https://github.com/petercorke/robotics-toolbox-python)
|
|
42
42
|
[](https://github.com/petercorke/spatialmath-python)
|
|
43
43
|
[](https://qcr.github.io)
|
|
44
44
|
|
|
45
45
|
[](https://pypi.python.org/pypi/pgraph-python/)
|
|
46
46
|
[](https://pypi.python.org/pypi/pgraph-python/)
|
|
47
|
-
[](https://github.com/petercorke/pgraph-python/blob/
|
|
47
|
+
[](https://github.com/petercorke/pgraph-python/blob/main/LICENSE)
|
|
48
48
|
|
|
49
|
-
[](https://github.com/petercorke/pgraph-python/actions?query=workflow%3ACI)
|
|
50
|
+
[](https://codecov.io/gh/petercorke/pgraph-python)
|
|
51
51
|

|
|
52
52
|
|
|
53
53
|
- [GitHub repository](https://github.com/petercorke/pgraph-python)
|
|
54
54
|
- [Wiki (examples and details)](https://github.com/petercorke/pgraph-python/wiki)
|
|
55
55
|
- [Documentation](https://petercorke.github.io/pgraph-python)
|
|
56
|
-
- [Changelog](https://github.com/petercorke/pgraph-python/blob/
|
|
56
|
+
- [Changelog](https://github.com/petercorke/pgraph-python/blob/main/CHANGELOG.md)
|
|
57
57
|
- Dependencies: [`numpy`](https://numpy.org) [`spatialmath`](https://github.com/bdaiinstitute/spatialmath-python)
|
|
58
58
|
|
|
59
59
|
|
|
60
60
|
This Python package allows the manipulation of directed and non-directed graphs. Also supports embedded graphs. It is suitable for graphs with thousands of nodes.
|
|
61
61
|
|
|
62
|
-

|
|
63
63
|
|
|
64
64
|
```
|
|
65
65
|
from pgraph import *
|
|
@@ -161,11 +161,11 @@ for f in f1.neighbours():
|
|
|
161
161
|
|
|
162
162
|
The key objects and their interactions are shown below.
|
|
163
163
|
|
|
164
|
-

|
|
165
165
|
|
|
166
166
|
## MATLAB version
|
|
167
167
|
|
|
168
|
-
This is a re-engineered version of [PGraph.m](https://github.com/petercorke/spatialmath-matlab/blob/
|
|
168
|
+
This is a re-engineered version of [PGraph.m](https://github.com/petercorke/spatialmath-matlab/blob/main/PGraph.m) which ships as part of the [Spatial Math Toolbox for MATLAB](https://github.com/petercorke/spatialmath-matlab). This class is used to support bundle adjustment, pose-graph SLAM and various planners such as PRM, RRT and Lattice.
|
|
169
169
|
|
|
170
170
|
The Python version was designed from the start to work with directed and undirected graphs, whereas directed graphs were a late addition to the MATLAB version. Semantics are similar but not identical. In particular the use of subclassing rather than references to
|
|
171
171
|
_user data_ is encouraged.
|
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
# PGraph: graphs for Python
|
|
2
2
|
|
|
3
|
-
[](https://github.com/petercorke/robotics-toolbox-python)
|
|
4
4
|
[](https://github.com/petercorke/spatialmath-python)
|
|
5
5
|
[](https://qcr.github.io)
|
|
6
6
|
|
|
7
7
|
[](https://pypi.python.org/pypi/pgraph-python/)
|
|
8
8
|
[](https://pypi.python.org/pypi/pgraph-python/)
|
|
9
|
-
[](https://github.com/petercorke/pgraph-python/blob/
|
|
9
|
+
[](https://github.com/petercorke/pgraph-python/blob/main/LICENSE)
|
|
10
10
|
|
|
11
|
-
[](https://github.com/petercorke/pgraph-python/actions?query=workflow%3ACI)
|
|
12
|
+
[](https://codecov.io/gh/petercorke/pgraph-python)
|
|
13
13
|

|
|
14
14
|
|
|
15
15
|
- [GitHub repository](https://github.com/petercorke/pgraph-python)
|
|
16
16
|
- [Wiki (examples and details)](https://github.com/petercorke/pgraph-python/wiki)
|
|
17
17
|
- [Documentation](https://petercorke.github.io/pgraph-python)
|
|
18
|
-
- [Changelog](https://github.com/petercorke/pgraph-python/blob/
|
|
18
|
+
- [Changelog](https://github.com/petercorke/pgraph-python/blob/main/CHANGELOG.md)
|
|
19
19
|
- Dependencies: [`numpy`](https://numpy.org) [`spatialmath`](https://github.com/bdaiinstitute/spatialmath-python)
|
|
20
20
|
|
|
21
21
|
|
|
22
22
|
This Python package allows the manipulation of directed and non-directed graphs. Also supports embedded graphs. It is suitable for graphs with thousands of nodes.
|
|
23
23
|
|
|
24
|
-

|
|
25
25
|
|
|
26
26
|
```
|
|
27
27
|
from pgraph import *
|
|
@@ -123,11 +123,11 @@ for f in f1.neighbours():
|
|
|
123
123
|
|
|
124
124
|
The key objects and their interactions are shown below.
|
|
125
125
|
|
|
126
|
-

|
|
127
127
|
|
|
128
128
|
## MATLAB version
|
|
129
129
|
|
|
130
|
-
This is a re-engineered version of [PGraph.m](https://github.com/petercorke/spatialmath-matlab/blob/
|
|
130
|
+
This is a re-engineered version of [PGraph.m](https://github.com/petercorke/spatialmath-matlab/blob/main/PGraph.m) which ships as part of the [Spatial Math Toolbox for MATLAB](https://github.com/petercorke/spatialmath-matlab). This class is used to support bundle adjustment, pose-graph SLAM and various planners such as PRM, RRT and Lattice.
|
|
131
131
|
|
|
132
132
|
The Python version was designed from the start to work with directed and undirected graphs, whereas directed graphs were a late addition to the MATLAB version. Semantics are similar but not identical. In particular the use of subclassing rather than references to
|
|
133
133
|
_user data_ is encouraged.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.6.1
|