The first feature that we will need your opinion for is the Implementation of comments feature from Bintray.
Currently, our plan is to keep Addons as simple as possible thereby reducing the effort that will be needed to maintain it. Keeping that in mind, @darius proposed that we fetch the comments from Bintray and display it in Add Ons rather and have a button(âWrite a Reviewâ) which when clicked will redirect the user to Bintray where he can login and post the comment. This comment will then be fetched within addons.
Why do we plan to do it this way?
Thatâs because by doing this, we will not have to implement our own login system which will reduce the complexity of this project to a great extent while at the same time we can ensure that we donât lose out on this feature.
Here is a mock-up of the same:
The next feature that was the Implementation of download counts.
We have a wide variety of options when it comes to this feature. We can fetch the download counts and graph it out (again a wide set of option on which library to use and also which type of graph to use) or we can just display the total download count. Please provide you thoughts on which one you would like to see in Add Ons by replying to this post . I have created one mock-up for this as well . The graph in the mock-up is actually the graph found on Bintray when we open a Moduleâs page
Thanks again to @raff and all who worked on the Bintray migration.
For any further questions, please contact @darius , @mseaton or me
@reubenv this will be cool! And itâs great that weâll get to take advantage of the move to bintray. But we should also keep in mind that people may choose to store their modules in other places too, so we should make sure the underlying design stays a bit independent of Bintray.
I took a quick peek at some different places that list addons to download:
My takeaway is that the most useful thing to show is usage of the addon. In our case we can get this from download counts (or even better, we could try to get this from usage data reported to atlas.openmrs.org). Second most important would be a rating, and last would be the specific comments. (At least, thatâs generally how others have chosen to do this.)
So, I suggest that you work on things in this order (i.e. âUser reviewsâ should be the last of the three things you implement) and that you give more visual prominence to whatever measures we can come up with of usage.
Other notes:
I still stand (strongly) behind my comment that the Add On Index is just an index, and not the primary store of any of this info. So, people can comment, rate, etc, as supported by bintray, modulus, github releases, etc, and we just index this as best we can.
I vaguely recall from looking at the bintray API that we donât have access to complete historic download counts, but only to those going back a month. We could actually record this data once a month, so we could construct the complete history, but Iâm not sure itâs worth the trouble. E.g. npm only shows you downloads in the last day/week/month, and as a user Iâve never felt like I needed to know more than that.
I donât see any value in showing downloads on a chart by day. This may be interesting for the author (and they can just get this from bintray) but itâs not helpful to someone whoâs trying to decide whether to install the XForms module to see more than just a single summary number of downloads.
If you increase the count using only download buttons in the Add-Ons site, that may cause some issues.
For Example,
I am going to collect the module information from OpenMRS Add-Ons site APIs and then will use that download link (https://modules.openmrs.org/modulus/api/releases/1169/download/dataexchange-1.3.1.omod) to automatically download the module.
In this case, How will you increase the count of the downloads? Here want to think about this API triggers also
@suthagar23 Initially our plan was to get the download counts from Bintray.
In that case ,
a) Thereâs nothing much we can do about the increase of donwload counts due to the API. The reason being that the button indirectly links to Bintray(remember that add-ons is just an index) so each time you donwload a module, youâre indirectly downloading it from Bintray. Hence, the download count is bound to go up as Bintray will not be able to distinguish between an API download and a user download.
b) Secondly, the API calls I assume, will be a rare thing right? In that case it doesnât really matter .
Now, suppose we really want to get some credible info , in that case download counts wouldnât be the way to go. As Darius pointed out, we could use the usage report from Atlas for this(I still have to look into as to how to go about this).
Actually, there may use some modules/OWA(like SysAdmin OWA) which can invoke those APIs to download and install the modules. Users will not directly come to the Add-Ons site to download those modules if they use those type OWAs.
Anyway, If the binary increases due to the API invokes, then Itâs fine
My plan is that in the first release itâs fine if we do not have the total historic downloads, but just âdownloads in the last monthâ, or basically whatever it is that bintray will give us out of the box.
However since weâll be retiring modulus, we need to make sure that we preserve the data on module download counts in case we do want to add this back in the future.
@raff, does your plan for decommissioning modulus include saving its database?
Iâve actually tried to move all data from Modulus to Bintray (I hope I didnât miss anything). The counts are saved as package metadata, see e.g. https://bintray.com/openmrs/omod/adminui/1.2.2 in the âAbout this versionâ section (itâs not displayed nicely, it should say âDownloads (modulus)â).
Iâll archive the database of Modulus in addition to that.
For implementing the download counts feature, I hope to go about it this way:
a) Create a schedule
b) Make it fetch the download counts for each version
c) Include this property within this file.
@darius What are your thoughts regarding this approach?
As far as comments and ratings are concerned, I was unable to find any rest API which would get this done for us.
@raff, are you aware of any such Bintray API which fetches us the comments and ratings for each module? Another thing that I wished to get clarified is as to whether the download counts is just meta data i.e. will it take into account the current downloads as well or does it just show the number of downloads at the time of migration? From what I checked, I guess itâs static because the number of downloads as per modulus is different from that reported by bintray.
I also cannot find comments in the REST API (where they should be called âreviewsâ). Further, the fact that their official Java client doesnât support reviews makes me think itâs not supported via REST. I suggest that you add a review/comment to some module, and then try out various REST calls against that package and see if itâs stored somewhere non-obvious. E.g. maybe itâs stored as an attribute?
That said I would not spend too long searching for this. The ratings are probably more valuable than the reviewsâŠ
Ideally we would be able to show cumulative download counts for all time. To do this weâd need to take the total downloads from Modulus and add them to the total downloads from Bintray.
However Bintray wonât give us cumulative downloads, only the count in the last 30 days (or something like that). Therefore we wonât do the ideal thing I mentioned above. Instead weâll do the simplest thing, and show whatever it is that Bintray gives us.
(Arguably downloads in the last 30 days may be more valuable as a metric to someone deciding whatâs popular, versus cumulative total. For example the infopath formentry module which was downloaded thousands of times years ago, but isnât used anymore.)
@darius@raff While trying to implement this feature, I stumbled upon an issue. We do not have a premium Bintray account and hence we cannot use the Bintray statistics API which is necessary for fetching download counts.
For ex :
On trying to use this, this is the output received.
{"message":"This resource is only available for premium packages."}
How should we now go about getting the download counts?
@raff After discussing the above issue with Darius, I guess we need a Premium Bintray account to be able to implement the feature in the way we had planned. Could you please try and request Bintray to sponsor our premium account(since they have already sponsored our Artifactory account, they might be willing to sponsor this as well)?