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

Naive edge/vertex removal for GenericGraphs#86

Open
tcfuji wants to merge 5 commits into
JuliaAttic:masterfrom
tcfuji:master
Open

Naive edge/vertex removal for GenericGraphs#86
tcfuji wants to merge 5 commits into
JuliaAttic:masterfrom
tcfuji:master

Conversation

@tcfuji

@tcfuji tcfuji commented May 7, 2014

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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

tcfuji commented May 7, 2014

Copy link
Copy Markdown
Author

@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

lindahua commented May 7, 2014

Copy link
Copy Markdown
Contributor

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
Copy Markdown
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

tcfuji commented May 7, 2014

Copy link
Copy Markdown
Author

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
Copy Markdown
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 notifications@github.com 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