-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
WIP: Html diff render #78
WIP: Html diff render #78
Conversation
Fixes #69 |
@janakrajchadha What’s the status on this? Just curious since it sounded like we came to an agreement over a week ago that we should not just remove |
@Mr0grog I went deeper into lxml's code to understand where we could alter it to add our own tags. Turns out that there's no parameter which allows us to pass our own tags, we'll have to alter the source code in a few places. |
@danielballan @janakrajchadha does it make sense to merge and deploy this in the mean time, improving the implementation not to cause problems on pages with |
Update: decided in weekly meeting to merge this and iterate later, pending a deeper review of the existing implementation here by @danielballan. |
@Mr0grog @danielballan I was planning to create my own version of |
Sounds good. Shall we leave this PR in limbo in the meantime? |
Sorry I have been slow to respond. Unless someone has a PR they are ready to submit, I would not like to leave this in limbo. I would like to have something for our most critical diff, even if we completely replace it in the near future. |
That is a very fair point. Post v0 a lot of our diffing stuff might get superceded by collaborative projects, but this will suffice for v0. I'll add some additional tests. @janakrajchadha, carry on with your collaborative work with Anastasia. |
As requested by @danielballan, I've added more tests for html diff render. @danielballan, take a look and let me know if these are along the lines of what you had in mind.
@danielballan I'm not sure why I'm getting the |
Good test cases. As you've discovered, bundling static files into a Python package properly is not straightforward. We'll probably find a good reason to do that later (and I'll show you how) but in this case I think it's easier and better to just define the test cases in the code itself. |
@danielballan Fixed, should this be merged now? |
Great, thanks @janakrajchadha. |
This should have been done in #78, but was apparently missed.
This should have been done in #78, but was apparently missed.
This should have been done in edgi-govdata-archiving#78, but was apparently missed.
WIPI've tried and tested this differ. It works well on the few test cases I've tried it on.
There are better ways to implement some parts of the differ but most of the ones I've found include the reconstruction of the HTML tree which leads to loss of attribute data from tags like
<head>
and<body>
.Some changes in the source code of
lxml
would also make this job easier but there's probably a good reason they haven't done that.Please review @danielballan :)