-
Notifications
You must be signed in to change notification settings - Fork 272
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Docs modification for better clarification #424
Conversation
Codecov Report
@@ Coverage Diff @@
## 0.0.1-alpha #424 +/- ##
=================================================
- Coverage 98.573% 98.523% -0.051%
=================================================
Files 29 29
Lines 3646 3657 +11
=================================================
+ Hits 3594 3603 +9
- Misses 52 54 +2
|
" the two methods." %(source)) | ||
elif not hasattr(self, target): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
" the two methods." %(source)) | |
elif not hasattr(self, target): | |
" the two methods." %(source)) | |
if not hasattr(self, target): |
" vertices on its own. This is done to maintain" | ||
" clear separation between the functionality of" | ||
" the two methods." %(target)) | ||
else: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
else: |
raise ValueError("Vertex %s is not present in the graph." | ||
" Call Graph.add_vertex() to add a new" | ||
" vertex. Graph.add_edge is only responsible" | ||
" for adding edges and it will not add new" | ||
" vertices on its own. This is done to maintain" | ||
" clear separation between the functionality of" | ||
" the two methods." %(source)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this whole string can be represented as msg = ("Vertex %s is not present in the graph." " Call Graph.add_vertex() to add a new" " vertex. Graph.add_edge is only responsible" " for adding edges and it will not add new" " vertices on its own. This is done to maintain" " clear separation between the functionality of" " the two methods.")
And then just do msg%(source)
. I am not sure if it's syntactically correct. But what I am trying to say is the both the messages only differ in the name of the vertex (source, target) rest of the stuff is same. So using a variable will be helpful to avoid repetition.
pydatastructs/graphs/graph.py
Outdated
Note | ||
==== | ||
Steps to create a graph: | ||
1. Create nodes (AdjacencyListGraphNode or AdjacencyListMatrixNode) | ||
2. Add nodes to the graph | ||
3. Add edges b/w these nodes | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note | |
==== | |
Steps to create a graph: | |
1. Create nodes (AdjacencyListGraphNode or AdjacencyListMatrixNode) | |
2. Add nodes to the graph | |
3. Add edges b/w these nodes | |
Note | |
==== | |
Steps to create a graph: | |
1. Create nodes (AdjacencyListGraphNode or AdjacencyListMatrixNode). | |
2. Add nodes to the graph. | |
3. Add edges between these nodes. | |
* Changed version to 0.0.1-alpha * pydatastructs -> pydatastructs_ for PyPI * pydatasturcts_ -> cz-pydatastructs * Removed incorrect topic * Updated installation instructions on website * Minor typo fix in documentation * Doc improvements (ODA, DODA) and addition of checks in ``graph`` (#424) * Made the API of ``RangeQueryStatic`` consistent (#425) * Added notebook for California road network (#426) * Added salient features of PyDataStructs (#428) * Bumped to 0.0.1-beta * Bumped to 0.0.1 * Updated for master Co-authored-by: Pratik Goyal <pratikgoyal2712@gmail.com>
Modified Docs to resolve discrepancies
References to other Issues or PRs or Relevant literature
Fixes #406
Fixes #423
Brief description of what is fixed or changed
Other comments