These are chat archives for biojs/biojs

19th
Feb 2019
Shubham Awasthi
@awasthishubh
Feb 19 07:36
biojs/edu!7 please review this :D
Nikhil Vats
@Nikhil-Vats
Feb 19 13:15
@yochannah I checked out the code for downloads issue, everything is fine there, I think there is an issue in the backend part, anyway I can fix this issue using a npm module, can I proceed and use a module?
Yo Yehudi
@yochannah
Feb 19 13:17
I think so, but isn't the code python, not node?
Sarthak Sehgal
@sarthak-sehgal
Feb 19 13:47
@Nikhil-Vats, I suggest you try to solve it from the backend (which is written on python). The backend is returning a downloads number (probably from npm) but it seems to be incorrect.
Shubham Awasthi
@awasthishubh
Feb 19 14:47
I checked the backend. It's django. It's using values for forks, stars, contributor from db and are not updated instantly. We can use github and npm apis instead of using db.
I would like to do this if you allow.
Nikhil Vats
@Nikhil-Vats
Feb 19 15:08
@sarthak-sehgal , As @awasthishubh said the backend is not getting values from npm, @yochannah I can get the number of downloads by using a npm module, yes the code is in django but we can make a seperate file for node.js in which we can get these details and then show it in downloads. What do you think?
Shubham Awasthi
@awasthishubh
Feb 19 15:31
I don't think that will be a good practice. If it's in django, we will do it in django way.
Moreover you'll be needed to run a seperate node server for running that node file.
Yo Yehudi
@yochannah
Feb 19 15:36
I think I agree with @awasthishubh - let's try and keep the codebase standardised
Nikhil Vats
@Nikhil-Vats
Feb 19 15:37
Okay, I will try to fix the issue using django only.
Yo Yehudi
@yochannah
Feb 19 15:38
:+1:
Sarthak Sehgal
@sarthak-sehgal
Feb 19 15:46
@awasthishubh, we are running a cron job to keep the data updated. It basically gets all the data and updates the database at a regular interval.
The backend is using the APIs only to fetch the data from sources like GitHub and npm though there seems to be a discrepency with the number of downloads.
Shubham Awasthi
@awasthishubh
Feb 19 15:50
Oh that's why my Fork got updated on page after few hours! So the problem is with crown job code only.
Shubham Awasthi
@awasthishubh
Feb 19 16:13
I think I got the problem. It's calculating downloads from github releases instead of npm
Yo Yehudi
@yochannah
Feb 19 16:13
nice spot!!
Shubham Awasthi
@awasthishubh
Feb 19 16:40
Okay I got the problem. It is calculating dowloads of github repo.
for cytoscape above urls returns an array and it's calculating its length which is 11
what we are getting as download count.
Yo Yehudi
@yochannah
Feb 19 16:50
lol - that's quite funny and makes sense. Can you fix it?
npm download numbers would probably make more sense!
Shubham Awasthi
@awasthishubh
Feb 19 16:51
Yes. I'm on it. :D
Nikhil Vats
@Nikhil-Vats
Feb 19 17:13
@yochannah @sarthak-sehgal I sent a PR (biojs/biojs-frontend#83) for biojs/biojs-frontend#34. As @DennisSchwartz commented on the issue page, I have linked https://edu.biojs.net to Guide in NavBar for now and shifted the guide page to README.md. Please have a look whenever you are free.
Yo Yehudi
@yochannah
Feb 19 17:14
@Nikhil-Vats awesome!
Nikhil Vats
@Nikhil-Vats
Feb 19 17:17
Screenshot from 2019-02-19 22-47-20.png
As you can see in the image, the search results are not looking very nice, I think they can be presented in a better and more informative form. Can I open an issue regarding this and work on it?
Shubham Awasthi
@awasthishubh
Feb 19 17:26
NPM api doesn't gives total download count. It gives download count for range or point of time.
Should I return weekly downloads? npmjs page shows weekly downloads only.
Sarthak Sehgal
@sarthak-sehgal
Feb 19 17:48
@Nikhil-Vats go ahead with the search UI
Sarthak Sehgal
@sarthak-sehgal
Feb 19 17:55
@awasthishubh nice find! You could replace it with the weekly downloads and change the name from the frontend too for now. It can be extended for all downloads by giving an arbitrary start date
till today (let's say Jan 1, 1980 to 19 Feb, 2019) I think. :)
Shubham Awasthi
@awasthishubh
Feb 19 17:58
Thanks! :D. Yes it'll work. Should I do that?
Sarthak Sehgal
@sarthak-sehgal
Feb 19 18:04
Sure! Don't forget to run the tests. :)
Shubham Awasthi
@awasthishubh
Feb 19 18:35
Yes! 😄
Shubham Awasthi
@awasthishubh
Feb 19 22:14
Just realised npm api limits download count results to last 18months.
It's there in the doc that I sent above.
@sarthak-sehgal Should I try to get total downloads by sending multiple requests each with range of 18months or should I go with weekly downloads?
I think weekly downloads is just fine.
Shubham Awasthi
@awasthishubh
Feb 19 22:21
Npmjs.com also shows weekly downloads only.