Skip to content
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

use AbstractTrees for traversals #29

Merged
merged 5 commits into from
Jan 12, 2017
Merged

use AbstractTrees for traversals #29

merged 5 commits into from
Jan 12, 2017

Conversation

porterjamesj
Copy link
Collaborator

And drop 0.4 support.

@codecov-io
Copy link

codecov-io commented Jan 11, 2017

Current coverage is 75.20% (diff: 100%)

Merging #29 into master will decrease coverage by 5.69%

@@             master        #29   diff @@
==========================================
  Files             5          6     +1   
  Lines           157        125    -32   
  Methods           0          0          
  Messages          0          0          
  Branches          0          0          
==========================================
- Hits            127         94    -33   
- Misses           30         31     +1   
  Partials          0          0          

Powered by Codecov. Last update 2250542...9e37ac1

@porterjamesj porterjamesj merged commit c102799 into master Jan 12, 2017
@porterjamesj porterjamesj deleted the abstract-trees branch January 12, 2017 00:00
@aviks
Copy link
Member

aviks commented Apr 12, 2017

The tests should probably be updated to the new API, since they show deprecation warnings currently. I ask mainly because looking at the tests is the best way to learn how to use the API.

@porterjamesj
Copy link
Collaborator Author

definitely an oversight on my part, I will make an issue for this. I'm not sure when I will get around to it though :/ PRs welcome if you have the time :)

@porterjamesj
Copy link
Collaborator Author

ahh wait, I remember why I left them now. I wanted to remove them since they more or less are just testing code in AbstractTrees.jl, but I also wanted to make sure that code using the now deprecated iterators from this package wouldn't break. Maybe the right thing to do here is a comment to that test file indicating that these are deprecated? Alternatively, we could just drop them when fixing the inevitable breakage when Julia 0.6 is released (if that hasn't happened yet, I haven't been paying too much attention I'll admit 😬)

@aviks
Copy link
Member

aviks commented Apr 12, 2017

OK, that makes sense. The reason I was looking into this is that the test code does not use AbstractTrees since it is not testing the new methods (PreOrderDFS etc), which means it does not hit #31.

@aviks
Copy link
Member

aviks commented Apr 12, 2017

Actually, I am trying to fix some code to use the new Gumbo.jl, and finding myself very confused. @porterjamesj any assistance appreciated

On Gumbo.jl v0.2.2, before the AbstractTrees change

julia> using Gumbo

julia> n=parsehtml("<body><address>This address...</address></body>");

julia> for c in preorder(n.root)
          println(c)
       end
<HTML><head></head><body><address>This address...</address></body></HTML>
<head></head>
<body><address>This address...</address></body>
<address>This address...</address>
This address...

However, with Gumbo.jl v0.3.0,

julia> using Gumbo

julia> n=parsehtml("<body><address>This address...</address></body>");

julia> for c in preorder(n.root)
          println(c)
       end
<HTML><head></head><body><address>This address...</address></body></HTML>

[Ignore the above, this was an artifact of my local environment. The existing package tests do test for this. Sorry for the noise. ]

@porterjamesj
Copy link
Collaborator Author

no worries!

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

Successfully merging this pull request may close these issues.

3 participants