jimmymathews / graph-path Goto Github PK
View Code? Open in Web Editor NEWExplore graph structure at the command line
Explore graph structure at the command line
Need to explain what library dependencies there are. Including pygtrie
.
Partial-name tab completion leads to state where "enter"ing a non-node-name is allowed, triggering a lookup error.
Example: TP53 is technically not in the HuRI.graphml
graph for some reason. TP53BP1 and several other related names are, which start with TP53. So tab completion of TP5 leads to TP53, the maximal prefix which any name starting with TP5 also has. But TP53 is not itself a name in the database.
This is an easy fix. We just need to use the appropriate calls from the pygtrie
library related to the CharTrie
data structure, and add a simple check.
Note 1: The above can also happen because of manual keystroke entry rather than tab completion.
Note 2: Subsequent tab-completions would lead to enumeration of correct completions in this case, so one can technically avoid this bug during use by zealous use of tab.
Change from requiring superuser (sudo
) to a home directory install. Also add an uninstall script.
Search python igraph library for more easy-to-calculate stats to summarize on first run. Omit ones that would take too long for quick CLI use.
Currently if you request a path between two nodes which are not in the same connected component of the graph, we are not interpreting the igraph API return value correctly and an error is triggered. Let us handle this gracefully. Say, by automatically acting as though the user double-enter-keyed to create a new path.
Replace shortest paths with shortest weighted paths, using edge weights coming from standard statistics. E.g. edge centrality. Add a simple CLI option like "-e" for "calculate edge weights and use these for shortest paths".
Implement the -d --descriptions descriptions_file.txt
functionality as documented in the manpage. Description strings will be automatically shown adjacent to the node names in "vertical" mode. As documented in the manpage.
In README.md, use a different ttyrec-to-GIF converter, one that supports bold and cursor stuff (to show the completion feature better, for example). Also strip the last frames (on the ttyrec itself?), showing "exit". Maybe redo ttyrec, trying Ctrl-C rather than typing 'exit' to terminate the recording.
The current view/display method overflows if the contents are longer than a page.
I think the "final printout" is correct, even if longer than a page, but the lines above this final printout look garbled (repeated lines, random newlines).
To make development more manageable, the codebase should perhaps be split into several relatively independent units and placed into separate files. This is useful for working on multiple changes at once; alterations in one file won't (immediately) affect or be affected by changes in another file.
Doing this, however, changes the distribution mechanism, since we can't just use a single executable Python file anymore. I read about a simple method:
__main__.py
. (Use import
statements to use the other files). While we're at it, let's look into bringing in the Python dependencies here, reducing the end-users' burden.Add a new mode flag (e.g. -p for "preview"?) implementing the following functionality.
When a new node query is initiated (i.e. last entry of model.nodes is ""), show as many neighbors will fit horizontally on a new line below the main entry line. Use non-bold magenta (like the partial completion text).
When the node query string is more specific, show instead completions (rather than neighbors) in this manner.
This way the user has an advance view of what is available before committing to one choice by typing or tabbing.
Implement the -n --names name_aliases_file.txt
functionality as documented in the manpage. Name aliases will be shown everywhere in place of the names as they appear in the topology specification file. This is for when you don't want to have to manually change the topology file, like when it is a large file and you don't want to have to keep backup copies in different formats on your local machine.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.