Skip to content
This repository has been archived by the owner on Oct 21, 2021. It is now read-only.

Naive edge/vertex removal for GenericGraphs #86

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

tcfuji
Copy link

@tcfuji tcfuji commented May 7, 2014

If anyone could point me to some references on how to do testing for Julia packages, I'll include the tests in another PR. Also, should we give users a choice to remove edges including v when running remove_vertex!(g, v)?

I'll also update the documentation if all goes well.

@pozorvlak
Copy link
Contributor

The Julia testing framework is documented here, but it's pretty straightforward - take a look at the files in the test directory. And I'd much rather you include tests in this PR, so I can see that your code works from the state of the Travis build :-) Please write the tests and push them up to your master branch - the pull request will be automatically updated and a new Travis build will run.

@pozorvlak
Copy link
Contributor

Also, should we give users a choice to remove edges including v when running remove_vertex!(g, v)?

I'm not sure that we should ever give them the choice not to remove edges touching a vertex that's being removed! @lindahua?

@tcfuji
Copy link
Author

tcfuji commented May 7, 2014

@pozorvlak Thanks for accommodating me (I'm sure it's evident I'm new to all this). Is there an expedient way to do tests in Julia locally without relying on Travis? Right now I'm getting the following:

$ julia runtests.jl
running test/edgelist.jl ...
running test/adjlist.jl ...
running test/inclist.jl ...
running test/graph.jl ...
ERROR: remove_edge! not defined
while loading /Users/tf/Desktop/MyGitProjects/Forks/Graphs.jl/test/graph.jl, in expression starting on line 136
while loading /Users/tf/Desktop/MyGitProjects/Forks/Graphs.jl/runtests.jl, in expression starting on line 20

If possible, I'd like to run some tests locally before pushing the changes into my github repository.

@lindahua
Copy link
Contributor

lindahua commented May 7, 2014

How can an edge be there when one of its vertex no longer exists. I think the behavior of removing an vertex is to remove the vertex together with all incident edges.

@pozorvlak
Copy link
Contributor

@lindahua thanks, that's what I thought too. Now I see why this operation is so difficult to implement efficiently...

@TFGIT yep, that's how you run the tests locally. You're getting that error because the Graphs module isn't exporting remove_edge! - add it to the list of exports in src/Graphs.jl.

@tcfuji
Copy link
Author

tcfuji commented May 7, 2014

I'll edit this PR later to just remove incident edges when running remove_vertex!. Also, I added remove_edge! and remove_vertex! in src/Graphs.jl but I'm getting the same output. Do I need to edit the test/graph.jl file too?

@pozorvlak
Copy link
Contributor

Huh, that's weird - the using Graphs line at the top of src/Graphs.jl
should import all the names exported by Graphs. Can you commit what
you've got and push it up to GitHub (possibly on a different branch) so I
can take a look?

On Wed, May 7, 2014 at 11:08 PM, tfgit [email protected] wrote:

I'll edit this PR later to just remove incident edges when running
remove_vertex!. Also, I added remove_edge! and remove_vertex! in
src/Graphs.jl but I'm getting the same output. Do I need to edit the
test/graph.jl file too?


Reply to this email directly or view it on GitHubhttps://github.com//pull/86#issuecomment-42489771
.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants