Skip to main content

Graph theoretic classes and helper functions.

Project description

Graphworks

Python package

A Python module for efficient graph theoretic programming

Usage

See the wiki

TLDR

First, pip install graphworks

import json
from graphworks.graph import Graph

json_graph = {"label": "my graph", "edges": {"A": ["B"], "B": []}}
graph = Graph("my graph", input_graph=json.dumps(json_graph))
print(graph)

Development

Requirements

  • Python 3.8+
  • virtualenv
  • numpy
  • graphviz

Install the required packages

pip install virtualenv
virtualenv env

Start the virtualenv

source ./env/bin/activate

You can deactivate the virtualenv with

deactivate

Lastly, install the required libraries

pip install -r requirements.txt

Building the package

  • Update the version number in setup.py
  • Run python setup.py sdist bdist_wheel
  • Run twine check dist/*
  • Upload to test PyPi: twine upload --repository-url https://test.pypi.org/legacy/ dist/*
  • Upload to PyPi main: twine upload --skip-existing dist/*
  • To autopublish, tag commit with git tag -a vX.Y.Z -m 'release message
  • Then git push --tags

Diagnostics

  • Run the unit tests: python -m unittest discover tests '*_tests.py'
  • Run unit test coverage: coverage run --source=graphworks/ -m unittest discover tests '*_tests.py'
  • Generate test coverage reports (either works):
    • coverage report --omit="*/test*,*/venv/*"
    • coverage html --omit="*/test*,*/venv/*"

TODO

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

graphworks-0.4.2.tar.gz (14.9 kB view details)

Uploaded Source

Built Distribution

graphworks-0.4.2-py3-none-any.whl (20.0 kB view details)

Uploaded Python 3

File details

Details for the file graphworks-0.4.2.tar.gz.

File metadata

  • Download URL: graphworks-0.4.2.tar.gz
  • Upload date:
  • Size: 14.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for graphworks-0.4.2.tar.gz
Algorithm Hash digest
SHA256 b22f3ddacad7dd9e78430027294e17725d708f738148fa31acbf2181af0df5fb
MD5 2fe0bde9843db6389e8feec62aa3e585
BLAKE2b-256 34cd8ad3be4d6d3c08a167bb9bc7d4b81e819c8ec4eaf0cd41ea3ec4e9489525

See more details on using hashes here.

File details

Details for the file graphworks-0.4.2-py3-none-any.whl.

File metadata

  • Download URL: graphworks-0.4.2-py3-none-any.whl
  • Upload date:
  • Size: 20.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.11.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.10

File hashes

Hashes for graphworks-0.4.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4538be678473cb7d1fe4162c323fa5ddeb4e235ed38a39d614f73d18edc3c731
MD5 a856da35abaf0cc2f88d30e17fa61e08
BLAKE2b-256 f9c8d03a919f17fc72155b3352519dfeb87e7c4285f85e791c0f5900405e05eb

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page