Dijkstar

Latest version: v2.6.0

Safety actively analyzes 628903 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 3

2.6.0

- Fixed import of `MutableMapping`, which was moved from `collections`
to `collections.abc` in Python 3.3 (xSetech)
- Added nominal support for Python 3.9

2.5.0

- Started supporting for Python 3.7 and 3.8 (no code changes required).
- Added support for undirected graphs. The implementation is simple. An
undirected graph is just a directed graph that automatically adds the
edge `(v, u)` when `(u, v)` is added and automatically removes
`(v, u)` when `(u, v)` is removed.
- Added several new `Graph` methods and properties:
- `get_data()` -> Get underlying data dict
- `node_count` -> Return the number of nodes in the graph
- `get_node()` -> Get a node
- `remove_node()` -> Remove a node
- `edge_count` -> Return the number of edges in the graph
- `get_edge()` -> Get an edge
- `remove_edge()` -> Remove an edge
- `subgraph()` -> Get a subgraph with the specified nodes
- `guess_load()` -> Load any supported graph type from file
- `__eq__()` -> Graph equal to other graph? (compares data dicts)
- `__repr__()` -> Graph representation (repr of data dict)
- Made `Graph`'s mapping interface methods (e.g., `__setitem__()`) call
the corresponding method (e.g., `add_node()`) instead of vice versa.
- Made `Graph.add_node()` return the added node.
- Made `Graph.add_edge()` return the added edge.
- Fixed `Graph.add_edge(u, v)` so it *always* updates `v`'s incoming
list, both when `u` is already in the graph and when it's not.
- When a node's incoming list becomes empty, delete it (i.e., the node's
entry in the incoming list, not the node).
- In `single_source_shortest_paths()`, operate on the underlying data
dict instead of going through `Graph`'s mapping interface. This should
improve performance (or, at least, that's the intent).
- Added `debug` flag to `single_source_shortest_paths()`. When set,
additional debugging info is returned along with the path info.
- Improved README, esp. wrt. path-finding examples and cost functions.
- Added and improved docstrings.
- Added more tests.
- Added Travis CI config.
- Started using setuptools instead of distutils for packaging.
- Added `dijkstar.__version__`.
- Improved some other packaging-related stuff.

2.4.0

- Added option of passing an open file to `Graph` read/write methods (in
addition to being able to pass a path name as before).

2.3

- Added incremental count to priority queue entries in
`algorithm.single_source_shortest_paths()`. The reason for this is
given in the standard library docs for the `heapq` module: "The entry
count serves as a tie-breaker so that two [items] with the same
priority are returned in the order they were added. And since no two
entry counts are the same, the tuple comparison will never attempt to
directly compare two tasks."

- Updated project metaata:
- Changed project status from alpha to beta
- Updated author name & email
- Removed support for Python 2.6
- Added support for Python 3.4, 3.5, and 3.6

- Added flake8 config and removed lint

- Added tox config

2.2

- Bugfix: Pass previous edge to cost & heuristic functions instead of
the whole predecessor tuple (node, edge, cost).
- Add a test that passes a cost function to `find_path()`.
- Improve package metadata.

2.1

- Made Python 3 compatible (required one tiny change in test code).
- Added a proper version of break-early.
- Made Graph implement the MutableMapping interface (while keeping the
rest of its public API the same).
- Keep track of each node's incoming nodes (not sure this is useful
though).
- Improved single_source_shortest_paths() (see 782f1e23).
- Use "visited" and "reached" terminology.
- Don't backtrack to already-visited nodes.
- Update the best cost to a node every time it's reached.
- Simplify and remove redundancy.
- Improved docstrings and comments throughout.
- Add more tests.

Page 2 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.