Download Counts Feature released for AddOns!

The much-awaited download counts feature has been finally deployed to the production server. Although it has been deployed to production, I suspect that it will take some time before the changes get reflect at .

In the meantime, you may see it in action in our staging server located here

Special thanks to @darius !

CC: @insiderish

Credit goes to @reubenv for implementing the feature and for putting up with my nitpicky code reviews. :slight_smile:

I should add that we fetch the download counts from bintray every few hours, so you won’t actually see the number increment by one right when you download.

1 Like

This is super cool!

1 Like

I greatly missed some sort of download count functionality, and so happy to see it in action. :smile:

Thanks @reubenv and @darius for making it happen!

1 Like

@dkayiwa, @reubenv I just added a feature to list the top downloaded modules, and I’m pushing it to production now. You might have to shift-refresh to see it.

1 Like

@darius that is awesome! Can’t wait to check it out. It seems like you have more coding time these days. :smile:

Awesome @darius ,just tried it out. Never knew that we had so many module downloads in a month!

How about we replace the highlighted modules with the top modules ? If not, is there any particular reason for having those modules as highlighted?

@dkayiwa my thoughts as well :stuck_out_tongue_winking_eye:

Actually I’m pretty surprised/confused by some of the download numbers also.

  • How is Cohort Builder OWA being downloaded 40 times per day? Could there be some bot or CI process that is inflating this?
  • Why are Address Hierarchy and Atom Feed so high also? Because they’re alphabetically early? Or are they really the most used omods?
  • Atom Feed in particular scares me because the description sounds like the old atomfeed module built by @bwolfe many years ago, but it seems to include new releases from soldevelo as part of sync2. (Maybe this is just a small fix that needs to be made?)


Peeking at the bintray stats on atomfeed, it looks like this:

This seems very much like an automated process is downloading it every 2 hours.

True, now that you have mentioned this, I feel download counts really isn’t something that truly reflects the popularity of a module. In Fact, it is quite misleading is what I’d say.

Yes, I also pointed out those higher numbers last night, but I thought, those are most wanted :smile:.


  • Good to have an option to avoid those automated download counts from the actual counts.
  • In the list, Birt Reports (INACTIVE, and mentioned as Do not Download) also included. So is it possible to add the support to avoid these modules from the Top download list? Because it can direct the new users to use those modules when it has some higher download numbers (maybe from the very old implementers)

BTW, Some modules don’t have the icon infront of the module name, So why don’t we give an default icon to those modules which haven’t set the icons yet?

The only way (assuming bintray doesn’t have any such option to filter the download counts yet) would be to implement add-ons own mechanism to count download counts (we’ll probably also need a database for it. @darius and I had discussed this possibility as well while discussing the implementation details for the download counts feature but ultimately went with bintray ).

There are quite a few modules with no icon yet. If we give them a default icon, it doesn’t really look good(I guess we did try this before . Also it doesn’t serve the purpose of the icon which to be unique and hinting at the details of the module it’s representing)

@darius It’s very tricky point!!.

So we need to do some hard corded strategies to show the actual amount of downloads without the automated downloads. Just an idea for this would be,

  1. Let’s take the package org.openmrs.owa.sysadmin.

  2. So we can get the download counts for each day from Bintray (you posted a picture like a chart)

  3. Get the very lower count of the download for a day (It can be the actual download count by the bot for a day)

    Eg : Aug 01 - 1295 | Aug 02 - 1296 | Aug 03 -1295 | Aug 04 - 1297 | …

  4. Subtract that low count (LW) from each day download count (here less count is 1295). So the updated download counts,

    Eg : Aug 01 - 0 | Aug 02 - 1 | Aug 03 - 0 | Aug 04 - 2 | …

    Note : We need to add some restrictions, that the lower count should be greater than a preferred value X for this module (LW > X and X > 0). So we can exclude other module actual download counts from this subtraction.

    Eg : For LBAC module the counts may be → Aug 01 - 0 | Aug 02 - 2 | Aug 03 - 0 | Aug 04 - 1 | …
    Assume X = 5 for this module, So here the Lower count (LW) will be zero (0). So it will not be taken by this method to reduce the download count. we can get the actual count for this module.

  5. Now calculate the total of those downloads and add +1 at the end (for the bot downloads). So now we can get some kind of reduced download counts without the bots.

Definitely, It can’t be actual download count, but we can get some approx amount for the downloads. So it would be better than showing a larger amount as the downloads.

Summary of this idea,

  • We need to find the preferred values X for the modules which have the largest downloads in our dashboard (probably 5 - 6 modules)
  • This method will help us the get the actual download counts without the automated count for those modules which have a very large amount of downloads for last 30 days.
  • Other modules which have the regular download counts will not affect by this method since the preferred value X will not be there or it will be higher than the lower download count (LW).