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.
Files changed (55) hide show
  1. pgraph_python-0.6.4/.github/workflows/ci.yml +77 -0
  2. pgraph_python-0.6.4/.gitignore +9 -0
  3. pgraph_python-0.6.4/CHANGELOG.md +9 -0
  4. pgraph_python-0.6.4/Makefile +51 -0
  5. {pgraph-python-0.6.2/pgraph_python.egg-info → pgraph_python-0.6.4}/PKG-INFO +46 -28
  6. {pgraph-python-0.6.2 → pgraph_python-0.6.4}/README.md +13 -12
  7. pgraph_python-0.6.4/RELEASE +1 -0
  8. {pgraph-python-0.6.2 → pgraph_python-0.6.4/build/lib}/pgraph/PGraph.py +156 -118
  9. pgraph_python-0.6.4/docs/Makefile +20 -0
  10. pgraph_python-0.6.4/docs/make.bat +35 -0
  11. pgraph_python-0.6.4/docs/source/PGraph.rst +7 -0
  12. pgraph_python-0.6.4/docs/source/conf.py +69 -0
  13. pgraph_python-0.6.4/docs/source/datastructures.ezdraw +2353 -0
  14. pgraph_python-0.6.4/docs/source/datastructures.png +0 -0
  15. pgraph_python-0.6.4/docs/source/dgraph.rst +9 -0
  16. pgraph_python-0.6.4/docs/source/directed.rst +9 -0
  17. pgraph_python-0.6.4/docs/source/dvertex.rst +8 -0
  18. pgraph_python-0.6.4/docs/source/edge.rst +8 -0
  19. pgraph_python-0.6.4/docs/source/index.rst +26 -0
  20. pgraph_python-0.6.4/docs/source/matrices.rst +7 -0
  21. pgraph_python-0.6.4/docs/source/modules.rst +7 -0
  22. pgraph_python-0.6.4/docs/source/planning.rst +7 -0
  23. pgraph_python-0.6.4/docs/source/ugraph.rst +9 -0
  24. pgraph_python-0.6.4/docs/source/undirected.rst +9 -0
  25. pgraph_python-0.6.4/docs/source/uvertex.rst +8 -0
  26. pgraph_python-0.6.4/examples/roads.png +0 -0
  27. pgraph_python-0.6.4/posegraph.py +105 -0
  28. pgraph_python-0.6.4/pyproject.toml +73 -0
  29. pgraph_python-0.6.4/src/pgraph/PGraph.py +1912 -0
  30. pgraph_python-0.6.4/src/pgraph/__init__.py +1 -0
  31. pgraph-python-0.6.2/MANIFEST.in +0 -4
  32. pgraph-python-0.6.2/PKG-INFO +0 -158
  33. pgraph-python-0.6.2/RELEASE +0 -1
  34. pgraph-python-0.6.2/examples/dotfile.dot +0 -10
  35. pgraph-python-0.6.2/examples/places.mat +0 -0
  36. pgraph-python-0.6.2/examples/z.dot +0 -34
  37. pgraph-python-0.6.2/examples/z.pdf +0 -0
  38. pgraph-python-0.6.2/examples/zz.dot +0 -53
  39. pgraph-python-0.6.2/examples/zz.pdf +0 -0
  40. pgraph-python-0.6.2/pgraph_python.egg-info/SOURCES.txt +0 -26
  41. pgraph-python-0.6.2/pgraph_python.egg-info/dependency_links.txt +0 -1
  42. pgraph-python-0.6.2/pgraph_python.egg-info/requires.txt +0 -13
  43. pgraph-python-0.6.2/pgraph_python.egg-info/top_level.txt +0 -2
  44. pgraph-python-0.6.2/setup.cfg +0 -4
  45. pgraph-python-0.6.2/setup.py +0 -87
  46. {pgraph-python-0.6.2 → pgraph_python-0.6.4}/LICENSE +0 -0
  47. {pgraph-python-0.6.2 → pgraph_python-0.6.4/build/lib}/pgraph/__init__.py +0 -0
  48. {pgraph-python-0.6.2 → pgraph_python-0.6.4}/examples/README.md +0 -0
  49. {pgraph-python-0.6.2 → pgraph_python-0.6.4}/examples/create_json.py +0 -0
  50. {pgraph-python-0.6.2 → pgraph_python-0.6.4}/examples/places.json +0 -0
  51. {pgraph-python-0.6.2 → pgraph_python-0.6.4}/examples/queensland.json +0 -0
  52. {pgraph-python-0.6.2 → pgraph_python-0.6.4}/examples/roads.py +0 -0
  53. {pgraph-python-0.6.2 → pgraph_python-0.6.4}/examples/routes.json +0 -0
  54. {pgraph-python-0.6.2 → pgraph_python-0.6.4}/tests/__init__.py +0 -0
  55. {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
+ docs/build
2
+ dist/
3
+ *.code-workspace
4
+ __pycache__
5
+ *.egg-info
6
+ .vscode/
7
+ *.pdf
8
+ *.dot
9
+ *.mat
@@ -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
1
+ Metadata-Version: 2.4
2
2
  Name: pgraph-python
3
- Version: 0.6.2
4
- Summary: Mathematical graphs for Python.
5
- Home-page: https://github.com/petercorke/pgraph-python
6
- Author: Peter Corke
7
- Author-email: rvc@petercorke.com
8
- License: MIT
9
- Project-URL: Source, https://github.com/petercorke/bdsim
10
- Project-URL: Tracker, https://github.com/petercorke/bdsim/issues
11
- Keywords: python graph directed-graph undirected-graph a*-search adjacency-matrix Laplacian-matrix plotting optimal-path
12
- Classifier: Development Status :: 4 - Beta
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: Programming Language :: Python :: 3 :: Only
16
- Requires-Python: >=3.6
17
- Description-Content-Type: text/markdown
18
- Provides-Extra: docs
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
- License-File: LICENSE
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
- [![A Python Robotics Package](https://raw.githubusercontent.com/petercorke/robotics-toolbox-python/master/.github/svg/py_collection.min.svg)](https://github.com/petercorke/robotics-toolbox-python)
41
+ [![A Python Robotics Package](https://raw.githubusercontent.com/petercorke/robotics-toolbox-python/main/.github/svg/py_collection.min.svg)](https://github.com/petercorke/robotics-toolbox-python)
42
+ [![Powered by Spatial Maths](https://raw.githubusercontent.com/petercorke/spatialmath-python/master/.github/svg/sm_powered.min.svg)](https://github.com/petercorke/spatialmath-python)
25
43
  [![QUT Centre for Robotics Open Source](https://github.com/qcr/qcr.github.io/raw/master/misc/badge.svg)](https://qcr.github.io)
26
44
 
27
45
  [![PyPI version fury.io](https://badge.fury.io/py/pgraph-python.svg)](https://pypi.python.org/pypi/pgraph-python/)
28
46
  [![PyPI pyversions](https://img.shields.io/pypi/pyversions/pgraph-python)](https://pypi.python.org/pypi/pgraph-python/)
29
- [![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/petercorke/pgraph-python/blob/master/LICENSE)
47
+ [![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/petercorke/pgraph-python/blob/main/LICENSE)
30
48
 
31
- [![Build Status](https://github.com/petercorke/pgraph-python/workflows/build/badge.svg?branch=master)](https://github.com/petercorke/pgraph-python/actions?query=workflow%3Abuild)
32
- [![Coverage](https://codecov.io/gh/petercorke/pgraph-python/branch/master/graph/badge.svg)](https://codecov.io/gh/petercorke/pgraph-python)
33
- [![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/petercorke/pgraph-python.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/petercorke/pgraph-python/context:python)
49
+ [![Build Status](https://github.com/petercorke/pgraph-python/actions/workflows/ci.yml/badge.svg)](https://github.com/petercorke/pgraph-python/actions?query=workflow%3ACI)
50
+ [![Coverage](https://codecov.io/gh/petercorke/pgraph-python/branch/main/graph/badge.svg)](https://codecov.io/gh/petercorke/pgraph-python)
34
51
  ![pypi downloads](https://img.shields.io/pypi/dw/pgraph-python)
35
52
 
36
- - GitHub repository: [https://github.com/petercorke/pgraph-python](https://github.com/petercorke/pgraph-python)
37
- - Wiki (examples and details) [https://github.com/petercorke/pgraph-python/wiki](https://github.com/petercorke/pgraph-python/wiki)
38
- - Documentation: [https://petercorke.github.io/pgraph-python](https://petercorke.github.io/pgraph-python)
39
- - Dependencies: `numpy`
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
- ![road network](https://github.com/petercorke/pgraph-python/raw/master/examples/roads.png)
62
+ ![road network](https://github.com/petercorke/pgraph-python/raw/main/examples/roads.png)
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
- ![data structures](https://github.com/petercorke/pgraph-python/raw/master/docs/source/datastructures.png)
164
+ ![data structures](https://github.com/petercorke/pgraph-python/raw/main/docs/source/datastructures.png)
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/master/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.
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
- [![A Python Robotics Package](https://raw.githubusercontent.com/petercorke/robotics-toolbox-python/master/.github/svg/py_collection.min.svg)](https://github.com/petercorke/robotics-toolbox-python)
3
+ [![A Python Robotics Package](https://raw.githubusercontent.com/petercorke/robotics-toolbox-python/main/.github/svg/py_collection.min.svg)](https://github.com/petercorke/robotics-toolbox-python)
4
+ [![Powered by Spatial Maths](https://raw.githubusercontent.com/petercorke/spatialmath-python/master/.github/svg/sm_powered.min.svg)](https://github.com/petercorke/spatialmath-python)
4
5
  [![QUT Centre for Robotics Open Source](https://github.com/qcr/qcr.github.io/raw/master/misc/badge.svg)](https://qcr.github.io)
5
6
 
6
7
  [![PyPI version fury.io](https://badge.fury.io/py/pgraph-python.svg)](https://pypi.python.org/pypi/pgraph-python/)
7
8
  [![PyPI pyversions](https://img.shields.io/pypi/pyversions/pgraph-python)](https://pypi.python.org/pypi/pgraph-python/)
8
- [![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/petercorke/pgraph-python/blob/master/LICENSE)
9
+ [![GitHub license](https://img.shields.io/github/license/Naereen/StrapDown.js.svg)](https://github.com/petercorke/pgraph-python/blob/main/LICENSE)
9
10
 
10
- [![Build Status](https://github.com/petercorke/pgraph-python/workflows/build/badge.svg?branch=master)](https://github.com/petercorke/pgraph-python/actions?query=workflow%3Abuild)
11
- [![Coverage](https://codecov.io/gh/petercorke/pgraph-python/branch/master/graph/badge.svg)](https://codecov.io/gh/petercorke/pgraph-python)
12
- [![Language grade: Python](https://img.shields.io/lgtm/grade/python/g/petercorke/pgraph-python.svg?logo=lgtm&logoWidth=18)](https://lgtm.com/projects/g/petercorke/pgraph-python/context:python)
11
+ [![Build Status](https://github.com/petercorke/pgraph-python/actions/workflows/ci.yml/badge.svg)](https://github.com/petercorke/pgraph-python/actions?query=workflow%3ACI)
12
+ [![Coverage](https://codecov.io/gh/petercorke/pgraph-python/branch/main/graph/badge.svg)](https://codecov.io/gh/petercorke/pgraph-python)
13
13
  ![pypi downloads](https://img.shields.io/pypi/dw/pgraph-python)
14
14
 
15
- - GitHub repository: [https://github.com/petercorke/pgraph-python](https://github.com/petercorke/pgraph-python)
16
- - Wiki (examples and details) [https://github.com/petercorke/pgraph-python/wiki](https://github.com/petercorke/pgraph-python/wiki)
17
- - Documentation: [https://petercorke.github.io/pgraph-python](https://petercorke.github.io/pgraph-python)
18
- - Dependencies: `numpy`
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
- ![road network](https://github.com/petercorke/pgraph-python/raw/master/examples/roads.png)
24
+ ![road network](https://github.com/petercorke/pgraph-python/raw/main/examples/roads.png)
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
- ![data structures](https://github.com/petercorke/pgraph-python/raw/master/docs/source/datastructures.png)
126
+ ![data structures](https://github.com/petercorke/pgraph-python/raw/main/docs/source/datastructures.png)
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/master/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
+ 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