pgraph-python 0.6.2__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.2/pgraph_python.egg-info → pgraph_python-0.6.4}/PKG-INFO +46 -28
- {pgraph-python-0.6.2 → pgraph_python-0.6.4}/README.md +13 -12
- pgraph_python-0.6.4/RELEASE +1 -0
- {pgraph-python-0.6.2 → pgraph_python-0.6.4/build/lib}/pgraph/PGraph.py +156 -118
- 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/roads.png +0 -0
- pgraph_python-0.6.4/posegraph.py +105 -0
- pgraph_python-0.6.4/pyproject.toml +73 -0
- pgraph_python-0.6.4/src/pgraph/PGraph.py +1912 -0
- pgraph_python-0.6.4/src/pgraph/__init__.py +1 -0
- pgraph-python-0.6.2/MANIFEST.in +0 -4
- pgraph-python-0.6.2/PKG-INFO +0 -158
- pgraph-python-0.6.2/RELEASE +0 -1
- pgraph-python-0.6.2/examples/dotfile.dot +0 -10
- pgraph-python-0.6.2/examples/places.mat +0 -0
- pgraph-python-0.6.2/examples/z.dot +0 -34
- pgraph-python-0.6.2/examples/z.pdf +0 -0
- pgraph-python-0.6.2/examples/zz.dot +0 -53
- pgraph-python-0.6.2/examples/zz.pdf +0 -0
- pgraph-python-0.6.2/pgraph_python.egg-info/SOURCES.txt +0 -26
- pgraph-python-0.6.2/pgraph_python.egg-info/dependency_links.txt +0 -1
- pgraph-python-0.6.2/pgraph_python.egg-info/requires.txt +0 -13
- pgraph-python-0.6.2/pgraph_python.egg-info/top_level.txt +0 -2
- pgraph-python-0.6.2/setup.cfg +0 -4
- pgraph-python-0.6.2/setup.py +0 -87
- {pgraph-python-0.6.2 → pgraph_python-0.6.4}/LICENSE +0 -0
- {pgraph-python-0.6.2 → pgraph_python-0.6.4/build/lib}/pgraph/__init__.py +0 -0
- {pgraph-python-0.6.2 → pgraph_python-0.6.4}/examples/README.md +0 -0
- {pgraph-python-0.6.2 → pgraph_python-0.6.4}/examples/create_json.py +0 -0
- {pgraph-python-0.6.2 → pgraph_python-0.6.4}/examples/places.json +0 -0
- {pgraph-python-0.6.2 → pgraph_python-0.6.4}/examples/queensland.json +0 -0
- {pgraph-python-0.6.2 → pgraph_python-0.6.4}/examples/roads.py +0 -0
- {pgraph-python-0.6.2 → pgraph_python-0.6.4}/examples/routes.json +0 -0
- {pgraph-python-0.6.2 → pgraph_python-0.6.4}/tests/__init__.py +0 -0
- {pgraph-python-0.6.2 → 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,47 +1,65 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: pgraph-python
|
|
3
|
-
Version: 0.6.
|
|
4
|
-
Summary: Mathematical graphs for Python
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
Project-URL:
|
|
10
|
-
Project-URL:
|
|
11
|
-
|
|
12
|
-
|
|
3
|
+
Version: 0.6.4
|
|
4
|
+
Summary: Mathematical graphs for Python
|
|
5
|
+
Project-URL: Homepage, https://github.com/petercorke/pgraph-python
|
|
6
|
+
Project-URL: Bug Tracker, https://github.com/petercorke/pgraph-python/issues
|
|
7
|
+
Project-URL: Documentation, https://petercorke.github.io/pgraph-python
|
|
8
|
+
Project-URL: GitHub Source, https://github.com/petercorke/pgraph-python
|
|
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
|
|
14
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
13
15
|
Classifier: Intended Audience :: Developers
|
|
14
16
|
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
-
Classifier:
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
17
|
+
Classifier: Operating System :: OS Independent
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
23
|
+
Requires-Python: >=3.7
|
|
24
|
+
Requires-Dist: matplotlib
|
|
25
|
+
Requires-Dist: numpy>=1.18.0
|
|
26
|
+
Requires-Dist: scipy
|
|
27
|
+
Requires-Dist: spatialmath-python
|
|
19
28
|
Provides-Extra: dev
|
|
20
|
-
|
|
29
|
+
Requires-Dist: pytest; extra == 'dev'
|
|
30
|
+
Requires-Dist: pytest-cov; extra == 'dev'
|
|
31
|
+
Provides-Extra: docs
|
|
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
|
|
21
38
|
|
|
22
39
|
# PGraph: graphs for Python
|
|
23
40
|
|
|
24
|
-
[](https://github.com/petercorke/robotics-toolbox-python)
|
|
42
|
+
[](https://github.com/petercorke/spatialmath-python)
|
|
25
43
|
[](https://qcr.github.io)
|
|
26
44
|
|
|
27
45
|
[](https://pypi.python.org/pypi/pgraph-python/)
|
|
28
46
|
[](https://pypi.python.org/pypi/pgraph-python/)
|
|
29
|
-
[](https://github.com/petercorke/pgraph-python/blob/
|
|
47
|
+
[](https://github.com/petercorke/pgraph-python/blob/main/LICENSE)
|
|
30
48
|
|
|
31
|
-
[](https://lgtm.com/projects/g/petercorke/pgraph-python/context:python)
|
|
49
|
+
[](https://github.com/petercorke/pgraph-python/actions?query=workflow%3ACI)
|
|
50
|
+
[](https://codecov.io/gh/petercorke/pgraph-python)
|
|
34
51
|

|
|
35
52
|
|
|
36
|
-
- GitHub repository
|
|
37
|
-
- Wiki (examples and details)
|
|
38
|
-
- Documentation
|
|
39
|
-
-
|
|
53
|
+
- [GitHub repository](https://github.com/petercorke/pgraph-python)
|
|
54
|
+
- [Wiki (examples and details)](https://github.com/petercorke/pgraph-python/wiki)
|
|
55
|
+
- [Documentation](https://petercorke.github.io/pgraph-python)
|
|
56
|
+
- [Changelog](https://github.com/petercorke/pgraph-python/blob/main/CHANGELOG.md)
|
|
57
|
+
- Dependencies: [`numpy`](https://numpy.org) [`spatialmath`](https://github.com/bdaiinstitute/spatialmath-python)
|
|
40
58
|
|
|
41
59
|
|
|
42
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.
|
|
43
61
|
|
|
44
|
-

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

|
|
147
165
|
|
|
148
166
|
## MATLAB version
|
|
149
167
|
|
|
150
|
-
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.
|
|
151
169
|
|
|
152
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
|
|
153
171
|
_user data_ is encouraged.
|
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
# PGraph: graphs for Python
|
|
2
2
|
|
|
3
|
-
[](https://github.com/petercorke/robotics-toolbox-python)
|
|
4
|
+
[](https://github.com/petercorke/spatialmath-python)
|
|
4
5
|
[](https://qcr.github.io)
|
|
5
6
|
|
|
6
7
|
[](https://pypi.python.org/pypi/pgraph-python/)
|
|
7
8
|
[](https://pypi.python.org/pypi/pgraph-python/)
|
|
8
|
-
[](https://github.com/petercorke/pgraph-python/blob/
|
|
9
|
+
[](https://github.com/petercorke/pgraph-python/blob/main/LICENSE)
|
|
9
10
|
|
|
10
|
-
[](https://lgtm.com/projects/g/petercorke/pgraph-python/context:python)
|
|
11
|
+
[](https://github.com/petercorke/pgraph-python/actions?query=workflow%3ACI)
|
|
12
|
+
[](https://codecov.io/gh/petercorke/pgraph-python)
|
|
13
13
|

|
|
14
14
|
|
|
15
|
-
- GitHub repository
|
|
16
|
-
- Wiki (examples and details)
|
|
17
|
-
- Documentation
|
|
18
|
-
-
|
|
15
|
+
- [GitHub repository](https://github.com/petercorke/pgraph-python)
|
|
16
|
+
- [Wiki (examples and details)](https://github.com/petercorke/pgraph-python/wiki)
|
|
17
|
+
- [Documentation](https://petercorke.github.io/pgraph-python)
|
|
18
|
+
- [Changelog](https://github.com/petercorke/pgraph-python/blob/main/CHANGELOG.md)
|
|
19
|
+
- Dependencies: [`numpy`](https://numpy.org) [`spatialmath`](https://github.com/bdaiinstitute/spatialmath-python)
|
|
19
20
|
|
|
20
21
|
|
|
21
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.
|
|
22
23
|
|
|
23
|
-

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

|
|
126
127
|
|
|
127
128
|
## MATLAB version
|
|
128
129
|
|
|
129
|
-
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.
|
|
130
131
|
|
|
131
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
|
|
132
133
|
_user data_ is encouraged.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
0.6.1
|