[](https://github.com/rappdw/redblackgraph/actions/workflows/ci.yml)
[](https://github.com/rappdw/redblackgraph/actions/workflows/ci.yml)
[](https://pypi.org/project/redblackgraph/)
[](https://pypi.org/project/redblackgraph/)
[](https://www.python.org/downloads/release/python-3120/)
[](https://www.python.org/downloads/release/python-3110/)
[](https://www.python.org/downloads/release/python-3100/)
Red-Black Graph - A DAG of Multiple, Interleaved Binary Trees
----------------------------------
# Introduction
Red-Black Graphs are a specific type of graph, a directed acyclic graph of interleaved binary trees.
This data structure resulted from exploration of efficient representations for family history.
This package presents and implements the underlying linear algebra as well as discusses some interesting applications.
This python module extends both scipy and numpy and also conforms to [dockerutils](https://github.com/rappdw/docker-utils)
conventions for building and running docker images used in module development. There is a script in the bin
directory that can be used to setup the project for development or to prep for reading the notebook.
(`bin/setup-project.sh`). You will want to create an activate a virtual environment prior to running the script.
# Reading the Notebook
A research paper describing the linear algebra underlying Red-Black graphs as well as examples of application can be found in the Jupyter notebook,
"Red Black Graph - A DAG of Multiple, Interleaved Binary Trees.ipynb". To access the notebook
after you've setup the project for development, simply:
* `run-image notebook`
* `open http://localhost:8888/lab`
If you'd prefer to read hard copy, simply run:
`bin/generate-pdf.sh notebooks/Red Black Graph - A DAG of Multiple, Interleaved Binary Trees.ipynb`
A pdf file will be generated into the `build/latex-{datestamped}` directory.
# To Try Things Out...
Run the following:
```shell script
# use crawl-fs to extract a sample data set from FamilySearch
pip install fs-crawler
crawl-fs -i <FamilySearch Ids to seed crawl> -o <output-directory> -b <name portion of output file>
# this will generate a <name>.vertices.csv and <name>.edges.csv file which can be ingested into a RedBlackGraph
pip install RedBlackGraph
# use rbgcf to generate both a simple form and cannonical form of a Red Black Graph (xlsx files)
rbgcf -f <directory and base name of vertices and edges file> -o <output-directory>
# Use excel to view output
```
# Building from Source
RedBlackGraph uses the Meson build system (as of version 0.5.0, migrated from numpy.distutils).
## Requirements
- Python 3.10, 3.11, or 3.12
- Meson >= 1.2.0
- Ninja build tool
- Cython >= 3.0
- NumPy >= 1.26
## Build and Install
```bash
# Install build dependencies
pip install meson-python meson ninja cython numpy
# Build and install in development mode
pip install -e .
# Or build wheel
pip install build
python -m build
```
The Meson build system compiles all C/C++ extensions and Cython modules automatically.
# Building and Publishing Wheels
RedBlackGraph uses `cibuildwheel` to build wheels for multiple platforms and Python versions.
## Quick Start
```bash
# Build wheels for current platform
./bin/build-wheels-cibuildwheel.sh
# Or use cibuildwheel directly
pip install cibuildwheel
cibuildwheel --platform auto --output-dir wheelhouse
```
## Automated Release
Wheels are automatically built and published to PyPI when a version tag is pushed:
```bash
git tag -a v0.5.1 -m "Release version 0.5.1"
git push origin v0.5.1
```
For detailed instructions, see:
- **[PyPI Publishing Guide](docs/PYPI_PUBLISHING.md)** - Complete guide for building and publishing
- **[Release Checklist](RELEASE_CHECKLIST.md)** - Quick reference for releases
# A Note on Implementations
* `redblackgraph.reference` - a pure python implementation. This simple implementation is intended primarily for illustrative purposes.
* `redblackgraph.matrix` and `redblackgrpah.array` - a Numpy C-API extension for efficient computation with the matrix multiplication operator, @, overloaded to support avos sum and product.
* `redblackgraph.sparse_matrix` - an optimized implementation built on scipy's sparse matrix implementation.
Raw data
{
"_id": null,
"home_page": null,
"name": "redblackgraph",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "Daniel Rapp <rappdw@gmail.com>",
"keywords": "graph, algebra, AVOS, sparse, matrix",
"author": null,
"author_email": "Daniel Rapp <rappdw@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/e1/ed/08462ccf97522def7f39d47fb9a8fdcc12eea496cace9ad75c088eeddb1c/redblackgraph-0.5.1.tar.gz",
"platform": null,
"description": "[](https://github.com/rappdw/redblackgraph/actions/workflows/ci.yml)\n[](https://github.com/rappdw/redblackgraph/actions/workflows/ci.yml)\n[](https://pypi.org/project/redblackgraph/) \n[](https://pypi.org/project/redblackgraph/) \n[](https://www.python.org/downloads/release/python-3120/) \n[](https://www.python.org/downloads/release/python-3110/) \n[](https://www.python.org/downloads/release/python-3100/) \n\nRed-Black Graph - A DAG of Multiple, Interleaved Binary Trees\n----------------------------------\n\n# Introduction\n\nRed-Black Graphs are a specific type of graph, a directed acyclic graph of interleaved binary trees.\nThis data structure resulted from exploration of efficient representations for family history.\nThis package presents and implements the underlying linear algebra as well as discusses some interesting applications.\n\nThis python module extends both scipy and numpy and also conforms to [dockerutils](https://github.com/rappdw/docker-utils)\nconventions for building and running docker images used in module development. There is a script in the bin \ndirectory that can be used to setup the project for development or to prep for reading the notebook. \n(`bin/setup-project.sh`). You will want to create an activate a virtual environment prior to running the script.\n\n# Reading the Notebook\n\nA research paper describing the linear algebra underlying Red-Black graphs as well as examples of application can be found in the Jupyter notebook, \n\"Red Black Graph - A DAG of Multiple, Interleaved Binary Trees.ipynb\". To access the notebook \nafter you've setup the project for development, simply: \n* `run-image notebook`\n* `open http://localhost:8888/lab`\n \nIf you'd prefer to read hard copy, simply run: \n\n `bin/generate-pdf.sh notebooks/Red Black Graph - A DAG of Multiple, Interleaved Binary Trees.ipynb` \n\nA pdf file will be generated into the `build/latex-{datestamped}` directory.\n\n# To Try Things Out...\n\nRun the following:\n\n```shell script\n# use crawl-fs to extract a sample data set from FamilySearch\npip install fs-crawler\ncrawl-fs -i <FamilySearch Ids to seed crawl> -o <output-directory> -b <name portion of output file>\n\n# this will generate a <name>.vertices.csv and <name>.edges.csv file which can be ingested into a RedBlackGraph\npip install RedBlackGraph\n# use rbgcf to generate both a simple form and cannonical form of a Red Black Graph (xlsx files)\nrbgcf -f <directory and base name of vertices and edges file> -o <output-directory>\n\n# Use excel to view output\n \n```\n\n# Building from Source\n\nRedBlackGraph uses the Meson build system (as of version 0.5.0, migrated from numpy.distutils).\n\n## Requirements\n- Python 3.10, 3.11, or 3.12\n- Meson >= 1.2.0\n- Ninja build tool\n- Cython >= 3.0\n- NumPy >= 1.26\n\n## Build and Install\n```bash\n# Install build dependencies\npip install meson-python meson ninja cython numpy\n\n# Build and install in development mode\npip install -e .\n\n# Or build wheel\npip install build\npython -m build\n```\n\nThe Meson build system compiles all C/C++ extensions and Cython modules automatically.\n\n# Building and Publishing Wheels\n\nRedBlackGraph uses `cibuildwheel` to build wheels for multiple platforms and Python versions.\n\n## Quick Start\n\n```bash\n# Build wheels for current platform\n./bin/build-wheels-cibuildwheel.sh\n\n# Or use cibuildwheel directly\npip install cibuildwheel\ncibuildwheel --platform auto --output-dir wheelhouse\n```\n\n## Automated Release\n\nWheels are automatically built and published to PyPI when a version tag is pushed:\n\n```bash\ngit tag -a v0.5.1 -m \"Release version 0.5.1\"\ngit push origin v0.5.1\n```\n\nFor detailed instructions, see:\n- **[PyPI Publishing Guide](docs/PYPI_PUBLISHING.md)** - Complete guide for building and publishing\n- **[Release Checklist](RELEASE_CHECKLIST.md)** - Quick reference for releases\n\n# A Note on Implementations\n\n* `redblackgraph.reference` - a pure python implementation. This simple implementation is intended primarily for illustrative purposes.\n* `redblackgraph.matrix` and `redblackgrpah.array` - a Numpy C-API extension for efficient computation with the matrix multiplication operator, @, overloaded to support avos sum and product. \n* `redblackgraph.sparse_matrix` - an optimized implementation built on scipy's sparse matrix implementation. \n \n",
"bugtrack_url": null,
"license": "AGPLv3+",
"summary": "Red Black Graph - AVOS algebra for graph computation",
"version": "0.5.1",
"project_urls": {
"Download": "https://github.com/rappdw/redblackgraph",
"Homepage": "https://github.com/rappdw/redblackgraph",
"Repository": "https://github.com/rappdw/redblackgraph"
},
"split_keywords": [
"graph",
" algebra",
" avos",
" sparse",
" matrix"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "6c4ac191cfdeea6dca4cf9853cda7f91b0c12124e8f71ca27789989939574055",
"md5": "d8439603750e52bfaf0e88854d716041",
"sha256": "9c6d4e3a37d043696ac679b83ea4baed80e7adf50c21c23345fa08dad7bc060b"
},
"downloads": -1,
"filename": "redblackgraph-0.5.1-cp310-cp310-macosx_10_9_x86_64.whl",
"has_sig": false,
"md5_digest": "d8439603750e52bfaf0e88854d716041",
"packagetype": "bdist_wheel",
"python_version": "cp310",
"requires_python": ">=3.10",
"size": 604715,
"upload_time": "2025-10-23T00:34:16",
"upload_time_iso_8601": "2025-10-23T00:34:16.256299Z",
"url": "https://files.pythonhosted.org/packages/6c/4a/c191cfdeea6dca4cf9853cda7f91b0c12124e8f71ca27789989939574055/redblackgraph-0.5.1-cp310-cp310-macosx_10_9_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "12bb9fab029cfdf5cdcc0d0ac351ba9f0e2d50f71863303413203ea6d90f5296",
"md5": "32cebad87547388c5f6a8bc13621f281",
"sha256": "070b13a2229182723eb1496f8871f8515e834ebb71d9c66b04f555520eb08622"
},
"downloads": -1,
"filename": "redblackgraph-0.5.1-cp310-cp310-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "32cebad87547388c5f6a8bc13621f281",
"packagetype": "bdist_wheel",
"python_version": "cp310",
"requires_python": ">=3.10",
"size": 562510,
"upload_time": "2025-10-23T00:34:17",
"upload_time_iso_8601": "2025-10-23T00:34:17.845395Z",
"url": "https://files.pythonhosted.org/packages/12/bb/9fab029cfdf5cdcc0d0ac351ba9f0e2d50f71863303413203ea6d90f5296/redblackgraph-0.5.1-cp310-cp310-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "af96b0160db831f05ac63cce79fdbdd5bc747e436aa8b16a35b49bbd947072b9",
"md5": "e17d34e672749a311429b64faf5ade7a",
"sha256": "dbc1ebaf69738da62d3b52d207d0adc41fb5faf505e048a7396c8b888eb2cfe4"
},
"downloads": -1,
"filename": "redblackgraph-0.5.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "e17d34e672749a311429b64faf5ade7a",
"packagetype": "bdist_wheel",
"python_version": "cp310",
"requires_python": ">=3.10",
"size": 793943,
"upload_time": "2025-10-23T00:34:19",
"upload_time_iso_8601": "2025-10-23T00:34:19.255348Z",
"url": "https://files.pythonhosted.org/packages/af/96/b0160db831f05ac63cce79fdbdd5bc747e436aa8b16a35b49bbd947072b9/redblackgraph-0.5.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "935a2261ceb61b380a6a96cce6da396c4b295bb066d2b619e3074ecdb0e6e11f",
"md5": "826508c5961ced3e5a02661e4d9079ea",
"sha256": "841d4615e1af40f64965ebe9c6004ca40bd8293b7f760ac9a6fb045c1d4d648d"
},
"downloads": -1,
"filename": "redblackgraph-0.5.1-cp310-cp310-win_amd64.whl",
"has_sig": false,
"md5_digest": "826508c5961ced3e5a02661e4d9079ea",
"packagetype": "bdist_wheel",
"python_version": "cp310",
"requires_python": ">=3.10",
"size": 787938,
"upload_time": "2025-10-23T00:34:20",
"upload_time_iso_8601": "2025-10-23T00:34:20.884850Z",
"url": "https://files.pythonhosted.org/packages/93/5a/2261ceb61b380a6a96cce6da396c4b295bb066d2b619e3074ecdb0e6e11f/redblackgraph-0.5.1-cp310-cp310-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "9dcbd09e2191d75106d35b99f077601ba42fbb1f727155ebb6fd8a8080515026",
"md5": "01050b42b2925b3f62e0f5f5db5d9479",
"sha256": "6c77f1783a765f453cf44f3fa0907eba1e42a1d688960edeb3b7f6a697e7d86b"
},
"downloads": -1,
"filename": "redblackgraph-0.5.1-cp311-cp311-macosx_10_9_x86_64.whl",
"has_sig": false,
"md5_digest": "01050b42b2925b3f62e0f5f5db5d9479",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.10",
"size": 601173,
"upload_time": "2025-10-23T00:34:22",
"upload_time_iso_8601": "2025-10-23T00:34:22.542510Z",
"url": "https://files.pythonhosted.org/packages/9d/cb/d09e2191d75106d35b99f077601ba42fbb1f727155ebb6fd8a8080515026/redblackgraph-0.5.1-cp311-cp311-macosx_10_9_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "adb753afcd5ee0811abcc4ae0a087a18b9538e4ad375ff31d8681b5589d8410d",
"md5": "3a5577d6623b860ef8e8d542a5a70bce",
"sha256": "a72c5e5f96bf994b1560b269b5b84e84927931f1e91cca1587307fc7a8ef8c8a"
},
"downloads": -1,
"filename": "redblackgraph-0.5.1-cp311-cp311-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "3a5577d6623b860ef8e8d542a5a70bce",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.10",
"size": 560207,
"upload_time": "2025-10-23T00:34:23",
"upload_time_iso_8601": "2025-10-23T00:34:23.882859Z",
"url": "https://files.pythonhosted.org/packages/ad/b7/53afcd5ee0811abcc4ae0a087a18b9538e4ad375ff31d8681b5589d8410d/redblackgraph-0.5.1-cp311-cp311-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "253a3b026080589c481d1de83776288ac03cd9cf8c5bdf4ef35877b6b21071bd",
"md5": "82f660d57001dd1a1a742d9729d02d2c",
"sha256": "6b32bd16d247c75d1058daa6fd02849ab92d02da8f3133a79c550d14a8af8694"
},
"downloads": -1,
"filename": "redblackgraph-0.5.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "82f660d57001dd1a1a742d9729d02d2c",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.10",
"size": 794617,
"upload_time": "2025-10-23T00:34:25",
"upload_time_iso_8601": "2025-10-23T00:34:25.344694Z",
"url": "https://files.pythonhosted.org/packages/25/3a/3b026080589c481d1de83776288ac03cd9cf8c5bdf4ef35877b6b21071bd/redblackgraph-0.5.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "b2c47ca31e0c28cdaa0d1bd9ef14dfbc408fbe58bd8ba2e4c732c0bcd4c39974",
"md5": "82cd6b2b174c9d13ee5caf6642eb4e18",
"sha256": "ca9db35d28631b88a901c1849bdfa1358270b4baefaf28efee2983998b9ffb33"
},
"downloads": -1,
"filename": "redblackgraph-0.5.1-cp311-cp311-win_amd64.whl",
"has_sig": false,
"md5_digest": "82cd6b2b174c9d13ee5caf6642eb4e18",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": ">=3.10",
"size": 787779,
"upload_time": "2025-10-23T00:34:27",
"upload_time_iso_8601": "2025-10-23T00:34:27.011238Z",
"url": "https://files.pythonhosted.org/packages/b2/c4/7ca31e0c28cdaa0d1bd9ef14dfbc408fbe58bd8ba2e4c732c0bcd4c39974/redblackgraph-0.5.1-cp311-cp311-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "78190327e30b9692f34cb8b27125e45a6fd94f3a8d25ba295ad3256158a2d238",
"md5": "aad8efba99afa694bca1e6433148825d",
"sha256": "bc228625878214dbb86bec3f4308b2d8665576614e808d5dc416a8cb12bac64b"
},
"downloads": -1,
"filename": "redblackgraph-0.5.1-cp312-cp312-macosx_10_9_x86_64.whl",
"has_sig": false,
"md5_digest": "aad8efba99afa694bca1e6433148825d",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.10",
"size": 597938,
"upload_time": "2025-10-23T00:34:28",
"upload_time_iso_8601": "2025-10-23T00:34:28.945079Z",
"url": "https://files.pythonhosted.org/packages/78/19/0327e30b9692f34cb8b27125e45a6fd94f3a8d25ba295ad3256158a2d238/redblackgraph-0.5.1-cp312-cp312-macosx_10_9_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "48b0673ef7e14b750bfa006b619952ce3fedc9d32690d4cc3e37c039f9f36aa6",
"md5": "a8d4f69a7ac0cf16e7f04bf2e802ca69",
"sha256": "3228341ddaa506a42c73d8be90681584e2ce23e54e789e26b6df2ab16a86d2ae"
},
"downloads": -1,
"filename": "redblackgraph-0.5.1-cp312-cp312-macosx_11_0_arm64.whl",
"has_sig": false,
"md5_digest": "a8d4f69a7ac0cf16e7f04bf2e802ca69",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.10",
"size": 555617,
"upload_time": "2025-10-23T00:34:30",
"upload_time_iso_8601": "2025-10-23T00:34:30.668135Z",
"url": "https://files.pythonhosted.org/packages/48/b0/673ef7e14b750bfa006b619952ce3fedc9d32690d4cc3e37c039f9f36aa6/redblackgraph-0.5.1-cp312-cp312-macosx_11_0_arm64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "20f0fab4260e5057866cb65938a7837b67da376d66530cf539532234de287d2a",
"md5": "39bb7f9198c4b20b184a1d3008a79c51",
"sha256": "2842e3f6b787311174bd2b9ebd3bcf59da221b0a302490fe2b41e994267fb396"
},
"downloads": -1,
"filename": "redblackgraph-0.5.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"has_sig": false,
"md5_digest": "39bb7f9198c4b20b184a1d3008a79c51",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.10",
"size": 766289,
"upload_time": "2025-10-23T00:34:32",
"upload_time_iso_8601": "2025-10-23T00:34:32.318285Z",
"url": "https://files.pythonhosted.org/packages/20/f0/fab4260e5057866cb65938a7837b67da376d66530cf539532234de287d2a/redblackgraph-0.5.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "def9c8884d16486084b264209b42f140040b8e3e0b23dc5d243eebe385b66678",
"md5": "d8b52db40e9164e548128ed20203800b",
"sha256": "9532fa5c695857aadf8db239542f06e93db416a6b625aff57924913b9a295a2f"
},
"downloads": -1,
"filename": "redblackgraph-0.5.1-cp312-cp312-win_amd64.whl",
"has_sig": false,
"md5_digest": "d8b52db40e9164e548128ed20203800b",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": ">=3.10",
"size": 774256,
"upload_time": "2025-10-23T00:34:33",
"upload_time_iso_8601": "2025-10-23T00:34:33.994206Z",
"url": "https://files.pythonhosted.org/packages/de/f9/c8884d16486084b264209b42f140040b8e3e0b23dc5d243eebe385b66678/redblackgraph-0.5.1-cp312-cp312-win_amd64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "e1ed08462ccf97522def7f39d47fb9a8fdcc12eea496cace9ad75c088eeddb1c",
"md5": "7402aafc8c6fc66d261960ccb12295f9",
"sha256": "87396ba4f7bc88b4d3bb784356678e5c9434b98fa0e516b4d36de0a7e9ad2395"
},
"downloads": -1,
"filename": "redblackgraph-0.5.1.tar.gz",
"has_sig": false,
"md5_digest": "7402aafc8c6fc66d261960ccb12295f9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 556053,
"upload_time": "2025-10-23T00:34:35",
"upload_time_iso_8601": "2025-10-23T00:34:35.686413Z",
"url": "https://files.pythonhosted.org/packages/e1/ed/08462ccf97522def7f39d47fb9a8fdcc12eea496cace9ad75c088eeddb1c/redblackgraph-0.5.1.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-10-23 00:34:35",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "rappdw",
"github_project": "redblackgraph",
"travis_ci": false,
"coveralls": true,
"github_actions": true,
"requirements": [
{
"name": "numpy",
"specs": [
[
"<",
"2.0"
],
[
">=",
"1.26.0"
]
]
},
{
"name": "scipy",
"specs": [
[
">=",
"1.11.0"
]
]
},
{
"name": "XlsxWriter",
"specs": []
}
],
"lcname": "redblackgraph"
}