-
Notifications
You must be signed in to change notification settings - Fork 29
Open
Labels
Description
The networkx project is, I think, a project which pathpy might look to be highly compatible with, since its users are among the most likely to use pathpy. To that end it would be useful to refactor the api to be in line with the PEP8 style guide as well as separating the algorithms working on the various objects from those objects (i.e. get_betweeness_preference for Paths becomes a function and not a method).
Here are a few daring proposals (just my opinion 😁) that in part would break backward compatibility 💥
- refactor variable names, methods and properties to PEP8 (e.g.
getSequence()becomessequence()) - move data structures (i.e.
Paths,HigherOrderNetwork,MarkovSequenceandTemporalNetwork) into aclassessub-module (i.e. a folder) (inspired by structure of networkx) - move algorithms into an
algorithmssumodules- this would allow more flexibility and transparency when adding or modifying algorithms later
- by correctly loading them in the relevant
__init__.pythe additional level in the file hierachy would not be visible to the user. - This would mean that a user would call
pathpy.betweenness_preference(paths_inst)instead ofpaths_inst.betweenness_preference()the latter behavior can still be maintained if desired
- Implement a helper functions to convert patphy objects to most adequate
nxequivalent an vice versa- reduces the barrier to entry to users of
nx - benefits from algorithm already implemented in
nx
- reduces the barrier to entry to users of
- Use the
loggingmodule in the python standard library instead of the current custom implementation (Log) - Write documentation in sphinx style (so it can be compiled and viewed in https://readthedocs.org/
I have already implemented some of these changes and kept the functionality equal to the current pathpy implementation (thanks to unit tests) (see here).
Sorry for long post.