RENCI / xDCIShare

xDCIShare is a collaborative website being developed for better access to data and models of scientific domains. xDCIShare is derived directly from the NSF-funded HydroShare codebase.
https://www.xdcishare.org
BSD 3-Clause "New" or "Revised" License
0 stars 1 forks source link

[#42] WIP Replace Mezzanine comments with django contrib comments #49

Closed alexlemann closed 7 years ago

alexlemann commented 7 years ago

@cbcrenci Could you review when you get a chance please?

cbcunc commented 7 years ago

@alexlemann, I'm at SciPy getting back to RENCI on the 18th. What would be the impact if I could not review this until then?

alexlemann commented 7 years ago

@cbcunc Yes, that sounds fine. Any input about whether this seems like a reasonable direction is appreciated.

Just for an update, this is definitely a WIP. 42-remove-mez-models now builds on this branch. A basic create/view resource workflow is now working again as well as new user registration, but there is obviously a lot of code affected by these changes and issues to work out yet.

Also, CCing @rayi113 as an update.

alexlemann commented 7 years ago

@cbcunc I'm now thinking that the approach in remove-mez-models was gping too far into trying to fix metadata, but I think that this work on comments is still correct. Could you please review when you get a chance?

If you agree that it's headed down the correct direction, I can work on making the templates pretty.

cbcunc commented 7 years ago

@alexlemann: getting right on it.

cbcunc commented 7 years ago

@alexlemann: I looked at the code and found it OK. I installed and ran the branch locally and it seems OK. I approve of using stock django_comments. The main thing about it is that django_comments lose the ability to have replies to a specific comment, it's just one long list of comments without threads. I'll have to check with Ray if that's going to be OK. It's a step backwards from what mezzanine offers, but it may be sufficient. I'll get back to you but I'm inclined to say this is going to be OK. I'm also running the theme tests now to see if we broke any tests. I think there are no tests for comments per se. But there need to be. That leads into something else Michael and I will talk to you about later (putting the slenium integration PR into xDCIShare instead of Hydroshare).

cbcunc commented 7 years ago

@alexlemann: OK, all 638 tests pass including the theme tests (so no tests got broken, meaning there are probably no comment tests). And Ray said the lack of threaded replies is OK considering there is low utilization of comments in Hydroshare. So I am still inclined to merge this. I just need to do some quick queries on Hydroshare.org to see how many actual comments and replies are out there. There is nothing about this PR which migrates exsiting comments in the database from mezzanine comments to django_comments, correct?

cbcunc commented 7 years ago

@alexlemann: Also just realized django_comments doesn't provide for ratings on comments (or replies).

cbcunc commented 7 years ago

@rayi113: My investigation of www.hydroshare.org finds:

1) 98 comments from 45 distinct users. 2) 57 ratings on comments from 44 distinct users. 3) 22 comments are replies from 10 distinct users.

Notes:

1) select count(*) from django_comments; select count(distinct(user_id)) from django_comments; 2) select count(*) from generic_rating where content_type_id=134; select count(distinct(user_id)) from generic_rating where content_type_id=134; 3) len([tc.user_id for tc in ThreadedComment.objects.all() if tc.replied_to]) len(set([tc.user_id for tc in ThreadedComment.objects.all() if tc.replied_to]))

cbcunc commented 7 years ago

@alexlemann, @rayi113: Finally, even though django.contrib.comments is now in an external project, it is deprecated in Django 1.7 with a warning to use something like Disqus. Hydroshare has already had some discussion of using Disqus, I think. So I expect it to be revisited at some point. Anyway, since comments on www.hydroshare.org are only in the double digits, I'm merging this without replies, ratings, or tests.