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 src.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 graphworks.__init__.py
  • Run python -m build
  • 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.5.0.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

graphworks-0.5.0-py3-none-any.whl (12.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: graphworks-0.5.0.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for graphworks-0.5.0.tar.gz
Algorithm Hash digest
SHA256 9155febd4ab365aa6318f3aa8e3bc71ba44c2b9b0f1595e30ec3fbe10adb00dd
MD5 1e0d2b947e58b6902c867462e8cb7dad
BLAKE2b-256 71c69ffeb51b0d60d199d8e9270b63b3c719e7acc99e17394d2fa40cba8c8f87

See more details on using hashes here.

File details

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

File metadata

  • Download URL: graphworks-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 12.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.9.13

File hashes

Hashes for graphworks-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 052834646c28d6c90df2bca5e03ed1f45d76388ea6219f38131f06d05da1446f
MD5 1ed9715cef442ef58f91ca325a8a158b
BLAKE2b-256 10b7dda6cdaf11e2db3240ebe0569b933b0973e662342d17b78dbabdedf64480

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