GitXplorerGitXplorer
p

typed_graphs

public
3 stars
0 forks
0 issues

Commits

List of commits on branch master.
Unverified
5f7bc17967002edf54df3347552d58bb54f54e6f

Update name

ppkch committed 8 years ago
Unverified
25437c52f1615c1f6c47f002872b851217e4dac6

Make the project installable as a package typed_graphs

ppkch committed 8 years ago
Unverified
f542e5ace8c050f81e6678c4ae3136021eb81104

Make IGraph iterable of its nodes

ppkch committed 8 years ago
Unverified
23b7e828e72f0b258c1f3347b16a94144588cd62

Require mypy master instead of latest official release

ppkch committed 8 years ago
Unverified
9df964954c1fab488c78724d81ec7a31373572b8

Remove all implementation details from INode and IGraph

ppkch committed 8 years ago
Unverified
db899e83735c55c55a76223921369c6c9f601a63

Replace INode.adj with Iterable API

ppkch committed 8 years ago

README

The README file for this repository.

Build Status Coverage Status MIT licensed

Type Annotated Graphs in Python

This is not a graph library! It is just the source code for a series of blog articles. It's not tested as extensively as a library should be, and it's also not optimized in any way.

If you do want to use it in your project, the most reasonable implementations are:

The blog posts are here:

They summarize my experience with type hints in a small project. I go through several iterations of graph representation and traversal, and discuss various design and type checking issues. I use python 3.6 and the latest version of mypy.

My workflow used to be:

  • push my code to this repo to run tests / type checker using Travis CI
  • push it to gist, from which it is directly embedded in the blog

It was a good way to test the code shown in the posts. Later, I needed to use this code myself, so I rearranged the folder structure as if it was a regular package. Unfortunately, it means I can't push the entire thing to gist any more.