Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

graphworks

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

graphworks

Graph theoretic classes and helper functions.

  • 0.5.0
  • PyPI
  • Socket score

Maintainers
1

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

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc