Giter Site home page Giter Site logo

graph-path's People

Contributors

jimmymathews avatar

Watchers

 avatar  avatar

graph-path's Issues

Error, not a node name, on "enter" sometimes

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.

Installation cleanup

Change from requiring superuser (sudo) to a home directory install. Also add an uninstall script.

Support for more graph statistics

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.

Disconnected components handling

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.

Different types of shortest paths

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".

Support for node description strings

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.

gif generation for documentation

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.

Multi-page output

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).

File breakup and packaging/distribution

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:

  1. Break into multiple files, with a single point of entry, __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.
  2. Make a zip archive of all these files.
  3. Prepend the python shebang line to the zip file (this is apparently allowed by the zip file format).
  4. Distribute the resulting zip in the same way we are currently distributing the single executable.

Show neighbors without requiring tab completion

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.

Basic refactoring the GUI class

  1. Give much more descriptive names to the state fields and to the functions.
  2. Break up this class, perhaps in light of the Model-View-Controller design pattern. That is:
  • The Model is just the data model, including the current list of nodes, the current node query characters, etc., with no real behaviors.
  • The Controller is responsible for receiving key strokes and comprehending them as instructions for altering the Model and for altering the View state.
  • The View is responsible for outputting terminal codes and characters for the user to see some aspects of the Model state.

Support for name aliases

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.